Also ich habe hier mein LV Bot,aber da muss irgendwas falsch sein weil mein Chara im spiel nicht angreift und daher konnte ich auich nicht testen ob es mit den hinsetztenund soo weiter funtz.
Quote:
Global $Paused
$running = false
HotKeySet("{PAUSE}", "TogglePause")
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("NosTale Bot by cCcBoZkurTcCc", 301, 552, 190, 123)
$Adressen = GUICtrlCreateGroup("Adressen", 25, 8, 249, 97)
$h = GUICtrlCreateInput("", 73, 32, 177, 21)
$HP = GUICtrlCreateLabel("HP", 41, 32, 19, 17)
$m = GUICtrlCreateInput("", 73, 72, 177, 21)
$MP = GUICtrlCreateLabel("MP", 41, 72, 19, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Aufsammeln = GUICtrlCreateGroup("Aufsammeln", 25, 120, 249, 73)
$aufsammel = GUICtrlCreateInput("", 129, 136, 129, 21)
$Aufsammeltaste = GUICtrlCreateLabel("Aufsammeltaste", 41, 136, 78, 17)
$Aktivieren = GUICtrlCreateCheckbox("Aktivieren", 41, 168, 97, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Hinsetzen = GUICtrlCreateGroup("Hinsetzen", 25, 208, 249, 49)
$setzen = GUICtrlCreateInput("", 129, 224, 129, 21)
$Hinsetztaste = GUICtrlCreateLabel("Hinsetztaste", 41, 224, 62, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$SonstigeEinstellungen = GUICtrlCreateGroup("Sonstige Einstellungen", 25, 280, 249, 153)
$minhp = GUICtrlCreateInput("", 90, 304, 167, 21)
$MinHP = GUICtrlCreateLabel("MinHP", 41, 304, 36, 17)
$maxhp = GUICtrlCreateInput("", 89, 336, 169, 21)
$MaxHP = GUICtrlCreateLabel("MaxHP", 41, 336, 39, 17)
$minmp = GUICtrlCreateInput("", 89, 368, 169, 21)
$MinMP = GUICtrlCreateLabel("MinMP", 41, 368, 37, 17)
$maxmp = GUICtrlCreateInput("", 89, 400, 169, 21)
$MaxMP = GUICtrlCreateLabel("MaxMP", 41, 400, 40, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Steuerung = GUICtrlCreateGroup("Steuerung", 25, 448, 249, 89)
$START = GUICtrlCreateButton("START", 41, 472, 217, 25, $WS_GROUP)
$PAUSE = GUICtrlCreateButton("PAUSE", 41, 504, 217, 25, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$windowname = "NosTale"
$minHP = GUICtrlRead($minhp)
$maxHP = GUICtrlRead($maxhp)
$minMP = GUICtrlRead($minmp)
$maxMP = GUICtrlRead($maxmp)
$SPA = GUICtrlRead($HP)
$SPP = GUICtrlRead($MP)
$sk = GUICtrlRead($setzen)
$lk = GUICtrlRead($aufsammel)
func startstop()
$running = NOT $running
EndFunc
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
WEnd
EndFunc
func checkHP()
$SPA = "0x1E5E29C"
$pid = WinGetProcess($windowname) ; hier besorge ich die PID
;open the process
$ProcessInformation = _MemoryOpen($pid)
$Number = _MemoryRead($SPA, $ProcessInformation)
_MemoryClose($ProcessInformation)
return $Number
EndFunc
func checkMP()
$SPP = "0x1E5E29C"
$pid = WinGetProcess($windowname) ; hier besorge ich die PID
;open the process
$ProcessInformation = _MemoryOpen($pid)
$Number = _MemoryRead($SPP, $ProcessInformation)
_MemoryClose($ProcessInformation)
return $Number
EndFunc
func loot()
if BitAnd(GUICtrlRead($Aktivieren), $GUI_CHECKED) THEN
ControlSend($windowname, '', '', $lk)
Else
;NIX TUN --> WEIL NICHT AUSGEWÄHLT
EndIf
ControlSend($windowname, '', '', $lk)
EndFunc
func attack()
ControlSend($windowname, '', '', "{SPACE}")
EndFunc
func doSleep()
ControlSend($windowname, '', '', $sk)
while(checkHP()<$maxHP)
sleep(500)
WEnd
ControlSend($windowname, '', '', $sk)
EndFunc
func doSleep1()
ControlSend($windowname, '', '', $sk)
while(checkMP()<$maxMP)
sleep(500)
WEnd
ControlSend($windowname, '', '', $sk)
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $START
startstop()
Case $PAUSE
TogglePause()
EndSwitch
if $running == True Then
if(checkHP()<$minHP) Then
doSleep()
EndIf
if(checkMP()<$minMP) Then
doSleep1()
EndIf
attack()
loot()
EndIf
WEnd