daily pastebin goal
21%
SHARE
TWEET

Ape Escape direction and speed

a guest May 19th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. x_pos_addr = 0EC204
  2. y_pos_addr = 0EC20C
  3. z_pos_addr = 0EC208
  4.  
  5. player_x = 0
  6. player_y = 0
  7. player_z = 0
  8. player_x_old = 0
  9. player_y_old = 0
  10. player_z_old = 0
  11.  
  12. if memory.usememorydomain("MainRAM") then
  13.     while true do
  14.         player_x = memory.read_s16_le(x_pos_addr)
  15.         player_y = memory.read_s16_le(y_pos_addr)
  16.         player_z = memory.read_s16_le(z_pos_addr)
  17.         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) )
  18.         player_x_old = player_x
  19.         player_y_old = player_y
  20.         player_z_old = player_z
  21.         emu.frameadvance()
  22.     end
  23. else
  24.     console.log("Fatal error: unable to set memory domain to MainRAM")
  25. end
RAW Paste Data
Top