Quote (sofakingdom @ Oct 16 2011 07:24pm)
ive got a very basic version running just for the xp, i was running more complex back when they still have 8 hr dissassemblers for trade, but now that you can't trade them i don't think it is worth it to try for loot.
my main thing i want to change is that i want to be able to leave my bot running all day because im usually gone for 12+ hours. but either the channel will crash or my game will crash after a few hours, so I'm thinking I should maybe have the bot actually start hellgate and login, and then restart the program and re-log every hour or few... only problem would be the security code, would have to setup a pixel search, and probably just use the same digit all four times like 0000 or 1111... lmk what you guys think about that idea.
I was thinking about that as well. Right now, I'm more concerned about getting it to run minimized. I'm trying to work with a function call _MouseClickPlus, to no avail so far.
Here's my code so far for V2.0a, the mouse clicks are NOT working as of yet, I'm of half a mind to scrap all of that and use controlsend for all my keys, but I still need to reset the instance. ><
THIS CODE DOES NOT WORKCode
;### Tidy Error: next line creates a negative tablevel.
;### Tidy Error: next line creates a negative tablevel for the line after it.
#ce ----------------------------------------------------------------------------
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region
$Form1 = GUICreate("Hellgate Bot", 268, 257, 637, 331)
$Form1 = GUISetBkColor(0xb83f5d)
$Form1 = GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans Ms")
$Form1 = GUISetState()
$Button1 = GUICtrlCreateButton("START", 20, 40, 190, 50, 0)
$Button2 = GUICtrlCreateButton("Pause Button = Pause / ESC = Quit", 20, 120, 190, 50, 0)
$Button3 = GUICtrlCreateButton("USE 1024x768 RESOLUTION", 20, 180, 250, 50, 0)
GUISetState(@SW_SHOW)
$Mouse = MouseGetPos()
#endregion
_WinWaitActivate("Hellgate (x86 DX9)", "")
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
Opt("MouseCoordMode", 0)
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
Func _move($loop, $key)
For $i = $loop To 1 Step -1
ControlSend("Hellgate (x86 DX9)", "", "", $key)
Next
EndFunc ;==>_move
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('BOT IS PAUSED ATM',0,0)
WEnd
ToolTip("Use 1024x768")
EndFunc
Func Terminate()
Exit 0
EndFunc
Func _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 1)
Local $MK_LBUTTON = 0x0001
Local $WM_LBUTTONDOWN = 0x0201
Local $WM_LBUTTONUP = 0x0202
Local $MK_RBUTTON = 0x0002
Local $WM_RBUTTONDOWN = 0x0204
Local $WM_RBUTTONUP = 0x0205
Local $WM_MOUSEMOVE = 0x0200
Local $i = 0
Select
Case $Button = "left"
$Button = $MK_LBUTTON
$ButtonDown = $WM_LBUTTONDOWN
$ButtonUp = $WM_LBUTTONUP
Case $Button = "right"
$Button = $MK_RBUTTON
$ButtonDown = $WM_RBUTTONDOWN
$ButtonUp = $WM_RBUTTONUP
EndSelect
If $X = "" OR $Y = "" Then
$MouseCoord = MouseGetPos()
$X = $MouseCoord[0]
$Y = $MouseCoord[1]
EndIf
For $i = 1 to $Clicks
DllCall("user32.dll", "int", "SendMessage", _
"hwnd", WinGetHandle( $Window ), _
"int", $WM_MOUSEMOVE, _
"int", 0, _
"long", _MakeLong($X, $Y))
DllCall("user32.dll", "int", "SendMessage", _
"hwnd", WinGetHandle( $Window ), _
"int", $ButtonDown, _
"int", $Button, _
"long", _MakeLong($X, $Y))
DllCall("user32.dll", "int", "SendMessage", _
"hwnd", WinGetHandle( $Window ), _
"int", $ButtonUp, _
"int", $Button, _
"long", _MakeLong($X, $Y))
Next
EndFunc
Func _MakeLong($LoWord,$HiWord)
Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
EndFunc
While 1
$nMsg = GUIGetMsg()
Select
Case $Button1
While 1
Sleep(3000); TO PORTAL
ControlSend("Hellgate (x86 DX9)", "", "", "{s down}")
Sleep(1200)
ControlSend("Hellgate (x86 DX9)", "", "", "{s up}")
Sleep(200)
ControlSend("Hellgate (x86 DX9)", "", "", "{w down}")
Sleep(250)
ControlSend("Hellgate (x86 DX9)", "", "", "{w up}")
Sleep(200)
ControlSend("Hellgate (x86 DX9)", "", "", "{s down}")
Sleep(250)
ControlSend("Hellgate (x86 DX9)", "", "", "{s up}")
Sleep(5)
_move(20, "w")
Sleep(5)
_move(20, "s")
Sleep(6000); INSIDE BELOW THIS LINE
_move(50, "w")
Sleep(5)
_move(60, "a")
_move(60, "w")
Sleep(10)
_move(40, "a")
Sleep(10)
_move(60, "w")
Sleep(10)
_move(30, "a")
Sleep(10)
_move(120, "w")
Sleep(10)
_move(60, "a")
Sleep(10)
_move(100, "w")
Sleep(10)
_move(30, "a")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "right"); Hellfire
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left"); Demonspine
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)", "", "", "{8}")
Sleep(1000)
_move(20, "w")
Sleep(500)
_MouseClickPlus("Hellgate (x86 DX9)", "right")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "right")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "right")
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)", "", "", "{8}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)", "", "", "{ENTER}")
Sleep(500)
ControlSend("Hellgate (x86 DX9)", "", "", "/unstuck")
Sleep(500)
ControlSend("Hellgate (x86 DX9)", "", "", "{ENTER}")
Sleep(12000)
ControlSend("Hellgate (x86 DX9)", "", "", "{7}")
Sleep(250)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f down}"); Loot
Sleep(150)
ControlSend("Hellgate (x86 DX9)", "", "", "{f up}")
Sleep(250)
ControlSend("Hellgate (x86 DX9)", "", "", "{s down}")
Sleep(1200)
ControlSend("Hellgate (x86 DX9)", "", "", "{s up}")
Sleep(200)
ControlSend("Hellgate (x86 DX9)", "", "", "{w down}")
Sleep(250)
ControlSend("Hellgate (x86 DX9)", "", "", "{w up}")
Sleep(200)
ControlSend("Hellgate (x86 DX9)", "", "", "{s down}")
Sleep(250)
ControlSend("Hellgate (x86 DX9)", "", "", "{s up}")
Sleep(5)
_move(20, "w")
Sleep(5)
_move(20, "s")
Sleep(6000)
ControlSend("Hellgate (x86 DX9)", "", "", "{ALTDOWN}"); RESET
Sleep(1000)
_MouseClickPlus("Hellgate (x86 DX9)", "left", "831", "41", 10)
Sleep(2000)
_MouseClickPlus("Hellgate (x86 DX9)", "left", "442", "404", 10)
Sleep(2000)
_MouseClickPlus("Hellgate (x86 DX9)", "left", "505", "388", 10)
Sleep(250)
ControlSend("Hellgate (x86 DX9)", "", "", "{ALTUP}")
Sleep(250)
WEnd
Case $Button2
GUIDelete()
ExitLoop
EndSelect
WEnd