[REL] Heavensblessing for coEmu v2 (Partiall)

09/18/2009 17:45 ImmortalYashi#1
Hello all, Im still new and yeah i'd like to share my things.

I am still creating it but this is what i have so far.
* the items work
* the icon is there
** offline tg npc
** offline tg
** revive command
* benefits are coming soon (im still creating them just give me time )

Add this into character.cs
Quote:
public int HeavenBlessing = 0;
Then go to UseItem.cs and add this :
Quote:
case 1200000:// S prayingstone
{
CSocket.Client.HeavenBlessing += 259200;
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You used PrayingStone(S) And obtained 3 days of heavenblessing", Struct.ChatType.Top));
CSocket.Send(ConquerPacket.Status(CSocket, 512, CSocket.Client.HeavenBlessing, Struct.StatusTypes.HeavensBlessing));
Delete = true;
break;
}
case 1200001: // M Prayingstone
{
CSocket.Client.HeavenBlessing += 604800;
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You used PrayingStone(M) And obtained 7 days of heavenblessing", Struct.ChatType.Top));
CSocket.Send(ConquerPacket.Status(CSocket, 512, CSocket.Client.HeavenBlessing, Struct.StatusTypes.HeavensBlessing));
Delete = true;
break;
}
case 1200002: // L prayingstone
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You used PrayingStone(L) And obtained 30 days of heavenblessing", Struct.ChatType.Top));

CSocket.Client.HeavenBlessing += 2592000;
CSocket.Send(ConquerPacket.Status(CSocket, 512, CSocket.Client.HeavenBlessing, Struct.StatusTypes.HeavensBlessing));
Delete = true;
break;
}
then go to Struct.Statustypes and add this
Quote:
HeavensBlessing = 17,
then go to packetprocessor and add this at the login part.
Quote:
if (CSocket.Client.HeavensBlessing > 1)
Packets.ConquerPacket.ToLocal(ConquerPacket.Effect (CSocket.Client.ID, "zf2-e128"), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
CSocket.Send(ConquerPacket.Status(CSocket, 512, CSocket.Client.HeavenBlessing, Struct.StatusTypes.HeavensBlessing));
then go to Structs -> Status

then add in the code this :
Quote:
if (CSocket.Client.HeavenBlessing > 1)
Status += 0x200000000;
** NPC ADDED

Go to lovestone and add this
Quote:
Link("I want to go to offline TG", 3, CSocket);
then the linkback is here too ;)
Quote:
else if (LinkBack == 3)
{
if (CSocket.Client.HeavenBlessing > 1)
{
CSocket.Client.LogoutTime -= CSocket.Client.LogoutTime;
Teleport(601, 60, 54, 0, CSocket);
CSocket.Client.OfflineTG = true;
CSocket.Disconnect();
End(CSocket);
}
else { ErrorMsg("Only players blessed by heavenblessing can use this feature.", CSocket); }




}
then go to character.cs and add this

Quote:
public uint LogoutTime;
public bool OfflineTG;
then go to
Structs > Map.cs
and add this

Quote:
Nhouse04 = 601,
then go to NpcTalk.cs and add this

Quote:
#region offline tg npc in offline tg
case 3836:
{
if (LinkBack == 0)
{
Text("You did get exp for : " + CSocket.Client.LogoutTime + " time./n", CSocket);
Text("The exp you have now : " + CSocket.Client.Exp + "/n ", CSocket);
Text("And your level is : " + CSocket.Client.Level + " /n", CSocket);
Text("Offline TG Status : " + CSocket.Client.OfflineTG + " /n", CSocket);
Text("/n", CSocket);
Text("/n", CSocket);
Link("I want to leave to twincity.", 1, CSocket);
Link("I want to stay here.", 255, CSocket);
End(CSocket);
}
if (LinkBack == 1)
{
CSocket.Client.LogoutTime -= CSocket.Client.LogoutTime;
Teleport(1002, 444, 444, 0, CSocket);
CSocket.Client.OfflineTG = false;
Text("There you go.", CSocket);
Link("Thanks", 255, CSocket);
End(CSocket);
}
break;
}
#endregion
then go to packetprocessor.cs and add at the login part :
Quote:
CSocket.Client.LogoutTime = (uint)Environment.TickCount;


for (int a = 20; a < 50; a++)
if (CSocket.Client.OfflineTG)
{
CSocket.Client.Exp += (ulong)(Math.Abs((uint)Environment.TickCount - CSocket.Client.LogoutTime) * 0.71);

CSocket.Client.OfflineTG = false;
CSocket.Client.LogoutTime = 0;

/

}
add this in chat.cs

Quote:
case "rev":
{
if (CSocket.Client.Dead && CSocket.Client.HeavenBlessing > 1)
{
CSocket.Client.CurrentHP = CSocket.Client.MaxHP;
CSocket.Client.Dead = false;
CSocket.Send(ConquerPacket.Status(CSocket, 2, 0, Struct.StatusTypes.StatusEffect));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Model, Struct.StatusTypes.Model));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CurrentHP, Struct.StatusTypes.Hp));
ConquerPacket.ToLocal(ConquerPacket.General(CSocke t.Client.ID, CSocket.Client.X, CSocket.Client.Y, 0, 0, 0, Struct.DataType.EntityRemove), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, CSocket.Client.ID);
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter (CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
ConquerPacket.ToLocal(ConquerPacket.Effect(CSocket .Client.ID, "relive"), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
}
break;
}
Please press thanks,
Yashi.
09/18/2009 17:47 CooP^TooL#2
Is nice that you release things so quick :)
Goodluck and nice release
09/18/2009 17:52 ImmortalYashi#3
Thanks,
Npcs added and benefits ( Offline TG ) and revive command.
09/20/2009 11:48 ImmortalYashi#4
#BUMP
Effects added and a fix:P
09/20/2009 17:19 felipeboladao#5
How to increase more 50% to instamina?
09/20/2009 17:32 zbest#6
Nice release :D
OFFTOPIC:felipe add me i wanna talk with you ;)
09/20/2009 19:06 ImmortalYashi#7
ehh well i have another system written for stamina but just change when you login.

If im right it sets the stamina there to 100 just do

Quote:
if(HeavensBlessing > 0)
CSocket.Client.Stamina = 150;
// and here the send packet
09/20/2009 19:21 felipeboladao#8
ok, my name is Diego , now I only owner of Felipe.

My msn is [Only registered and activated users can see links. Click Here To Register...]..
I am not a good coder,But I'm learning.

I already studied the Coemu source, and already did some modifications, such as Heaven Blessing + benefits.

I'm from Brazil.
I hope that does not have any problem in our communication here in Elitepvprs.

ok, meu nome é Diego, agora eu só proprietário de Felipe.

Meu msn é diego.alef @ hotmail.com ..
Eu não sou um programador bom, mas eu estou aprendendo.

Já estudou a fonte Coemu, e já fiz algumas modificações, como Heaven Bênção + benefícios.

Eu sou do Brasil.
Espero que não tenha nenhum problema na nossa comunicação aqui no Elitepvprs.
09/25/2009 23:15 minakaram#9
srr for this question but
where can i find this??
then go to Structs -> Status
09/26/2009 10:38 ImmortalYashi#10
Right.. open your source then go to structs and then status.cs
09/26/2009 18:48 minakaram#11
Quote:
Originally Posted by ImmortalYashi View Post
Right.. open your source then go to structs and then status.cs
there no status at structs
09/30/2009 09:46 ImmortalYashi#12
Make a screen shot and prove it isn't there,
So far you are the only one saying it isn't there.

Please look better this time,
Yashi.
09/30/2009 20:59 minakaram#13
here u go
09/30/2009 21:31 ImmortalYashi#14
GOSH!
How's that not there as i stated something like that.

Status.cs or Statustypes.cs LMAO..
10/02/2009 23:06 killerdiggs#15
hey can u pls post the definition for HeavenBlessing thx