I'm working on a tool which receives packets from phconnector and send again to phconnector. I was working on getting charlist, getting mp/hp of the char when its loaded and they are done. However recently i cannot capture the packet '3020'. I was able to catch it but now i'm not able to do it again.
An example of output:
But this doesnt seem like its right? What do i miss?
PHP Code:
data := stringtohex(socket.ReceiveText); //where i receive whole packet
data := stringreplace(data, ' ', '', [rfReplaceAll]); //delete all spaces
size := hexatoint(copy(data,3,2)+copy(data, 1, 2)); //get the size
opcode:=(copy(data,7,2)+copy(data, 5, 2)); //this never gives me 3020
security:=copy(data,11,2)+copy(data, 9, 2); //security byte
listbox1.items.Add('['+inttostr(size)+'] ['+opcode+'] ['+security+']');
packetdata:=copy(data,13,size*2); //this is the the data part of packet
listbox1.Items.Add('Data: '+ packetdata);
listbox1.Items.add('------------------------');
PHP Code:
[16] [2001] [0000]
Dara: 0D004761746577617953657276657200