Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pixel= gui.drawPixel
- local line = gui.drawLine
- local box = gui.drawBox
- local ismovie= movie.isloaded
- local TblNextM= { -- Mario experience needed
- 7, 32, 68, 108, 218, 336, 470, 694, 962, 1254, -- 1-10
- 1578, 1924, 2306, 2756, 3256, 3830, 4480, 5195, 5975, 6845 --11-20
- }
- local TblNextL= { -- Luigi experience needed
- 10, 37, 77, 123, 233, 353, 493, 699, 969, 1272, -- 1-10
- 1552, 1898, 2280, 2730, 3239, 3813, 4463, 5178, 5958, 6858 --11-20
- }
- --** variables to move everything around if needed **--
- x =0
- y = 0
- --*****************************************************************************
- while true do
- --*****************************************************************************
- memory.usememorydomain("EWRAM")
- --** design **--
- -- box
- box(0+x, -1+y, 181+x ,29+y, 0x00000000, 0xD5000000)
- -- mushroom graphic
- line( 3+x,2+y ,7+x,2+y, 0xC4FF0000)
- line( 2+x,3+y ,8+x,3+y, 0xC4FF0000)
- line( 2+x,4+y ,8+x,4+y, 0xC4FF0000)
- line( 4+x,5+y, 6+x,5+y, 0xC4F5D0A9)
- line( 4+x,6+y, 6+x,6+y, 0xC4F5D0A9)
- pixel(3+x,3+y, 0xC4FFFFFF)
- pixel(5+x,2+y, 0xC4FFFFFF)
- pixel(7+x,3+y, 0xC4FFFFFF)
- -- syrup graphic
- line(4+x, 8+y, 5+x, 8+y, 0xC4FF9900)
- line(4+x, 9+y, 5+x, 9+y, 0xC4FF9900)
- line( 2+x, 10+y, 7+x, 10+y, 0xC4FF9900)
- line( 2+x, 11+y, 7+x, 11+y, 0xC4FF9900)
- line(3+x, 12+y, 6+x, 12+y, 0xC4FF9900)
- -- seperation line
- line(41+x, 15+y, 41+x, 25+y, 0x55FFFFFF)
- line(42+x, 15+y,42+x, 25+y, 0x55FFFFFF)
- line(83+x, 14+y, 83+x, 25+y, 0x55FFFFFF)
- line(84+x, 14+y,84+x, 25+y, 0x55FFFFFF)
- line(67+x, 2+y, 67+x, 13+y, 0x55FFFFFF)
- line(68+x, 2+y, 68+x, 13+y, 0x55FFFFFF)
- line(144+x, 2+y, 144+x, 25+y, 0x55FFFFFF)
- line(145+x, 2+y, 145+x, 25+y, 0x55FFFFFF)
- line(0+x,14+y,82+x,14+y,0x55FFFFFF)
- --** ADDRESS VALUES **--
- mushrooms = memory.read_s8(0x48e2)
- supermushrooms = memory.read_s8(0x48e3)
- ultramushrooms = memory.read_s8(0x48e4)
- maxmushrooms = memory.read_s8(0x48e5)
- nuts = memory.read_s8(0x48e6)
- supernuts = memory.read_s8(0x48e7)
- ultranuts = memory.read_s8(0x48e8)
- maxnuts = memory.read_s8(0x48e9)
- syrups = memory.read_s8(0x48ea)
- supersyrups = memory.read_s8(0x48eb)
- ultrasyrups = memory.read_s8(0x48ec)
- maxsyrups = memory.read_s8(0x48ed)
- ONEups = memory.read_s8(0x48ee)
- ONEupDXs = memory.read_s8(0x48ef)
- goldmushrooms = memory.read_s8(0x48f0)
- herbs = memory.read_s8(0x48f1)
- redpeppers = memory.read_s8(0x48f2)
- greenpeppers = memory.read_s8(0x48f3)
- ahastraights = memory.read_s8(0x48f4)
- ufustraights = memory.read_s8(0x48f5)
- gerastraights = memory.read_s8(0x48f6)
- dehestraights = memory.read_s8(0x48f7)
- ufumanjaros = memory.read_s8(0x48f8)
- gerapuccinos = memory.read_s8(0x48f9)
- dehepressos = memory.read_s8(0x48fa)
- ahabeans = memory.read_s8(0x4902)
- ufubeans = memory.read_s8(0x4903)
- gerabeans = memory.read_s8(0x4904)
- dehebeans = memory.read_s8(0x4905)
- --TODO: CLOTHES
- --Mario
- HPM = memory.read_s16_le(0x4866)
- HPmaxM = memory.read_s16_le(0x486A)
- BPM = memory.read_s16_le(0x486c)
- BPmaxM = memory.read_s16_le(0x4870)
- PowM = memory.read_s16_le(0x4874)
- DefM = memory.read_s16_le(0x487c)
- SpeedM = memory.read_s16_le(0x4878)
- HigeM = memory.read_s16_le(0x4880)
- levelM = memory.read_s8(0x4888)
- ExpM = memory.read_s16_le(0x485c)
- -- This calculates how much experience you have to get for the next level.
- -- The NextM/NextL values seem to be hardcoded into the game.
- NextM = TblNextM[levelM] or 0
- NextexpM = NextM - ExpM
- --Luigi
- HPL = memory.read_s16_le(0x48a2)
- HPmaxL = memory.read_s16_le(0x48a6)
- BPL = memory.read_s16_le(0x48a8)
- BPmaxL = memory.read_s16_le(0x48ac)
- PowL = memory.read_s16_le(0x48b0)
- DefL = memory.read_s16_le(0x48b8)
- SpeedL = memory.read_s16_le(0x48b4)
- HigeL = memory.read_s16_le(0x48bc)
- levelL = memory.read_s8(0x48c4)
- ExpL = memory.read_s16_le(0x4898)
- -- 'Next' calculator
- NextL = TblNextL[levelL] or 0
- NextexpL = NextL - ExpL
- -- display
- if mushrooms == -1 then mushrooms = 0 end
- if supermushrooms == -1 then supermushrooms = 0 end
- if ultramushrooms == -1 then ultramushrooms = 0 end
- if maxmushrooms == -1 then maxmushrooms = 0 end
- if nuts == -1 then nuts = 0 end
- if supernuts == -1 then supernuts = 0 end
- if ultranuts == -1 then ultranuts = 0 end
- if maxnuts == -1 then maxnuts = 0 end
- if syrups == -1 then syrups = 0 end
- if supersyrups == -1 then supersyrups = 0 end
- if ultrasyrups == -1 then ultrasyrups = 0 end
- if maxsyrups == -1 then maxsyrups = 0 end
- if ONEups == -1 then ONEups = 0 end
- if ONEupDXs == -1 then ONEupDXs = 0 end
- if redpeppers == -1 then redpeppers = 0 end
- if greenpeppers == -1 then greenpeppers = 0 end
- if herbs == -1 then herbs = 0 end
- if goldmushrooms == -1 then goldmushrooms = 0 end
- if ahastraights == -1 then ahastraights = 0 end
- if ufustraights == -1 then ufustraights = 0 end
- if gerastraights == -1 then gerastraights = 0 end
- if dehestraights == -1 then dehestraights = 0 end
- if ufumanjaros == -1 then ufumanjaros = 0 end
- if gerapuccinos == -1 then gerapuccinos = 0 end
- if dehepressos == -1 then dehepressos = 0 end
- if ahabeans == -1 then ahabeans = 0 end
- if ufubeans == -1 then ufubeans = 0 end
- if gerabeans == -1 then gerabeans = 0 end
- if dehebeans == -1 then dehebeans = 0 end
- gui.text(23+x,12+y, syrups, 0x000000)
- gui.text(49+x,12+y, supersyrups, 0x000000)
- gui.text(75+x,12+y, ultrasyrups, 0x000000)
- gui.text(101+x,12+y, maxsyrups, 0x000000)
- gui.text(23+x,0+y, mushrooms, 0x000000)
- gui.text(49+x,0+y, supermushrooms, 0x000000)
- gui.text(75+x,0+y, ultramushrooms, 0x000000)
- gui.text(101+x,0+y, maxmushrooms, 0x000000)
- --Mushpower + Cash
- gui.text(96+x,29+y, mushrooms*0.078 + supermushrooms*0.098 + ultramushrooms*0.117 + maxmushrooms*0.199 , 0x00000000, "yellow")
- gui.text( 96+x, 41+y, "$ ".. memory.read_s16_le(0x48e0), 0x00000000,"yellow")
- --stats
- gui.text( 146+x, 0+y, "Lv" .. levelM, 0x00000000,0xffEE9595)
- gui.text(232+x, 0+y, "Lv" .. levelL,0x00000000,0xff77EE77)
- gui.text( 146+x, 12+y, "BP ", 0x00000000,0xff777777)
- gui.text( 174+x, 25+y, "POW ", 0x00000000,0xff777777)
- gui.text( 174+x, 38+y, "HIGE ", 0x00000000,0xff777777)
- gui.text( 168+x, 12+y, BPM .. "/" .. BPmaxM, 0x000000)
- gui.text( 231+x, 12+y, BPL .. "/" .. BPmaxL, 0x000000)
- ----gui.text( 86+x,25+y, "NEXT ", "#A9D0F5")
- gui.text(204+x,25+y, PowM, 0x00000000,0xffffffff)
- gui.text(252+x,25+y, PowL, 0x00000000,0xffffffff)
- gui.text(216+x,37+y, HigeM,0x00000000,0xffffffff)
- gui.text(252+x,37+y, HigeL,0x00000000,0xffffffff)
- ----gui.text(107+x,25+y, NextexpM .. " " .. NextexpL)
- --Bros Attacks counters
- gui.text( 6+x,29+y, "S".. math.max(20 - memory.read_s8(0x4684),0),0x000000,0xffEE9595)
- gui.text(-14+x,41+y," B".. math.max( 8 - memory.read_s8(0x468c),0),0x000000,0xff77EE77)
- gui.text(25+x,29+y," C".. math.max(32 - memory.read_s8(0x4686),0),0x000000,0xffEE9595)
- gui.text(25+x,41+y," K".. math.max(43 - memory.read_s8(0x468e),0),0x000000,0xff77EE77)
- -- RNG
- box(0+x, 30+y, 19+x ,45+y, 0x00000000, 0xAF000000)
- gui.text(3+x,60+y, memory.read_u8(0x1e60),0x00000000,0xffffffff)
- gui.text(3+x,73+y, memory.read_u8(0x1e64),0x00000000,0xffffffff)
- --Movie active? Lagframe? framecount+lagcount
- if ismovie()~=true then box(21,30,140,38, 0x00FF0000, 0xC4FF0000) end
- if ismovie()~=true then box(0,0,239,159, 0xFFFF0000) end --border around the screen
- if ismovie()~=true then gui.text(45,60, "! MOVIE NOT RECORDING !", 0x00000000, 0xFFFFFFFF) end
- if ismovie() == true then
- ----*** when lagging
- if emu.islagged()==true then gui.text(90,76, "*****", 0x00000000, 0xFFFFFF33) end
- ----framecount
- gui.text(44,60, emu.framecount(), 0xff000000, 0xFF000000) --stroke
- gui.text(47,60, emu.framecount(), 0xff000000, 0xFF000000)
- gui.text(46,59, emu.framecount(), 0xff000000, 0xFF000000)
- gui.text(46,60, emu.framecount(), 0xff000000, 0xFFFFFFFF) --white framecounttext
- ----lagcount
- gui.text(44,76, emu.lagcount(), 0xff000000, 0xFF000000) --stroke
- gui.text(47,76, emu.lagcount(), 0xff000000, 0xFF000000)
- gui.text(46,75, emu.lagcount(), 0xff000000, 0xFF000000)
- gui.text(46,76, emu.lagcount(), 0xff000000, 0xFFFFFF33) --yellow lagcounttext
- ----input
- t = ""
- for key, value in pairs(joypad.get()) do
- if tostring(value) ~= "false" then t = t .." ".. tostring(key) end
- end
- gui.text(100,60,tostring(t), 0xff000000, 0xff000000)
- gui.text(103,60,tostring(t), 0xff000000, 0xff000000)
- gui.text(102,59,tostring(t), 0xff000000, 0xff000000)
- gui.text(102,60,tostring(t), 0xff000000, 0xffffffff)
- end
- ---- POS
- gui.text(300+x, 1+y, memory.read_s24_le(0x6c14), 0x00000000,0xffEE9595)
- gui.text(300+x, 13+y, memory.read_s24_le(0x6c18), 0x00000000,0xffEE9595)
- gui.text(300+x, 25+y, memory.read_s24_le(0x6fb0), 0x00000000, 0xff77EE77)
- gui.text(300+x, 37+y, memory.read_s24_le(0x6fb4), 0x00000000,0xff77EE77)
- ---- MISC
- --gui.text(10, 89, "rookie hp " ..R2u(0x8ce6)-5000, 0xE5FFFF00)
- --gui.text(10, 89, "Birdo hp " ..R2u(0x8fe2), 0xE5FFFF00)
- --gui.text(10, 89, "head " ..R2u(0xaa42)-5000, 0xE5FFFF00)
- --gui.text(10, 98, "heart " ..R2u(0xa912)-5000, 0xE5FFFF00)
- --gui.text(10,107, "left " ..R2u(0xab72)-5000, 0xE5FFFF00)
- --gui.text(10,116, "right " ..R2u(0xaca2)-5000, 0xE5FFFF00)
- if memory.read_s8(0x04f4c) == 0 then box(141,37,181,45, 0x00000000,0xaf000000)
- elseif memory.read_s8(0x4f4c) == 1 then box(141,30,181,38, 0x00000000,0xaf000000) end
- memory.usememorydomain("IWRAM")
- gui.text(288+x, 60+y, memory.read_s8(0x2429), 0x00000000,0xffEE9595)
- gui.text(324+x, 60+y, memory.read_s8(0x2440), 0x00000000, 0xff77EE77)
- gui.text(288+x, 73+y, memory.read_s8(0x2441), 0x00000000, 0xff77EE77)
- gui.text(324+x, 73+y, memory.read_s8(0x2428), 0x00000000,0xffEE9595)
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement