Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- --variables to move box around
- x = 0
- y = -2
- --xcamspecial correction
- z = 0
- xcamspecial = memory.readbyte(0xd855)+z
- if xcamspecial > 108 then xcamspecial = 6
- elseif xcamspecial > 82 then xcamspecial = 5
- elseif xcamspecial > 66 then xcamspecial = 4
- elseif xcamspecial > 50 then xcamspecial = 3
- elseif xcamspecial > 36 then xcamspecial = 2
- elseif xcamspecial > 20 then xcamspecial = 1
- else xcamspecial = 0 end
- xpos = memory.readbyte(0xf80d)+memory.readbyteunsigned(0xf820)/256
- ypos = memory.readbyte(0xf824)+memory.readbyteunsigned(0xf823)/256
- xcam = memory.readbyteunsigned(0xd85f)+xcamspecial*256
- xcamroom = memory.readbyteunsigned(0xd85f)
- hp = memory.readbyteunsigned(0xdfa3)
- lives = memory.readbyteunsigned(0xc108)-1
- rng = memory.readbyte(0xdfae)
- lag = vba.lagcount()
- spd = memory.readwordsigned(0xd82a)
- spdadd = memory.readbytesigned(0xd84e) -- is 0 if Rockman doesn't move a pixel, 1 or -1 otherwise
- gui.opacity(0.75)
- gui.drawbox(34+x,10+y,160+x,20+y,"#861175")
- gui.drawbox(0,0,200,7, "black")
- gui.opacity(1)
- gui.drawbox(56,128,170,160,"#222222")
- gui.drawbox(0,128,37,160,"#222222")
- gui.opacity(0.17)
- gui.drawbox(37,128,56,170,"orange")
- gui.opacity(0.80)
- gui.text(23+x,8+y, " Spd X Cam", "yellow")
- gui.text(41+x,14+y, " Y RNG", "yellow")
- gui.text(74+x,8+y, xpos)
- gui.text(72+x,14+y, ypos)
- gui.text(144+x,8+y, xcam)
- gui.text(142+x,14+y, rng)
- gui.text(44+x,14+y, spd)
- gui.text(131,128,"HP life", "yellow")
- gui.text(129,134,hp)
- gui.text(152,134,lives)
- if vba.lagged() == true then lagcol = "red"
- elseif vba.lagged() == false then lagcol = "white" end
- gui.text(104,136,lag,lagcol)
- gui.drawbox(126,142,142,143,"#cc0000")
- gui.opacity(1)
- q=0
- if hp == 0 then q = 500 end
- gui.drawbox(126+q,142+q,(126+hp/9.5)+q,143+q,"#00aa00")
- gui.opacity(0.8)
- -- enemy hp display
- -- It's a bit broken, but may still be useful
- for i = 0xc600, 0xc7FF, 64 do
- if memory.readbyte(i+1) ~= 0 then
- local xenemy = memory.readbyteunsigned(i+10)
- local yenemy = memory.readbyteunsigned(i+16)
- local enemyhp = memory.readbyte(i+24)
- gui.opacity(0.9)
- cor = 70
- if xpos <140 and xcam < 35 then cor = 130 end
- gui.text(xenemy-xpos+cor,0,"HP:" ..enemyhp)
- end
- end
- vba.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment