i just new in scripts , tcp, and sockets programing
i learned the basics from topics here about socket program and sending & receiving packets and make my own alchemy program put i faced some problem
my program principal is plus items in inventory first slot with elixir in second slot and lucky powder in third slot
here is my nope code:-
the program worked fine put he stuck in receiving do loop alot i think its cause he missed server alchemy response packet and i notic that he stuck when the client received alot of packet or large packets from uniq and global chat.Quote:
; Script Start - Add your code below here
TCPStartup() ;start program to proxy connection
$socket=TCPConnect("127.0.0.1",22580)
$maxplus=InputBox("alchemy","max plus = ") ;put the plus desire
do
packs("5071","0203030f0d0e") ;send packet from function packs
;where "5071" opcode and "o203030f0d0e" is the data
sleep(3000)
rx() ;wait the receive packet
funcname ($plus) ;recall plus value
Until $plus = $maxplus ;stop when desire plus reached
func packs ($op,$dt)
$d=("0x"&"0900"&$op&"0100"&$dt) ;final packet form
TCPSend($socket,$d)
endfunc
func rx() ;receive function
Do
sleep(50)
$pkr=TCPRecv($socket,80) ;receiver packet
$opc=StringMid($pkr,7,4) ;opcode received
$plus=StringMid($pkr,39,2) ; plus bytes indata
Until $opc= ("50b1") ;server opcode alchemy response
return($plus) ;return plus value
EndFunc
thanks in advanced






