Advertisement
Guest User

mario luigi superstar saga lua 2015 vba v24

a guest
Aug 16th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.92 KB | None | 0 0
  1. while true do
  2.  
  3. --** variables to move everything around if needed **--
  4.  
  5. x = -1
  6. y = 0
  7.  
  8.  
  9.  
  10. --** design **--
  11. -- box
  12. gui.opacity(0.77)
  13. gui.drawbox(5+x, -2+y, 177+x ,26+y, "#1c1c1c")
  14.  
  15. -- mushroom graphic
  16. gui.drawline(10+x,2+y ,14+x,2+y, "red")
  17. gui.drawline(9+x,3+y ,15+x,3+y, "red")
  18. gui.drawline(9+x,4+y ,15+x,4+y, "red")
  19. gui.drawline(11+x,5+y, 13+x,5+y, "#F5D0A9")
  20. gui.drawline(11+x,6+y, 13+x,6+y, "#F5D0A9")
  21. gui.drawpixel(10+x,3+y, "white")
  22. gui.drawpixel(12+x,2+y, "white")
  23. gui.drawpixel(14+x,3+y, "white")
  24.  
  25. -- nut graphic
  26. gui.drawline(10+x, 8+y, 12+x, 8+y, "#FFCC66")
  27. gui.drawline(9+x, 9+y, 13+x, 9+y, "#FFCC66")
  28. gui.drawline(9+x, 10+y, 14+x, 10+y, "#FFCC66")
  29. gui.drawline(12+x, 11+y, 14+x, 11+y, "#FFCC66")
  30. gui.drawline(13+x, 12+y, 14+x, 12+y, "#FFCC66")
  31.  
  32. -- syrup graphic
  33. gui.drawline(11+x, 14+y, 12+x, 14+y, "#FF9900")
  34. gui.drawline(11+x, 15+y, 12+x, 15+y, "#FF9900")
  35. gui.drawline(9+x, 16+y, 14+x, 16+y, "#FF9900")
  36. gui.drawline(9+x, 17+y, 14+x, 17+y, "#FF9900")
  37. gui.drawline(10+x, 18+y, 13+x, 18+y, "#FF9900")
  38.  
  39. -- seperation line
  40. gui.opacity(0.5)
  41. gui.drawline(55+x, 1+y, 55+x, 18+y, "#FFFFFF")
  42. gui.drawline(56+x, 1+y, 56+x, 18+y, "#FFFFFF")
  43.  
  44. gui.drawline(77+x, 1+y, 77+x, 18+y, "#FFFFFF")
  45. gui.drawline(78+x, 1+y, 78+x, 18+y, "#FFFFFF")
  46.  
  47. gui.drawline(144+x, 1+y, 144+x, 25+y, "#FFFFFF")
  48. gui.drawline(145+x, 1+y, 145+x, 25+y, "#FFFFFF")
  49. gui.opacity(0.77)
  50.  
  51. --** ADDRESS VALUES **--
  52. mushrooms = memory.readbytesigned(0x020048e2)
  53. supermushrooms = memory.readbytesigned(0x020048e3)
  54. ultramushrooms = memory.readbytesigned(0x020048e4)
  55. maxmushrooms = memory.readbytesigned(0x020048e5)
  56. nuts = memory.readbytesigned(0x020048e6)
  57. supernuts = memory.readbytesigned(0x020048e7)
  58. ultranuts = memory.readbytesigned(0x020048e8)
  59. maxnuts = memory.readbytesigned(0x020048e9)
  60. syrups = memory.readbytesigned(0x020048ea)
  61. supersyrups = memory.readbytesigned(0x020048eb)
  62. ultrasyrups = memory.readbytesigned(0x020048ec)
  63. maxsyrups = memory.readbytesigned(0x020048ed)
  64. ONEups = memory.readbytesigned(0x020048ee)
  65. ONEupDXs = memory.readbytesigned(0x020048ef)
  66. goldmushrooms = memory.readbytesigned(0x020048f0)
  67. herbs = memory.readbytesigned(0x020048f1)
  68. redpeppers = memory.readbytesigned(0x020048f2)
  69. greenpeppers = memory.readbytesigned(0x020048f3)
  70. ahastraights = memory.readbytesigned(0x020048f4)
  71. ufustraights = memory.readbytesigned(0x020048f5)
  72. gerastraights = memory.readbytesigned(0x020048f6)
  73. dehestraights = memory.readbytesigned(0x020048f7)
  74. ufumanjaros = memory.readbytesigned(0x020048f8)
  75. gerapuccinos = memory.readbytesigned(0x020048f9)
  76. dehepressos = memory.readbytesigned(0x020048fa)
  77.  
  78. ahabeans = memory.readbyte(0x02004902)
  79. ufubeans = memory.readbyte(0x02004903)
  80. gerabeans = memory.readbyte(0x02004904)
  81. dehebeans = memory.readbyte(0x02004905)
  82.  
  83.  
  84.  
  85. --TODO: CLOTHES
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. --Mario
  94. HPM = memory.readword(0x02004866)
  95. HPmaxM = memory.readword(0x0200486A)
  96. BPM = memory.readword(0x0200486c)
  97. BPmaxM = memory.readword(0x02004870)
  98. PowM = memory.readword(0x02004874)
  99. DefM = memory.readword(0x0200487c)
  100. SpeedM = memory.readword(0x02004878)
  101. HigeM = memory.readword(0x02004880)
  102. levelM = memory.readbyte(0x02004888)
  103. ExpM = memory.readword(0x0200485c)
  104.  
  105.  
  106. -- This calculates how much experience you have to get for the next level.
  107. -- The NextM/NextL values seem to be hardcoded into the game.
  108. NextM = 0
  109. if levelM == 1 then NextM = 7
  110.  
  111. elseif levelM == 2 then NextM = 32
  112. elseif levelM == 3 then NextM = 68
  113. elseif levelM == 4 then NextM = 108
  114. elseif levelM == 5 then NextM = 218
  115. elseif levelM == 6 then NextM = 336
  116. elseif levelM == 7 then NextM = 470
  117. elseif levelM == 8 then NextM = 694
  118. elseif levelM == 9 then NextM = 962
  119. elseif levelM == 10 then NextM = 1254
  120. elseif levelM == 11 then NextM = 1578
  121. elseif levelM == 12 then NextM = 1924
  122. elseif levelM == 13 then NextM = 2306
  123. elseif levelM == 14 then NextM = 2756
  124. elseif levelM == 15 then NextM = 3256
  125. elseif levelM == 16 then NextM = 3830
  126. elseif levelM == 17 then NextM = 4480
  127. elseif levelM == 18 then NextM = 5195
  128. elseif levelM == 19 then NextM = 5975
  129. elseif levelM == 20 then NextM = 6845
  130. else NextM = 0 end
  131.  
  132. NextexpM = NextM - ExpM
  133.  
  134. --Luigi
  135. HPL = memory.readword(0x020048a2)
  136. HPmaxL = memory.readword(0x020048a6)
  137. BPL = memory.readword(0x020048a8)
  138. BPmaxL = memory.readword(0x020048ac)
  139. PowL = memory.readword(0x020048b0)
  140. DefL = memory.readword(0x020048b8)
  141. SpeedL = memory.readword(0x020048b4)
  142. HigeL = memory.readword(0x020048bc)
  143. levelL = memory.readbyte(0x020048c4)
  144. ExpL = memory.readword(0x02004898)
  145.  
  146. -- 'Next' calculator
  147. NextL = 0
  148. if levelL == 1 then NextL = 10
  149. elseif levelL == 2 then NextL = 37
  150. elseif levelL == 3 then NextL = 77
  151. elseif levelL == 4 then NextL = 123
  152. elseif levelL == 5 then NextL = 233
  153. elseif levelL == 6 then NextL = 353
  154. elseif levelL == 7 then NextL = 493
  155. elseif levelL == 8 then NextL = 699
  156. elseif levelL == 9 then NextL = 969
  157. elseif levelL == 10 then NextL = 1272
  158. elseif levelL == 11 then NextL = 1552
  159. elseif levelL == 12 then NextL = 1898
  160. elseif levelL == 13 then NextL = 2280
  161. elseif levelL == 14 then NextL = 2730
  162. elseif levelL == 15 then NextL = 3239
  163. elseif levelL == 16 then NextL = 3813
  164. elseif levelL == 17 then NextL = 4463
  165. elseif levelL == 18 then NextL = 5178
  166. elseif levelL == 19 then NextL = 5958
  167. elseif levelL == 20 then NextL = 6858
  168. elseif levelL == 20 then NextL = 6845
  169. else NextL = 0 end
  170.  
  171. NextexpL = NextL - ExpL
  172.  
  173.  
  174. -- display
  175. if mushrooms == -1 then mushrooms = 0 end
  176. if supermushrooms == -1 then supermushrooms = 0 end
  177. if ultramushrooms == -1 then ultramushrooms = 0 end
  178. if maxmushrooms == -1 then maxmushrooms = 0 end
  179. if nuts == -1 then nuts = 0 end
  180. if supernuts == -1 then supernuts = 0 end
  181. if ultranuts == -1 then ultranuts = 0 end
  182. if maxnuts == -1 then maxnuts = 0 end
  183. if syrups == -1 then syrups = 0 end
  184. if supersyrups == -1 then supersyrups = 0 end
  185. if ultrasyrups == -1 then ultrasyrups = 0 end
  186. if maxsyrups == -1 then maxsyrups = 0 end
  187. if ONEups == -1 then ONEups = 0 end
  188. if ONEupDXs == -1 then ONEupDXs = 0 end
  189. if redpeppers == -1 then redpeppers = 0 end
  190. if greenpeppers == -1 then greenpeppers = 0 end
  191. if herbs == -1 then herbs = 0 end
  192. if goldmushrooms == -1 then goldmushrooms = 0 end
  193. if ahastraights == -1 then ahastraights = 0 end
  194. if ufustraights == -1 then ufustraights = 0 end
  195. if gerastraights == -1 then gerastraights = 0 end
  196. if dehestraights == -1 then dehestraights = 0 end
  197. if ufumanjaros == -1 then ufumanjaros = 0 end
  198. if gerapuccinos == -1 then gerapuccinos = 0 end
  199. if dehepressos == -1 then dehepressos = 0 end
  200. if ahabeans == -1 then ahabeans = 0 end
  201. if ufubeans == -1 then ufubeans = 0 end
  202. if gerabeans == -1 then gerabeans = 0 end
  203. if dehebeans == -1 then dehebeans = 0 end
  204.  
  205.  
  206. gui.text(18+x,1+y, mushrooms)
  207. gui.text(28+x,1+y, supermushrooms)
  208. gui.text(38+x,1+y, ultramushrooms)
  209. gui.text(48+x,1+y, maxmushrooms)
  210.  
  211. --gui.text(133+x,1+y, "(" ..mushrooms*0.078 + supermushrooms*0.098 + ultramushrooms*0.117 + maxmushrooms*0.199 .. ")" , "yellow")
  212.  
  213. gui.text(18+x,7+y, nuts)
  214. gui.text(28+x,7+y, supernuts)
  215. gui.text(38+x,7+y, ultranuts)
  216. gui.text(48+x,7+y, maxnuts)
  217.  
  218. gui.text(18+x,13+y, syrups)
  219. gui.text(28+x,13+y, supersyrups)
  220. gui.text(38+x,13+y, ultrasyrups)
  221. gui.text(48+x,13+y, maxsyrups)
  222.  
  223. --gui.text(57+x,1+y, "=" ..mushrooms*20+supermushrooms*50+ultramushrooms*110+maxmushrooms*280 ,"#81F7F3")
  224. --gui.text(78+x,1+y, mushrooms*24+supermushrooms*60+ultramushrooms*100+maxmushrooms*180 ,"#ACFA58")
  225.  
  226. --gui.text(57+x,7+y, "=" ..nuts*50+supernuts*120+ultranuts*260+maxnuts*340 , "#81f7f3")
  227. --gui.text(78+x,7+y, nuts*50+supernuts*90+ultranuts*140+maxnuts*220 , "#acfa58")
  228.  
  229. --gui.text(57+x,13+y, "=" ..syrups*24+supersyrups*50+ultrasyrups*80+maxsyrups*280 , "#81f7f3")
  230. --gui.text(78+x,13+y, syrups*24+supersyrups*50+ultrasyrups*80+maxsyrups*150 , "#acfa58")
  231.  
  232.  
  233. --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")
  234. --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")
  235.  
  236. gui.text(60+x,7+y, "$" ..memory.readword(0x020048e0), "yellow")
  237.  
  238. gui.text(82+x,1+y, "(M)", "#F78181")
  239. gui.text(116+x,1+y, "(L)", "#ACFA58")
  240. gui.text(94+x,1+y, "Lv" .. levelM)
  241. gui.text(128+x,1+y, "Lv" .. levelL)
  242. gui.text(82+x,7+y, "BP ", "#FFCC66")
  243. gui.text(93+x,7+y, BPM .. "/" .. BPmaxM .. " " .. BPL .. "/" .. BPmaxL)
  244. gui.text(82+x,13+y, "Pow " , "#EAADEA")
  245. gui.text(94+x,19+y, "hige " , "#A9F5D0")
  246. --gui.text(86+x,25+y, "NEXT ", "#A9D0F5")
  247. gui.text(102+x,13+y, PowM .. " " .. PowL)
  248. gui.text(116+x,19+y, HigeM .. " " .. HigeL)
  249. --gui.text(107+x,25+y, NextexpM .. " " .. NextexpL)
  250.  
  251. --Bros Attacks counters
  252. SplashCounter = 20 - memory.readbyte(0x02004684)
  253. if SplashCounter < 0 then SplashCounter = 0 end
  254. BounceCounter = 8 - memory.readbyte(0x0200468c)
  255. if BounceCounter < 0 then BounceCounter = 0 end
  256. ChopperCounter = 32 - memory.readbyte(0x02004686)
  257. if ChopperCounter < 0 then ChopperCounter = 0 end
  258. KnockCounter = 43 - memory.readbyte(0x0200468e)
  259. if ChopperCounter < 0 then KnockCounter = 0 end
  260.  
  261.  
  262. gui.text(9+x,19+y, "S=".. SplashCounter)
  263. gui.text(30+x,19+y, "B=".. BounceCounter)
  264. gui.text(47+x,19+y, "C=".. ChopperCounter)
  265. gui.text(68+x,19+y, "K=".. KnockCounter)
  266.  
  267. -- RNG
  268. gui.text(6+x,28+y, memory.readbytesigned(0x02001e60))
  269. gui.text(6+x,35+y, memory.readbytesigned(0x02001e64))
  270.  
  271.  
  272. --Movie active?
  273. --if movie.active()~=true then gui.drawbox(29,29,140,39, "red") end
  274. --gui.opacity(0.9)
  275. --if movie.active()~=true then gui.text(35,31, "!! MOVIE NOT RECORDING !!") end
  276.  
  277.  
  278. ---- POS
  279. gui.text(150+x, 1+y, memory.readdwordsigned(0x02006c14), "#F78181")
  280. gui.text(150+x, 7+y, memory.readdwordsigned(0x02006c18), "#F78181")
  281. gui.text(150+x, 13+y, memory.readdwordsigned(0x02006fb0), "#ACFA58")
  282. gui.text(150+x, 19+y, memory.readdwordsigned(0x02006fb4), "#ACFA58")
  283.  
  284. ---- MISC
  285. --gui.text(10,89, "rookie hp " ..memory.readword(0x02008ce6)-5000, "yellow")
  286. --gui.text(10,89, "Birdo hp " ..memory.readword(0x02008fe2), "yellow")
  287. --gui.text(10,89, "head " ..memory.readword(0x0200aa42)-5000, "yellow")
  288. --gui.text(10,98, "heart " ..memory.readword(0x0200a912)-5000, "yellow")
  289. --gui.text(10,107, "left " ..memory.readword(0x0200ab72)-5000, "yellow")
  290. --gui.text(10,116, "right " ..memory.readword(0x0200aca2)-5000, "yellow")
  291.  
  292. gui.opacity(0.6)
  293. if memory.readbytesigned(0x02004f4c) == 0 then gui.drawbox(126,36,158,44, "#666666","#666666")
  294. elseif memory.readbytesigned(0x02004f4c) == 1 then gui.drawbox(126,27,158,35, "#666666", "#666666") end
  295. gui.opacity(0.9)
  296.  
  297. gui.text(130+x, 28+y, memory.readbyteunsigned(0x03002429), "#F78181")
  298. gui.text(150+x, 28+y, memory.readbyteunsigned(0x03002440), "#ACFA58")
  299.  
  300. gui.text(130+x, 37+y, memory.readbyteunsigned(0x03002441), "#ACFA58")
  301. gui.text(150+x, 37+y, memory.readbyteunsigned(0x03002428), "#F78181")
  302.  
  303. vba.frameadvance()
  304. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement