Advertisement
Guest User

KSJ hud

a guest
Jul 9th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. local p = { 0,memory.readword(0x481,0x482) + memory.readbyte(0x480)/256,
  2. 0,memory.readword(0x487,0x488) + memory.readbyte(0x486)/256}
  3.  
  4. local c = { 0,memory.readword(0x41,0x42),
  5. 0,memory.readword(0x52,0x53)}
  6.  
  7. local function PlayerHUD()
  8. gui.text(p[1]-c[1],p[3]-c[3],string.format("x pos %.2f",p[1]-c[1]),"#ffffff","#00000060")
  9. end
  10.  
  11. local function objects()
  12. for i = 0, 15 do
  13. gui.text(200,1+i*8,string.format("%3d %3d",memory.readbyte(0x4d0+i),memory.readbyte(0x4e0+i)),"#ffffff","#00000060")
  14. end
  15. end
  16.  
  17. local function cutscene()
  18. if memory.readbyte(0x388) ~= 0 then
  19. gui.text(80,2,string.format("State: %d\nDelay timer: %d\nCharacters printed: %d\n",
  20. memory.readbyte(0x388),memory.readbyte(0x38b),memory.readbyte(0x3a7)),"#ffffff","#00000060")
  21. end
  22. end
  23.  
  24. local function Stuff()
  25. p[1] = memory.readword(0x481,0x482) + memory.readbyte(0x480)/256
  26. p[3] = memory.readword(0x487,0x488) + memory.readbyte(0x486)/256
  27.  
  28. c[1] = memory.readword(0x41,0x42)
  29. c[3] = memory.readword(0x52,0x53)
  30.  
  31. gui.text(2,10,string.format("Boss hp: %d",memory.readbyte(0x8e)),"#ffffff","#00000060")
  32.  
  33. gui.text(2,35,string.format("CX %.2f\nCY %.2f (%.2f)\nX %.2f (%.2f)\nY %.3f (%.2f)",c[1],c[3],c[3]-c[4],p[1],p[1]-p[2],p[3],p[3]-p[4]),"#ffffff","#00000060")
  34.  
  35. p[2] = p[1] - p[2]
  36. p[4] = p[3] - p[4]
  37.  
  38. c[2] = c[1] - c[2]
  39. c[4] = c[3] - c[4]
  40.  
  41. p[2] = p[1]
  42. p[4] = p[3]
  43.  
  44. c[2] = c[1]
  45. c[4] = c[3]
  46.  
  47. cutscene()
  48. objects()
  49. PlayerHUD()
  50.  
  51. end
  52.  
  53. emu.registerafter(Stuff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement