Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local xenemybefore = {0,0,0,0,0,0,0,0}
- local xposbefore = 0
- local inputtable={}
- function fn()
- if movie.active() then
- gui.text(2,16,vba.framecount() .."/".. movie.length() .. " " .. emu.lagcount(), "#ffffff", "#000000")
- else
- gui.text(2,16,"movie not recording", "#ff2222", "#000000") end
- end
- gui.register(fn)
- local formtable= {
- [0] = "fish",
- [1] = "fish/attack",
- [2] = "fish/damage",
- [4] = "fish/splash",
- [8] = "fish",
- [9] = "fish/attack",
- [10] = "fish/damage",
- [16] = "normal",
- [17] = "normal/attack",
- [18] = "normal/damage",
- [19] = "normal/damage",
- [20] = "normal/splash",
- [24] = "normal",
- [25] = "normal/attack",
- [26] = "normal/damage",
- [27] = "normal/damage",
- [32] = "flying",
- [34] = "flying/damage",
- [35] = "flying/damage",
- [36] = "splash",
- [40] = "flying",
- [42] = "flying/damage",
- [43] = "flying/damage",
- [48] = "transform",
- [80] = "ball",
- [84] = "ball/splash",
- [88] = "ball",
- [96] = "mouse",
- [97] = "mouse/attack",
- [98] = "mouse/damage",
- [99] = "mouse/damage",
- [100] = "mouse/splash",
- [104] = "mouse",
- [105] = "mouse/attack",
- [106] = "mouse/damage",
- [107] = "mouse/damage",
- [112] = "flower",
- [113] = "flower/attack",
- [114] = "flower/damage",
- [116] = "flower/splash",
- [120] = "flower",
- [121] = "flower",
- [122] = "flower/damage",
- [128] = "big",
- [132] = "big/splash",
- [136] = "big",
- [144] = "mini",
- [145] = "mini/attack",
- [146] = "mini/damage",
- [148] = "mini/splash",
- [152] = "mini",
- [153] = "mini/attack",
- [154] = "mini/damage",
- [160] = "goku",
- [161] = "goku/attack",
- [162] = "goku/damage",
- [164] = "goku/splash",
- [168] = "goku",
- [169] = "goku/attack",
- [170] = "goku/damage"
- }
- Color = "#ffffff"
- BorderColor = "#00111111"
- XOFFSET = 0
- YOFFSET = 40
- while true do
- xcam = memory.readbyte(0xff9d)*256 + memory.readbyte(0xff9e)
- ycam = memory.readbyte(0xff9f)*256
- form = memory.readbyte(0xffad)
- paused = memory.readbytesigned(0xc2db)
- health = memory.readbytesigned(0xffa0)
- ingamecounter = memory.readbyte(0xff99)
- xspeed = memory.readbytesigned(0xffa8)
- yspeed = memory.readbytesigned(0xffaa)
- xpos = memory.readbyteunsigned(0xffa1)*256 + memory.readbyteunsigned(0xffa2)
- ypos = memory.readbyteunsigned(0xffa3)*256 + memory.readbyteunsigned(0xffa4)
- powerupduration = memory.readbyteunsigned(0xc2c4)*256 + memory.readbyteunsigned(0xc2c5)
- bosshealth = memory.readbyteunsigned(0xc102)
- bosshealth2 = memory.readbytesigned(0xc122)
- bosshealth3 = memory.readbytesigned(0xc142)
- bosshealth4 = memory.readbytesigned(0xc162)
- bosshealth5 = memory.readbytesigned(0xc182)
- xyacopudiff = xpos - xposbefore
- xposbefore = xpos
- -- ENEMIES
- for i=0,7,1 do
- xspeedenemy = memory.readbytesigned(0xc103+i*32)
- xenemy = memory.readbyte(0xc106+i*32)*256 + memory.readbyte(0xc105+i*32)
- yenemy = memory.readbyte(0xc108+i*32)*256 + memory.readbyte(0xc107+i*32)
- xactual = (xenemy-xcam)/16 -8
- yactual = (yenemy-ycam)/16 -26
- xdiff = xenemybefore[i+1] - xenemy
- if xdiff < 0 then xdiff=xdiff*-1 end
- gui.opacity(0.65)
- gui.drawbox(xactual-1,yactual-8,xactual+26,yactual+13,"#AA1000")
- gui.opacity(0.82)
- gui.text(xactual,yactual-7, xspeedenemy, Color,BorderColor)
- gui.text(xactual,yactual, "D:"..xdiff, Color,BorderColor)
- gui.text(xactual,yactual+7, "X:"..xenemy, Color,BorderColor)
- --gui.text(xactual,yactual+7, yenemy, Color, BorderColor)
- xenemybefore[i+1] = xenemy
- end
- -- DRAW BOXES
- gui.opacity(0.75)
- gui.drawbox(0+XOFFSET,-2+YOFFSET,160+XOFFSET,14+YOFFSET,"#001175")
- gui.opacity(0.9)
- -- DRAW HEALTH AND FORM
- gui.drawbox(0+XOFFSET,0+YOFFSET,7+XOFFSET,6+YOFFSET,"#dd0000",BorderColor)
- gui.drawbox(7+XOFFSET,0+YOFFSET,14+XOFFSET,6+YOFFSET,"#dd0000",BorderColor)
- gui.drawbox(14+XOFFSET,0+YOFFSET,21+XOFFSET,6+YOFFSET,"#dd0000",BorderColor)
- gui.drawbox(21+XOFFSET,0+YOFFSET,28+XOFFSET,6+YOFFSET,"#dd0000",BorderColor)
- for i=health-1,0,-1 do
- gui.drawbox(i*7+XOFFSET,0+YOFFSET,7+i*7+XOFFSET,6+YOFFSET,"#00dd00",BorderColor)
- end
- if formtable[form] then
- gui.text(2+XOFFSET,7+YOFFSET,formtable[form], Color, BorderColor) else
- gui.text (2+XOFFSET,7+YOFFSET, "???", Color, BorderColor) end
- -- DRAW STATS
- if xyacopudiff > 149 then
- gui.text(40+XOFFSET,0+YOFFSET,"d: "..xyacopudiff,"green",BorderColor)
- else
- gui.text(40+XOFFSET,0+YOFFSET,"d: "..xyacopudiff,Color,BorderColor)
- end
- gui.text(60+XOFFSET,7+YOFFSET,memory.readbyteunsigned(0xC3C2),Color,BorderColor)
- gui.text(94+XOFFSET,0+YOFFSET, xspeed, Color,BorderColor)
- gui.text(94+XOFFSET,7+YOFFSET, yspeed,Color,BorderColor)
- gui.text(112+XOFFSET,0+YOFFSET, xpos,Color,BorderColor)
- gui.text(112+XOFFSET,7+YOFFSET, ypos,Color,BorderColor)
- gui.text(138+XOFFSET,0+YOFFSET, powerupduration,Color,BorderColor)
- gui.text(138+XOFFSET,7+YOFFSET, bosshealth,Color,BorderColor)
- gui.text(146+XOFFSET,7+YOFFSET, bosshealth2,Color,BorderColor)
- gui.text(154+XOFFSET,7+YOFFSET, bosshealth3,Color,BorderColor)
- if emu.lagged() then
- gui.text(80,16,"************************************************", "#ff2222", "#ff000000") end
- -- DRAW SPEED PENALTY ON YACOPU
- xonscreen = (xpos-xcam)/16
- yonscreen = (ypos-ycam)/16
- penaltytimer = ingamecounter % 16
- gui.opacity(0.40)
- if penaltytimer == 0 and paused==0 then
- gui.drawbox(xonscreen-10,yonscreen-12,xonscreen+6,yonscreen-2, "#ff0000" )
- end
- if penaltytimer == 0 and paused==1 then
- gui.drawbox(xonscreen-10,yonscreen-12,xonscreen+6,yonscreen-2, "#00ff00" )
- end
- gui.opacity(0.75)
- gui.drawbox(xonscreen-7,yonscreen-25,xonscreen+5,yonscreen-16, "#000000" )
- gui.opacity(1)
- gui.text(xonscreen-4,yonscreen-24, 16-penaltytimer, Color, BorderColor)
- gui.opacity(1)
- vba.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement