Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --no movement frame counter
- LastDistance = 0
- CurrentDistance = 0
- nomovement = 0
- while true do
- --declarations
- xposoncam = memory.readbyte(0xc704)
- xsub = memory.readbyte(0xc703)
- ypos = memory.readbyte(0xc706)
- ysub = memory.readbyte(0xc705)
- xcam = memory.readbyte(0xff43)
- xcamsection = memory.readbyte(0xc684)
- hp = memory.readbyte(0xc717)
- bosshp = memory.readbyte(0xc0e9) --variable, needs to be updated >_>
- killcount1 = memory.readbyte(0xd00a) -- bomb 3rd level, 3th
- killcount2 = memory.readbyte(0xd00b) -- hp, 20th
- killcount3 = memory.readbyte(0xd00c) -- <3, 50th
- killcount4 = memory.readbyte(0xd00d) -- 1up, 90th
- killcount5 = memory.readbyte(0xd00e) -- hp, lastlvl(?), 4th
- killcount6 = memory.readbyte(0xd00f) -- bomb, last level, 8th
- havebomb = memory.readbyte(0xd013)
- --display
- gui.opacity(0.88)
- gui.drawbox(0,16,260,21, "black")
- gui.drawbox(0,0,127,15, "black")
- gui.drawline(44,2,44,16, "#666666")
- gui.drawline(81,2,81,16, "#666666")
- gui.opacity(0.55)
- gui.drawbox(0,22,260,23, "black")
- gui.opacity(0.88)
- gui.text(6,6, "X", "yellow")
- gui.text(6,12, "Y", "yellow")
- gui.text(18,6, xposoncam+xsub/256)
- gui.text(18,12, ypos+ysub/256)
- gui.text(2,0, "Cam", "yellow")
- gui.text(18,0, xcam)
- gui.text(54,0, "HP", "yellow")
- gui.text(50,6, "Boss", "yellow")
- gui.text(68,0, hp)
- gui.text(71,6, bosshp)
- gui.text(85,-1, "Bottle", "#99FFFF")
- gui.text(85,5, "Heart", "#99FFFF")
- gui.text(85,11, "1up", "#99FFFF")
- gui.text(85,17, "Bomb", "#99FFFF")
- if killcount5 == 0 then gui.text(116,-1, 20-killcount2) else gui.text(116,-1, 4-killcount5) end
- gui.text(116,5, 50-killcount3)
- gui.text(116,11,90-killcount4)
- if killcount6 == 0 then gui.text(116,17,3-killcount1) else gui.text(116,17,8-killcount6) end
- if havebomb == 1 then gui.text(51,14,"[Bomb]","orange") else end
- --enemy x,y display
- for i = 0xC060, 0xC0FF, 32 do
- active = memory.readbytesigned(i+0)
- if active ~= -1 and active ~= 3 then
- local xenemy = memory.readbyte(i+2) -----subx unneeded +memory.readbyteunsigned(i+10)/256
- local yenemy = memory.readbyte(i+3) -----suby unneeded +memory.readbyteunsigned(i+11)/256
- gui.opacity(0.4)
- gui.drawbox(xenemy-xposoncam+46,yenemy-37,xenemy-xposoncam+66,yenemy-26,"#009933")
- gui.opacity(0.95)
- gui.text(xenemy-xposoncam+47,yenemy-38,"X " ..xenemy)
- gui.text(xenemy-xposoncam+47,yenemy-32,"Y " ..yenemy)
- end
- end
- -- no movement counter
- -- Pressing E will reset the nomovement count
- LastDistance = CurrentDistance
- CurrentDistance = xcam
- CurrentSpeed = CurrentDistance - LastDistance
- if CurrentSpeed < 1 then nomovement = nomovement + 1 end
- table=input.get(1)
- if table.E then nomovement = 0 end
- gui.text(13,19, nomovement, "red")
- vba.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement