[HELP] in my code the gw gate mesh 12tails source

07/12/2011 10:10 djneo31#1
I believe this code, is to change the mesh of the gate when it is open, but is not working, can someone tell me why?

public void Die(Game.Entity killer)
{
if (MapID == 1038)
{
if (UID != 6700)
{
if (Hitpoints != 0 || Mesh != 251 && Mesh != 287)
{
if (Mesh == 241)
Mesh = (ushort)(251 + Mesh % 10);
else
Mesh = (ushort)(287 + Mesh % 10);

Update upd = new Update(true);
upd.UID = UID;
upd.Append(Update.Mesh, Mesh);
killer.Owner.SendScreen(upd, true);
Hitpoints = 0;
}
Attack attack = new Attack(true);
attack.Attacker = killer.UID;
attack.Attacked = UID;
attack.AttackType = Network.GamePackets.Attack.Kill;
attack.X = X;
attack.Y = Y;
killer.Owner.Send(attack);
killer.KOCount++;
}
}
else
{
Attack attack = new Attack(true);
attack.Attacker = killer.UID;
attack.Attacked = UID;
attack.AttackType = Network.GamePackets.Attack.Kill;
attack.X = X;
attack.Y = Y;
killer.Owner.Send(attack);
Hitpoints = MaxHitpoints;
Update upd = new Update(true);
upd.UID = UID;
upd.Append(Update.Hitpoints, MaxHitpoints);
killer.Owner.SendScreen(upd, true);
}
}

And here is the code of the mesh!

public enum SOBType : ushort
{
Gate = 0x1A,
Scarecrow = 0x16,
Shop = 14,
Stake = 0x15,
Pole = 0x0A
}
public enum SOBMesh : ushort
{
ShopFlag = 406,
LeftGate = 0x00F1,
LeftGateOpen = 251,
RightGate = 0x0115,
RightGateOpen = 287,
Pole = 0x471
}

If someone can tell me where is the error I will thank a lot. :D :handsdown:
07/12/2011 10:18 Spirited#2
Hitpoints != 0
(I've never coded Guild War so idk the meshes from heart, but I would try changing that first to see what happens)
07/12/2011 10:36 Kiyono#3
It's not actually broken, first you need to start GW and second you just need to update the gate with the gate open thingy when it dies.
07/12/2011 14:53 BaussHacker#4
Hitpoints != 0 should be Hitpoints > 0.

Also remember that source was not intended to make a server, but to be used as a resource for making your own.
07/13/2011 04:16 djneo31#5
Thank you for answering me, I sure hope I can make my own source one day, but I'm not at that level, but I'm learning, I would just like to make a simple server with a public source. thanks all! :D :handsdown: :handsdown:
07/13/2011 05:26 BaussHacker#6
Quote:
Originally Posted by djneo31 View Post
Thank you for answering me, I sure hope I can make my own source one day, but I'm not at that level, but I'm learning, I would just like to make a simple server with a public source. thanks all! :D :handsdown: :handsdown:
Just practice, read tutorials, try yourself. Learn to think programmatic.

That way it will be easier for you to understand how these things work etc.

Good luck learning.