Problem with packet..

07/02/2012 17:27 M4n1ak#1
Hello..

I got little problem with packet send via AutoIT :)
It's alchemy packet 7150 with 1st,2nd,3th slot..

Am using:
Code:
InjectPacket("7150", "0203030D0E0F")

Func InjectPacket($opcode, $data, $security = "0100")
	$size = Hex(StringLen($data) / 2, 4)
	$size = StringMid($size, 3, 2) & StringMid($size, 1, 2)
	$opcode = StringMid($opcode, 3, 2) & StringMid($opcode, 1, 2)
	$packet = _HexToString($size & $opcode & $security & $data)
        TCPSend($socket, $packet)
EndFunc
After I send it through PHConnector i got DC =d
When I change security 0100 -> 0200 I didn't get DC, but nothin happen..

Any suggestions?

#Edit

In edx6 analyzer It's like this when I fuse in-game..

Code:
[C -> S][7150]
02                                                ................
03                                                ................
03                                                ................
0D                                                ................
0E                                                ................
0F                                                ................
#Edit2

Am investigated, that $packet is empty ;/
Before _HexToString it's:
Code:
0000507102000203030E0F10
I didn't understand anything :D
07/02/2012 18:52 theonly112#2
As far as i know when using PHConnector the "security" bytes determine whether the packet get's sent to the client or the server. But i can't tell you which one's which because i haven't used it in ages.
07/02/2012 19:02 M4n1ak#3
Yeah..
0100 S->C
0200 C->S
I guess, but why it's not working?
This packet is from original Fuse-O-Mat, and am always getting DC with this..
07/02/2012 19:06 jremy#4
This code is outdated since AutoIt v3.3.8.0

Change
$size = Hex(StringLen($data) / 2, 4)
To
$size = Hex(Int(StringLen($data) / 2), 4)

[Only registered and activated users can see links. Click Here To Register...]
Quote:
Changed: Hex() detects doubles internally and processes them respecting binary format.
07/02/2012 19:10 M4n1ak#5
Yup working..
thanks jremy, u best ;)

Security flag 0100 + this change works ;D
07/02/2012 19:11 theonly112#6
Well do you have a Weapon in the 1st a Elixir in the 2nd and a lucky powder in the 3rd inventory slot? And it is going take a few seconds. You are only going to see whether it worked in the bottom right. There is no alchemy window going to pop up.
EDIT: too late. sorry