Guest User

Untitled

a guest
Oct 31st, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.37 KB | None | 0 0
  1. local p = {0,0,0,0}
  2. local c = {0,0,0,0}
  3.  
  4. p[2] = memory.readword(0x10c,0x10d) + memory.readbyte(0x10b)/256
  5. p[4] = memory.readword(0x109,0x10a) + memory.readbyte(0x108)/256
  6.  
  7. c[2] = memory.readword(0x66,0x67) + memory.readbyte(0x65)/256
  8. c[4] = memory.readword(0x63,0x64) + memory.readbyte(0x62)/256
  9.  
  10. local function objects()
  11.     for i = 0, 4 do
  12.         if memory.readbyte(0x50e+i*0x15) ~= 0 then
  13.             --sub x and sub y not added.
  14.             gui.text(memory.readword(0x517+i*0x15,0x518+i*0x15)-c[1],memory.readword(0x514+i*0x15,0x515+i*0x15)-c[3],string.format("x %3d\nsuby %3d\nsubx %3d",memory.readword(0x517+i*0x15,0x518+i*0x15)-c[1],memory.readbyte(0x513+i*0x15),memory.readbyte(0x520+i*0x15)),"#ffffff","#00000060")
  15.         end
  16.     end
  17. end
  18.  
  19. local function Stuff()
  20. p[1] = memory.readword(0x10c,0x10d) + memory.readbyte(0x10b)/256
  21. p[3] = memory.readword(0x109,0x10a) + memory.readbyte(0x108)/256
  22.  
  23. c[1] = memory.readword(0x66,0x67) + memory.readbyte(0x65)/256
  24. c[3] = memory.readword(0x63,0x64) + memory.readbyte(0x62)/256
  25.  
  26. gui.text(2,35,string.format("CX %.2f\nCY %.2f (%.2f)\nX %.2f (%.2f)\nY %.3f (%.2f)\nJump: %2d",c[1],c[3],c[3]-c[4],p[1],p[1]-p[2],p[3],p[3]-p[4],memory.readbyte(0x102)),"#ffffff","#00000060")
  27.  
  28.  
  29. p[2] = p[1] - p[2]
  30. p[4] = p[3] - p[4]
  31.  
  32. c[2] = c[1] - c[2]
  33. c[4] = c[3] - c[4]
  34.  
  35. p[2] = p[1]
  36. p[4] = p[3]
  37.  
  38. c[2] = c[1]
  39. c[4] = c[3]
  40.  
  41. objects()
  42.  
  43. end
  44.  
  45. emu.registerafter(Stuff)
Advertisement
Add Comment
Please, Sign In to add comment