Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- }
- local itemsTbl = {
- [0] = "mushrooms",
- [1] = "supermushrooms",
- [2] = "ultramushrooms",
- [3] = "maxmushrooms",
- [4] = "nuts",
- [5] = "supernuts",
- [6] = "ultranuts",
- [7] = "maxnuts",
- [8] = "syrups",
- [9] = "supersyrups",
- [10] = "ultrasyrups",
- [11] = "maxsyrups",
- [12] = "1ups",
- [13] = "1ups DX",
- [14] = "goldmushrooms",
- [15] = "herbs",
- [16] = "redpeppers",
- [17] = "greenpeppers",
- [18] = "woohoo blends",
- [19] = "hoohoo blends",
- [20] = "chuckle blends",
- [21] = "teehee blends",
- [22] = "hoolumbians",
- [23] = "chuckoccinos",
- [24] = "teeheespressos",
- --[32] = "woo beans",
- --[33] = "hoo beans",
- --[34] = "chuckle beans",
- --[35] = "hee beans",
- [48] = "bean badges",
- [49] = "castle badges",
- [50] = "pea badges",
- [51] = "bean B. badges",
- [52] = "counter badges",
- [53] = "charity badges",
- [54] = "bros. badges",
- [55] = "miracle badges",
- [56] = "ohoracle badges",
- [57] = "mush badges",
- [58] = "mari-lui badges",
- [59] = "muscle badges",
- [60] = "spiny badges AA",
- [61] = "mush badges A",
- [62] = "grab badges",
- [63] = "mush badges AA",
- [64] = "power badges",
- [65] = "wonder badges",
- [66] = "beauty badges",
- [67] = "salvage badges",
- [68] = "oh-pah badges",
- [69] = "brilliant badges",
- [70] = "sarge badges",
- [71] = "general badges",
- [72] = "tank badges",
- [73] = "school emblem",
- [74] = "steady badges",
- [75] = "oho jee symbol",
- [76] = "spiny badges A",
- [77] = "bros. lifes",
- [78] = "piranha swings",
- [79] = "bros. rocks",
- [80] = "lucky ribbons",
- [81] = "mush badges A",
- [82] = "soulful bros.",
- [83] = "high-end badges",
- [84] = "hand auras",
- [85] = "sledge hearts",
- [86] = "lucky bros.",
- [87] = "bros. respects",
- [88] = "bowser fists",
- [89] = "bowser fangs",
- [90] = "spike badges",
- [91] = "chuckola badges",
- [104] = "work pants",
- [105] = "work jeans",
- [106] = "bean pants",
- [107] = "blue jeans",
- [108] = "parasol pants",
- [109] = "hard pants",
- [110] = "heart jeans",
- [111] = "plaid trousers",
- [112] = "#1 trousers",
- [113] = "safety slacks",
- [114] = "shroom pants",
- [115] = "shroom bells",
- [116] = "shroom slacks",
- [117] = "peachy jeans",
- [118] = "mushwin pants",
- [119] = "mushluck pants",
- [120] = "scandal jeans",
- [121] = "street jeans",
- [122] = "tropic jeans",
- [123] = "hermetic jeans",
- [124] = "beanstar pants",
- [125] = "peasley slacks",
- [126] = "queen B. slacks",
- [127] = "B. brand jeans",
- [128] = "heart slacks",
- [129] = "casual slacks",
- [130] = "bubble's gears",
- [131] = "chuckola pants",
- [132] = "smart pants",
- [133] = "school slacks",
- [134] = "oho jee wears",
- [135] = "oho gears",
- [136] = "casual corals",
- [137] = "piranha suits",
- [138] = "anuboo jeans",
- [139] = "ancient pants",
- [140] = "heavy slacks",
- [141] = "light slacks",
- [142] = "harhall's pants",
- [143] = "jeanie jeans",
- [144] = "wool trousers",
- [145] = "random slacks",
- [146] = "jeaniest jeans",
- [147] = "safe guards",
- [148] = "iron pants"
- }
- --** switch ** --
- clicked=false
- --** MOVE EVERYTHING AROUND **--
- x =0
- y = 0
- --*****************************************************************************
- while true do
- --*****************************************************************************
- -- WHEN MOVIE IS NOT ACTIVE, DISPLAY NOTE
- if ismovie()~=true then
- gui.text(14,60, "MOVIE NOT", 0x00000000, 0xFFFF0000)
- gui.text(14,74, "RECORDING", 0x00000000, 0xFFFF0000)
- end
- memory.usememorydomain("EWRAM")
- --- SEPARATION LINES
- gui.text(80,-2, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(81,-2, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(80,11, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(81,11, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(80,24, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(81,24, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(80,37, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(81,37, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(309,-2, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(310,-2, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(309,11, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(310,11, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(309,24, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(310,24, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(309,37, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(310,37, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(232,-2, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(233,-2, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(232,11, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(233,11, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(232,24, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(233,24, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(232,37, "|", 0x00000000, 0x4FFFFFFF)
- gui.text(233,37, "|", 0x00000000, 0x4FFFFFFF)
- --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
- --Mushpower + Cash
- mush = memory.read_s8(0x48e2)
- supermush = memory.read_s8(0x48e3)
- ultramush = memory.read_s8(0x48e4)
- maxmush = memory.read_s8(0x48e5)
- if mush <0 then mush = 0 end
- if supermush <0 then supermush = 0 end
- if ultramush <0 then ultramush = 0 end
- if maxmush <0 then maxmush = 0 end
- gui.text(12+x,25+y, mush*0.078 + supermush*0.098 + ultramush*0.117 + maxmush*0.199 , 0x00000000, "yellow")
- gui.text(12+x, 38+y, memory.read_s16_le(0x48e0) .. " $", 0x00000000,"yellow")
- --STATS
- gui.text( 122+x, 0+y, "Lv" .. levelM, 0x00000000,0xffEE9595)
- gui.text(184+x, 0+y, "Lv" .. levelL,0x00000000,0xff77EE77)
- gui.text( 88+x, 12+y, "BP ", 0x00000000,0xff777777)
- gui.text( 88+x, 25+y, "POW ", 0x00000000,0xff777777)
- gui.text( 89+x, 38+y, "HIGE ", 0x00000000,0xff777777)
- gui.text( 120+x, 12+y, BPM .. "/" .. BPmaxM, 0x00000000, 0xFFFFFFFF)
- gui.text( 183+x, 12+y, BPL .. "/" .. BPmaxL,0x00000000, 0xFFFFFFFF)
- gui.text(140+x,25+y, PowM, 0x00000000,0xFFffffff)
- gui.text(204+x,25+y, PowL, 0x00000000,0xFFffffff)
- gui.text(140+x,37+y, HigeM,0x00000000,0xFFffffff)
- gui.text(204+x,37+y, HigeL,0x00000000,0xFFffffff)
- --Bros Attacks counters
- gui.text( 12+x,0+y, "S".. math.max(20 - memory.read_s8(0x4684),0),0x000000,0xffEE9595)
- gui.text(-8+x,12+y," B".. math.max( 8 - memory.read_s8(0x468c),0),0x000000,0xff77EE77)
- gui.text(31+x,0+y," C".. math.max(32 - memory.read_s8(0x4686),0),0x000000,0xffEE9595)
- gui.text(31+x,12+y," K".. math.max(43 - memory.read_s8(0x468e),0),0x000000,0xff77EE77)
- -- RNG
- gui.text(175+x,60+y, memory.read_u8(0x1e60),0x00000000,0xffffffff)
- gui.text(175+x,73+y, memory.read_u8(0x1e64),0x00000000,0xffffffff)
- -- WHEN IT IS ACTIVE, DISPLAY LAGCOUNT,FRAMECOUNT,INPUT
- if ismovie() == true then
- if emu.islagged()==true then gui.text(56,73, "*****", 0x00000000, 0xFFFFFF33) end
- gui.text(12,60, emu.framecount(), 0xff000000, 0xFFFFFFFF) --white framecounttext
- gui.text(12,73, emu.lagcount(), 0xff000000, 0xFFFFFF33) --yellow lagcounttext
- t = ""
- for key, value in pairs(joypad.get()) do
- -- if value ~= false then t = t .." ".. tostring(key) end
- if value ~= false then
- if tostring(key)=="Up" then t = t .." ^"
- elseif tostring(key)=="Down" then t = t .." v"
- elseif tostring(key)=="Left" then t = t .." <"
- elseif tostring(key)=="Right" then t = t .." >"
- elseif tostring(key)=="Select" then t = t .." s"
- elseif tostring(key)=="Start" then t = t .." S"
- else t = t .." ".. tostring(key) end
- end
- end
- gui.text(76,60,tostring(t), 0xff000000, 0xffffffff)
- end
- ---- MOUSE CLICK EVENT
- mouseX=0
- mouseY=0
- for key, value in pairs(input.getmouse()) do
- if tostring(key) == "X" then mouseX = value end
- if tostring(key) == "Y" then mouseY = value end
- if tostring(key) =="Left" then mouseClicked = value end
- end
- --- CLICK ON BUTTON
- if clicked == false then
- if mouseX > 224 then
- if mouseY < 10 then
- if mouseClicked == true then clicked = true end
- end
- end
- end
- if clicked == true then
- if mouseX > 144 then
- if mouseX < 159 then
- if mouseY < 10 then
- if mouseClicked == true then clicked = false end
- end
- end
- end
- end
- ---- ITEM DISPLAY
- itempos = 0
- count=0
- if clicked==false then
- gui.drawBox(227,0,238,8, 0x000000, 0xaaff3300) --buttongraphic
- gui.drawLine(232,1,232,6, 0xAAFFFFFF)
- gui.drawLine(233,1,233,5, 0xAAFFFFFF)
- gui.drawLine(231,1,231,5, 0xAAFFFFFF)
- gui.drawLine(230,3,230,4, 0xAAFFFFFF)
- gui.drawLine(234,3,234,4, 0xAAFFFFFF)
- gui.drawPixel(235,3, 0xAAFFFFFF)
- gui.drawPixel(229,3, 0xAAFFFFFF)
- end
- if clicked == true then
- gui.drawBox(147,0,158,8, 0x000000, 0xaaff3300) --buttongraphic
- gui.drawLine(152,1,152,6, 0xAAFFFFFF)
- gui.drawLine(153,2,153,6, 0xAAFFFFFF)
- gui.drawLine(151,2,151,6, 0xAAFFFFFF)
- gui.drawLine(150,3,150,4, 0xAAFFFFFF)
- gui.drawLine(154,3,154,4, 0xAAFFFFFF)
- gui.drawPixel(155,4, 0xAAFFFFFF)
- gui.drawPixel(149,4, 0xAAFFFFFF)
- end
- --****************************
- if clicked==false then
- for offset = 0, 149 do
- if itemsTbl[offset] then
- amount = memory.read_s8(0x48E2 + offset)
- if count < 7 then
- if (amount > 0) then
- if string.len(itemsTbl[offset])> 12 then
- gui.text(320,0+itempos, amount, 0x00FFFFFF,0xFF777777)
- gui.text(350,0+itempos, bizstring.substring(itemsTbl[offset],0,10) .. "..", 0x00FFFFFF,0xFF777777)
- else
- gui.text(320, 0 + itempos, amount, 0x00FFFFFF,0xFF777777)
- gui.text(350, 0 + itempos, itemsTbl[offset], 0x00FFFFFF,0xFF777777)
- end
- count=count+1
- itempos = count*12.5
- end
- end
- end
- end
- end
- --***************************************
- if clicked==true then
- -- finding out how many entries 8~?
- for offset = 0, 149 do
- if itemsTbl[offset] then
- amount = memory.read_s8(0x48E2 + offset)
- if (amount > 0) then count=count+1 end
- end
- end
- gui.drawBox(157,0,500, 3.4*count, 0xFF000000,0xFF000000)
- -- now adding a box based on the # of entries we found above
- for offset = 0, 149 do
- if itemsTbl[offset] then
- amount = memory.read_s8(0x48E2 + offset)
- if (amount > 0) then
- if string.len(itemsTbl[offset])> 12 then
- gui.text(320,0+itempos, amount, 0x00FFFFFF,0xFF777777)
- gui.text(350,0+itempos, bizstring.substring(itemsTbl[offset],0,10) .. "..", 0x00FFFFFF,0xFF777777)
- else
- gui.text(320, 0 + itempos, amount, 0x00FFFFFF,0xFF777777)
- gui.text(350, 0 + itempos, itemsTbl[offset], 0x00FFFFFF,0xFF777777)
- end
- itempos = itempos+12.5
- end
- end
- end
- end
- --*************************************
- ---- POS
- gui.text(245+x, 1+y, memory.read_s24_le(0x6c14), 0x00000000,0xffEE9595)
- gui.text(245+x, 13+y, memory.read_s24_le(0x6c18), 0x00000000,0xffEE9595)
- gui.text(245+x, 25+y, memory.read_s24_le(0x6fb0), 0x00000000, 0xff77EE77)
- gui.text(245+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)
- --- COMMAND ID
- if memory.read_s8(0x04f4c) == 0 then gui.text(216,73,"<", 0x00000000,0x5fFFFFFF)
- elseif memory.read_s8(0x4f4c) == 1 then gui.text(216,60,"<", 0x00000000,0x5fFFFFFF) end
- memory.usememorydomain("IWRAM")
- gui.text(266+x, 60+y, memory.read_u8(0x2429), 0x00000000,0xffEE9595)
- gui.text(230+x, 60+y, memory.read_u8(0x2440), 0x00000000, 0xff77EE77)
- gui.text(266+x, 73+y, memory.read_u8(0x2441), 0x00000000, 0xff77EE77)
- gui.text(230+x, 73+y, memory.read_u8(0x2428), 0x00000000,0xffEE9595)
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement