Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- --** variables to move everything around if needed **--
- x = 0
- y = 0
- --** design **--
- -- box
- gui.opacity(0.77)
- gui.fillbox(5+x, -2+y, 160+x ,31+y, "#1c1c1c")
- -- mushroom graphic
- gui.drawline(10+x,2+y ,14+x,2+y, "red")
- gui.drawline(9+x,3+y ,15+x,3+y, "red")
- gui.drawline(9+x,4+y ,15+x,4+y, "red")
- gui.drawline(11+x,5+y, 13+x,5+y, "#F5D0A9")
- gui.drawline(11+x,6+y, 13+x,6+y, "#F5D0A9")
- gui.drawpixel(10+x,3+y, "white")
- gui.drawpixel(12+x,2+y, "white")
- gui.drawpixel(14+x,3+y, "white")
- -- nut graphic
- gui.drawline(10+x, 8+y, 12+x, 8+y, "#FFCC66")
- gui.drawline(9+x, 9+y, 13+x, 9+y, "#FFCC66")
- gui.drawline(9+x, 10+y, 14+x, 10+y, "#FFCC66")
- gui.drawline(12+x, 11+y, 14+x, 11+y, "#FFCC66")
- gui.drawline(13+x, 12+y, 14+x, 12+y, "#FFCC66")
- -- syrup graphic
- gui.drawline(11+x, 14+y, 12+x, 14+y, "#FF9900")
- gui.drawline(11+x, 15+y, 12+x, 15+y, "#FF9900")
- gui.drawline(9+x, 16+y, 14+x, 16+y, "#FF9900")
- gui.drawline(9+x, 17+y, 14+x, 17+y, "#FF9900")
- gui.drawline(10+x, 18+y, 13+x, 18+y, "#FF9900")
- -- others graphic
- --e
- gui.drawline(9+x, 20+y, 9+x, 20+y , "white")
- gui.drawline(9+x, 21+y, 10+x, 21+y , "white")
- gui.drawline(8+x, 21+y, 8+x, 23+y , "white")
- gui.drawline(9+x, 24+y, 10+x, 24+y , "white")
- gui.drawline(9+x, 22+y, 10+x, 22+y , "white")
- gui.drawpixel(9+x, 21+y, "black")
- --t
- gui.drawline(13+x, 20+y, 13+x, 24+y , "white")
- gui.drawline(12+x, 21+y, 14+x, 21+y , "white")
- --c
- gui.drawline(17+x, 21+y, 17+x, 21+y , "white")
- gui.drawline(16+x, 24+y, 17+x, 24+y , "white")
- gui.drawline(16+x, 22+x, 16+x, 23+y , "white")
- --** ADDRESS VALUES **--
- mushrooms = memory.readbytesigned(0x020048e2)
- supermushrooms = memory.readbytesigned(0x020048e3)
- ultramushrooms = memory.readbytesigned(0x020048e4)
- maxmushrooms = memory.readbytesigned(0x020048e5)
- nuts = memory.readbytesigned(0x020048e6)
- supernuts = memory.readbytesigned(0x020048e7)
- ultranuts = memory.readbytesigned(0x020048e8)
- maxnuts = memory.readbytesigned(0x020048e9)
- syrups = memory.readbytesigned(0x020048ea)
- supersyrups = memory.readbytesigned(0x020048eb)
- ultrasyrups = memory.readbytesigned(0x020048ec)
- maxsyrups = memory.readbytesigned(0x020048ed)
- ONEups = memory.readbytesigned(0x020048ee)
- ONEupDXs = memory.readbytesigned(0x020048ef)
- goldmushrooms = memory.readbytesigned(0x020048f0)
- herbs = memory.readbytesigned(0x020048f1)
- redpeppers = memory.readbytesigned(0x020048f2)
- greenpeppers = memory.readbytesigned(0x020048f3)
- ahastraights = memory.readbytesigned(0x020048f4)
- ufustraights = memory.readbytesigned(0x020048f5)
- gerastraights = memory.readbytesigned(0x020048f6)
- dehestraights = memory.readbytesigned(0x020048f7)
- ufumanjaros = memory.readbytesigned(0x020048f8)
- gerapuccinos = memory.readbytesigned(0x020048f9)
- dehepressos = memory.readbytesigned(0x020048fa)
- ahabeans = memory.readbyte(0x02004902)
- ufubeans = memory.readbyte(0x02004903)
- gerabeans = memory.readbyte(0x02004904)
- dehebeans = memory.readbyte(0x02004905)
- --TODO: CLOTHES
- --Mario
- HPM = memory.readword(0x02004866)
- HPmaxM = memory.readword(0x0200486A)
- BPM = memory.readword(0x0200486c)
- BPmaxM = memory.readword(0x02004870)
- PowM = memory.readword(0x02004874)
- DefM = memory.readword(0x0200487c)
- SpeedM = memory.readword(0x02004878)
- HigeM = memory.readword(0x02004880)
- levelM = memory.readbyte(0x02004888)
- ExpM = memory.readword(0x0200485c)
- -- 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 = 0
- if levelM == 1 then NextM = 7
- elseif levelM == 2 then NextM = 32
- elseif levelM == 3 then NextM = 68
- elseif levelM == 4 then NextM = 108
- elseif levelM == 5 then NextM = 218
- elseif levelM == 6 then NextM = 336
- elseif levelM == 7 then NextM = 470
- elseif levelM == 8 then NextM = 694
- elseif levelM == 9 then NextM = 962
- elseif levelM == 10 then NextM = 1254
- elseif levelM == 11 then NextM = 1578
- elseif levelM == 12 then NextM = 1924
- elseif levelM == 13 then NextM = 2306
- elseif levelM == 14 then NextM = 2756
- elseif levelM == 15 then NextM = 3256
- elseif levelM == 16 then NextM = 3830
- elseif levelM == 17 then NextM = 4480
- elseif levelM == 18 then NextM = 5195
- elseif levelM == 19 then NextM = 5975
- elseif levelM == 20 then NextM = 6845
- else NextM = 0 end
- NextexpM = NextM - ExpM
- --Luigi
- HPL = memory.readword(0x020048a2)
- HPmaxL = memory.readword(0x020048a6)
- BPL = memory.readword(0x020048a8)
- BPmaxL = memory.readword(0x020048ac)
- PowL = memory.readword(0x020048b0)
- DefL = memory.readword(0x020048b8)
- SpeedL = memory.readword(0x020048b4)
- HigeL = memory.readword(0x020048bc)
- levelL = memory.readbyte(0x020048c4)
- ExpL = memory.readword(0x02004898)
- -- 'Next' calculator
- NextL = 0
- if levelL == 1 then NextL = 10
- elseif levelL == 2 then NextL = 37
- elseif levelL == 3 then NextL = 77
- elseif levelL == 4 then NextL = 123
- elseif levelL == 5 then NextL = 233
- elseif levelL == 6 then NextL = 353
- elseif levelL == 7 then NextL = 493
- elseif levelL == 8 then NextL = 699
- elseif levelL == 9 then NextL = 969
- elseif levelL == 10 then NextL = 1272
- elseif levelL == 11 then NextL = 1552
- elseif levelL == 12 then NextL = 1898
- elseif levelL == 13 then NextL = 2280
- elseif levelL == 14 then NextL = 2730
- elseif levelL == 15 then NextL = 3239
- elseif levelL == 16 then NextL = 3813
- elseif levelL == 17 then NextL = 4463
- elseif levelL == 18 then NextL = 5178
- elseif levelL == 19 then NextL = 5958
- elseif levelL == 20 then NextL = 6858
- elseif levelL == 20 then NextL = 6845
- else NextL = 0 end
- 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(18+x,1+y, mushrooms)
- gui.text(28+x,1+y, supermushrooms)
- gui.text(38+x,1+y, ultramushrooms)
- gui.text(48+x,1+y, maxmushrooms)
- gui.text(166+x,1+y, "(" ..mushrooms*0.078 + supermushrooms*0.098 + ultramushrooms*0.117 + maxmushrooms*0.199 .. ")" , "yellow")
- gui.text(18+x,7+y, nuts)
- gui.text(28+x,7+y, supernuts)
- gui.text(38+x,7+y, ultranuts)
- gui.text(48+x,7+y, maxnuts)
- gui.text(18+x,13+y, syrups)
- gui.text(28+x,13+y, supersyrups)
- gui.text(38+x,13+y, ultrasyrups)
- gui.text(48+x,13+y, maxsyrups)
- gui.text(57+x,1+y, "=" ..mushrooms*20+supermushrooms*50+ultramushrooms*110+maxmushrooms*280 ,"#81F7F3")
- gui.text(78+x,1+y, mushrooms*24+supermushrooms*60+ultramushrooms*100+maxmushrooms*180 ,"#ACFA58")
- gui.text(57+x,7+y, "=" ..nuts*50+supernuts*120+ultranuts*260+maxnuts*340 , "#81f7f3")
- gui.text(78+x,7+y, nuts*50+supernuts*90+ultranuts*140+maxnuts*220 , "#acfa58")
- gui.text(57+x,13+y, "=" ..syrups*24+supersyrups*50+ultrasyrups*80+maxsyrups*280 , "#81f7f3")
- gui.text(78+x,13+y, syrups*24+supersyrups*50+ultrasyrups*80+maxsyrups*150 , "#acfa58")
- gui.text(22+x,19+y, "=" ..ONEups*70+ONEupDXs*420+herbs*30+goldmushrooms*105+redpeppers*30+greenpeppers*30+ahastraights*100+ufustraights*100+gerastraights*100+dehestraights*100+ufumanjaros*100+gerapuccinos*100+dehepressos*100 , "#81f7f3")
- gui.text(43+x,19+y, ONEups*80+ONEupDXs*240+herbs*30+goldmushrooms*60+redpeppers*50+greenpeppers*50+ahastraights*100+ufustraights*100+gerastraights*100+dehestraights*100+ufumanjaros*100+gerapuccinos*100+dehepressos*100 , "#acfa58")
- gui.text(67+x,19+y, "$" ..memory.readword(0x020048e0))
- gui.text(100+x,1+y, "(M)", "#F78181")
- gui.text(134+x,1+y, "(L)", "#ACFA58")
- gui.text(112+x,1+y, "Lv" .. levelM)
- gui.text(146+x,1+y, "Lv" .. levelL)
- gui.text(100+x,7+y, "BP " .. BPM .. "/" .. BPmaxM .. " " .. BPL .. "/" .. BPmaxL)
- gui.text(100+x,13+y, "Pow " , "#F5A9A9")
- gui.text(100+x,19+y, "hige " , "#A9F5D0")
- gui.text(100+x,25+y, "NEXT ", "#A9D0F5")
- gui.text(120+x,13+y, PowM .. " " .. PowL)
- gui.text(120+x,19+y, HigeM .. " " .. HigeL)
- gui.text(120+x,25+y, NextexpM .. " " .. NextexpL)
- --Bros Attacks counters
- SplashCounter = 20 - memory.readbyte(0x02004684)
- if SplashCounter < 0 then SplashCounter = 0 end
- BounceCounter = 8 - memory.readbyte(0x0200468c)
- if BounceCounter < 0 then BounceCounter = 0 end
- ChopperCounter = 32 - memory.readbyte(0x02004686)
- if ChopperCounter < 0 then ChopperCounter = 0 end
- KnockCounter = 43 - memory.readbyte(0x0200468e)
- if ChopperCounter < 0 then KnockCounter = 0 end
- gui.text(8+x,25+y, "S=".. SplashCounter)
- gui.text(28+x,25+y, "B=".. BounceCounter)
- gui.text(49+x,25+y, "C=".. ChopperCounter)
- gui.text(71+x,25+y, "K=".. KnockCounter)
- -- Boss HP
- gui.opacity(1.00)
- gui.text(8+x,34+y, "[ Boss HP " .. memory.readbyte(0x0200a912) .. " ]")
- -- CORRECTIONS --
- -- Since Bros Rock was collected, but not required, it shouldn't have been
- -- along the items that were sold. Due to this mistake, memory address values
- -- now need to be changed.
- -- reduces coins by 2.
- if vba.framecount() == 500000 then
- memory.writeword(0x020048E0, (memory.readword(0x020048E0)-2))
- end
- -- reduces mushrooms by 4.
- if vba.framecount() == 500000 then
- memory.writebyte(0x020048e2, (memory.readbyte(0x020048E2)-4))
- end
- vba.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement