PHP Code:
#include <file.au3>
#include <array.au3>
#include <String.au3>
#include <GuiConstantsEX.au3>
#include <Staticconstants.au3>
;Hotkeys
#Region "HotKeys"
HotKeySet("{F1}", "SetMiningStuff")
HotKeySet("{F2}", "MiningWithTori")
HotKeySet("{ESC}","Close")
#EndRegion
;Globals
#Region "Globals"
Global $LeftCritter, $RightCritter, $LCPixel, $RCPixel, $pos, $hWnd, $LPixel, $RPixel, $miner
Global $LeftCritter_X, $LeftCritter_Y, $RightCritter_X, $RightCritter_Y
#EndRegion
InputBox("NosMinigameBot","Please enter your Windowname. You can find it out with the 'AutoIt v3 Window Info'","In Germany it's NosTale")
if @error = 1 Then
Exit
EndIf
$left = InputBox("NosMinigameBot","Now you type in the coords where you hit the worms ON THE LEFT SIDE. Use the 'AutoIt v3 Window Info' ,too","On my PC they are 524,693")
if @error = 1 Then
Exit
EndIf
$right = InputBox("NosMinigameBot","And for the right side!","On my PC they are 768,693")
if @error = 1 Then
Exit
EndIf
$LeftCritter = StringSplit(""$left"",",")
$RightCritter = StringSplit(""$right"",",")
;Self Explainitory
$LeftCritter_X = $LeftCritter[1]
$LeftCritter_Y = $LeftCritter[2]
$RightCritter_X = $RightCritter[1]
$RightCritter_Y = $RightCritter[2]
MsgBox(0,"NosMinigameBot","Now start the minigame and press F1 fast and then F2")
MsgBox(0,"NosMinigameBot","You always must press F1 and then F2 after you start new game")
while 1
sleep(100)
WEnd
Func SetMiningStuff()
$hWnd = WinGetHandle(''$fenster'')
;Use this as SOON as the Start button of the Minigame is clicked
;This sets the Pixel colors to watch for.
$RCPixel = PixelGetColor($RightCritter_X, $RightCritter_Y, $hWnd)
$LCPixel = PixelGetColor($LeftCritter_X, $LeftCritter_Y, $hWnd)
EndFunc
Func MiningWithTori()
$miner = NOT $miner
While $miner
$hWnd = WinGetHandle(''$fenster'')
;This Sets new Variables as the Constant Pixel Color within ths given coords
$RPixel = PixelGetColor($RightCritter_X, $RightCritter_Y, $hWnd)
$LPixel = PixelGetColor($LeftCritter_X, $LeftCritter_Y, $hWnd)
;If the Constant Pixel color changes
Sleep("40")
If $RPixel <> $RCPixel then
Send("{RIGHT}",0)
Sleep("40")
EndIf
If $LPixel <> $LCPixel then
Send("{LEFT}",0)
Sleep("40")
EndIf
;If no change is present Keep Hitting that Rock you crackhead i know u like it !
Send("{UP}")
Sleep("1")
WEnd
EndFunc
Func Close()
Exit 0
EndFunc