Watch health points, RNG, inputs pad and speed move
local function BOSS_breaker()
local boss_HP1 = mainmemory.read_u8
local boss_HP2 = mainmemory.read_u8
local boss_HP3 = mainmemory.read_u8
local boss_HP4 = mainmemory.read_u8
local boss_HP5 = mainmemory.read_u8
local boss_HP6 = mainmemory.read_u8
local boss_HP7 = mainmemory.read_u8
local boss_HP8 = mainmemory.read_u8
local boss_HP9 = mainmemory.read_u8
local boss_Xposition = mainmemory.read_u8
local boss_RNGdecision = mainmemory.read_u8
local boss_level1 = mainmemory.read_u8
local boss_level2 = mainmemory.read_u8
local black = 0xFF000000
local orange = 0xFFFF9900
local red = 0xFFFF0000
local no = 0x00FFFFFF
local purp = 0xFFCC00FF
local yel = 0xFFFFFF00
local hp1 = boss_HP1(0x0745)
local hp2 = boss_HP2(0x074B)
local hp3 = boss_HP3(0x0751)
local hp4 = boss_HP4(0x0757)
local hp5 = boss_HP5(0x075D)
local hp6 = boss_HP6(0x0763)
local hp7 = boss_HP7(0x0769)
local hp8 = boss_HP8(0x076F)
local hp9 = boss_HP9(0x0775)
local bxpos = boss_Xposition(0x04C8)
local rng = boss_RNGdecision(0x04FC)
local lv1 = boss_level1(0x0332)
local lv2 = boss_level2(0x0333)
if lv1 == 250 and lv2 == 176 and hp1 > 0
or lv1 == 250 and lv2 == 176 and hp2 > 0
or lv1 == 250 and lv2 == 176 and hp3 > 0
or lv1 == 250 and lv2 == 176 and hp4 > 0
or lv1 == 250 and lv2 == 176 and hp5 > 0
or lv1 == 250 and lv2 == 176 and hp6 > 0
or lv1 == 250 and lv2 == 176 and hp7 > 0
or lv1 == 250 and lv2 == 176 and hp8 > 0
or lv1 == 250 and lv2 == 176 and hp9 > 0 then
gui.drawText(bxpos-1,94,hp1,black,no,10)
gui.drawText(bxpos-1,110,hp2,black,no,10)
gui.drawText(bxpos-1,126,hp3,black,no,10)
gui.drawText(bxpos-1,142,hp4,black,no,10)
gui.drawText(bxpos-1,158,hp5,black,no,10)
gui.drawText(bxpos+73,113,hp6,black,no,10)
gui.drawText(bxpos+102,160,hp7,black,no,10)
gui.drawText(bxpos+124,152,hp8,black,no,10)
gui.drawText(bxpos+52,142,hp9,black,no,10)
gui.drawText(bxpos,94,hp1,orange,no,10)
gui.drawText(bxpos,110,hp2,orange,no,10)
gui.drawText(bxpos,126,hp3,orange,no,10)
gui.drawText(bxpos,142,hp4,orange,no,10)
gui.drawText(bxpos,158,hp5,orange,no,10)
gui.drawText(bxpos+74,113,hp6,orange,no,10)
gui.drawText(bxpos+103,160,hp7,orange,no,10)
gui.drawText(bxpos+125,152,hp8,orange,no,10)
gui.drawText(bxpos+53,142,hp9,orange,no,10)
end
if lv1 == 250 and lv2 == 176 and rng >= 103 and rng <= 105 then
gui.drawLine(bxpos,95,bxpos+10,95,red)
gui.drawLine(bxpos+10,95,bxpos+5,86,red)
gui.drawLine(bxpos+5,86,bxpos,95,red)
gui.drawText(bxpos+2,87,'!',red,no,8)
elseif lv1 == 250 and lv2 == 176 and rng >= 115 and rng <= 117 then
gui.drawLine(bxpos+76,113,bxpos+86,113,red)
gui.drawLine(bxpos+86,113,bxpos+81,104,red)
gui.drawLine(bxpos+81,104,bxpos+76,113,red)
gui.drawText(bxpos+78,105,'!',red,no,8)
elseif lv1 == 250 and lv2 == 176 and rng >= 129 and rng <= 131 then
gui.drawLine(bxpos+103,161,bxpos+113,161,red)
gui.drawLine(bxpos+113,161,bxpos+108,152,red)
gui.drawLine(bxpos+108,152,bxpos+103,161,red)
gui.drawText(bxpos+105,153,'!',red,no,8)
elseif lv1 == 250 and lv2 == 176 and rng >= 137 and rng <= 139 then
gui.drawLine(bxpos+128,153,bxpos+138,153,purp)
gui.drawLine(bxpos+138,153,bxpos+133,144,purp)
gui.drawLine(bxpos+133,144,bxpos+128,153,purp)
gui.drawText(bxpos+130,145,'!',purp,no,8)
elseif lv1 == 250 and lv2 == 176 and rng >= 151 and rng <= 153 then
gui.drawLine(bxpos+56,141,bxpos+66,141,yel)
gui.drawLine(bxpos+66,141,bxpos+61,132,yel)
gui.drawLine(bxpos+61,132,bxpos+56,141,yel)
gui.drawText(bxpos+58,133,'!',yel,no,8)
end
end
local function flash_speed()
local speed = mainmemory.read_u8
local boss_level1 = mainmemory.read_u8
local boss_level2 = mainmemory.read_u8
local sp = speed(0x071A)
local lv1 = boss_level1(0x0332)
local lv2 = boss_level2(0x0333)
local purp = 0xFF9933CC
local purp2 = 0xFF9999FF
local ora = 0xFFFF6633
local ora2 = 0xFFFF9966
local red = 0xFFDD0000
local red2 = 0xFFFF6600
local whi = 0xFFEEEEEE
local no = 0x00FFFFFF
local yel = 0xFFFFFF66
local red3 = 0xFFAA0000
local ora3 = 0xFF993333
local ora4 = 0xFFFFCC00
local black = 0xFF0000000
local efc = emu.framecount()
if efc > 1755 and efc < 2720
or efc > 3062 and efc < 5319
or efc > 6907 and efc < 8224
or efc > 8563 and efc < 10002
or efc > 11790 and efc < 12245
or efc > 12586 and efc < 13370
or efc > 15406 and efc < 16447
or efc > 16800 and efc < 18359
or efc > 18422 and efc < 19901
or efc > 22297 and efc < 23134
or efc > 23459 and efc < 24368
or efc > 27195 and efc < 27918
or efc > 27974 and efc < 28799
or efc > 29137 and efc < 29566 then
if lv1 == 128 and lv2 == 206 then
gui.drawRectangle(14,168,32,7,no,black)
gui.drawRectangle(19,168,7,9,no,black)
gui.drawRectangle(40,166,6,7,no,black)
gui.drawRectangle(46,168,4,7,no,black)
gui.drawText(13,165,'speed:',red2,no,10)
gui.drawText(14,165,'speed:',red,no,10)
gui.drawPixel(18,170,whi)
gui.drawPixel(23,170,whi)
gui.drawPixel(31,170,whi)
gui.drawPixel(37,170,whi)
gui.drawPixel(44,168,whi)
gui.drawPixel(17,170,yel)
gui.drawPixel(22,170,yel)
gui.drawPixel(30,170,yel)
gui.drawPixel(36,170,yel)
gui.drawPixel(43,168,yel)
gui.drawPixel(19,170,yel)
gui.drawPixel(24,170,yel)
gui.drawPixel(32,170,yel)
gui.drawPixel(38,170,yel)
gui.drawPixel(20,170,red3)
gui.drawPixel(20,172,red3)
gui.drawPixel(26,171,red3)
gui.drawPixel(26,172,red3)
gui.drawPixel(32,171,red3)
gui.drawPixel(32,173,red3)
gui.drawPixel(29,172,red3)
gui.drawPixel(38,171,red3)
gui.drawPixel(38,173,red3)
gui.drawPixel(35,172,red3)
gui.drawPixel(45,173,red3)
gui.drawPixel(19,172,ora3)
gui.drawPixel(25,171,ora3)
gui.drawPixel(25,172,ora3)
gui.drawPixel(43,172,ora3)
gui.drawPixel(43,171,ora3)
gui.drawPixel(16,170,ora4)
gui.drawPixel(29,170,ora4)
gui.drawPixel(28,171,ora4)
gui.drawPixel(21,170,ora4)
gui.drawPixel(35,170,ora4)
gui.drawPixel(42,168,ora4)
if lv1 == 128 and lv2 == 206 and sp >= 0 and sp <= 10 then
gui.drawText(51,166,sp,black,no,10)
gui.drawText(48,166,sp,black,no,10)
gui.drawText(49,166,sp,purp2,no,10)
gui.drawText(50,166,sp,purp,no,10)
elseif lv1 == 128 and lv2 == 206 and sp >= 11 and sp <= 16 then
gui.drawText(51,166,sp,black,no,10)
gui.drawText(48,166,sp,black,no,10)
gui.drawText(49,166,sp,ora2,no,10)
gui.drawText(50,166,sp,ora,no,10)
elseif lv1 == 128 and lv2 == 206 and sp <= 255 and sp >= 246 then
gui.drawText(51,166,sp,black,no,10)
gui.drawText(48,166,sp,black,no,10)
gui.drawText(49,166,sp,purp2,no,10)
gui.drawText(50,166,sp,purp,no,10)
elseif lv1 == 128 and lv2 == 206 and sp <= 247 and sp >= 240 then
gui.drawText(51,166,sp,black,no,10)
gui.drawText(48,166,sp,black,no,10)
gui.drawText(49,166,sp,ora2,no,10)
gui.drawText(50,166,sp,ora,no,10)
end
end
end
end
local function input_pad()
local boss_level1 = mainmemory.read_u8
local boss_level2 = mainmemory.read_u8
local lv1 = boss_level1(0x0332)
local lv2 = boss_level2(0x0333)
local black = 0xFF000000
local blackt = 0xF0111111
local blackt2 = 0xF0000000
local grey = 0xFF333333
local grey2 = 0xFF555555
local grey3 = 0xFF222222
local no = 0x00FFFFFF
local ora = 0xFFFF6633
local ora2 = 0xFFCC6600
local ora3 = 0xFF996633
local ipt = movie.getinput(emu.framecount())
if emu.framecount() > 625 then
gui.drawRectangle(56,175,53,20,blackt2,blackt)
gui.drawRectangle(61,177,6,14,black,no)
gui.drawRectangle(57,181,14,6,black,no)
gui.drawRectangle(62,178,4,12,grey,grey)
gui.drawRectangle(58,182,12,4,grey,grey)
gui.drawLine(62,178,66,178,grey2)
gui.drawLine(58,182,61,182,grey2)
gui.drawLine(67,182,70,182,grey2)
gui.drawEllipse(85,180,8,8,black,grey)
gui.drawEllipse(100,180,8,8,black,grey)
gui.drawText(86,180,'1',black,no,8)
gui.drawText(101,180,'2',black,no,8)
gui.drawPixel(87,182,grey2)
gui.drawPixel(102,182,grey2)
gui.drawLine(86,183,86,185,grey2)
gui.drawLine(101,183,101,185,grey2)
gui.drawLine(88,181,90,181,grey2)
gui.drawLine(103,181,105,181,grey2)
gui.drawLine(88,187,90,187,grey3)
gui.drawLine(103,187,105,187,grey3)
gui.drawLine(92,183,92,185,grey3)
gui.drawLine(107,183,107,185,grey3)
gui.drawPixel(87,186,grey2)
gui.drawPixel(102,186,grey2)
gui.drawPixel(91,186,grey3)
gui.drawPixel(106,186,grey3)
gui.drawPixel(91,182,grey3)
gui.drawPixel(106,182,grey3)
gui.drawLine(62,190,66,190,grey3)
gui.drawLine(58,186,61,186,grey3)
gui.drawLine(67,186,70,186,grey3)
if ipt["P1 Up"] then
gui.drawRectangle(61,177,6,5,no,ora)
gui.drawRectangle(62,177,4,6,no,ora2)
gui.drawRectangle(63,177,2,7,no,ora3)
end
if ipt["P1 Down"] then
gui.drawRectangle(61,186,6,5,no,ora)
gui.drawRectangle(62,185,4,6,no,ora2)
gui.drawRectangle(63,184,2,7,no,ora3)
end
if ipt["P1 Left"] then
gui.drawRectangle(57,181,5,6,no,ora)
gui.drawRectangle(57,182,6,4,no,ora2)
gui.drawRectangle(57,183,7,2,no,ora3)
end
if ipt["P1 Right"] then
gui.drawRectangle(66,181,5,6,no,ora)
gui.drawRectangle(65,182,6,4,no,ora2)
gui.drawRectangle(64,183,7,2,no,ora3)
end
if ipt["P1 B1"] then
gui.drawText(86,180,'1',ora,no,8)
end
if ipt["P1 B2"] then
gui.drawText(101,180,'2',ora,no,8)
end
end
end
while true do
input_pad()
flash_speed()
BOSS_breaker()
emu.frameadvance();
end