Hey everyone,(Bare with me)
I'm having trouble figuring out how to implement the gates in guildwars. I'm using a source that has been great to use and I've implemented many things and now I feel more comfortable to learn more about the packets and meshes. In the source, the pole has been implemented as you see below:
It uses this function to spawn the pole:
I decided to look at another source, Redux, which has gates and the pole in it and I was able to find some characteristics that were the same. First is the EntityID. For the pole, The EntityID = 6700 for both sources, The MeshID for the pole on my source is: 1137. on Redux, I found the left gate had an EntityID = 6701, with a mesh ID:241. So I tried using the same "Pole Struct" but with an EntityID = 6701 and Mesh:241:
Ofcourse it didn't work, but I was able to keep the EntityID to 6701 instead of 6700 and use the Pole Mesh and could spawn another Pole, but no gate.
How do you find the meshes and their corresponding IDs? And what should I look into to solving my problem? I just need some guidance; pointed in the right direction. Thank you!
I'm having trouble figuring out how to implement the gates in guildwars. I'm using a source that has been great to use and I've implemented many things and now I feel more comfortable to learn more about the packets and meshes. In the source, the pole has been implemented as you see below:
Code:
public static void Init()
{
War = false;
Scores = new Hashtable();
LastScores = DateTime.Now;
LastPoints = DateTime.Now;
ThePole = new Pole();
ThePole.EntityID = 6700;
ThePole.Mesh = 1137;
ThePole.CurHP = 10000000;
ThePole.MaxHP = 10000000;
ThePole.Loc = new Location();
ThePole.Loc.Map = 1038;
ThePole.Loc.X = 84;
ThePole.Loc.Y = 99;
}
Code:
public void Spawn(Character C, bool Check)
{
if (C.Loc.Map == Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, Loc.X, Loc.Y, 16) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, Loc.X, Loc.Y, 16) || !Check))
{
if (LastWinner == null) C.MyClient.AddSend(Packets.SpawnNPCWithHP(EntityID, (ushort)Mesh, 10, Loc, true, "Pole", CurHP, MaxHP));
else C.MyClient.AddSend(Packets.SpawnNPCWithHP(EntityID, (ushort)Mesh, 10, Loc, true, LastWinner.GuildName, CurHP, MaxHP));
}
}
Code:
LeftGate = new Pole(); LeftGate.EntityID = 6701; LeftGate.Mesh = 1137; LeftGate.CurHP = 10000000; LeftGate.MaxHP = 10000000; LeftGate.Loc = new Location(); LeftGate.Loc.Map = 1038; LeftGate.Loc.X = 167; LeftGate.Loc.Y = 210;
How do you find the meshes and their corresponding IDs? And what should I look into to solving my problem? I just need some guidance; pointed in the right direction. Thank you!