Well, i just wanted to create a simple tool to improve my AutoIt skills, but i fail at searching for the Character Name Offset =/
I got it up to 20 Adresses, but im to bored to check the right offsets from all these adresses >.^
So, i just want u to post the CharacterName offset here, besides it would be nice if u would complain finding it =)
greetz HideAndSeek
btw. heres the simple (very simple/easy) tool =P:
Code:
#include <GUIConstants.au3>
#include <GuiListview.au3>
#include <array.au3>
$Form1_1 = GUICreate("Silkroad Client Manager", 336, 165, 193, 125)
$ListView1 = GUICtrlCreateListView("Charname|Status", 8, 8, 169, 145)
$hidegui = GUICtrlCreateButton("Hide", 200, 8, 121, 25, 0)
$killgui = GUICtrlCreateButton("Kill", 200, 72, 121, 25, 0)
$refreshgui = GUICtrlCreateButton("Refresh", 200, 104, 121, 25, 0)
$showgui = GUICtrlCreateButton("Show", 200, 40, 121, 25, 0)
GUISetState(@SW_SHOW)
Dim $clients, $char_offset= "0x00D3C6A8", $pointer ="0x00D3DF54" , $maxhp_off="0x454", $curhp_off="0x44c" , $curmp_off="0x450", $maxmp_off="0x458"
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $refreshgui
$clients=WinList("[CLASS:CLIENT]")
_GUICtrlListView_DeleteAllItems($ListView1)
For $x=1 To $clients[0][0]
$pid=WinGetProcess($clients[$x][1])
$mem=memopen($pid)
$charname=memread($mem,$char_offset)
If $charname =0 Then
$charname ="Not logged in"
EndIf
$status=_srogetstate($clients[$x][1])
$clients[$x][0]=$charname
GUICtrlCreateListviewItem($charname &"|" &$status,$ListView1)
Next
Case $hidegui
$lmao=GUIctrlread(GUIctrlread($ListView1))
$split=StringSplit($lmao,"|")
For $x=1 To $clients[0][0]
If $split[1]= $clients[$x][0] Then
WinSetState($clients[$x][1],"",@SW_HIDE)
GUICtrlSetData(GUIctrlread($ListView1), $clients[$x][0] &"|"& _srogetstate($clients[$x][1]))
EndIf
Next
Case $showgui
$lmao=GUIctrlread(GUIctrlread($ListView1))
$split=StringSplit($lmao,"|")
For $x=1 To $clients[0][0]
If $split[1]= $clients[$x][0] Then
WinSetState($clients[$x][1],"",@SW_SHOWMINNOACTIVE)
GUICtrlSetData(GUIctrlread($ListView1), $clients[$x][0] &"|"& _srogetstate($clients[$x][1]))
EndIf
Next
Case $killgui
$lmao=GUIctrlread(GUIctrlread($ListView1))
$split=StringSplit($lmao,"|")
For $x=1 To $clients[0][0]
If $split[1]= $clients[$x][0] Then
If MsgBox(292, "Achtung!", "Willst du Silkroad wirklich beenden?") = 6 Then
ProcessClose($clients[$x][1])
EndIf
GUICtrlSetData(GUIctrlread($ListView1), $clients[$x][0] &"|"& _srogetstate($clients[$x][1]))
EndIf
Next
EndSwitch
WEnd
func _srogetstate($handle)
Local $status=WinGetState($handle)
Switch $status
Case 5
$status= "Hidden"
Case 21
$status= "Hidden"
Case 7
$status="Shown"
Case Else
$status="Shown"
EndSwitch
Return $status
EndFunc
Func memopen($pid)
Local $mid = DllCall('kernel32.dll', 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
Return $mid[0]
EndFunc
Func memread($mid, $adress, $type = 'dword')
Local $struct = DllStructCreate($type)
DllCall('kernel32.dll', 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
Return DllStructGetData($struct, 1)
EndFunc
Func memreaddynamic($mid, $pointer, $offset, $type = "dword")
$newadress = memread($mid, $pointer) + $offset
Return memread($mid, $newadress, $type)
EndFunc
Func memclose($mid)
DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $mid)
EndFunc






