Crash on opening npc with packet

02/07/2017 14:52 Kardil#1
I tried to open npc first with opcode 7045
And it opens, then i send 7046 with id and 1
Like this:
Packet p =new packet(0x7046);
p.writeuint32(id);
p.writeuint8(1);
Sendtoserver(p);
It gets crash.
Iam sure id is right so idk what's wrong am i doing
02/07/2017 23:15 B1Q#2
distance between your char and the npc?
02/08/2017 01:25 Kardil#3
it was enough to select npc
02/08/2017 08:22 B1Q#4
i've never tried parsing the packet. i'll parse it & let you know

okay...

the packet should work like this.

first you should select the npc

packet sel = new packet(0x7045);
sel.writeuint32(npcuniqueid);
sel.sendtosrv();

and then you can send the npc Open packet

packet pck = new packet(0x7046);
pck.writeuint32(npcuniqueid); // parse group/spawn packet to get the unique id of the npc
pck.writeuint8(1); // tab (weapons,2 is avatar alchemy or whatever you wanna call it)
pck.sendtosrv();

i tested this packet on a blacksmith npc no crashes.

PS: server will send a select confirmation packet along with other data related to the selected object. (0xB045) it's not that hard to figure out. gl
02/08/2017 11:52 Kardil#5
Quote:
Originally Posted by B1QB0SS :3 View Post
i've never tried parsing the packet. i'll parse it & let you know

okay...

the packet should work like this.

first you should select the npc

packet sel = new packet(0x7045);
sel.writeuint32(npcuniqueid);
sel.sendtosrv();

and then you can send the npc Open packet

packet pck = new packet(0x7046);
pck.writeuint32(npcuniqueid); // parse group/spawn packet to get the unique id of the npc
pck.writeuint8(1); // tab (weapons,2 is avatar alchemy or whatever you wanna call it)
pck.sendtosrv();

i tested this packet on a blacksmith npc no crashes.

PS: server will send a select confirmation packet along with other data related to the selected object. (0xB045) it's not that hard to figure out. gl
I know it's a piece a cake and i did exactily what u did but in vain.
Could be a damaged sroclient?
02/08/2017 16:56 B1Q#6
Quote:
Originally Posted by Kardil View Post
I know it's a piece a cake and i did exactily what u did but in vain.
Could be a damaged sroclient?
i'm not sure. but it works with me i parsed the group spawn packet got the blacksmith's (Constantinople) unique id sent the packet no crash.
02/08/2017 22:19 Kardil#7
Quote:
Originally Posted by B1QB0SS :3 View Post
i'm not sure. but it works with me i parsed the group spawn packet got the blacksmith's (Constantinople) unique id sent the packet no crash.
Packet p3 = new Packet(0x7045);
p3.WriteUInt8(0x26);
p3.WriteUInt8(0x00);
p3.WriteUInt8(0x00);
p3.WriteUInt8(0x00);
Sendtosrv(p3);

Packet p2 = new Packet(0x7046);
p2.WriteUInt8(0x26);
p2.WriteUInt8(0x00);
p2.WriteUInt8(0x00);
p2.WriteUInt8(0x00);
p2.WriteUInt8(1);
Sendtosrv(p2);

26 00 00 00 is npc unique id, i parse it from loader and it's always fixed
02/09/2017 00:03 B1Q#8
Quote:
Originally Posted by Kardil View Post
Packet p3 = new Packet(0x7045);
p3.WriteUInt8(0x26);
p3.WriteUInt8(0x00);
p3.WriteUInt8(0x00);
p3.WriteUInt8(0x00);
Sendtosrv(p3);

Packet p2 = new Packet(0x7046);
p2.WriteUInt8(0x26);
p2.WriteUInt8(0x00);
p2.WriteUInt8(0x00);
p2.WriteUInt8(0x00);
p2.WriteUInt8(1);
Sendtosrv(p2);

26 00 00 00 is npc unique id, i parse it from loader and it's always fixed

but... npcid should be uint????