I have this script i just want to make my char walk back and forth and summon his beasty however my keystrokes wont work in 2moons game window.
I have the 2moons bypass and it works fine, but still no luck with my script.
#include <GuiConstants.au3>
GUICreate("testBot",200,75)
Opt("GuiCoordMode",2)
$Button_1 = GUICtrlCreateButton("Start Bot",45,30,55)
$Button_2 = GUICtrlCreateButton("Exit Bot",0,-1)
Guisetstate()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $gui_event_close
MsgBox(0,"TestBot","Hope it works!")
ExitLoop
Case $msg = $Button_1
If WinActivate("2Moons") Then
ControlSend("2Moons","","","{w down}")
Sleep(5000)
ControlSend("2Moons","","","{w up}")
Sleep(1000)
Controlsend("2Moons","","","{9 down}")
Sleep(750)
Controlsend("2Moons","","","{9 up}")
Else
EndIf
Case $msg = $Button_2
MsgBox(0,"testBot","Hope it works!")
ExitLoop
EndSelect
WEnd
I have the 2moons bypass and it works fine, but still no luck with my script.
#include <GuiConstants.au3>
GUICreate("testBot",200,75)
Opt("GuiCoordMode",2)
$Button_1 = GUICtrlCreateButton("Start Bot",45,30,55)
$Button_2 = GUICtrlCreateButton("Exit Bot",0,-1)
Guisetstate()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $gui_event_close
MsgBox(0,"TestBot","Hope it works!")
ExitLoop
Case $msg = $Button_1
If WinActivate("2Moons") Then
ControlSend("2Moons","","","{w down}")
Sleep(5000)
ControlSend("2Moons","","","{w up}")
Sleep(1000)
Controlsend("2Moons","","","{9 down}")
Sleep(750)
Controlsend("2Moons","","","{9 up}")
Else
EndIf
Case $msg = $Button_2
MsgBox(0,"testBot","Hope it works!")
ExitLoop
EndSelect
WEnd