Curveball bot v1.0-firefox based xD

« Older   Newer »
  Share  
xdmisterx
CAT_IMG Posted on 3/2/2010, 16:22     +1   -1




Ho implementato l'utilizzo di firefox al posto di quello di internet explorer(che mi causava molti problemi) e ho fatto in modo che il giocho funzioni in locale. Basta estrarre il tutto in una cartella.
L'unico problema è che per utilizzarlo bisogna installare gli object di firefox(che comunque possono sempre servire ;)) da questo link qua: www.iol.ie/~locka/mozilla/MozillaControl1712.exe

CODICE
;Curve ball-bot by Misterx
#include <GuiConstants.au3>

HotKeySet("{esc}","esci")
HotKeySet("{F2}","go")
HotKeySet("{F3}","refresh")

Opt("PixelCoordMode",0)
Opt("MouseCoordMode",0)

Global $title="Curve ball-bot by Misterx", $go=False, $x=416, $y=266, $xadd=-1, $yadd=12, $color=15007710, $trim=2
Dim $static[2]
$static[0]=0
$static[1]=0

$obj=ObjCreate("Mozilla.Browser.1")

$gui=GUICreate($title,$x,$y)
GUICtrlCreateObj($obj,0,0,$x,$y)

GUISetState()

$obj.navigate(@ScriptDir &"curveball.html")

While 1
       Switch GUIGetMsg()
       Case $gui_event_close
               Exit
       EndSwitch
WEnd

Func esci()
       Exit
EndFunc

Func go()
       $i=0
       $k=0
       $case=0
       If $go=True Then
               $go=False
       Else
               $go=True
       EndIf
       While 1
               $pos=MouseGetPos()
               If $go=False Then ExitLoop
               $pixel=PixelSearch(0,0,$x,$y,$color,14,0)
               If Not @error Then
                       MouseMove($pixel[0]+$xadd,$pixel[1]+$yadd,0)
                       ToolTip($xadd & @CR & $yadd)
                       If $static[0]=$pixel[0] And $static[1]=$pixel[1] Then
                               $i+=1
                               If $i=50 Then
                                       $i=0
                                       $xadd=-1
                                       $yadd=12
                                       MouseClick("left",$pixel[0]+$xadd,$pixel[1]+$yadd,1,0)
                               EndIf
                       EndIf
                       $static[0]=$pixel[0]
                       $static[1]=$pixel[1]
               EndIf
       WEnd
EndFunc

Func refresh()
       $obj.refresh()
EndFunc


p.s.:non penso che serva dirlo, ma bisogna aver installato firefox per farlo funzionare ;D ;D ;D
Download

ciao :)
 
Top
0 replies since 3/2/2010, 16:22   84 views
  Share