Code:
;---- Includes ----
#Include <NomadMemory.au3>
#Include <Misc.au3>
;------Copy/Pasted offsets (3.3.0.11159) from http://www.mmowned.com/forums/wow-memory-editing/271736-wow-3-3-0-info-dump-thread.html
Global $PlayerBaseStatic = 0x00CF7C00
Global $PlayerBaseOffsA = 0x34, $PlayerBaseOffsB = 0x24
;------------------
SetPrivilege("SeDebugPrivilege", 1)
$dll = DllOpen("user32.dll")
$wow = _memoryopen(ProcessExists("Wow.exe"))
Func teleport($direction)
$lvl1Pointer = _MemoryRead($PlayerBaseStatic, $wow, 'ptr')
$lvl2Pointer = _MemoryRead(($lvl1Pointer + $PlayerBaseOffsA), $wow, 'ptr')
$PlayerBase = _MemoryRead(($lvl2Pointer + $PlayerBaseOffsB), $wow, 'ptr')
$X = $PlayerBase + 0x798
$Y = $PlayerBase + 0x79C
$Z = $PlayerBase + 0x7A0
$R = $PlayerBase + 0x7A8
$pi = 3.14159265
Select
Case $direction = 8
$locationX = _MemoryRead($X , $wow, 'float')
$locationY = _MemoryRead($Y , $wow, 'float')
$locationR = _MemoryRead($R , $wow, 'float')
$newlocationX = $locationX + 0.13 * cos($locationR)
$newlocationY = $locationY + 0.13 * sin($locationR)
_MemoryWrite($X , $wow,$newlocationX, 'float')
_MemoryWrite($Y , $wow,$newlocationY, 'float')
send("{left}{left}{right}{right}")
Case $direction = 4
$locationX = _MemoryRead($X , $wow, 'float')
$locationY = _MemoryRead($Y , $wow, 'float')
$locationR = _MemoryRead($R , $wow, 'float')
$newlocationX = $locationX + 0.13 * cos($locationR + ($pi/2))
$newlocationY = $locationY + 0.13 * sin($locationR + ($pi/2))
_MemoryWrite($X , $wow,$newlocationX, 'float')
_MemoryWrite($Y , $wow,$newlocationY, 'float')
send("{left}{left}{right}{right}")
Case $direction = 5
$locationX = _MemoryRead($X , $wow, 'float')
$locationY = _MemoryRead($Y , $wow, 'float')
$locationR = _MemoryRead($R , $wow, 'float')
$newlocationX = $locationX + 0.13 * (-cos($locationR))
$newlocationY = $locationY + 0.13 * (-sin($locationR))
_MemoryWrite($X , $wow,$newlocationX, 'float')
_MemoryWrite($Y , $wow,$newlocationY, 'float')
send("{left}{left}{right}{right}")
Case $direction = 6
$locationX = _MemoryRead($X , $wow, 'float')
$locationY = _MemoryRead($Y , $wow, 'float')
$locationR = _MemoryRead($R , $wow, 'float')
$newlocationX = $locationX + 0.13 * cos($locationR - ($pi/2))
$newlocationY = $locationY + 0.13 * sin($locationR - ($pi/2))
_MemoryWrite($X , $wow,$newlocationX, 'float')
_MemoryWrite($Y , $wow,$newlocationY, 'float')
send("{left}{left}{right}{right}")
Case $direction = 7
$location = _MemoryRead($Z , $wow, 'float')
$newlocation = $location + 0.13
_MemoryWrite($Z , $wow,$newlocation, 'float')
send("{left}{left}{right}{right}")
Case $direction = 9
$location = _MemoryRead($Z , $wow, 'float')
$newlocation = $location - 0.13
_MemoryWrite($Z , $wow,$newlocation, 'float')
send("{left}{left}{right}{right}")
EndSelect
EndFunc
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
WEnd
EndFunc
;check if the keys are pressed, yes this drains alot of CPU :'(
While 1
If _IsPressed("68", $dll) Then
teleport(8)
elseif _IsPressed("64", $dll) Then
teleport(4)
elseif _IsPressed("65", $dll) Then
teleport(5)
elseif _IsPressed("66", $dll) Then
teleport(6)
elseif _IsPressed("67", $dll) Then
teleport(7)
elseif _IsPressed("69", $dll) Then
teleport(9)
elseif _IsPressed("61", $dll) Then
teleport(1)
elseif _IsPressed("63", $dll) Then
teleport(3)
EndIf
sleep(50)
WEnd