Register for your free account! | Forgot your password?

You last visited: Today at 10:49

  • Please register to post and access all features, it's quick, easy and FREE!

 

Implementing Guildwars Gates

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2016
Posts: 20
Received Thanks: 6
Implementing Guildwars Gates

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:
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;

        }
It uses this function to spawn the pole:

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));
                }
            }
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:
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;
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!



freefora11 is offline  
Old   #2
 
elite*gold: 0
Join Date: Feb 2016
Posts: 20
Received Thanks: 6
No one has said anything yet so I'm going to continue with more test that I've done and learn. I still can't find out how to spawn a gate mesh instead of a pole. From 2 different sources, the mesh ID for a pole was 1137. One of those had the gate mesh ID as 241(leftgate) and 245(when left gate is opened). Again when I replace the pole mesh id with 241, there is no object.

Where can I find the mesh IDs? I've done many searches using Notepad++ to search all text files in my database and conquer client and nothing pops up.
I assume the gate uses the same packet as the pole which is an npc packet, the packet is below.

Code:
byte[] Packet = new byte[8 + 36 + Name.Length];

            COPacket P = new COPacket(Packet);
            P.WriteInt16((ushort)(Packet.Length - 8));
            P.WriteInt16((ushort)1109);
            P.WriteInt32(EntityID);
            P.WriteInt32(MaxHP);
            P.WriteInt32(CurHP);
            P.WriteInt16(Loc.X);
            P.WriteInt16(Loc.Y);
            P.WriteInt16((ushort)Type); //stores the meshID
            P.WriteInt16(Flags);
            P.WriteInt16(11);
            if (Named)
            {
                P.WriteByte(1);
                P.WriteByte((byte)Name.Length);
                P.WriteString(Name);
            }
My only other option I can think of which I'm thinking is just use 2 poles as the gate. I can set it to when the health gets to 0, i can remove object, or move it out of the way. This would be pretty easy, but would rather have the correct mesh. Example:



I'm not asking anyone to code anything for me, I want to do it myself.Any help in the right direction would be very appreciated!


freefora11 is offline  
Old   #3
 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,387
Received Thanks: 3,109
Here's an old packet dump I have for the side gates.
Hopefully they're useful to you.

Code:
Packet 0 -- From: TQClient -- Length: 38 | Receive Length: 46 -- Type: 10010
26 00 1A 27 7C 4F 3F 00 F2 00 C3 00 00 00 00 00 ;   & '|O?       
52 65 8E 17 89 00 00 00 FD 00 CB 00 0E 04 00 00 ;   ReŽ‰       
FF FF FF FF 00 00 54 51 43 6C 69 65 6E 74       ;     TQClient

Packet 1 -- From: TQServer -- Length: 38 | Receive Length: 46 -- Type: 10010
26 00 1A 27 7C 4F 3F 00 F2 00 C3 00 00 00 00 00 ;   & '|O?       
6F 17 EB 09 89 00 00 00 FD 00 CB 00 0E 04 00 00 ;   o	‰       
00 00 00 00 00 00 54 51 53 65 72 76 65 72       ;         TQServer

Packet 2 -- From: TQServer -- Length: 40 | Receive Length: 48 -- Type: 1109
28 00 55 04 13 8F 01 00 CF 5C 5C 00 00 2D 31 01 ;   ( U \\  -1
64 00 00 00 DF 00 B1 00 1F 01 1A 00 15 00 00 00 ;   d         
CB 09 00 00 00 00 00 00 54 51 53 65 72 76 65 72 ;   	      TQServer

Packet 3 -- From: TQClient -- Length: 38 | Receive Length: 46 -- Type: 10010
26 00 1A 27 7C 4F 3F 00 E8 00 BA 00 00 00 00 00 ;   & '|O?       
29 68 8E 17 89 00 00 00 F2 00 C3 00 0E 04 00 00 ;   )hŽ‰       
FF FF FF FF 00 00 54 51 43 6C 69 65 6E 74       ;     TQClient

Packet 4 -- From: TQServer -- Length: 38 | Receive Length: 46 -- Type: 10010
26 00 1A 27 7C 4F 3F 00 E8 00 BA 00 00 00 00 00 ;   & '|O?       
30 1A EB 09 89 00 00 00 F2 00 C3 00 0E 04 00 00 ;   0	‰       
00 00 00 00 00 00 54 51 53 65 72 76 65 72       ;         TQServer

Packet 5 -- From: TQServer -- Length: 40 | Receive Length: 48 -- Type: 1109
28 00 55 04 13 8F 01 00 CF 5C 5C 00 00 2D 31 01 ;   ( U \\  -1
64 00 00 00 DF 00 B1 00 1F 01 1A 00 15 00 00 00 ;   d         
CB 09 00 00 00 00 00 00 54 51 53 65 72 76 65 72 ;   	      TQServer

Packet 6 -- From: TQClient -- Length: 88 | Receive Length: 96 -- Type: 1009
58 00 F1 03 7C 4F 3F 00 00 00 00 00 1B 00 00 00 ;   X |O?        
36 6A 8E 17 00 00 00 00 00 00 00 00 00 00 00 00 ;   6jŽ            
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 54 51 43 6C 69 65 6E 74 ;           TQClient

Packet 7 -- From: TQServer -- Length: 88 | Receive Length: 96 -- Type: 1009
58 00 F1 03 7C 4F 3F 00 00 00 00 00 1B 00 00 00 ;   X |O?        
36 6A 8E 17 00 00 00 00 00 00 00 00 00 00 00 00 ;   6jŽ            
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 54 51 53 65 72 76 65 72 ;           TQServer

Packet 8 -- From: TQServer -- Length: 84 | Receive Length: 92 -- Type: 10017
54 00 21 27 7C 4F 3F 00 02 00 00 00 FF FF FF FF ;   T !'|O?    
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 08 00 00 00 12 00 00 00 00 00 00 00 ;                 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 54 51 53 65 72 76 65 72             ;       TQServer
Spirited is offline  
Thanks
1 User
Old   #4
 
elite*gold: 0
Join Date: Feb 2016
Posts: 20
Received Thanks: 6
Quote:
Originally Posted by Spirited View Post
Here's an old packet dump I have for the side gates.
Hopefully they're useful to you.

Code:
Packet 0 -- From: TQClient -- Length: 38 | Receive Length: 46 -- Type: 10010
26 00 1A 27 7C 4F 3F 00 F2 00 C3 00 00 00 00 00 ;   & '|O?       
52 65 8E 17 89 00 00 00 FD 00 CB 00 0E 04 00 00 ;   Re       
FF FF FF FF 00 00 54 51 43 6C 69 65 6E 74       ;     TQClient

Packet 1 -- From: TQServer -- Length: 38 | Receive Length: 46 -- Type: 10010
26 00 1A 27 7C 4F 3F 00 F2 00 C3 00 00 00 00 00 ;   & '|O?       
6F 17 EB 09 89 00 00 00 FD 00 CB 00 0E 04 00 00 ;   o	       
00 00 00 00 00 00 54 51 53 65 72 76 65 72       ;         TQServer

Packet 2 -- From: TQServer -- Length: 40 | Receive Length: 48 -- Type: 1109
28 00 55 04 13 8F 01 00 CF 5C 5C 00 00 2D 31 01 ;   ( U \\  -1
64 00 00 00 DF 00 B1 00 1F 01 1A 00 15 00 00 00 ;   d         
CB 09 00 00 00 00 00 00 54 51 53 65 72 76 65 72 ;   	      TQServer

Packet 3 -- From: TQClient -- Length: 38 | Receive Length: 46 -- Type: 10010
26 00 1A 27 7C 4F 3F 00 E8 00 BA 00 00 00 00 00 ;   & '|O?       
29 68 8E 17 89 00 00 00 F2 00 C3 00 0E 04 00 00 ;   )h       
FF FF FF FF 00 00 54 51 43 6C 69 65 6E 74       ;     TQClient

Packet 4 -- From: TQServer -- Length: 38 | Receive Length: 46 -- Type: 10010
26 00 1A 27 7C 4F 3F 00 E8 00 BA 00 00 00 00 00 ;   & '|O?       
30 1A EB 09 89 00 00 00 F2 00 C3 00 0E 04 00 00 ;   0	       
00 00 00 00 00 00 54 51 53 65 72 76 65 72       ;         TQServer

Packet 5 -- From: TQServer -- Length: 40 | Receive Length: 48 -- Type: 1109
28 00 55 04 13 8F 01 00 CF 5C 5C 00 00 2D 31 01 ;   ( U \\  -1
64 00 00 00 DF 00 B1 00 1F 01 1A 00 15 00 00 00 ;   d         
CB 09 00 00 00 00 00 00 54 51 53 65 72 76 65 72 ;   	      TQServer

Packet 6 -- From: TQClient -- Length: 88 | Receive Length: 96 -- Type: 1009
58 00 F1 03 7C 4F 3F 00 00 00 00 00 1B 00 00 00 ;   X |O?        
36 6A 8E 17 00 00 00 00 00 00 00 00 00 00 00 00 ;   6j            
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 54 51 43 6C 69 65 6E 74 ;           TQClient

Packet 7 -- From: TQServer -- Length: 88 | Receive Length: 96 -- Type: 1009
58 00 F1 03 7C 4F 3F 00 00 00 00 00 1B 00 00 00 ;   X |O?        
36 6A 8E 17 00 00 00 00 00 00 00 00 00 00 00 00 ;   6j            
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 54 51 53 65 72 76 65 72 ;           TQServer

Packet 8 -- From: TQServer -- Length: 84 | Receive Length: 92 -- Type: 10017
54 00 21 27 7C 4F 3F 00 02 00 00 00 FF FF FF FF ;   T !'|O?    
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 08 00 00 00 12 00 00 00 00 00 00 00 ;                 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 54 51 53 65 72 76 65 72             ;       TQServer
Thank you very much, I will take a look into these and see what I find.


freefora11 is offline  
Old   #5
 
elite*gold: 0
Join Date: Feb 2016
Posts: 20
Received Thanks: 6
I was finally able to spawn it! The problem was the flag variable. It was sending 10(which is for pole) and I switched it to 26 and that did it! After 14 hours of learning about packets in 3 different sources, I was able to. Thanks again Spirit, the packet type 1109 was the key in all of this.

Btw, can anyone point me in the right direction with the actual file of the gate? The client that I got with the source apparently removed it. I used a different client to get it to appear. Below are links to the 2 different clients. Thanks!

//my client, doens't show gate, but it is there

// other client
freefora11 is offline  
Thanks
1 User
Old   #6
 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,387
Received Thanks: 3,109
Quote:
Originally Posted by freefora11 View Post
I was finally able to spawn it! The problem was the flag variable. It was sending 10(which is for pole) and I switched it to 26 and that did it! After 14 hours of learning about packets in 3 different sources, I was able to. Thanks again Spirit, the packet type 1109 was the key in all of this.

Btw, can anyone point me in the right direction with the actual file of the gate? The client that I got with the source apparently removed it. I used a different client to get it to appear. Below are links to the 2 different clients. Thanks!

//my client, doens't show gate, but it is there

// other client
Likely compressed in data.wdf and c3.wdf
Spirited is offline  
Thanks
1 User
Old   #7
 
elite*gold: 0
Join Date: Feb 2016
Posts: 20
Received Thanks: 6
Quote:
Originally Posted by Spirited View Post
Likely compressed in data.wdf and c3.wdf
After messing around with exchanging files around, I found out it was the data.wdf. If you don't mind answering one more question. I'm trying to use CptSky's Package manager to extract the data.wdf. I'm a little confuse of what I'm doing wrong.

In the extractor part, I enter the source(which is the data.WDF), the input should be the same as the source and the output should be a different location. Is there something I did wrong? Should the output location have something in it before? Or is it that I just can't read his instructions haha. Thanks

freefora11 is offline  
Old   #8
 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,387
Received Thanks: 3,109
Quote:
Originally Posted by freefora11 View Post
After messing around with exchanging files around, I found out it was the data.wdf. If you don't mind answering one more question. I'm trying to use CptSky's Package manager to extract the data.wdf. I'm a little confuse of what I'm doing wrong.

In the extractor part, I enter the source(which is the data.WDF), the input should be the same as the source and the output should be a different location. Is there something I did wrong? Should the output location have something in it before? Or is it that I just can't read his instructions haha. Thanks

WPF is a compressed file system. You need to know the key filename/path to get its data from the archive. Korvacs has a tool that iterates through all keys and dumps the archive to a directory. That's probably what you're looking for.
Spirited is offline  
Old   #9
 
elite*gold: 0
Join Date: Feb 2016
Posts: 20
Received Thanks: 6
Quote:
Originally Posted by Spirited View Post
WPF is a compressed file system. You need to know the key filename/path to get its data from the archive. Korvacs has a tool that iterates through all keys and dumps the archive to a directory. That's probably what you're looking for.
I used his before and it didn't work at first, but now I understand what you/them meant where it had to know the file path to the original. I was making a copy of the data.wdf and placed it in another directory. I was able to set up the gate and got them to work like it does in normal conquer. Thanks again for time


freefora11 is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Problem implementing new maps.
Hi epvp, I've problem implementing some new map, when I implement all good, I reboot and server like starts normally but.. when I try to enter.....
1 Replies - Metin2 PServer - Discussions / Questions
[HELP]Custum gear patching and implementing
Hi ive got all sets of ep6 custom gears but when we chose new items and set the right design and patch then run the sql the item is n invalid item...
2 Replies - Shaiya Private Server
implementing quests in sro
I would like to make my own quests in sro, but i don't know whit what i should begin with. Got some big ideas with really cool feature's, that im...
2 Replies - SRO PServer Ask the Experts
Joymax plans on implementing HackShield!
It seems that Joymax has paid AhnLab to use their HackShield System for Silkroad Online. Their new security should be implemented in a near future....
20 Replies - Gaming News - EN
Implementing Game Hacks
Okay well don't im really new to this but what exactly do you do with the RAR file when you download it? thanks for your replies in advanced =D
9 Replies - CO2 Main - Discussions / Questions



All times are GMT +2. The time now is 10:49.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.