Code:
; note: can be improved, if so please share with the comunity
; If you want to support you can throw a penny here.
; LTC: LfHAabU9Lqzn6sgdYcfoLZFoZjf36PW3rf
; NMC: N7P667yC5aMTUFb4h7S1UVbMzvvmfZsXjw
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <Array.au3>
#include <File.au3>
#include <GDIPlus.au3>
#include <ScreenCapture.au3>
#include <WinAPI.au3>
#include <ScrollBarConstants.au3>
#include <WindowsConstants.au3>
#include <GuiComboBox.au3>
#include <GuiListBox.au3>
#include <GuiButton.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <Math.au3>
#include <GuiListBox.au3>
Opt("WinTitleMatchMode", 1)
Opt("PixelCoordMode", 2)
Opt("MouseCoordMode", 2)
If Not FileExists("ImageSearchDLL.dll") Then
MsgBox(4096,"", "ImageSearchDLL.dll not found, some features will not be available.", 10)
EndIf
If Not FileExists("ImageSearchDLL_x64.dll") Then
MsgBox(4096,"", "ImageSearchDLL_x64.dll not found, some features will not be available.", 10)
EndIf
If Not FileExists("pp.png") Then
MsgBox(4096,"", "pp.png not found, some features will not be available.", 10)
EndIf
If Not FileExists("pp2.png") Then
MsgBox(4096,"", "pp2.png not found, some features will not be available.", 10)
EndIf
If Not FileExists("move.wav") Then
MsgBox(4096,"", "move.wav not found, some features will not be available.", 10)
EndIf
If Not FileExists("config.ini") Then
MsgBox(4096,"", "config.ini not found, creating a new one.", 10)
EndIf
If Not FileExists("hp.png") Then
MsgBox(4096,"", "hp.png not found, some features will not be available.", 10)
EndIf
Dim $casino = 0
Dim $abutton
Dim $bbutton
Dim $square
Dim $walktime
Dim $pokecenter = 0
Dim $walked = 0
Dim $moveforget
Dim $catch = 0
Dim $waypoint = 1
Dim $catched = 1
Dim $job
Dim $pp1 = 1
Dim $pp2 = 1
Dim $pp3 = 1
Dim $pp4 = 1
Dim $align = 0
Dim $Label1
Dim $check = 0
Dim $e = -1
Dim $selectedatk[10]
Dim $pp = 1
Dim $Label2
Dim $Label3
Dim $Label4
Dim $read = 0
Dim $fish
Dim $hurt = 1
Dim $canebutton = "{F5}"
Dim $Label5
dim $atk
Dim $totalcount = 0
Dim $count = 0
Dim $something = 0
Dim $move1
Dim $move2
Dim $move3
Dim $move4
Dim $info1
Dim $info2
Dim $info3
Dim $info4 = "Press [Pause] to pause / F11 to resume / F12 to quit"
Dim $info5 = "Debug enabled"
Dim $image
Dim $image2
Dim $pos
Dim $walk = 0
Dim $log
Dim $dll = DllOpen("user32.dll")
Global $x, $y, $image
Dim $user
Dim $pass
Dim $debug
Dim $change = 0
Dim $train
Dim $iIndex2
Dim $iIndex
Dim $offscreen = 0
$job = setting()
HotKeySet("{F7}", "TogglePause")
HotKeySet("{F9}", "quit")
If $debug = 1 Then
GUICreate("uglybot", 225, 300, 20, 0, BitOR($WS_BORDER, $WS_POPUP), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
$Label5 = GUICtrlCreateList("debug menu", 0, 96, 112, 200, BitOR($WS_BORDER, $WS_VSCROLL))
$Label6 = GUICtrlCreateList("debug menu", 112, 96, 113, 200, BitOR($WS_BORDER, $WS_VSCROLL))
GUICtrlSetLimit(-1, 200)
Else
GUICreate("uglybot", 225, 100, 20, 0, BitOR($WS_BORDER, $WS_POPUP), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
EndIf
$Label1 = GUICtrlCreateLabel("Label1", 0, 0, 225, 25)
$Label2 = GUICtrlCreateLabel("Label2", 0, 24, 225, 25)
$Label3 = GUICtrlCreateLabel("Label3", 0, 48, 225, 25)
$Label4 = GUICtrlCreateLabel("Label3", 0, 72, 225, 25)
GUISetState()
While 1;100ms(50)
;~ Sleep(100)
Sleep(50)
$info2 = "RUNNING PRESS F7 TO PAUSE / F9 TO QUIT"
GUICtrlSetData($Label2, $info2)
If $debug = 1 Then
$info5 = "In loop"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
GUICtrlSetData($Label1, $info1)
GUICtrlSetData($Label2, $info2)
GUICtrlSetData($Label3, $info3)
GUICtrlSetData($Label4, $info4)
Switch $job
Case 1
$info3 = "Function start()"
GUICtrlSetData($Label3, $info3)
$job = start()
Case 2
$info3 = "Function state()"
GUICtrlSetData($Label3, $info3)
$job = state()
Case 3
$info3 = "Function fight()"
GUICtrlSetData($Label3, $info3)
$job = fight()
Case 4
$info3 = "Function walk()"
GUICtrlSetData($Label3, $info3)
$job = walk()
Case 5
$info3 = "Function login()"
GUICtrlSetData($Label3, $info3)
$job = login()
Case 6
$info3 = "Function fishbot()"
GUICtrlSetData($Label3, $info3)
$job = fishbot()
Case 7
$info3 = "Function casinobot()"
GUICtrlSetData($Label3, $info3)
$job = casinobot()
Case 8
$job = setting()
EndSwitch
WEnd
Func fight();0-100ms 1/20
$check = $check + 1
If $debug = 1 Then
$info5 = "In fight"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
If $something = 1 Then
$count = $count + 1
$totalcount = $totalcount + 1
$something = 0
EndIf
;~ $image = PixelSearch(110, 395, 750, 540, 0x8DC655, 5);greenbar
;~ If IsArray($image) Then
;~ If $debug = 1 Then
;~ $info6 = "Mousclick left - greenbar"
;~ _GUICtrlListBox_BeginUpdate($Label6)
;~ _GUICtrlListBox_InsertString($Label6, $info6)
;~ _GUICtrlListBox_EndUpdate($Label6)
;~ $iIndex = _GUICtrlListBox_GetCurSel($Label6)
;~ $iIndex = $iIndex + 1
;~ _GUICtrlListBox_SetCurSel($Label6, $iIndex)
;~ EndIf
;~ MouseClick("left", $image[0], $image[1], 1, 0)
;~ Sleep(50)
;~ If $debug = 1 Then
;~ $info6 = "B button sent"
;~ _GUICtrlListBox_BeginUpdate($Label6)
;~ _GUICtrlListBox_InsertString($Label6, $info6)
;~ _GUICtrlListBox_EndUpdate($Label6)
;~ $iIndex = _GUICtrlListBox_GetCurSel($Label6)
;~ $iIndex = $iIndex + 1
;~ _GUICtrlListBox_SetCurSel($Label6, $iIndex)
;~ EndIf
;~ Send($bbutton)
;~ Sleep(50)
;~ Return 1
;~ EndIf
$image = _ImageSearchArea('hp.png', 1, $pos[0]+129, $pos[1]+456, $pos[0]+756, $pos[1]+556, $x, $y, 80)
If $image = 1 Then;50ms
$info3 = "Warning one guy died"
GUICtrlSetData($Label3, $info3)
Sleep(50)
$image = _ImageSearchArea('hp.png', 1, $pos[0]+129, $pos[1]+456, $pos[0]+336, $pos[1]+504, $x, $y, 80)
If $image = 1 Then
;~ $poke1 = 0
Else
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send($abutton)
Sleep(50)
Send($bbutton)
Return 1
EndIf
$image = _ImageSearchArea('hp.png', 1, $pos[0]+337, $pos[1]+456, $pos[0]+544, $pos[1]+504, $x, $y, 80)
If $image = 1 Then
;~ $poke2 = 0
Else
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send($abutton)
Sleep(50)
Send($bbutton)
Return 1
EndIf
$image = _ImageSearchArea('hp.png', 1, $pos[0]+551, $pos[1]+456, $pos[0]+754, $pos[1]+504, $x, $y, 80)
If $image = 1 Then
;~ $poke3 = 0
Else
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send($abutton)
Sleep(50)
Send($bbutton)
Return 1
EndIf
$image = _ImageSearchArea('hp.png', 1, $pos[0]+129, $pos[1]+511, $pos[0]+336, $pos[1]+554, $x, $y, 80)
If $image = 1 Then
;~ $poke4 = 0
Else
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{DOWN}")
Sleep(50)
Send($abutton)
Sleep(50)
Send($bbutton)
Return 1
EndIf
$image = _ImageSearchArea('hp.png', 1, $pos[0]+337, $pos[1]+511, $pos[0]+544, $pos[1]+554, $x, $y, 80)
If $image = 1 Then
;~ $poke5 = 0
Else
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{DOWN}")
Sleep(50)
Send($abutton)
Sleep(50)
Send($bbutton)
Return 1
EndIf
$image = _ImageSearchArea('hp.png', 1, $pos[0]+551, $pos[1]+511, $pos[0]+754, $pos[1]+554, $x, $y, 80)
If $image = 1 Then
;~ $poke6 = 0
Else
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{DOWN}")
Sleep(50)
Send($abutton)
Sleep(50)
Send($bbutton)
Return 1
EndIf
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send($abutton)
Send($bbutton)
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send($abutton)
Send($bbutton)
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send($abutton)
Send($bbutton)
Sleep(50)
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{DOWN}")
Sleep(50)
Send($abutton)
Send($bbutton)
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{DOWN}")
Sleep(50)
Send($abutton)
Send($bbutton)
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send("{DOWN}")
Sleep(50)
Send($abutton)
Send($bbutton)
Sleep(50)
Return 1
EndIf
$image = PixelSearch(110, 395, 540, 540, 0xCFA806, 5);orange
If IsArray($image) Then
Sleep(50)
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton)
If $catch = 1 Then
$catched = 0
$i = 0
While $i < 3
Sleep(50)
$image = PixelSearch(160, 105, 400, 115, 0xA80000, 5);redpokeball
$i = $i + 1
If IsArray($image) Then
$catched = 1
EndIf
WEnd
If $catched = 0 Then
Sleep(50)
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Up stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{UP}")
Sleep(50)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(50)
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT}")
Sleep(50)
$i = 0
While $i < 3
Sleep(50)
$image = PixelSearch(117, 443, 459, 474, 0xCFA806, 5);orange
$i = $i + 1
If IsArray($image) Then
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(500)
Return 1
Else;no balls
$catch = 0
Sleep(50)
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton)
Sleep(50)
Return 1
EndIf
WEnd
EndIf
EndIf
If $train = 1 And $change = 0 Then
Sleep(50)
If $debug = 1 Then
$info6 = "Left stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{LEFT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Left stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{LEFT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}")
Sleep(50)
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}")
Sleep(50)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(50)
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT}")
Sleep(50)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(500)
$change = 1
Else
$info3 = "Attacking."
GUICtrlSetData($Label3, $info3)
Sleep(50)
If $debug = 1 Then
$info6 = "Left stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{LEFT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Left stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{LEFT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Up stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{UP}")
Sleep(50)
If $debug = 1 Then
$info6 = "Up stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{UP}")
Sleep(50)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(50)
$pp1 = 1
$pp2 = 1
$pp3 = 1
$pp4 = 1
$i = 0
While $i < 3
$info3 = "Got PP?"
GUICtrlSetData($Label3, $info3)
Sleep(50)
$i = $i + 1
$image2 = _ImageSearchArea('pp2.png', 1, $pos[0]+122, $pos[1]+453, $pos[0]+227, $pos[1]+501, $x, $y, 80)
$image = _ImageSearchArea('pp.png', 1, $pos[0]+122, $pos[1]+453, $pos[0]+227, $pos[1]+501, $x, $y, 80)
If $image = 1 Or $image2 = 1 Then
$info3 = "Warning no PP"
GUICtrlSetData($Label3, $info3)
$pp1 = 0
EndIf
$image2 = _ImageSearchArea('pp2.png', 1, $pos[0] + 335, $pos[1] + 454, $pos[0] + 437, $pos[1] + 496, $x, $y, 80)
$image = _ImageSearchArea('pp.png', 1, $pos[0] + 335, $pos[1] + 454, $pos[0] + 437, $pos[1] + 496, $x, $y, 80)
If $image = 1 Or $image2 = 1 Then
$info3 = "Warning no PP"
GUICtrlSetData($Label3, $info3)
$pp2 = 0
EndIf
$image2 = _ImageSearchArea('pp2.png', 1, $pos[0] + 125, $pos[1] + 507, $pos[0] + 220, $pos[1] + 555, $x, $y, 80)
$image = _ImageSearchArea('pp.png', 1, $pos[0] + 125, $pos[1] + 507, $pos[0] + 220, $pos[1] + 555, $x, $y, 80)
If $image = 1 Or $image2 = 1 Then
$info3 = "Warning no PP"
GUICtrlSetData($Label3, $info3)
$pp3 = 0
EndIf
$image2 = _ImageSearchArea('pp2.png', 1, $pos[0] + 336, $pos[1] + 509, $pos[0] + 440, $pos[1] + 555, $x, $y, 80)
$image = _ImageSearchArea('pp.png', 1, $pos[0] + 336, $pos[1] + 509, $pos[0] + 440, $pos[1] + 555, $x, $y, 80)
If $image = 1 Or $image2 = 1 Then
$info3 = "Warning no PP"
GUICtrlSetData($Label3, $info3)
$pp4 = 0
EndIf
WEnd
Dim $selectedatk[10]
$e = -1
If $move1 = 1 And $pp1 = 1 Then
$e = $e+1
$selectedatk[$e] = "$move1"
EndIf
If $move2 = 1 And $pp2 = 1 Then
$e = $e+1
$selectedatk[$e] = "$move2"
EndIf
If $move3 = 1 And $pp3 = 1 Then
$e = $e+1
$selectedatk[$e] = "$move3"
EndIf
If $move4 = 1 And $pp4 = 1 Then
$e = $e+1
$selectedatk[$e] = "$move4"
EndIf
If $e = -1 Then
$e = $e+1
$selectedatk[$e] = "$move4"
$e = $e+1
$selectedatk[$e] = "$move3"
$e = $e+1
$selectedatk[$e] = "$move2"
$e = $e+1
$selectedatk[$e] = "$move1"
EndIf
$nothing = ""
$empty = _ArraySearch($selectedatk, $nothing)
If $empty > 0 Then
_ArrayDelete($selectedatk, $empty)
$empty = _ArraySearch($selectedatk, $nothing)
EndIf
If $empty > 0 Then
_ArrayDelete($selectedatk, $empty)
$empty = _ArraySearch($selectedatk, $nothing)
EndIf
If $empty > 0 Then
_ArrayDelete($selectedatk, $empty)
$empty = _ArraySearch($selectedatk, $nothing)
EndIf
If $empty > 0 Then
_ArrayDelete($selectedatk, $empty)
$empty = _ArraySearch($selectedatk, $nothing)
EndIf
$pick = Random(0,$e, 1)
$e = -1
If $selectedatk[$pick] = "$move1" Then
If $debug = 1 Then
$info6 = "Left stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{LEFT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Up stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{UP}")
Sleep(50)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(50)
Return 1
EndIf
If $selectedatk[$pick] = "$move2" Then
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Up stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{UP}")
Sleep(50)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(50)
Return 1
EndIf
If $selectedatk[$pick] = "$move3" Then
If $debug = 1 Then
$info6 = "Left stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{LEFT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}")
Sleep(50)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(50)
Return 1
EndIf
If $selectedatk[$pick] = "$move4" Then
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT}")
Sleep(50)
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}")
Sleep(50)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton)
Sleep(50)
Return 1
EndIf
EndIf
Return 1
EndIf
$image = PixelSearch(875, 515, 895, 535, 0xFFFFFF, 5);fleche blanche
If IsArray($image) Then
$info3 = "Input needed."
GUICtrlSetData($Label3, $info3)
Sleep(50)
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton)
Sleep(50)
Return 1
EndIf
If $check > 20 Then;100ms 1/20
Sleep(50)
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT}");juste au cas ou on perde le focus
Sleep(50)
$check = 0
EndIf
$image = PixelSearch(780, 430, 800, 450, 0x839299, 5);b de move
If IsArray($image) Then
If $moveforget = 1 Then
$info3 = "Move detected"
GUICtrlSetData($Label3, $info3)
Sleep(50)
MouseClick("left", $image[0], $image[1], 1, 0)
Sleep(50)
MouseClick("left", 509, 377, 1, 0)
Sleep(50)
Return 1
Else
SoundPlay("move.wav", 1)
Sleep(500)
Return 1
EndIf
EndIf
Return 1
EndFunc ;==>fight
Func walk();0
If $debug = 1 Then
$info5 = "In walk"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
if $waypoint = 1 Then
Sleep(100)
$image = _ImageSearchArea('poke.png', 1, $pos[0], $pos[1], $pos[2], $pos[3], $x, $y, 55)
If $image = 1 Then;in pc but where?
$pokecenter = 1;set waypoint for after pokecenter
if $align = 0 Then
If $x < $pos[0]+490 Then;perso a droite donc send gauche
Sleep(100)
Send("{LEFT down}")
Sleep(100)
Send("{LEFT up}")
Sleep(100)
Return 1
EndIf
If $x > $pos[0]+550 Then;perso a gauche donc send droite
Sleep(100)
Send("{RIGHT down}")
Sleep(100)
Send("{RIGHT up}")
Sleep(100)
Return 1
EndIf
If $y < $pos[1]+275 Then;perso en bas donc send haut
Sleep(100)
Send("{UP down}")
Sleep(100)
Send("{UP up}")
Sleep(100)
Return 1
EndIf
If $y > $pos[1]+310 Then;perso en haut (wtf?) donc send bas
Sleep(100)
Send("{DOWN down}")
Sleep(100)
Send("{DOWN up}")
Sleep(100)
Return 1
EndIf
;sinon on est aligné tout va bien on sort
$align = 1
EndIf
;~ Sleep(100)
Send("{DOWN down}")
Sleep(300)
Send("{DOWN up}")
;~ Sleep(500)
Return 1
EndIf; on est dehors
$align = 0
;some kind of read waypoint file
;wp for pc2
If $pokecenter = 1 Then;here is wp 1 for pc2 if so can there be others
Send("{DOWN down}");first step is to exit PC
Sleep(250)
Send("{DOWN up}")
Sleep(2000);then wait for load
;~ $file = FileOpen("waypoint.txt", 0)
Sleep(250)
$File = @sCripTDir & '\waypoint.txt'
Run @autoItExe & ' /AutoIt3ExecuteScript ' & FileGetShortName($File))
Sleep(250)
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{RIGHT down}")
;~ Sleep(250)
;~ Send("{RIGHT up}")
;~ Send("{RIGHT down}")
;~ Sleep(250)
;~ Send("{RIGHT up}")
;~ Send("{RIGHT down}")
;~ Sleep(250)
;~ Send("{RIGHT up}")
;~ Send("{RIGHT down}")
;~ Sleep(250)
;~ Send("{RIGHT up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Send("{DOWN down}")
;~ Sleep(250)
;~ Send("{DOWN up}")
;~ Sleep(250)
$pokecenter = 0
Return 1
EndIf
EndIf
$something = 1
$change = 0
If $square = 1 Then
If $walk < 1 Then
If $walked < $walktime Then
$info3 = "Walking down."
GUICtrlSetData($Label3, $info3)
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN down}")
Sleep(250)
Send("{DOWN up}")
;~ Sleep(50)
$walked = $walked + 1
Return 1
EndIf
$walk = 1
$walked = 0
Return 1
EndIf
If $walk < 2 Then
If $walked < $walktime Then
$info3 = "Walking left."
GUICtrlSetData($Label3, $info3)
If $debug = 1 Then
$info6 = "Left stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{LEFT down}")
Sleep(250)
Send("{LEFT up}")
;~ Sleep(50)
$walked = $walked + 1
Return 1
EndIf
$walk = 2
$walked = 0
Return 1
EndIf
If $walk < 3 Then
If $walked < $walktime Then
$info3 = "Walking up."
GUICtrlSetData($Label3, $info3)
If $debug = 1 Then
$info6 = "Up stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{UP down}")
Sleep(250)
Send("{UP up}")
;~ Sleep(50)
$walked = $walked + 1
Return 1
EndIf
$walk = 3
$walked = 0
Return 1
EndIf
If $walk < 4 Then
If $walked < $walktime Then
$info3 = "Walking right."
GUICtrlSetData($Label3, $info3)
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT down}")
Sleep(250)
Send("{RIGHT up}")
;~ Sleep(50)
$walked = $walked + 1
Return 1
EndIf
$walk = 0
$walked = 0
Return 1
EndIf
Return 1
EndIf
If $square = 0 Then
If $walk < 1 Then
If $walked < $walktime Then
$info3 = "Walking down."
GUICtrlSetData($Label3, $info3)
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN down}")
Sleep(200)
Send("{DOWN up}")
;~ Sleep(50)
$walked = $walked + 1
Return 1
EndIf
$walk = 1
$walked = 0
Return 1
EndIf
If $walk < 2 Then
If $walked < $walktime Then
$info3 = "Walking up."
GUICtrlSetData($Label3, $info3)
If $debug = 1 Then
$info6 = "Up stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{UP down}")
Sleep(200)
Send("{UP up}")
;~ Sleep(50)
$walked = $walked + 1
Return 1
EndIf
$walk = 0
$walked = 0
Return 1
EndIf
Return 1
EndIf
If $square = 2 Then
If $walk < 1 Then
If $walked < $walktime Then
$info3 = "Walking left."
GUICtrlSetData($Label3, $info3)
If $debug = 1 Then
$info6 = "Left stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{LEFT down}")
Sleep(200)
Send("{LEFT up}")
;~ Sleep(50)
$walked = $walked + 1
Return 1
EndIf
$walk = 1
$walked = 0
Return 1
EndIf
If $walk < 2 Then
If $walked < $walktime Then
$info3 = "Walking right."
GUICtrlSetData($Label3, $info3)
If $debug = 1 Then
$info6 = "Right stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{RIGHT down}")
Sleep(200)
Send("{RIGHT up}")
;~ Sleep(50)
$walked = $walked + 1
Return 1
EndIf
$walk = 0
$walked = 0
Return 1
EndIf
Return 1
EndIf
Return 1
EndFunc ;==>walk
Func login();
If $debug = 1 Then
$info5 = "In login"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
If $log = 1 Then
$info3 = "Loggin in..."
GUICtrlSetData($Label3, $info3)
Sleep(500)
If $debug = 1 Then
$info6 = "Mouseclick - login input"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
MouseClick("left", 582, 351, 2, 0);login
Sleep(50)
If $debug = 1 Then
$info6 = "Backspace sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{BS down}")
Sleep(1700)
Send("{BS up}")
Sleep(50)
If $debug = 1 Then
$info6 = "Delete sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DEL down}")
Sleep(1700)
Send("{DEL up}")
Sleep(50)
If $debug = 1 Then
$info6 = "Username sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($user)
Sleep(50)
If $debug = 1 Then
$info6 = "Tabulation sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{TAB}")
Sleep(50)
If $debug = 1 Then
$info6 = "Backspace sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{BS down}")
Sleep(1500)
Send("{BS up}")
Sleep(50)
If $debug = 1 Then
$info6 = "Delete sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DEL down}")
Sleep(1500)
Send("{DEL up}")
Sleep(50)
If $debug = 1 Then
$info6 = "Password sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($pass)
Sleep(50)
If $debug = 1 Then
$info6 = "Enter sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{ENTER}")
Sleep(3000)
If $debug = 1 Then
$info6 = "Enter sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{ENTER}")
Sleep(3000)
If $debug = 1 Then
$info6 = "Enter sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{ENTER}")
Sleep(3000)
$info3 = "Logged in."
GUICtrlSetData($Label3, $info3)
Return 1;start
Else
$info3 = "Autologin not enabled, please login."
GUICtrlSetData($Label3, $info3)
Return 1;start
EndIf
EndFunc ;==>login
Func state();50ms + 50 (0)
If WinGetPos("uglybot", "") <> WinGetPos("[CLASS:LWJGL]") Then
WinMove("uglybot", "", $pos[0]-225, $pos[1])
EndIf
If $debug = 1 Then
$info5 = "In state"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
$image = PixelSearch(503, 715, 515, 720, 0x242C31, 1)
If IsArray($image) And $catch = 1 And $casino = 0 Then;500 only 1
Send("{F12}")
Sleep(500)
Return 1
EndIf
$image = PixelSearch(200, 400, 700, 420, 0x1D415D, 3);bleu fight 50ms
If IsArray($image) Then
;~ Sleep(50)
Return 3
EndIf
$image = PixelSearch(500, 85, 520, 95, 0xF3EA6D, 3);login mmo 50ms
If IsArray($image) Then
;~ Sleep(50)
Return 5
EndIf
;~ Sleep(50) ;50ms
If $fish = 1 Then
Return 6
EndIf
If $casino = 1 Then
Return 7
EndIf
Return 4;walk 0ms
EndFunc ;==>state
Func start();50ms (0)
If $debug = 1 Then
$info5 = "In start"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
$info1 = "Initialising..."
GUICtrlSetData($Label1, $info1)
If $read = 0 Then
$log = IniRead("config.ini", "setting", "log", "0")
If $log = 1 Then
$user = IniRead("config.ini", "setting", "user", "")
$pass = BinaryToString(IniRead("config.ini", "setting", "pass", '"passdefault"'), 4)
EndIf
$debug = IniRead("config.ini", "setting", "debug", "0")
$train = IniRead("config.ini", "setting", "train", "0")
$square = IniRead("config.ini", "setting", "square", "0")
$walktime = IniRead("config.ini", "setting", "walktime", "800")
$abutton = IniRead("config.ini", "setting", "abutton", "z")
$bbutton = IniRead("config.ini", "setting", "bbutton", "x")
$moveforget = IniRead("config.ini", "setting", "moveforget", "0")
$fish = IniRead("config.ini", "setting", "fish", "0")
$read = 1
$move1 = IniRead("config.ini", "setting", "move1", "1")
$move2 = IniRead("config.ini", "setting", "move2", "0")
$move3 = IniRead("config.ini", "setting", "move3", "0")
$move4 = IniRead("config.ini", "setting", "move4", "0")
EndIf
If $casino = 1 Then
$info4 = "Number of gamble: "&$totalcount
Else
$info4 = "Number of Pokemon fought: "&$totalcount
EndIf
If Not WinExists("[CLASS:LWJGL]") Then;50ms
$info1 = "Window not found, waiting for game."
GUICtrlSetData($Label1, $info1)
Sleep(50)
Return 1
EndIf
If WinActive("[CLASS:LWJGL]") Then;50ms
if $offscreen = 1 Then
WinMove("[CLASS:LWJGL]", "", @desktopWidth - 20, 0)
EndIf
$pos = WinGetPos("[CLASS:LWJGL]")
$info1 = "Window found, focus OK."
WinMove("[CLASS:LWJGL]", "", $pos[0], $pos[1], 1032, 795)
GUICtrlSetData($Label1, $info1)
;~ Sleep(50); 50ms
Return 2;state
EndIf
WinActivate("[CLASS:LWJGL]")
$info1 = "Window found, waiting for game focus."
GUICtrlSetData($Label1, $info1)
;~ Sleep(50);50ms
Return 1
EndFunc ;==>start
Func _ImageSearchArea($FindImage, $ResultPosition, $x1, $y1, $right, $bottom, ByRef $x, ByRef $y, $Tolerance)
If $Tolerance > 0 Then $FindImage = "*" & $Tolerance & " " & $FindImage
If @autoItX64 Then
$Result = DllCall("ImageSearchDLL_x64.dll", "str", "ImageSearch", "int", $x1, "int", $y1, "int", $right, "int", $bottom, "str", $FindImage)
Else
$Result = DllCall("ImageSearchDLL.dll", "str", "ImageSearch", "int", $x1, "int", $y1, "int", $right, "int", $bottom, "str", $FindImage)
EndIf
If $Result = "0" Then Return 0
$Array = StringSplit($Result[0], "|")
If (UBound($Array) >= 4) Then
$x = Int(Number($Array[2]))
$y = Int(Number($Array[3]))
If $ResultPosition = 1 Then
$x = $x + Int(Number($Array[4]) / 2)
$y = $y + Int(Number($Array[5]) / 2)
EndIf
Return 1
EndIf
EndFunc ;==>_ImageSearchArea
Func TogglePause()
If $debug = 1 Then
$info5 = "In pause"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
While 1
$info2 = "PAUSED PRESS F8 TO RESUME / F9 TO QUIT"
GUICtrlSetData($Label2, $info2)
Sleep(100)
If _IsPressed("77", $dll) Then
Return 1
EndIf
WEnd
EndFunc ;==>TogglePause
Func quit()
If $offscreen = 1 Then
WinMove("[CLASS:LWJGL]", "", 0, 0)
EndIf
If $debug = 1 Then
$info5 = "In quit"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
Sleep(100)
Exit
EndFunc ;==>TogglePause
Func setting()
#region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrator\Desktop\pokemmo bot\koda\Forms\Form1.kxf
$Form1 = GUICreate("UglyBot Setting", 466, 294, 287, 138)
$Label1 = GUICtrlCreateLabel("Auto Login", 16, 8, 55, 17)
$Label2 = GUICtrlCreateLabel("Username", 16, 36, 52, 17)
$Label3 = GUICtrlCreateLabel("Password", 16, 63, 50, 17)
$Label4 = GUICtrlCreateLabel("Debug Mode", 16, 91, 66, 17)
$Label5 = GUICtrlCreateLabel("Training", 16, 118, 42, 17)
$Label6 = GUICtrlCreateLabel("Walking type", 16, 146, 66, 17)
$Label7 = GUICtrlCreateLabel("Walking steps", 16, 173, 107, 17)
$Label8 = GUICtrlCreateLabel("Button A", 16, 201, 45, 17)
$Label9 = GUICtrlCreateLabel("Button B", 16, 228, 45, 17)
$Button1 = GUICtrlCreateButton("Save and start", 16, 256, 89, 25)
$Checkbox1 = GUICtrlCreateCheckbox("", 104, 8, 97, 17)
$Checkbox2 = GUICtrlCreateCheckbox("", 104, 89, 17, 17)
$Radio1 = GUICtrlCreateRadio("Square", 104, 143, 113, 17)
$Radio2 = GUICtrlCreateRadio("Left/Right", 224, 144, 113, 17)
$Radio3 = GUICtrlCreateRadio("Up/Down", 344, 144, 113, 17)
$Input3 = GUICtrlCreateInput("500", 104, 170, 121, 21)
$Input4 = GUICtrlCreateInput("Z", 104, 197, 121, 21)
$Input5 = GUICtrlCreateInput("X", 104, 224, 121, 21)
$Checkbox3 = GUICtrlCreateCheckbox("", 104, 116, 17, 17)
$Checkbox4 = GUICtrlCreateCheckbox("Forget new Moves", 144, 116, 107, 17)
$Checkbox5 = GUICtrlCreateCheckbox("FishBot (F5)", 144, 89, 107, 17)
$Checkbox6 = GUICtrlCreateCheckbox("Move 1", 224, 40, 97, 17)
$Checkbox8 = GUICtrlCreateCheckbox("Move 3", 224, 64, 97, 17)
$Checkbox7 = GUICtrlCreateCheckbox("Move 2", 336, 40, 97, 17)
$Checkbox9 = GUICtrlCreateCheckbox("Move 4", 336, 64, 97, 17)
$Checkbox10 = GUICtrlCreateCheckbox("Catch new pokemons", 336, 88, 107, 17)
$Checkbox11 = GUICtrlCreateCheckbox("Use waypoint", 336, 112, 107, 17)
$Checkbox12 = GUICtrlCreateCheckbox("Use offscreen", 336, 196, 107, 17)
$Label10 = GUICtrlCreateLabel("Move to use", 224, 16, 79, 17)
$Button2 = GUICtrlCreateButton("Casino bot", 312, 256, 73, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
If Not FileExists("config.ini") Then
IniWrite("config.ini", "setting", "log", "0")
IniWrite("config.ini", "setting", "user", '"user"')
IniWrite("config.ini", "setting", "pass", '"pass"')
IniWrite("config.ini", "setting", "debug", "0")
IniWrite("config.ini", "setting", "train", "0")
IniWrite("config.ini", "setting", "square", "1")
IniWrite("config.ini", "setting", "walktime", "5")
IniWrite("config.ini", "setting", "abutton", "z")
IniWrite("config.ini", "setting", "bbutton", "x")
IniWrite("config.ini", "setting", "moveforget", "0")
IniWrite("config.ini", "setting", "fish", "0")
IniWrite("config.ini", "setting", "move1", "1")
IniWrite("config.ini", "setting", "move2", "0")
IniWrite("config.ini", "setting", "move3", "0")
IniWrite("config.ini", "setting", "move4", "0")
IniWrite("config.ini", "setting", "catch", "0")
IniWrite("config.ini", "setting", "waypoint", "0")
IniWrite("config.ini", "setting", "offscreen", "0")
EndIf
If IniRead("config.ini", "setting", "log", "0") = 1 Then
_GUICtrlButton_SetCheck($Checkbox1)
$Input1 = GUICtrlCreateInput("", 104, 35, 97, 21)
$Input2 = GUICtrlCreateInput("", 104, 62, 97, 21, $ES_PASSWORD)
GUICtrlSetData($Input1, IniRead("config.ini", "setting", "user", '"userdefault"'))
$pass = BinaryToString(IniRead("config.ini", "setting", "pass", '"passdefault"'), 4)
GUICtrlSetData($Input2, $pass)
$log = 1
Else
$log = 0
EndIf
If IniRead("config.ini", "setting", "debug", "0") = 1 Then
_GUICtrlButton_SetCheck($Checkbox2)
$debug = 1
Else
$debug = 0
EndIf
If IniRead("config.ini", "setting", "catch", "0") = 1 Then
_GUICtrlButton_SetCheck($Checkbox10)
$catch = 1
Else
$catch = 0
EndIf
If IniRead("config.ini", "setting", "train", "0") = 1 Then
_GUICtrlButton_SetCheck($Checkbox3)
$train = 1
Else
$train = 0
EndIf
If IniRead("config.ini", "setting", "move1", "0") = 1 Then
_GUICtrlButton_SetCheck($Checkbox6)
$move1 = 1
Else
$move1 = 0
EndIf
If IniRead("config.ini", "setting", "move2", "0") = 1 Then
_GUICtrlButton_SetCheck($Checkbox7)
$move2 = 1
Else
$move2 = 0
EndIf
If IniRead("config.ini", "setting", "move3", "0") = 1 Then
_GUICtrlButton_SetCheck($Checkbox8)
$move3 = 1
Else
$move3 = 0
EndIf
If IniRead("config.ini", "setting", "move4", "0") = 1 Then
_GUICtrlButton_SetCheck($Checkbox9)
$move4 = 1
Else
$move4 = 0
EndIf
If $move1 = 0 And $move2 = 0 And $move3 = 0 And $move4 = 0 Then
_GUICtrlButton_SetCheck($Checkbox6)
$move1 = 1
EndIf
If IniRead("config.ini", "setting", "square", "1") = 0 Then
_GUICtrlButton_SetCheck($Radio3)
_GUICtrlButton_SetCheck($Radio1, $BST_UNCHECKED)
_GUICtrlButton_SetCheck($Radio2, $BST_UNCHECKED)
$square = 0
EndIf
If IniRead("config.ini", "setting", "square", "1") = 2 Then
_GUICtrlButton_SetCheck($Radio2)
_GUICtrlButton_SetCheck($Radio1, $BST_UNCHECKED)
_GUICtrlButton_SetCheck($Radio3, $BST_UNCHECKED)
$square = 2
EndIf
If IniRead("config.ini", "setting", "square", "1") = 1 Then
_GUICtrlButton_SetCheck($Radio1)
_GUICtrlButton_SetCheck($Radio3, $BST_UNCHECKED)
_GUICtrlButton_SetCheck($Radio2, $BST_UNCHECKED)
$square = 1
EndIf
If Not IniRead("config.ini", "setting", "square", "1") = 1 And Not IniRead("config.ini", "setting", "square", "1") = 0 And Not IniRead("config.ini", "setting", "square", "1") = 2 Then
_GUICtrlButton_SetCheck($Radio3)
_GUICtrlButton_SetCheck($Radio1, $BST_UNCHECKED)
_GUICtrlButton_SetCheck($Radio2, $BST_UNCHECKED)
$square = 0
EndIf
GUICtrlSetData($Input3, IniRead("config.ini", "setting", "walktime", "5"))
GUICtrlSetData($Input4, IniRead("config.ini", "setting", "abutton", "z"))
GUICtrlSetData($Input5, IniRead("config.ini", "setting", "bbutton", "x"))
If IniRead("config.ini", "setting", "moveforget", "1") = 1 Then
_GUICtrlButton_SetCheck($checkbox4)
$moveforget = 1
Else
$moveforget = 0
EndIf
If IniRead("config.ini", "setting", "fish", "0") = 1 Then
_GUICtrlButton_SetCheck($checkbox5)
$fish = 1
Else
$fish = 0
EndIf
If IniRead("config.ini", "setting", "waypoint", "0") = 1 Then
_GUICtrlButton_SetCheck($checkbox11)
$waypoint = 1
Else
$waypoint = 0
EndIf
If IniRead("config.ini", "setting", "offscreen", "0") = 1 Then
_GUICtrlButton_SetCheck($checkbox12)
$offscreen = 1
Else
$offscreen = 0
EndIf
While 1
$nMsg = GUIGetMsg()
Sleep(50)
If $log = 1 Then
$user = GUICtrlRead($Input1, 1)
$pass = GUICtrlRead($Input2, 1)
EndIf
$walktime = GUICtrlRead($Input3, 1)
$abutton = GUICtrlRead($Input4, 1)
$bbutton = GUICtrlRead($Input5, 1)
If $move1 = 0 And $move2 = 0 And $move3 = 0 And $move4 = 0 Then
_GUICtrlButton_SetCheck($Checkbox6)
$move1 = 1
EndIf
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
IniWrite("config.ini", "setting", "log", $log)
If $log = 1 Then
IniWrite("config.ini", "setting", "user", $user)
IniWrite("config.ini", "setting", "pass", StringToBinary($pass, 4))
EndIf
IniWrite("config.ini", "setting", "debug", $debug)
IniWrite("config.ini", "setting", "train", $train)
IniWrite("config.ini", "setting", "square", $square)
IniWrite("config.ini", "setting", "walktime", $walktime)
IniWrite("config.ini", "setting", "abutton", $abutton)
IniWrite("config.ini", "setting", "bbutton", $bbutton)
IniWrite("config.ini", "setting", "moveforget", $moveforget)
IniWrite("config.ini", "setting", "fish", $fish)
IniWrite("config.ini", "setting", "move1", $move1)
IniWrite("config.ini", "setting", "move2", $move2)
IniWrite("config.ini", "setting", "move3", $move3)
IniWrite("config.ini", "setting", "move4", $move4)
IniWrite("config.ini", "setting", "catch", $catch)
IniWrite("config.ini", "setting", "waypoint", $waypoint)
IniWrite("config.ini", "setting", "offscreen", $offscreen)
GUIDelete($Form1)
If $offscreen = 1 Then
send("{LWINDOWN}")
Sleep(1000)
send("p")
Sleep(1000)
Send("p")
Sleep(1000)
Send("p")
Sleep(1000)
send("{LWINUP}")
Sleep(1000)
EndIf
Return 1
Case $Button2
GUIDelete($Form1)
If $offscreen = 1 Then
send("{LWINDOWN}")
Sleep(1000)
send("p")
Sleep(1000)
Send("p")
Sleep(1000)
Send("p")
Sleep(1000)
send("{LWINUP}")
Sleep(1000)
EndIf
$casino = 1
Return 1
Case $Checkbox1
If _GUICtrlButton_GetCheck($Checkbox1) Then
$log = 1
$Input1 = GUICtrlCreateInput("", 104, 35, 97, 21)
$Input2 = GUICtrlCreateInput("", 104, 62, 97, 21, $ES_PASSWORD)
Else
$log = 0
GUICtrlDelete($Input1)
GUICtrlDelete($Input2)
EndIf
Case $Radio1
If _GUICtrlButton_GetCheck($Radio1) Then
$square = 1
_GUICtrlButton_SetCheck($Radio2, $BST_UNCHECKED)
_GUICtrlButton_SetCheck($Radio3, $BST_UNCHECKED)
EndIf
Case $Radio2
If _GUICtrlButton_GetCheck($Radio2) Then
$square = 2
_GUICtrlButton_SetCheck($Radio1, $BST_UNCHECKED)
_GUICtrlButton_SetCheck($Radio3, $BST_UNCHECKED)
EndIf
Case $Radio3
If _GUICtrlButton_GetCheck($Radio3) Then
$square = 0
_GUICtrlButton_SetCheck($Radio1, $BST_UNCHECKED)
_GUICtrlButton_SetCheck($Radio2, $BST_UNCHECKED)
EndIf
Case $Checkbox2
If _GUICtrlButton_GetCheck($Checkbox2) Then
$debug = 1
Else
$debug = 0
EndIf
Case $Checkbox3
If _GUICtrlButton_GetCheck($Checkbox3) Then
$train = 1
Else
$train = 0
EndIf
Case $checkbox4
If _GUICtrlButton_GetCheck($checkbox4) Then
$moveforget = 1
Else
$moveforget = 0
EndIf
Case $checkbox5
If _GUICtrlButton_GetCheck($checkbox5) Then
$fish = 1
Else
$fish = 0
EndIf
Case $checkbox6
If _GUICtrlButton_GetCheck($checkbox6) Then
$move1 = 1
Else
$move1 = 0
EndIf
Case $checkbox7
If _GUICtrlButton_GetCheck($checkbox7) Then
$move2 = 1
Else
$move2 = 0
EndIf
Case $checkbox8
If _GUICtrlButton_GetCheck($checkbox8) Then
$move3 = 1
Else
$move3 = 0
EndIf
Case $checkbox9
If _GUICtrlButton_GetCheck($checkbox9) Then
$move4 = 1
Else
$move4 = 0
EndIf
Case $checkbox10
If _GUICtrlButton_GetCheck($checkbox10) Then
$catch = 1
Else
$catch = 0
EndIf
Case $checkbox11
If _GUICtrlButton_GetCheck($checkbox11) Then
$waypoint = 1
Else
$waypoint = 0
EndIf
Case $checkbox12
If _GUICtrlButton_GetCheck($checkbox12) Then
$offscreen = 1
Else
$offscreen = 0
EndIf
EndSwitch
WEnd
EndFunc ;==>setting
Func casinobot()
If $debug = 1 Then
$info5 = "In casino"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
WinActivate("[CLASS:LWJGL]")
$image = PixelSearch(700, 500, 710, 510, 0xE8A800, 1)
If IsArray($image)Then;in slot
Sleep(Random(100,500,1))
WinActivate("[CLASS:LWJGL]")
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}")
Sleep(Random(100,500,1))
WinActivate("[CLASS:LWJGL]")
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}")
Sleep(Random(100,500,1))
WinActivate("[CLASS:LWJGL]")
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}")
Sleep(Random(500,1000,1))
WinActivate("[CLASS:LWJGL]")
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton)
Sleep(Random(100,500,1))
WinActivate("[CLASS:LWJGL]")
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton)
Sleep(Random(100,500,1))
WinActivate("[CLASS:LWJGL]")
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton)
Sleep(Random(100,500,1))
WinActivate("[CLASS:LWJGL]")
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton)
Sleep(Random(100,500,1))
WinActivate("[CLASS:LWJGL]")
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton)
Sleep(Random(3000,4500,1))
Return 1
Else
Sleep(500)
Return 1
EndIf
Return 1
EndFunc
Func fishbot()
If $debug = 1 Then
$info5 = "In fishbot"
_GUICtrlListBox_BeginUpdate($Label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label5, $iIndex)
EndIf
$change = 0
If $count = 9 Then
$hurt = 1
$count = 0
EndIf
$image = PixelSearch(500, 170, 510, 180, 0xE08098, 1)
$image2 = PixelSearch(500, 165, 510, 180, 0xD06878, 1)
If $hurt = 1 Then
If IsArray($image) Or IsArray($image2) Then
Send("{UP up}")
Sleep(2000)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton);talk nurse
Sleep(2000)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton); say hi
Sleep(2000)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton);heal
Sleep(2000)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton);waiting
Sleep(2000)
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton);thanks
Sleep(2000)
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton);bye
Sleep(2000)
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton);yeah love you too
Sleep(2000)
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton);stop talking to me psycho
Sleep(2000)
If $debug = 1 Then
$info6 = "B button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($bbutton);im gonna call your manager!
Sleep(2000)
$hurt = 0
Return 1
EndIf
EndIf
$image = PixelSearch(500, 410, 510, 420, 0x4878D8, 1)
If IsArray($image) And $hurt = 0 Then
Send("{DOWN up}")
Sleep(500)
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}");make sure you look ok
Sleep(50)
If $debug = 1 Then
$info6 = "Cane button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($canebutton);see water
$something = 0
Sleep(5000)
If $debug = 1 Then
$info6 = "A button sent"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send($abutton);somenthing?
Sleep(500)
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN}")
$something = 1
Return 1
EndIf
If $hurt = 1 Then
If $debug = 1 Then
$info6 = "Up stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{UP down}")
Return 1
EndIf
If $hurt = 0 Then
If $debug = 1 Then
$info6 = "Down stick"
_GUICtrlListBox_BeginUpdate($Label6)
_GUICtrlListBox_InsertString($Label6, $info6)
_GUICtrlListBox_EndUpdate($Label6)
$iIndex = _GUICtrlListBox_GetCurSel($Label6)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($Label6, $iIndex)
EndIf
Send("{DOWN down}")
Return 1
EndIf
Return 1
EndFunc