Guest User

Untitled

a guest
Aug 23rd, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. while true do
  2.  
  3. --variables to move box around
  4. x = 0
  5. y = -2
  6.  
  7. --xcamspecial correction
  8. z = 0
  9.  
  10. xcamspecial = memory.readbyte(0xd855)+z
  11. if xcamspecial > 108 then xcamspecial = 6
  12. elseif xcamspecial > 82 then xcamspecial = 5
  13. elseif xcamspecial > 66 then xcamspecial = 4
  14. elseif xcamspecial > 50 then xcamspecial = 3
  15. elseif xcamspecial > 36 then xcamspecial = 2
  16. elseif xcamspecial > 20 then xcamspecial = 1
  17. else xcamspecial = 0 end
  18.  
  19. xpos = memory.readbyte(0xf80d)+memory.readbyteunsigned(0xf820)/256
  20. ypos = memory.readbyte(0xf824)+memory.readbyteunsigned(0xf823)/256
  21. xcam = memory.readbyteunsigned(0xd85f)+xcamspecial*256
  22. xcamroom = memory.readbyteunsigned(0xd85f)
  23. hp = memory.readbyteunsigned(0xdfa3)
  24. lives = memory.readbyteunsigned(0xc108)-1
  25. rng = memory.readbyte(0xdfae)
  26. lag = vba.lagcount()
  27. spd = memory.readwordsigned(0xd82a)
  28. spdadd = memory.readbytesigned(0xd84e) -- is 0 if Rockman doesn't move a pixel, 1 or -1 otherwise
  29.  
  30. gui.opacity(0.75)
  31. gui.drawbox(34+x,10+y,160+x,20+y,"#861175")
  32. gui.drawbox(0,0,200,7, "black")
  33. gui.opacity(1)
  34. gui.drawbox(56,128,170,160,"#222222")
  35. gui.drawbox(0,128,37,160,"#222222")
  36. gui.opacity(0.17)
  37. gui.drawbox(37,128,56,170,"orange")
  38. gui.opacity(0.80)
  39.  
  40. gui.text(23+x,8+y, " Spd X Cam", "yellow")
  41. gui.text(41+x,14+y, " Y RNG", "yellow")
  42. gui.text(74+x,8+y, xpos)
  43. gui.text(72+x,14+y, ypos)
  44. gui.text(144+x,8+y, xcam)
  45. gui.text(142+x,14+y, rng)
  46. gui.text(44+x,14+y, spd)
  47.  
  48. gui.text(131,128,"HP life", "yellow")
  49. gui.text(129,134,hp)
  50. gui.text(152,134,lives)
  51. if vba.lagged() == true then lagcol = "red"
  52. elseif vba.lagged() == false then lagcol = "white" end
  53. gui.text(104,136,lag,lagcol)
  54. gui.drawbox(126,142,142,143,"#cc0000")
  55. gui.opacity(1)
  56. q=0
  57. if hp == 0 then q = 500 end
  58. gui.drawbox(126+q,142+q,(126+hp/9.5)+q,143+q,"#00aa00")
  59. gui.opacity(0.8)
  60.  
  61. -- enemy hp display
  62. -- It's a bit broken, but may still be useful
  63.  
  64. for i = 0xc600, 0xc7FF, 64 do
  65. if memory.readbyte(i+1) ~= 0 then
  66. local xenemy = memory.readbyteunsigned(i+10)
  67. local yenemy = memory.readbyteunsigned(i+16)
  68. local enemyhp = memory.readbyte(i+24)
  69. gui.opacity(0.9)
  70.  
  71. cor = 70
  72. if xpos <140 and xcam < 35 then cor = 130 end
  73.  
  74. gui.text(xenemy-xpos+cor,0,"HP:" ..enemyhp)
  75. end
  76. end
  77.  
  78.  
  79. vba.frameadvance()
  80. end
Advertisement
Add Comment
Please, Sign In to add comment