PHP Code:
Func _imagesearch($findimage, $resultposition, ByRef $x, ByRef $y, $tolerance)
Return _imagesearcharea($findimage, $resultposition, 0, 0, @DesktopWidth, @DesktopHeight, $x, $y, $tolerance)
EndFunc ;==>_imagesearch
Func _imagesearcharea($findimage, $resultposition, $x1, $y1, $right, $bottom, ByRef $x, ByRef $y, $tolerance)
If $tolerance > 0 Then $findimage = "*" & $tolerance & " " & $findimage
$result = DllCall("ImageSearchDLL.dll", "str", "ImageSearch", "int", $x1, "int", $y1, "int", $right, "int", $bottom, "str", $findimage)
If $result[0] = "0" Then Return 0
$array = StringSplit($result[0], "|")
$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
EndFunc ;==>_imagesearcharea
Func _waitforimagesearch($findimage, $waitsecs, $resultposition, ByRef $x, ByRef $y, $tolerance)
$waitsecs = $waitsecs * 1000
$starttime = TimerInit()
While TimerDiff($starttime) < $waitsecs
Sleep(100)
$result = _imagesearch($findimage, $resultposition, $x, $y, $tolerance)
If $result > 0 Then
Return 1
EndIf
WEnd
Return 0
EndFunc ;==>_waitforimagesearch
Func _waitforimagessearch($findimage, $waitsecs, $resultposition, ByRef $x, ByRef $y, $tolerance)
$waitsecs = $waitsecs * 1000
$starttime = TimerInit()
While TimerDiff($starttime) < $waitsecs
For $i = 1 To $findimage[0]
Sleep(100)
$result = _imagesearch($findimage[$i], $resultposition, $x, $y, $tolerance)
If $result > 0 Then
Return $i
EndIf
Next
WEnd
Return 0
EndFunc ;==>_waitforimagessearch
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1_1 = GUICreate("Auto Summoner", 265, 430)
$Checkbox1 = GUICtrlCreateCheckbox("[TAB] - Lunge T1", 20, 30, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox2 = GUICtrlCreateCheckbox("[TAB] - Lunge T3", 20, 50, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox3 = GUICtrlCreateCheckbox("[TAB] - Power Pounce", 20, 70, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox4 = GUICtrlCreateCheckbox("[C] - Strike", 20, 120, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox8 = GUICtrlCreateCheckbox("[V] - Surprise Gift", 20, 230, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox6 = GUICtrlCreateCheckbox("[V] - Uppercut", 20, 190, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox7 = GUICtrlCreateCheckbox("[V] - Play Time", 20, 210, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox5 = GUICtrlCreateCheckbox("[C] - Hammer Spin", 20, 140, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox10 = GUICtrlCreateCheckbox("[2] - Backstep", 20, 300, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox9 = GUICtrlCreateCheckbox("[1] - Tag Team", 20, 280, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox11 = GUICtrlCreateCheckbox("[F] - Retreat", 20, 320, 140, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox12 = GUICtrlCreateCheckbox("[RMB] -Entangle", 20, 370, 120, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Group1 = GUICtrlCreateGroup("TAB", 10, 10, 160, 90)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("C", 10, 100, 160, 70)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("V", 10, 170, 160, 90)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Escapes", 10, 260, 160, 90)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group5 = GUICtrlCreateGroup("RMB", 10, 350, 160, 50)
GUICtrlCreateGroup("", -99, -99, 1, 1)
HotKeySet("{NUMPADADD}", "_SwitchOnOff")
;HotKeySet("q", "_tauntpause")
$Button1 = GUICtrlCreateCheckbox("Start/Stop", 180, 16, 75, 25, $BS_PUSHLIKE)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1_1)
GUISetFont (9, 800)
Global $status = "off"
$statustxt = GUICtrlCreateLabel("Status: Off", 100, 410)
GUICtrlSetColor($statustxt, 0xFF0030)
Global $y1 = 0, $x1 = 0, $result=0
Global $tabkey = ("{TAB}")
Global $ckey = ("c")
Global $vkey = ("v")
Global $1key = ("1")
Global $2key = ("2")
Global $fkey = ("f")
Global $rmb = MouseClick("right")
Global $y = 0, $x = 0
GUISetState()
While 1
sleep(10)
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
Switch GUICtrlRead($button1)
Case $GUI_CHECKED
GUICtrlSetData($statustxt, "Status: On")
GUICtrlSetColor($statustxt, 0x00703C)
$status = "on"
Case $GUI_UNCHECKED
GUICtrlSetData($statustxt, "Status: Off")
GUICtrlSetColor($statustxt, 0xFF0030)
$status = "off"
EndSwitch
EndSwitch
If $status = "on" Then
_fkey()
_1key()
_2key()
_rkey()
_ckey2()
_tab2()
_combo1() ;_tab1() _tab3()
Sleep(100)
_combo2() ; _ckey1()_tab3()
Sleep(100)
_combo3() ;_ckey1() _vkey1() _vkey2()
Sleep(10)
_combo4() ;_vkey3() _vkey4() _tab3()
Sleep(10)
EndIf
WEnd
Func _switchonoff()
If GUICtrlRead($button1) = $GUI_UNCHECKED Then
GUICtrlSetState($Button1, $GUI_CHECKED)
GUICtrlSetData($statustxt, "Status: On")
GUICtrlSetColor($statustxt, 0x00703C)
$status = "on"
ElseIf GUICtrlRead($button1) = $GUI_CHECKED Then
GUICtrlSetState($Button1, $GUI_UNCHECKED)
GUICtrlSetData($statustxt, "Status: Off")
GUICtrlSetColor($statustxt, 0xFF0030)
$status = "off"
EndIf
EndFunc
Func _combo1()
_tab1()
_tab3()
EndFunc
Func _combo2()
_ckey1()
_tab3()
EndFunc
Func _combo3()
_ckey1()
_vkey1()
_vkey2()
EndFunc
Func _combo4()
_vkey3()
_vkey4()
_tab3()
EndFunc
Func _tab1()
If GUICtrlRead($CheckBox1) = $GUI_CHECKED Then
$result = _imagesearcharea("tab1.png", 1, 1545, 1251, 1592, 1300, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found tab1" & @CRLF)
Send($tabkey)
EndIf
EndIf
EndFunc
Func _tab2()
If GUICtrlRead($CheckBox2) = $GUI_CHECKED Then
$result = _imagesearcharea("tab2.png", 1, 1545, 1251, 1592, 1300, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found tab2" & @CRLF)
Send($tabkey)
EndIf
EndIf
EndFunc
Func _tab3()
If GUICtrlRead($CheckBox3) = $GUI_CHECKED Then
$result = _imagesearcharea("tab3.png", 1, 1545, 1251, 1592, 1300, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found tab3" & @CRLF)
Send($tabkey)
EndIf
EndIf
EndFunc
Func _ckey1()
If GUICtrlRead($CheckBox4) = $GUI_CHECKED Then
$result = _imagesearcharea("ckey1.png", 1, 1724, 1325, 1772, 1374, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found ckey1" & @CRLF)
Send($ckey)
EndIf
EndIf
EndFunc
Func _ckey2()
If GUICtrlRead($CheckBox5) = $GUI_CHECKED Then
$result = _imagesearcharea("ckey2.png", 1, 1724, 1325, 1772, 1374, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found ckey2" & @CRLF)
Send($ckey)
EndIf
EndIf
EndFunc
Func _vkey1()
If GUICtrlRead($CheckBox6) = $GUI_CHECKED Then
$result = _imagesearcharea("vkey1.png", 1, 1779, 1325, 1827, 1374, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found vkey1" & @CRLF)
Send($vkey)
EndIf
EndIf
EndFunc
Func _vkey2()
If GUICtrlRead($CheckBox7) = $GUI_CHECKED Then
$result = _imagesearcharea("vkey2.png", 1, 1779, 1325, 1827, 1374, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found vkey2" & @CRLF)
Send($vkey)
EndIf
EndIf
EndFunc
Func _vkey3()
If GUICtrlRead($CheckBox8) = $GUI_CHECKED Then
$result = _imagesearcharea("vkey3.png", 1, 1779, 1325, 1827, 1374, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found vkey3" & @CRLF)
Send($vkey)
EndIf
EndIf
EndFunc
Func _vkey4()
If GUICtrlRead($CheckBox8) = $GUI_CHECKED Then
$result = _imagesearcharea("vkey4.png", 1, 1779, 1325, 1827, 1374, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found vkey4" & @CRLF)
Send($vkey)
EndIf
EndIf
EndFunc
Func _1key()
If GUICtrlRead($CheckBox9) = $GUI_CHECKED Then
$result2 = _imagesearcharea("1key.png", 1, 1613, 1249, 1663, 1301, $x, $y, 70)
if $result2=1 Then
ConsoleWrite("Found 1key" & @CRLF)
Send($1key)
EndIf
EndIf
EndFunc
Func _2key()
If GUICtrlRead($Checkbox10) = $GUI_CHECKED Then
$result1 = _imagesearcharea("2key.png", 1, 1669, 1250, 1716, 1299, $x, $y, 70)
if $result1=1 Then
ConsoleWrite("Found 2key" & @CRLF)
Send($2key)
EndIf
EndIf
EndFunc
Func _fkey()
If GUICtrlRead($CheckBox11) = $GUI_CHECKED Then
$result = _imagesearcharea("fkey.png", 1, 1970, 735, 2115, 800, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found fkey" & @CRLF)
Send($fkey)
EndIf
EndIf
EndFunc
Func _rkey()
If GUICtrlRead($CheckBox12) = $GUI_CHECKED Then
$result = _imagesearcharea("rkey.png", 1, 1900, 1246, 1956, 1304, $x, $y, 70)
if $result=1 Then
ConsoleWrite("Found RMB" & @CRLF)
MouseClick("right")
EndIf
EndIf
EndFunc