;note to self: liv hex-2560
;---- Includes ----
#Include <NomadMemory.au3>
#Include <Misc.au3>
#include <Inet.au3>
;------------------
SetPrivilege("SeDebugPrivilege", 1)
$dll = DllOpen("user32.dll")
;This checks if there's a message available
$message = _INetGetSource("http://awwe.awardspace.com/XYZ/newmessage.txt")
;if the message isn't empty, display the contents of it
if $message = "" Then
else
MsgBox(0,"",$message)
EndIf
;Reads pointers from the .ini file
$wow = _memoryopen(WinGetProcess("World of Warcraft"))
$pointer = IniRead("pointers.ini","Pointers","Main","NotFound")
$version = IniRead("pointers.ini","Pointers","Version","NotFound")
$build = IniRead("pointers.ini","Pointers","Build","NotFound")
$plusX = IniRead("pointers.ini","Plus", "X","NotFound")
$pluzY = IniRead("pointers.ini","Plus","Y","NotFound")
$plusZ = IniRead("pointers.ini","Plus","Z","NotFound")
;checks the current version, if this isn't what it's supposed to be, do an update
if _memoryread($version ,$wow,'char[30]') = "World of WarCraft (build " & $build & ")" Then
Else
update()
EndIf
;Changes your position
Func teleport($direction)
Select
Case $direction = "north"
$base = _memoryread($pointer ,$wow,'dword')
$Y = "0x" & hex($base + 0xBF0)
$location = _MemoryRead($Y , $wow, 'float')
$newlocation = $location + 0.13
_MemoryWrite($Y , $wow,$newlocation, 'float')
send("{left}{left}{right}{right}")
sleep(30)
Case $direction = "west"
$base = _memoryread($pointer ,$wow,'dword')
$X = "0x" & hex($base + 0xBF4)
$location = _MemoryRead($X , $wow, 'float')
$newlocation = $location + 0.13
_MemoryWrite($X , $wow,$newlocation, 'float')
send("{left}{left}{right}{right}")
sleep(30)
Case $direction = "south"
$base = _memoryread($pointer ,$wow,'dword')
$Y = "0x" & hex($base + 0xBF0)
$location = _MemoryRead($Y , $wow, 'float')
$newlocation = $location - 0.13
_MemoryWrite($Y , $wow,$newlocation, 'float')
send("{left}{left}{right}{right}")
sleep(30)
Case $direction = "east"
$base = _memoryread($pointer ,$wow,'dword')
$X = "0x" & hex($base + 0xBF4)
$location = _MemoryRead($X , $wow, 'float')
$newlocation = $location - 0.13
_MemoryWrite($X , $wow,$newlocation, 'float')
send("{left}{left}{right}{right}")
sleep(30)
Case $direction = 5
$base = _memoryread($pointer ,$wow,'dword')
$Z = "0x" & hex($base + 0xBF
$location = _MemoryRead($Z , $wow, 'float')
$newlocation = $location + 3
sleep(30)
_MemoryWrite($Z , $wow,$newlocation, 'float')
Case $direction = 6
$base = _memoryread($pointer ,$wow,'dword')
$Z = "0x" & hex($base + 0xBF
$location = _MemoryRead($Z , $wow, 'float')
$newlocation = $location - 3
_MemoryWrite($Z , $wow,$newlocation, 'float')
sleep(30)
EndSelect
EndFunc
;check if the keys are pressed, yes this drains alot of CPU :'(
While 1
If _IsPressed("68", $dll) Then
teleport("north")
elseif _IsPressed("64", $dll) Then
teleport("west")
elseif _IsPressed("65", $dll) Then
teleport("south")
elseif _IsPressed("66", $dll) Then
teleport("east")
elseif _IsPressed("67", $dll) Then
teleport(5)
elseif _IsPressed("69", $dll) Then
teleport(6)
EndIf
WEnd
func update()
;download the new pointers
MsgBox(0,"","New pointers needed, press OK to download them.")
$update = _InetGetSource("http://awwe.awardspace.com/XYZ/newpointers.txt")
if $update = "" Then
;if the page cannot be retrieved, display error and shutdown.
MsgBox(0,"","Error downloading the new pointers, please try again later."& @CRLF & " The application will now shut down. ")
Exit
EndIf
$iamfeelingsplitted2day = StringSplit($update,"|")
;if the freshly downloaded buildnumber is the same as the one already saved, tell the user that there's no new pointers.
if $iamfeelingsplitted2day[3] = $build Then
msgbox(0,"","The new pointers aren't available yet, please try again later."& @CRLF & " The application will now shut down. ")
exit
else
IniWrite("pointers.ini","Pointers", "Main",$iamfeelingsplitted2day[1])
IniWrite("pointers.ini","Pointers","Version",$iamfeelingsplitted2day[2])
IniWrite("pointers.ini","Pointers","Build",$iamfeelingsplitted2day[3])
IniWrite("pointers.ini","Plus", "X",$iamfeelingsplitted2day[4])
IniWrite("pointers.ini","Plus","Y",$iamfeelingsplitted2day[5])
IniWrite("pointers.ini","Plus","Z",$iamfeelingsplitted2day[6])
global $pointer = IniRead("pointers.ini","Pointers","Main","NotFound")
global $version = IniRead("pointers.ini","Pointers","Version","NotFound")
global $build = IniRead("pointers.ini","Pointers","Build","NotFound")
MsgBox(0,"","Update successful.")
EndIf
EndFunc