Curveball bot v1.0

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




SPOILER (click to view)
CODICE
;Curve ball-bot by Misterx
#include <GuiConstants.au3>

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

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

Global $title="Curve ball-bot by Misterx", $go=False, $x=400, $y=250, $xadd=-1, $yadd=12, $color=15007710
;~ $x=400, $y=250, $xadd=311, $yadd=268, $color=15007710
;~ $x=500, $y=350, $xadd=263, $yadd=223, $color=15007710
;~ $x=700, $y=550, $xadd=161, $yadd=131, $color=15007710
Dim $static[2]
$static[0]=0
$static[1]=0

$obj=ObjCreate("shell.explorer.2")

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

GUISetState()
$obj.navigate("http://70.84.248.90/~fetchga/Games-D5-140406/curveball.swf")

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

Func esci()
       Exit
EndFunc

Func go()
       $i=0
       If $go=True Then
               $go=False
       Else
               $go=True
       EndIf
       While 1
               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)
                       If $static[0]=$pixel[0] And $static[1]=$pixel[1] Then
                               $i+=1
                               If $i=20 Then
                                       $i=0
                                       MouseClick("left",$pixel[0]+$xadd,$pixel[1]+$yadd,1,0)
                               EndIf
                       EndIf
                       $static[0]=$pixel[0]
                       $static[1]=$pixel[1]
               EndIf
       WEnd
EndFunc


Sono riuscito a fixare dei bug e a incrementare di molto la velocità del mouse :)
Ho provato a farlo girare un po' e sono arrivato al livello 9 con 29685 punti.
fatemi sapere se c'è qualcos'altro che mi è sfuggito :)
Adesso vedrò di implementare l'utilizzo di firefox, perchè internet explorer fa schifo e, se è troppo vecchio, non riesce a visualizzare la pagina <_<
ciao :)
 
Top
0 replies since 3/2/2010, 09:59   63 views
  Share