► Afficher le texte
Code : Tout sélectionner
;Press Esc to terminate script, Pause/Break to "pause"
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d
; Options
;Variables
Dim $pixel
Dim $detect
Dim $detect1
;;;; Body of program would go here ;;;
While 1
Do
$pixel = PixelGetColor(440,505)
if Hex($pixel, 6) = "FF6600" then
MouseClick("left",711,459) ;clik sur pret donc début du combat
$detect1 = 1
EndIf
if $detect1 = 0 then
$coord=PixelSearch( 134 , 88 , 618 , 452 , "0xF6F05C" )
if not @error Then
MouseClick("left", $coord[0], $coord[1])
MouseClick("left", $coord[0] + 10, $coord[1] + 30)
EndIf
Sleep(2000)
EndIf
Until $detect1
Do
$pixel = PixelGetColor(52,235)
if Hex($pixel, 6) = "514A3C" then
$coorda= PixelSearch( 0 , 0, 701 , 434 ,"0xFF6100")
if not @error Then
MouseClick("left",$coorda[0],$coorda[1])
EndIf
Sleep(200)
$detect = 1
endif
Sleep(100)
if $detect = 0 then
$pixel = PixelGetColor(439,505)
if Hex($pixel, 6) = "FF6600" then
MouseClick("left",533,548)
$coord1=PixelSearch( 134 , 88 , 618 , 452 , "0x0000FF" )
if not @error Then
MouseClick("left", $coord1[0], $coord1[1])
EndIf
MouseClick("left",485,585)
endif
endif
Until $detect = 1 ;voila le probleme est la après avoir réalisé la 1er boucle il sort bien puis fait la 2em boucle mais le problème s'est qu'il ne sort pas de la 2em boucle ,il ne recomence pas depuis le debut.
WEnd
;;;;;;;;
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc
Func Terminate()
Exit 0
EndFunc
Func ShowMessage()
MsgBox(4096,"","http://Cadernis.free.fr/")
EndFunc

