Curveball bot

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




Un semplice bot per il gioco Curveball:

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

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

Opt("PixelCoordMode",2)

Global $title="Curve ball-bot by Misterx", $go=False, $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,2)
               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


p.s.:c'è ne sono a milioni in giro per la rete, ma mi sono divertito lo stesso a farlo xD
 
Top
nicofossa96
CAT_IMG Posted on 2/2/2010, 18:16     +1   -1




Non so, ma io ho win xp e non va, dopo aver caricato e premuto f2 il mouse si sposta sulla barra del titolo...
 
Top
xdmisterx
CAT_IMG Posted on 3/2/2010, 09:06     +1   -1




lo so. ha qualche bug(diciamone molti xD). probabilmente fa così se sposti la finestra, perchè si ritrova a cerare nelle coordinate sbagliate. adesso darò un'occhiata che forse penso di saper come risolvere.
p.s.: ho riscontrato un problema in quanto se non si ha la versione aggiornata di ie alla numero 8, non riesce a far funzionare i file flash :(
 
Top
2 replies since 2/2/2010, 16:39   49 views
  Share