Advertisement
Guest User

Phygar

a guest
Nov 4th, 2008
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 3.98 KB | None | 0 0
  1.  
  2.  
  3. ;note to self: liv hex-2560
  4.  
  5.  
  6. ;---- Includes ----
  7. #Include <NomadMemory.au3>     
  8. #Include <Misc.au3>
  9. #include <Inet.au3>
  10. ;------------------
  11.  
  12.  
  13. SetPrivilege("SeDebugPrivilege", 1)            
  14. $dll = DllOpen("user32.dll")
  15.  
  16.  
  17. ;This checks if there's a message available
  18. $message = _INetGetSource("http://awwe.awardspace.com/XYZ/newmessage.txt")
  19.  
  20. ;if the message isn't empty, display the contents of it
  21. if $message = "" Then
  22.    
  23. else
  24.    
  25.     MsgBox(0,"",$message)
  26. EndIf
  27.    
  28.  
  29. ;Reads pointers from the .ini file
  30. $wow = _memoryopen(WinGetProcess("World of Warcraft"))
  31.  
  32.  
  33.  
  34.  
  35. ;checks the current version, if this isn't what it's supposed to be, do an update
  36.  
  37.  
  38.  
  39.  
  40. ;Changes your position
  41.  
  42.  Func teleport($direction)
  43.    
  44.     Select
  45.        
  46.  
  47.     Case $direction = "north"
  48.                    
  49.                    
  50.                    
  51.  
  52.  
  53. $Y = 0x012E1B80
  54.  
  55.                    
  56. $location = _MemoryRead($Y , $wow, 'float')
  57. $newlocation = $location + 0.13
  58.     _MemoryWrite($Y , $wow,$newlocation, 'float')
  59.     send("{left}{left}{right}{right}")
  60.    
  61.     sleep(30)
  62.    
  63. Case $direction = "west"
  64.    
  65.    
  66. $X = 0x012E1B7C
  67.  
  68.    
  69.    
  70.     $location = _MemoryRead($X , $wow, 'float')
  71. $newlocation = $location + 0.13
  72.     _MemoryWrite($X , $wow,$newlocation, 'float')
  73.     send("{left}{left}{right}{right}")
  74.     sleep(30)
  75.    
  76.    
  77. Case $direction = "south"
  78.    
  79.  
  80.  
  81. $Y = 0x012E1B80
  82.  
  83.    
  84.     $location = _MemoryRead($Y , $wow, 'float')
  85. $newlocation = $location - 0.13
  86.     _MemoryWrite($Y , $wow,$newlocation, 'float')
  87.     send("{left}{left}{right}{right}")
  88.     sleep(30)
  89.    
  90.    
  91. Case $direction = "east"
  92.    
  93.  
  94. $X = 0x012E1B7C
  95.  
  96.  
  97.         $location = _MemoryRead($X , $wow, 'float')
  98. $newlocation = $location - 0.13
  99.     _MemoryWrite($X , $wow,$newlocation, 'float')
  100.     send("{left}{left}{right}{right}")
  101.     sleep(30)
  102.    
  103. Case $direction = 5
  104.    
  105.  
  106.  
  107. $Z = 0x012E1B84
  108.    
  109.    
  110.     $location = _MemoryRead($Z , $wow, 'float')
  111. $newlocation = $location + 3
  112.  
  113. sleep(30)
  114.  
  115.     _MemoryWrite($Z , $wow,$newlocation, 'float')
  116. Case $direction = 6
  117.    
  118.  
  119.  
  120. $Z = 0x012E1B84
  121.    
  122.     $location = _MemoryRead($Z , $wow, 'float')
  123. $newlocation = $location - 3
  124.  
  125.  
  126.  
  127.     _MemoryWrite($Z , $wow,$newlocation, 'float')
  128. sleep(30)
  129.     EndSelect
  130.        
  131.         EndFunc
  132.  
  133.  
  134. ;check if the keys are pressed, yes this drains alot of CPU :'(
  135. While 1
  136.    
  137.      If _IsPressed("68", $dll) Then
  138.  teleport("north")
  139.  
  140.    elseif _IsPressed("64", $dll) Then
  141. teleport("west")
  142.        
  143.     elseif _IsPressed("65", $dll) Then
  144. teleport("south")
  145.    elseif  _IsPressed("66", $dll) Then
  146. teleport("east")
  147.     elseif  _IsPressed("67", $dll) Then
  148. teleport(5)
  149.     elseif  _IsPressed("69", $dll) Then
  150. teleport(6)
  151.  
  152.    
  153.     EndIf
  154.  
  155.  
  156.  
  157. WEnd
  158.  
  159.  
  160.  
  161.  
  162.  
  163. func update()
  164.     ;download the new pointers
  165.     MsgBox(0,"","New pointers needed, press OK to download them.")
  166.     $update = _InetGetSource("http://awwe.awardspace.com/XYZ/newpointers.txt")
  167.     if $update = "" Then
  168.         ;if the page cannot be retrieved, display error and shutdown.
  169.         MsgBox(0,"","Error downloading the new pointers, please try again later."& @CRLF & "      The application will now shut down. ")
  170.         Exit
  171.    
  172. EndIf
  173.  
  174. $iamfeelingsplitted2day = StringSplit($update,"|")
  175. ;if the freshly downloaded buildnumber is the same as the one already saved, tell the user that there's no new pointers.
  176.     if $iamfeelingsplitted2day[3] = $build Then
  177.         msgbox(0,"","The new pointers aren't available yet, please try again later."& @CRLF & "   The application will now shut down. ")
  178.         exit
  179.         else
  180.    
  181.     IniWrite("pointers.ini","Pointers", "Main",$iamfeelingsplitted2day[1])
  182.     IniWrite("pointers.ini","Pointers","Version",$iamfeelingsplitted2day[2])
  183.     IniWrite("pointers.ini","Pointers","Build",$iamfeelingsplitted2day[3])
  184.         IniWrite("pointers.ini","Plus", "X",$iamfeelingsplitted2day[4])
  185.     IniWrite("pointers.ini","Plus","Y",$iamfeelingsplitted2day[5])
  186.     IniWrite("pointers.ini","Plus","Z",$iamfeelingsplitted2day[6])
  187.    
  188. global $pointer = IniRead("pointers.ini","Pointers","Main","NotFound")
  189. global $version = IniRead("pointers.ini","Pointers","Version","NotFound")
  190. global $build = IniRead("pointers.ini","Pointers","Build","NotFound")
  191.  
  192. MsgBox(0,"","Update successful.")
  193.  
  194.     EndIf
  195.    
  196.    
  197.    
  198.     EndFunc
  199.  
  200.  
  201.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement