[Release][Alpha] PokeMMO bot
Regarding this message: http://www.mpgh.net/forum/247-other-...ml#post8833984
Since PokeMMO multibot is no longer supported I will try to provide another one.
First release still in work but can be used: The UglyBot !
Features:
*walk around in square/line
*fight pokemons
*can switch to train another one
*can use another attack
Bugs:
*it will not decline or accept other players invitations, make sure you are set to automatically decline things
*I don't know how it reacts to evolve and new moves learning as it didn't happen to me yet but will figure something when time comes
How to use:
Set game to 1024x768 !
At first start it will generate a setting.ini file with setings, read and edit it.
Find a grassy area and start the thing.
Note: It is a very early thing that work but can and probably will be improved. Tested on win xp x64 and win 7 x86.
I don't know what was in the PokeMMO Multibot so request features here and I will try to make it happen.
If you want to support you can throw a penny here.
LTC: LfHAabU9Lqzn6sgdYcfoLZFoZjf36PW3rf
NMC: N7P667yC5aMTUFb4h7S1UVbMzvvmfZsXjw
Virus scan:
uglybot-bin.zip MD5:bd689623ac3159ff2eeba432abc7c9b2 - VirSCAN.org 8% Scanner(s) (3/37) found malware!
https://www.virustotal.com/fr/file/9...is/1386458012/
Attachment:
*uglybot-bin_mpgh.net.zip includes everything
*pp.png and pp2.png are for people that want to build from source. If done so you will need dlls for imagesearch that can be found on google.
Source (autoit):



(being bad at text formating in someone want to make this post nicer feel free to do so)
Since PokeMMO multibot is no longer supported I will try to provide another one.
First release still in work but can be used: The UglyBot !
Features:
*walk around in square/line
*fight pokemons
*can switch to train another one
*can use another attack
Bugs:
*it will not decline or accept other players invitations, make sure you are set to automatically decline things
*I don't know how it reacts to evolve and new moves learning as it didn't happen to me yet but will figure something when time comes
How to use:
Set game to 1024x768 !
At first start it will generate a setting.ini file with setings, read and edit it.
Find a grassy area and start the thing.
Note: It is a very early thing that work but can and probably will be improved. Tested on win xp x64 and win 7 x86.
I don't know what was in the PokeMMO Multibot so request features here and I will try to make it happen.
If you want to support you can throw a penny here.
LTC: LfHAabU9Lqzn6sgdYcfoLZFoZjf36PW3rf
NMC: N7P667yC5aMTUFb4h7S1UVbMzvvmfZsXjw
Virus scan:
uglybot-bin.zip MD5:bd689623ac3159ff2eeba432abc7c9b2 - VirSCAN.org 8% Scanner(s) (3/37) found malware!
https://www.virustotal.com/fr/file/9...is/1386458012/
Attachment:
*uglybot-bin_mpgh.net.zip includes everything
*pp.png and pp2.png are for people that want to build from source. If done so you will need dlls for imagesearch that can be found on google.
Source (autoit):
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("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", "500")
IniWrite("config.ini", "setting", "abutton", "z")
IniWrite("config.ini", "setting", "bbutton", "x")
IniWrite("config.ini", "setting", "How to use:", "")
IniWrite("config.ini", "setting", "log = 1 enable autologin, if used make sure you have set your ids", "")
IniWrite("config.ini", "setting", 'user and pass must be in "quotation mark" in order to be used.', "")
IniWrite("config.ini", "setting", "debug enable logging so you can see where it get stuck if it does.", "")
IniWrite("config.ini", "setting", "train = 1 enable pokemon switching, used to train a low level by fighting with the second pokemon.", "")
IniWrite("config.ini", "setting", "square = 1 enable walking in square, if set to 0 then walk on a straight line up/down, if set to 2 left/right", "")
IniWrite("config.ini", "setting", "walktime = time in ms that you walk (in each direction) recomended 500 for small squares/lines or 1000 for longer trip", "")
IniWrite("config.ini", "setting", 'abutton = key set to A, must be in "quotation mark"', "")
IniWrite("config.ini", "setting", 'bbutton = key set to B, must be in "quotation mark"', "")
EndIf
Dim $abutton = IniRead("config.ini", "setting", "abutton", "z")
Dim $bbutton = IniRead("config.ini", "setting", "bbutton", "x")
Dim $square = IniRead("config.ini", "setting", "square", "1")
Dim $walktime = IniRead("config.ini", "setting", "walktime", "500")
Dim $job
Dim $Label1
Dim $Label2
Dim $Label3
Dim $Label4
Dim $Label5
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 = IniRead("config.ini", "setting", "log", "0")
Dim $dll = DllOpen("user32.dll")
Global $x, $y, $image
Dim $user = IniRead("config.ini", "setting", "user", "")
Dim $pass = IniRead("config.ini", "setting", "pass", "")
Dim $debug = IniRead("config.ini", "setting", "debug", "0")
Dim $change = 0
Dim $train = IniRead("config.ini", "setting", "train", "0")
$job = start()
HotKeySet("{PAUSE}", "TogglePause")
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, 225, 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
Sleep(100)
If _IsPressed("7B", $dll) Then
Exit
EndIf
GUICtrlSetData($Label1, $info1)
GUICtrlSetData($Label2, $info2)
GUICtrlSetData($label3, $info3)
GUICtrlSetData($label4, $info4)
If $debug = 1 Then
$info5 = "Processing..."
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
Switch $job
Case 1
$job = start()
Case 2
$job = state()
Case 3
$job = fight()
Case 4
$job = walk()
Case 5
$job = login()
EndSwitch
WEnd
Func fight()
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
$image = PixelSearch( 110, 395, 540, 540, 0xCFA806, 5)
If IsArray($image) Then
Sleep(50)
Send($bbutton)
If $debug = 1 Then
$info5 = "In attack"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
If $train = 1 And $change = 0 Then
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{DOWN}")
Sleep(50)
Send("{DOWN}")
Sleep(50)
Send($abutton)
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send($abutton)
Sleep(500)
$change = 1
Else
$info3 = "Attacking."
GUICtrlSetData($label3, $info3)
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{LEFT}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send($abutton)
Sleep(50)
$i = 0
While $i < 3
If $debug = 1 Then
$info5 = "in pp check"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Got PP?"
GUICtrlSetData($label3, $info3)
Sleep(500)
$i = $i + 1
$image2 = _ImageSearchArea('pp2.png', 1, 100, 300, 520, 570, $x, $y, 80)
$image = _ImageSearchArea('pp.png', 1, 110, 400, 320, 470, $x, $y, 50)
If $image = 1 Or $image2 = 1 Then
$info3 = "Warning no PP"
GUICtrlSetData($label3, $info3)
Send("{LEFT}")
Sleep(50)
Send("{UP}")
Sleep(50)
Send("{RIGHT}")
Sleep(50)
Send($abutton)
Sleep(50)
Return 1
EndIf
WEnd
If $debug = 1 Then
$info5 = "pp checked and ok"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Still some PP..."
GUICtrlSetData($label3, $info3)
$i = 0
Send($abutton)
Sleep(50)
EndIf
Return 1
EndIf
$image = PixelSearch( 875, 515, 895, 535, 0xFFFFFF, 5)
If IsArray($image) Then
If $debug = 1 Then
$info5 = "input required"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Input needed."
GUICtrlSetData($label3, $info3)
Sleep(50)
Send($bbutton)
Sleep(50)
Return 1
EndIf
If $debug = 1 Then
$info5 = "right stick fight check"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
Sleep(50)
Send("{RIGHT}")
Return 1
EndFunc
Func walk()
$change = 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 $square = 1 Then
If $walk < 1 Then
If $debug = 1 Then
$info5 = "walking down"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Walking down."
GUICtrlSetData($label3, $info3)
Send("{DOWN down}")
Sleep(Random($walktime, $walktime + 100, 1))
Send("{DOWN up}")
$walk = 1
Sleep(50)
Return 1
EndIf
If $walk < 2 Then
If $debug = 1 Then
$info5 = "walking left"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Walking left."
GUICtrlSetData($label3, $info3)
Send("{LEFT down}")
Sleep(Random($walktime, $walktime + 100, 1))
Send("{LEFT up}")
$walk = 2
Sleep(50)
Return 1
EndIf
If $walk < 3 Then
If $debug = 1 Then
$info5 = "walking up"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Walking up."
GUICtrlSetData($label3, $info3)
Send("{UP down}")
Sleep(Random($walktime, $walktime + 100, 1))
Send("{UP up}")
$walk = 3
Sleep(50)
Return 1
EndIf
If $walk < 4 Then
If $debug = 1 Then
$info5 = "walking right"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Walking right."
GUICtrlSetData($label3, $info3)
Send("{RIGHT down}")
Sleep(Random($walktime, $walktime + 100, 1))
Send("{RIGHT up}")
$walk = 0
Sleep(50)
Return 1
EndIf
EndIf
If $square = 0 Then
If $walk < 1 Then
If $debug = 1 Then
$info5 = "walking down"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Walking down."
GUICtrlSetData($label3, $info3)
Send("{DOWN down}")
Sleep(Random($walktime, $walktime + 100, 1))
Send("{DOWN up}")
$walk = 1
Sleep(50)
Return 1
EndIf
If $walk < 2 Then
If $debug = 1 Then
$info5 = "walking up"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Walking up."
GUICtrlSetData($label3, $info3)
Send("{UP down}")
Sleep(Random($walktime, $walktime + 100, 1))
Send("{UP up}")
$walk = 0
Sleep(50)
Return 1
EndIf
EndIf
If $square = 2 Then
If $walk < 1 Then
If $debug = 1 Then
$info5 = "walking left"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Walking left."
GUICtrlSetData($label3, $info3)
Send("{LEFT down}")
Sleep(Random($walktime, $walktime + 100, 1))
Send("{LEFT up}")
$walk = 1
Sleep(50)
Return 1
EndIf
If $walk < 2 Then
If $debug = 1 Then
$info5 = "walking right"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Walking right."
GUICtrlSetData($label3, $info3)
Send("{RIGHT down}")
Sleep(Random($walktime, $walktime + 100, 1))
Send("{RIGHT up}")
$walk = 0
Sleep(50)
Return 1
EndIf
EndIf
Return 1
EndFunc
Func login();return 3 -OK
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
If $debug = 1 Then
$info5 = "loggin in"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Loggin in..."
GUICtrlSetData($label3, $info3)
Sleep(500)
MouseClick("left", 582, 351, 2, 0);login
Sleep(50)
Send("{BS down}")
Sleep(1700)
Send("{BS up}")
Sleep(50)
Send("{DEL down}")
Sleep(1700)
Send("{DEL up}")
Sleep(50)
Send($user)
Sleep(50)
MouseClick("left", 590, 382, 2, 0);pass
Sleep(50)
Send("{BS down}")
Sleep(1500)
Send("{BS up}")
Sleep(50)
Send("{DEL down}")
Sleep(1500)
Send("{DEL up}")
Sleep(50)
Send($pass)
Sleep(50)
MouseClick("left", 574, 414, 2, 0);pass
Sleep(3000)
MouseClick("left", 598, 288, 2, 0);pass
Sleep(3000)
MouseClick("left", 504, 368, 2, 0);pass
Sleep(3000)
$info3 = "Logged in."
GUICtrlSetData($label3, $info3)
Return 1;start
Else
If $debug = 1 Then
$info5 = "autolog set to no"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info3 = "Autologin not enabled, please login."
GUICtrlSetData($label3, $info3)
Return 1;start
EndIf
EndFunc
Func state()
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( 200, 400, 700, 420, 0x1D415D, 3)
If IsArray($image) Then
If $debug = 1 Then
$info5 = "fight found"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info2 = "Player is fighting."
GUICtrlSetData($label2, $info2)
Sleep(50)
Return 3
EndIf
$image = PixelSearch( 500, 85, 520, 95, 0xF3EA6D, 3)
If IsArray($image) Then
If $debug = 1 Then
$info5 = "login found"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info2 = "Player is at login."
GUICtrlSetData($label2, $info2)
Sleep(50)
Return 5
EndIf
If $debug = 1 Then
$info5 = "nothing found"
_GUICtrlListBox_BeginUpdate($label5)
_GUICtrlListBox_InsertString($Label5, $info5)
_GUICtrlListBox_EndUpdate($Label5)
$iIndex = _GUICtrlListBox_GetCurSel($Label5)
$iIndex = $iIndex + 1
_GUICtrlListBox_SetCurSel($label5, $iIndex)
EndIf
$info2 = "Player is looking for pokemon."
GUICtrlSetData($label2, $info2)
Sleep(50)
Return 4
EndFunc
Func start()
If Not WinExists("[CLASS:LWJGL]") Then
$info1 = "Window not found, waiting for game."
GUICtrlSetData($label1, $info1)
Sleep(50)
Return 1
EndIf
WinActivate("[CLASS:LWJGL]")
$info1 = "Window found, waiting for game focus."
GUICtrlSetData($label1, $info1)
Sleep(50)
If WinActive("[CLASS:LWJGL]") Then
$pos = WinGetPos("[CLASS:LWJGL]")
$info1 = "Window found, focus OK."
WinMove("[CLASS:LWJGL]", "", $pos[0], $pos[1], 1032, 795)
GUICtrlSetData($label1, $info1)
Sleep(50)
Return 2
EndIf
Sleep(50)
Return 1
EndFunc
Func _ImageSearchArea($FindImage, $ResultPosition, $x1, $y1, $right, $bottom, ByRef $x, ByRef $y, $Tolerance)
If $Tolerance > 0 Then $FindImage = "*" & $Tolerance & " " & $FindImage
If @auto..ItX64 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
Func TogglePause()
While 1
$info1 = "PAUSED PRESS F11 TO RESUME / F12 to quit"
GUICtrlSetData($label1, $info1)
Sleep(100)
TrayTip("", "Paused", 500000000)
If _IsPressed("7B", $dll) Then
Exit
EndIf
If _IsPressed("7A", $dll) Then
Return 1
EndIf
WEnd
EndFunc
(being bad at text formating in someone want to make this post nicer feel free to do so)



)