Advertisement
Guest User

Ape Escape - coordinates

a guest
May 18th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. x_pos_addr = 0x0EC204
  2. y_pos_addr = 0x0EC20C
  3. z_pos_addr = 0x0EC208
  4. cam_dir_addr = 0x0EC334
  5. player_dir_addr = 0x0EC21C
  6.  
  7. player_x = 0
  8. player_y = 0
  9. player_z = 0
  10. player_x_old = 0
  11. player_y_old = 0
  12. player_z_old = 0
  13.  
  14. while true do
  15.     player_x = memory.read_s16_le(x_pos_addr)
  16.     player_y = memory.read_s16_le(y_pos_addr)
  17.     player_z = memory.read_s16_le(z_pos_addr)
  18.     gui.pixelText(0, 0, "X: " .. player_x .. "\nY: " .. player_y .. "\nZ: " .. player_z .. "\nX spe: " .. (player_x - player_x_old) .. "\nY spe: " .. (player_y - player_y_old) .. "\nZ spe: " .. (player_z - player_z_old) .. "\nXY spe: " .. (((player_x - player_x_old)^2+(player_y - player_y_old)^2)^0.5) .. "\nCAM dir: " .. memory.read_s16_le(cam_dir_addr)  .. "\nYOU dir: " .. memory.read_s16_le(player_dir_addr ) )
  19.     player_x_old = player_x
  20.     player_y_old = player_y
  21.     player_z_old = player_z
  22.     emu.frameadvance()
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement