المشاركة الأصلية كتبت بواسطة phoenix1337
(المشاركة 4686902)
auto it code for auto party
كود:
msgbox ( 0, "auto party script", "auto reform time: 30 seconds...")
#include <guiconstants.au3>
opt("guioneventmode", 1)
dim $pt
dim $ptc=300 ; time between paty checking (10 = 1 sec)
dim $res
dim $p=0
dim $es_number ;1
dim $bs_flat ;2
guicreate("auto party script", 150,100)
guisetonevent($gui_event_close, 'closebutton')
guictrlcreatelabel("resolution"&@cr&"1 = 1024x768"&@cr&"2 = 1280x1024",5,5,80, 50) ;3
$resw=guictrlcreateinput($res,90, 10, 50, 20,$es_number)
guictrlsetlimit($resw,1)
$start = guictrlcreatebutton("start", 40, 60, 60, 25,$bs_flat)
guictrlsetonevent($start, "startbutton")
guisetstate()
while 1
sleep(100)
if winactive("sro_client") then
$pt= $pt+1
tooltip($pt,1,100)
if $res=1 then
patychk()
endif
if $res=2 then
patychk2()
endif
acptpty()
endif
wend
func startbutton()
$res = guictrlread($resw)
guictrlsetdata($start,"stop")
guictrlsetdata($start,"start")
endfunc
func patychk()
if $pt >= $ptc then
$pt = 0
if (pixelgetcolor(10,240) <> 0) and (pixelgetcolor(11,300) <> 0) then
if (pixelgetcolor(473,160)= 16777215) and (pixelgetcolor(208,280) = 16777215 ) then
send("e")
sleep(200)
endif
$p=0
send("e")
sleep(500)
while (pixelgetcolor(250,302) = 0) and $p<50
sleep(50)
$p=$p+1
wend
$p=0
if (pixelgetcolor(250,302) = 16777215) then
mouseclick("left",610,590,1,0)
sleep(500)
mouseclick("left",460,540,1,0)
endif
send("e")
endif
endif
endfunc
func patychk2()
if $pt >= $ptc then
$pt = 0
if (pixelgetcolor(12,244) <> 0) and (pixelgetcolor(10,300) <> 0) then
if (pixelgetcolor(601,290)= 16777215) and (pixelgetcolor(336,402) = 16777215 ) then
send("e")
sleep(200)
endif
$p=0
send("e")
sleep(500)
while (pixelgetcolor(378,430) = 0) and $p<50
sleep(50)
$p=$p+1
wend
$p=0
if (pixelgetcolor(378,430) = 16777215) then
mouseclick("left",745,720,1,0)
sleep(500)
mouseclick("left",594,668,1,0)
endif
send("e")
endif
endif
endfunc
func acptpty()
if pixelgetcolor(10,300)<>0 then
if $res = 1 then
if (pixelgetcolor(468,243) = 16777215) and (pixelgetcolor(614,385) = 16777215) and (pixelgetcolor(611,385) = 0) and (pixelgetcolor(364,355) = 16777215) then
mouseclick("left",470,500,1,0)
sleep(200)
endif
endif
if $res = 2 then
if (pixelgetcolor(599,375) = 16777215) and (pixelgetcolor(675,510) = 16777215) and (pixelgetcolor(720,490) = 0) and (pixelgetcolor(492,485) = 16777215) then
mouseclick("left",600,630,1,0)
sleep(200)
endif
endif
endif
endfunc
func closebutton()
exit
endfunc
|