Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. local p = { 0,memory.readbyte(0x508),
  2.         0, memory.readbyte(0x50b) }
  3. local c = { 0, memory.readbyte(0x53b), 0, memory.readbyte(0x6b)}
  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.readbyte(0x53b)
  11. c[3] = memory.readbyte(0x6b)
  12.  
  13. gui.text(120,115,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")
  14.  
  15. if (c[1] - c[2] == 0) then
  16.     gui.box(10,10,150,150)
  17.     fail = fail + 1
  18. end
  19.  
  20. gui.text(10,10,string.format("Fails: %4d - Speed-o-meter: %3i",fail,memory.readbytesigned(0x4dc)))
  21.  
  22. p[2] = p[1] - p[2]
  23. p[4] = p[3] - p[4]
  24.  
  25. c[2] = c[1] - c[2]
  26. c[4] = c[3] - c[4]
  27.  
  28. p[2] = p[1]
  29. p[4] = p[3]
  30.  
  31. c[2] = c[1]
  32. c[4] = c[3]
  33.  
  34. end
  35.  
  36. emu.registerafter(Stuff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement