Ein Tool welches auf pointern basierend kills zählt, Leertaste und X drückt, sich mit Pause/Untbr pausieren lässt, im Hintergrund läuft, die Joblevel & Leben anzeigt, sowie den aktuellen Status des Bots anzeigt.
Code:
#include <NomadMemory.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("NSBT - Joblevel", 259, 76, 193, 125)
$Label1 = GUICtrlCreateLabel("Status:", 8, 8, 37, 17)
$Label2 = GUICtrlCreateLabel("Leben:", 8, 24, 37, 17)
$label_status = GUICtrlCreateLabel("Inaktiv", 56, 8, 76, 17)
$label_leben = GUICtrlCreateLabel("0", 56, 24, 40, 37)
$Label3 = GUICtrlCreateLabel("Joblvl:", 8, 40, 34, 17)
$label_joblvl = GUICtrlCreateLabel("0", 56, 40, 30, 17)
$Label4 = GUICtrlCreateLabel("Kills:", 8, 56, 25, 17)
$label_kills = GUICtrlCreateLabel("0", 56, 56, 74, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("{Pause}", "_pause")
HotKeySet("{F2}", "_start")
Global $paused
$pid = WinGetProcess("NosTale")
$memory = _MemoryOpen($pid)
$Read = _MemoryRead(0x02159890 ,$memory, "Dword")
$offsethp =$Read + 0x4c
$tp = _MemoryRead($offsethp ,$memory, "Dword")
GUICtrlSetData($label_leben, $tp)
$Read = _MemoryRead(0x01F536DC ,$memory, "Dword")
$offsethp =$Read + 0x194
$job = _MemoryRead($offsethp ,$memory, "Dword")
GUICtrlSetData($label_joblvl, $job)
$Read = _MemoryRead(0x02159890 ,$memory, "Dword")
$offsethp =$Read + 0x48
Global $maxtp = _MemoryRead($offsethp ,$memory, "Dword")
$percenttp = ($tp*100)/$maxtp
If $percenttp < 90 Then
GUICtrlSetColor($label_leben, 0xFF0000)
ElseIf $percenttp > 90 Then
GUICtrlSetColor($label_leben, 0x006600)
EndIf
If WinExists("NosTale") Then
MsgBox(64, "Info", "Erfolgreich mit Nostale verbunden! F2 zum starten!")
Else
MsgBox(16, "Error", "NostaleX.dat wurde nicht gefunden!"&@CRLF&"Bitte starte zuerst Nostale! F2 zum starten!")
EndIf
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _start()
If WinExists("NosTale") Then
Sleep(10)
Else
MsgBox(16, "Error", "NostaleX.dat wurde nicht gefunden!"&@CRLF&"Bitte starte zuerst Nostale! f2 zum starten!")
Return
EndIf
Local $kills = 0
While 1
Sleep(30)
ControlSend("NosTale", "", 0, "x{Space}x{Space}x")
$Read = _MemoryRead(0x020F0FEC ,$memory, "Dword")
$offsethp =$Read + 0x18
$fight = _MemoryRead($offsethp ,$memory, "Dword")
If $fight = 1 Then
If GUICtrlRead($label_status) <> "Kämpft" Then
GUICtrlSetData($label_status, "Kämpft")
$kills = $kills + 1
GUICtrlSetData($label_kills, $kills)
EndIf
Else
GUICtrlSetData($label_status, "Sucht Gegner...")
EndIf
$Read = _MemoryRead(0x02159890 ,$memory, "Dword")
$offsethp =$Read + 0x4c
$tp = _MemoryRead($offsethp ,$memory, "Dword")
If $tp <> GUICtrlRead($label_leben) Then GUICtrlSetData($label_leben, $tp)
$percenttp = ($tp*100)/$maxtp
If $percenttp < 10 Then
GUICtrlSetColor($label_leben, 0xFF0000)
;Sleep(5000)
;GUICtrlSetData($label_status, "Sitzt")
;ControlSend("NosTale", "", 0, "c")
;$timer_sit = TimerInit()
;While 1
;$nMsg = GUIGetMsg()
;Switch $nMsg
;Case $GUI_EVENT_CLOSE
;Exit
;EndSwitch
;If TimerDiff($timer_sit) > 20000 Then ExitLoop
;Sleep(25)
;WEnd
;ControlSend("NosTale", "", 0, "c")
;Sleep(1000)
ElseIf $percenttp > 90 Then
GUICtrlSetColor($label_leben, 0x006600)
Else
GUICtrlSetColor($label_leben, 0x000000)
EndIf
$Read = _MemoryRead(0x01F536DC ,$memory, "Dword")
$offsethp =$Read + 0x194
$job = _MemoryRead($offsethp ,$memory, "Dword")
If $job <> GUICtrlRead($label_joblvl) Then GUICtrlSetData($label_joblvl, $job)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Sleep(200)
$Read = _MemoryRead(0x020F0FEC ,$memory, "Dword")
$offsethp =$Read + 0x18
$fight = _MemoryRead($offsethp ,$memory, "Dword")
If $fight = 1 Then
If GUICtrlRead($label_status) <> "Kämpft" Then
GUICtrlSetData($label_status, "Kämpft")
$kills = $kills + 1
GUICtrlSetData($label_kills, $kills)
EndIf
Else
GUICtrlSetData($label_status, "Sucht Gegner...")
EndIf
WEnd
EndFunc
Func _pause()
$paused = Not $paused
GUICtrlSetData($label_status, "Pause")
While $paused
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
GUICtrlSetData($label_status, "Kämpft")
EndFunc
Kann auch gerne noch kommentieren wenns unübersichtlich ist.