Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.23 KB | None | 0 0
  1. local p = { 0,memory.readbyte(0x508),
  2.         0, memory.readbyte(0x50b) }
  3. local c = { 0, memory.readword(0x53b,0x53c), 0, memory.readword(0x53e,0x53f)}
  4. local fail = 0
  5. local lastpos = memory.readbyte(0x508)
  6.  
  7. local function Stuff()
  8. p[1] = memory.readbyte(0x508)
  9. p[3] = memory.readbyte(0x50b)
  10. c[1] = memory.readword(0x53b,0x53c) -- 0x520? 0x556?
  11. c[3] = memory.readword(0x53e,0x53f)
  12.  
  13. gui.text(p[1]-16,p[3],string.format("X %4d\nY %4d",p[1]+c[1],p[3]+c[3]),"#ffffff","#00000060")
  14.  
  15. gui.text(120,8,string.format("Cam X: %3d (%3d)\nCam Y: %3d (%3d)\nX: %3d (%3d)\nY: %3d (%3d)",c[1],c[1]-c[2],c[3],c[3]-c[4],p[1],p[1]-p[2],p[3],p[3]-p[4]),"#ffffff","#00000060")
  16.  
  17. gui.text(7,45,string.format("Jump timer %2d\nIn-game frame counter: %3d\nLag helpers: %3d %3d %3d",
  18.     memory.readbyte(0x527),memory.readbyte(0x504),
  19.     memory.readbyte(0xd6),memory.readbyte(0xd7),memory.readbyte(0xd8)),"#ffffff","#00000060")
  20.  
  21. if (c[1] - c[2] == 0) then
  22.     fail = fail + 1
  23. end
  24.  
  25. gui.text(7,8,string.format("Fails: %4d\nSpeed-o-meter: %3i",fail,memory.readbytesigned(0x4dc)),"#ffffff","#00000060")
  26.  
  27. p[2] = p[1] - p[2]
  28. p[4] = p[3] - p[4]
  29.  
  30. c[2] = c[1] - c[2]
  31. c[4] = c[3] - c[4]
  32.  
  33. p[2] = p[1]
  34. p[4] = p[3]
  35.  
  36. c[2] = c[1]
  37. c[4] = c[3]
  38.  
  39. end
  40.  
  41. emu.registerafter(Stuff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement