#include <GUIConstantsEx.au3>
#include <Array.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <GDIPlus.au3>
#include <IE.au3>
#include <EditConstants.au3>
#include <GUIEdit.au3>
#include <ScrollBarConstants.au3>
Global $Paused, $counter = 0
HotKeySet ("{HOME}", "Start")
HotKeySet("{PGUP}", "TogglePause")
HotKeySet ("{END}", "_Exit")
Opt("PixelCoordMode", 1)
Opt("MouseCoordMode", 1)
#region consts
;=================== !!do not modify please!! =================
Const $WMKEYDOWN = 0x100
Const $WMKEYUP = 0x101
Const $VK_F1 = 0x70
Const $VK_F2 = 0x71
Const $VK_F3 = 0x72
Const $VK_F4 = 0x73
Const $VK_F5 = 0x74
Const $VK_F6 = 0x75
Const $VK_F7 = 0x76
Const $VK_F8 = 0x77
Const $VK_F9 = 0x78
Const $VK_F10 = 0x79
Const $VK_C = 0x43
Const $VK_I = 0x49
Const $VK_W = 0x57
Const $VK_RIGHT = 0x27
Const $VK_LEFT = 0x25
Const $VK_UP = 0x26
Const $VK_DOWN = 0x28
Const $VK_ESCAPE = 0x1B
Const $VK_INSERT = 0x2D
;~ Const $WM_LBUTTONDOWN = 0x0201
;~ Const $WM_LBUTTONUP = 0x0202
Const $MK_LBUTTON = 0x0001
Const $MK_RBUTTON = 0x0002
;~ Const $WM_RBUTTONDOWN = 0x0204
;~ Const $WM_RBUTTONUP = 0x0205
;~ Const $WM_RBUTTONDBLCLK = 0x0206
Const $VK_SPACE = 0x20
Const $VK_PAUSE = 0x13
Const $VK_KEY_0 = 0x30
Const $VK_KEY_1 = 0x31
Const $VK_KEY_2 = 0x32
Const $VK_KEY_3 = 0x33
Const $VK_KEY_4 = 0x34
Const $VK_KEY_5 = 0x35
Const $VK_KEY_6 = 0x36
Const $VK_KEY_7 = 0x37
Const $VK_KEY_8 = 0x38
Const $VK_KEY_9 = 0x39
;~ Const $WM_MOUSEMOVE = 0x0200
#endregion consts
While 1
Sleep(200)
WEnd
Func Start()
While 1
;--- HP
Local $whitebar = PixelGetColor( 942 , 596 )
Local $hp = PixelGetColor ( 800 , 630 )
If $whitebar = (0xEECB2E) And $hp <> (0xCC1E46) then
sendKey($VK_F1)
sleep (500)
Else
Sleep(100)
EndIf
WEnd
EndFunc
Func _Exit()
Exit
EndFunc
Func sendKeyEx($FKey)
If $FKey = "F1" Then
sendKey($VK_F1)
ElseIf $FKey = "F2" Then
sendKey($VK_F2)
ElseIf $FKey = "F3" Then
sendKey($VK_F3)
ElseIf $FKey = "F4" Then
sendKey($VK_F4)
ElseIf $FKey = "F5" Then
sendKey($VK_F5)
ElseIf $FKey = "F6" Then
sendKey($VK_F6)
ElseIf $FKey = "F7" Then
sendKey($VK_F7)
ElseIf $FKey = "F8" Then
sendKey($VK_F8)
ElseIf $FKey = "F9" Then
sendKey($VK_F9)
ElseIf $FKey = "F10" Then
sendKey($VK_F10)
Else
ConsoleWrite("Error with the F-key" & $FKey)
consoleAppend("Error with the F-key" & $FKey)
EndIf
EndFunc ;==>sendKeyEx
Func mouseRightDBLCLK()
; press mouse right button 2 times
DllCall('ggbp.dll', 'BOOL', 'ggPMA', 'HWND', $hwnd, 'UINT', $WM_RBUTTONDBLCLK, 'WPARAM', 0, 'LPARAM', 0)
EndFunc ;==>mouseRightDBLCLK
Func mouseLeftClick()
; press mouse left button
DllCall('ggbp.dll', 'long', 'ggPMA', 'long', $hwnd, 'long', $WM_LBUTTONDOWN, 'long', $MK_LBUTTON, 'long', 0)
Sleep(50)
DllCall('ggbp.dll', 'long', 'ggPMA', 'long', $hwnd, 'long', $WM_LBUTTONUP, 'long', 0, 'long', 0)
EndFunc ;==>mouseLeftClick
Func sendKey($key)
; send a message
DllCall('ggbp.dll', 'long', 'ggPMA', 'long', $hwnd, 'long', $WMKEYDOWN, 'long', $key, 'long', 0)
Sleep(50)
DllCall('ggbp.dll', 'long', 'ggPMA', 'long', $hwnd, 'long', $WMKEYUP, 'long', $key, 'long', 0)
EndFunc ;==>sendKey
; used to select a mob
; it simulates a mousemove() with motion
Func setCurPosEx($xPos, $yPos)
DllCall('ggbp.dll', "long", "ggSCP", "long", $xPos, "long", $yPos)
Sleep(50)
DllCall('ggbp.dll', "long", "ggSCP", "long", $xPos, "long", $yPos - 5)
Sleep(50)
DllCall('ggbp.dll', "long", "ggSCP", "long", $xPos, "long", $yPos - 10)
Sleep(50)
EndFunc ;==>setCurPosEx
Func setCurPos($xPos, $yPos)
DllCall('ggbp.dll', "long", "ggSCP", "long", $xPos, "long", $yPos)
EndFunc ;==>setCurPos
|