02-13-2012, 07:19 PM
Today i want to share my old tool, it shows the current X, Y and Z coordinates plus the current rotation.
It is very useful for add new NPCs...
Pic:
Source:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: fabi202cool
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#include
#include
#include
#include
#include
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("", 138, 177, 192, 124)
GUISetBkColor(0x000000)
$Group1 = GUICtrlCreateGroup("", 8, 0, 121, 169)
$Label4 = GUICtrlCreateLabel("X:", 24, 19, 14, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Label5 = GUICtrlCreateLabel("Y:", 24, 52, 14, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Label6 = GUICtrlCreateLabel("Z:", 24, 84, 14, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Input1 = GUICtrlCreateInput("", 40, 16, 73, 21)
$Input2 = GUICtrlCreateInput("", 40, 48, 73, 21)
$Input3 = GUICtrlCreateInput("", 40, 80, 73, 21)
$Label1 = GUICtrlCreateLabel("Rotation:", 24, 120, 47, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Input4 = GUICtrlCreateInput("", 24, 136, 89, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
WinSetOnTop("PosInfo", "", 1)
$Base = 0x105F2B18
$offset_xpos=0x000FC4A8
$offset_ypos=0x000fc44C
$offset_zpos=0x000fc450
$offset_rot=0x000fc4d8
$posxOld = 0
$posyOld = 0
$poszOld = 0
$rotationOld = 0
If Not ProcessExists("Nksp.exe") Then
MsgBox(48, "Error", "Bitte zuerst LastChaos starten !")
Exit
EndIf
$Window = "[CLASS:Nksp]"
$Handle = _MemoryOpen(WinGetProcess($Window))
$Address = _MemoryRead($Base, $Handle)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
$posy = _MemoryRead($Address + $offset_ypos, $Handle, "float")
$posx = _MemoryRead($Address + $offset_xpos, $Handle, "float")
$posz = _MemoryRead($Address + $offset_zpos, $Handle, "float")
$rotation = _MemoryRead($Address + $offset_rot, $Handle, "float")
$coordx = Round($posx, 4)
$coordy = Round($posy, 4)
$coordz = Round($posz, 4)
$coordrot = Round($rotation, 4)
If $posxOld <> $coordx Then
GUICtrlSetData($Input1, $coordx)
EndIf
If $posyOld <> $coordy Then
GUICtrlSetData($Input2, $coordy)
EndIf
If $poszOld <> $coordz Then
GUICtrlSetData($Input3, $coordz)
EndIf
If $rotationOld <> $coordrot Then
GUICtrlSetData($Input4, $coordrot)
EndIf
$posxOld = $coordx
$posyOld = $coordy
$poszOld = $coordz
$rotationOld = $coordrot
Sleep(10)
WEnd
Download: 2


