Advertisement
Guest User

Katam Luascript 0.5

a guest
Jul 27th, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 54.96 KB | Gaming | 0 0
  1. local ScriptInfo = {"KATAM Luascript by Mugg1991",
  2.                     "v0.5",
  3.                     "28th July 2024",}
  4.  
  5. local Padding = {
  6.     Left = 40,
  7.     Top = 40,
  8.     Right = 40,
  9.     Bottom = 40
  10. }
  11.  
  12. local AddressTableGeneral= {
  13. [1] = {1,"Camera X",0xFFFFE0A0,"EWRAM",0x23660,2,true},
  14. [2] = {1,"Camera Y",0xFFFFE0A0,"EWRAM",0x23662,2,true}
  15. }
  16.  
  17. local enemyNames = {
  18. [00] = "Waddle Dee",
  19. [01] = "Bronto Burt",
  20. [02] = "Blipper",
  21. [03] = "Glunk",
  22. [04] = "Squishy",
  23. [05] = "Scarfy",
  24. [06] = "Gordo",
  25. [07] = "Snooter",
  26. [08] = "Chip",
  27. [09] = "Soarar",
  28. [10] = "Haley",
  29. [11] = "Roly-Poly",
  30. [12] = "Cupie",
  31. [13] = "Blockin",
  32. [14] = "Snooter",
  33. [15] = "Leap",
  34. [16] = "Jack",
  35. [17] = "Big Waddle Dee",
  36. [18] = "Waddle Doo",
  37. [19] = "Flamer",
  38. [20] = "Hot Head",
  39. [21] = "Laser Ball",
  40. [22] = "Pengy",
  41. [23] = "Rocky",
  42. [24] = "Sir Kibble",
  43. [25] = "Sparky",
  44. [26] = "Sword Knight",
  45. [27] = "UFO",
  46. [28] = "Twister",
  47. [29] = "Wheelie",
  48. [30] = "Noddy",
  49. [31] = "Golem",
  50. [32] = "Golem",
  51. [33] = "Golem",
  52. [34] = "Foley",
  53. [35] = "Shooty",
  54. [36] = "Scarfy",
  55. [37] = "Boxin",
  56. [38] = "Cookin",
  57. [39] = "Minny",
  58. [40] = "Bomber",
  59. [41] = "Heavy Knight",
  60. [42] = "Giant Rocky",
  61. [43] = "Metal Guardian",
  62. [44] = "---",
  63. [45] = "Batty",
  64. [46] = "Foley",
  65. [47] = "Bang-Bang",
  66. [48] = "---",
  67. [49] = "Cookin",
  68. [50] = "Droppy",
  69. [51] = "Prank",
  70. [52] = "Mirra",
  71. [53] = "Shotzo",
  72. [54] = "Shadow Kirby",
  73. [55] = "Waddle Dee",
  74. [56] = "Mr. Flosty",
  75. [57] = "Bonkers",
  76. [58] = "Phan Phan",
  77. [59] = "Batafire",
  78. [60] = "Box Boxer",
  79. [61] = "Boxy",
  80. [62] = "Master Hand",
  81. [63] = "Bombar",
  82. [64] = "---",
  83. [65] = "---",
  84. [66] = "---",
  85. [67] = "---",
  86. [68] = "---",
  87. [69] = "Kracko",
  88. [70] = "King Golem",
  89. [71] = "Master Hand",
  90. [72] = "Gobbler",
  91. [73] = "Wiz",
  92. [74] = "Moley",
  93. [75] = "Mega Titan",
  94. [76] = "Titan Head",
  95. [77] = "Crazy Hand",
  96. [78] = "Dark Meta Knight",
  97. [79] = "Dark Mind",
  98. [80] = "Dark Mind",
  99. [81] = "Dark Mind",
  100. [82] = "? ? ?",
  101. [83] = "---",
  102. [84] = "---",
  103. [85] = "---",
  104. [86] = "---",
  105. [87] = "---",
  106. [88] = "---",
  107. [89] = "---",
  108. [90] = "---",
  109. [91] = "---",
  110. [92] = "---",
  111. [93] = "---",
  112. [94] = "Cherry",
  113. [95] = "Energy Drink",
  114. [96] = "Meat",
  115. [97] = "Maxim Tomato",
  116. [98] = "Battery",
  117. [99] = "1-Up",
  118. [100] = "Rare Candy",
  119. [146] = "Ability Pedestral",
  120. [152] = "Master Sword",
  121. [155] = "Rock",
  122. [157] = "Foley's Leaves",
  123. [162] = "Waddle Dee's Parasol",
  124. [163] = "Ability Star",
  125. [166] = "Ice Cube",
  126. [213] = "Sir Kibble Proj.",
  127. [214] = "Glunk Projectile",
  128. [215] = "Shotzo Projectile"
  129. }
  130.  
  131. local AddressTableEnemies= {
  132. }
  133.  
  134. local AddressTableFlags= {
  135. [1] = {0,"Mirror Shards",0xFFB0B0B0},  
  136. [2] = {7,"Kracko",0xFFFFE0A0,"EWRAM",0x38970,0,true},
  137. [3] = {7,"King Golem",0xFFFFE0A0,"EWRAM",0x38970,1,true},
  138. [4] = {7,"Master Hand",0xFFFFE0A0,"EWRAM",0x38970,2,true},
  139. [5] = {7,"Gobbler",0xFFFFE0A0,"EWRAM",0x38970,3,true},
  140. [6] = {7,"Wiz",0xFFFFE0A0,"EWRAM",0x38970,4,true},
  141. [7] = {7,"Moley",0xFFFFE0A0,"EWRAM",0x38970,5,true},
  142. [8] = {7,"Mega Titan",0xFFFFE0A0,"EWRAM",0x38970,6,true},
  143. [9] = {7,"D. Metaknight",0xFFFFE0A0,"EWRAM",0x38970,7,true},
  144.  
  145. [10] = {0,"Misc Unlockables",0xFFB0B0B0},  
  146. [11] = {7,"Ability Room",0xFFFFE0A0,"EWRAM",0x28C58,0,true},
  147. [12] = {7,"Spray: Pink",0xFFFFE0A0,"EWRAM",0x38974,0,true},
  148. [13] = {7,"Spray: Yellow",0xFFFFE0A0,"EWRAM",0x38974,1,true},
  149. [14] = {7,"Spray: Red",0xFFFFE0A0,"EWRAM",0x38974,2,true},
  150. [15] = {7,"Spray: Green",0xFFFFE0A0,"EWRAM",0x38974,3,true},
  151. [16] = {7,"Spray: Snow",0xFFFFE0A0,"EWRAM",0x38974,4,true},
  152. [17] = {7,"Spray: Carbon",0xFFFFE0A0,"EWRAM",0x38974,5,true},
  153. [18] = {7,"Spray: Ocean",0xFFFFE0A0,"EWRAM",0x38974,6,true},
  154. [19] = {7,"Spray: Sapphire",0xFFFFE0A0,"EWRAM",0x38974,7,true},
  155. [20] = {7,"Spray: Grape",0xFFFFE0A0,"EWRAM",0x38975,0,true},
  156. [21] = {7,"Spray: Emerald",0xFFFFE0A0,"EWRAM",0x38975,1,true},
  157. [22] = {7,"Spray: Orange",0xFFFFE0A0,"EWRAM",0x38975,2,true},
  158. [23] = {7,"Spray: Chocolate",0xFFFFE0A0,"EWRAM",0x38975,3,true},
  159. [24] = {7,"Spray: Cherry",0xFFFFE0A0,"EWRAM",0x38975,4,true},
  160. [25] = {7,"Spray: Chalk",0xFFFFE0A0,"EWRAM",0x38975,5,true},
  161. [26] = {7,"Sound Player",0xFFFFE0A0,"EWRAM",0x38978,0,true},
  162. [27] = {7,"Music: Beginning Notes",0xFFFFE0A0,"EWRAM",0x38978,1,true},
  163. [28] = {7,"Music: Happy Notes",0xFFFFE0A0,"EWRAM",0x38978,2,true},
  164. [29] = {7,"Music: Spunky Notes",0xFFFFE0A0,"EWRAM",0x38978,3,true},
  165. [30] = {7,"Music: Battle Notes",0xFFFFE0A0,"EWRAM",0x38978,4,true},
  166. [31] = {7,"Music: Dream Notes",0xFFFFE0A0,"EWRAM",0x38978,5,true},
  167. [32] = {7,"Music: Secret Notes",0xFFFFE0A0,"EWRAM",0x38978,6,true},
  168. [33] = {7,"Music: Kirby's Sounds",0xFFFFE0A0,"EWRAM",0x38978,7,true},
  169. [34] = {7,"Music: Enemy Sounds",0xFFFFE0A0,"EWRAM",0x38979,0,true},
  170. [35] = {7,"Music: Secret Sounds",0xFFFFE0A0,"EWRAM",0x38979,1,true},
  171. [36] = {7,"Music: Sound Effects",0xFFFFE0A0,"EWRAM",0x38979,2,true},
  172. [37] = {7,"World Map",0xFFFFE0A0,"EWRAM",0x3897C,0,true},
  173. [38] = {7,"Map: Rainbow Route",0xFFFFE0A0,"EWRAM",0x3897C,1,true},
  174. [39] = {7,"Map: Moonlight Mansion",0xFFFFE0A0,"EWRAM",0x3897C,2,true},
  175. [40] = {7,"Map: Cabbage Cavern",0xFFFFE0A0,"EWRAM",0x3897C,3,true},
  176. [41] = {7,"Map: Mustard Mountain",0xFFFFE0A0,"EWRAM",0x3897C,4,true},
  177. [42] = {7,"Map: Carrot Castle",0xFFFFE0A0,"EWRAM",0x3897C,5,true},
  178. [43] = {7,"Map: Olive Ocean",0xFFFFE0A0,"EWRAM",0x3897C,6,true},
  179. [44] = {7,"Map: Peppermint Palace",0xFFFFE0A0,"EWRAM",0x3897C,7,true},
  180. [45] = {7,"Map: Radish Ruins",0xFFFFE0A0,"EWRAM",0x3897D,0,true},
  181. [46] = {7,"Map: Candy Constellation",0xFFFFE0A0,"EWRAM",0x3897D,1,true},
  182. [47] = {1,"Extra Health",0xFFFFE0A0,"EWRAM",0x38980,1,true},
  183. [48] = {7,"Master Sword req. 1",0xFFFFE0A0,"EWRAM",0x3AD2D,0,true}, -- this bit gets set after the first hub cutscene but also after endgame; req. for 100%
  184. [49] = {7,"Master Sword req. 2",0xFFFFE0A0,"EWRAM",0x3AD2D,1,true}, -- set after endgame, req. for 100%
  185. [50] = {7,"Master Sword req. 3",0xFFFFE0A0,"EWRAM",0x3AD2D,2,true}, -- set after endgame, req. for 100%
  186. [51] = {7,"Master Sword req. 4",0xFFFFE0A0,"EWRAM",0x3AD2D,5,true}, -- set after endgame, req. for 100%
  187.  
  188. [52] = {0,"Tutorial",0xFFB0B0B0},  
  189. [53] = {7,"R805 B.Chest",0xFFFFE0A0,"EWRAM",0x38960,0,true}, -- World Map
  190. [54] = {7,"Room 803",0xFFFFE0A0,"EWRAM",0x28CA3,7,true},
  191. [55] = {7,"Room 804",0xFFFFE0A0,"EWRAM",0x28CA5,7,true},
  192. [56] = {7,"Room 805",0xFFFFE0A0,"EWRAM",0x28CA7,7,true},
  193.  
  194. [57] = {0,"Area 1",0xFFB0B0B0},        
  195. [58] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C18,0,true},
  196. [59] = {7,"R106 Chest",0xFFFFE0A0,"EWRAM",0x38960,3,true}, -- 1up
  197. [60] = {7,"R108 Chest",0xFFFFE0A0,"EWRAM",0x38960,4,true}, -- 1up
  198. [61] = {7,"R138 Chest",0xFFFFE0A0,"EWRAM",0x38960,7,true}, -- Spray: Green
  199. [62] = {7,"R173 Chest",0xFFFFE0A0,"EWRAM",0x38961,0,true}, -- candy
  200. [63] = {7,"R176 Chest",0xFFFFE0A0,"EWRAM",0x38961,1,true}, -- energy drink
  201. [64] = {7,"R177 Chest",0xFFFFE0A0,"EWRAM",0x38961,2,true}, -- 1up
  202. [65] = {7,"R190 B.Chest",0xFFFFE0A0,"EWRAM",0x38960,5,true}, -- Map: Rainbow Route
  203. [66] = {7,"R537 Chest",0xFFFFE0A0,"EWRAM",0x38960,1,true}, -- Music: Beginning Notes
  204. [67] = {7,"R557 Chest",0xFFFFE0A0,"EWRAM",0x38960,6,true}, -- maxim tomato
  205. [68] = {7,"R570 Chest",0xFFFFE0A0,"EWRAM",0x38960,2,true}, -- meat
  206. [69] = {7,"Room 101",0xFFFFE0A0,"EWRAM",0x28CCB,7,true},
  207. [70] = {7,"Room 103",0xFFFFE0A0,"EWRAM",0x28CCD,7,true},
  208. [71] = {7,"Room 104",0xFFFFE0A0,"EWRAM",0x28CCF,7,true},
  209. [72] = {7,"Room 106",0xFFFFE0A0,"EWRAM",0x28CD1,7,true},
  210. [73] = {7,"Room 107",0xFFFFE0A0,"EWRAM",0x28CD3,7,true},
  211. [74] = {7,"Room 108",0xFFFFE0A0,"EWRAM",0x28CD5,7,true},
  212. [75] = {7,"Room 110",0xFFFFE0A0,"EWRAM",0x28CD7,7,true},
  213. [76] = {7,"Room 115",0xFFFFE0A0,"EWRAM",0x28CFB,7,true},
  214. [77] = {7,"Room 117",0xFFFFE0A0,"EWRAM",0x28CFD,7,true},
  215. [78] = {7,"Room 118",0xFFFFE0A0,"EWRAM",0x28CFF,7,true},
  216. [79] = {7,"Room 119",0xFFFFE0A0,"EWRAM",0x28D01,7,true},
  217. [80] = {7,"Room 126",0xFFFFE0A0,"EWRAM",0x28CF9,7,true},
  218. [81] = {7,"Room 127",0xFFFFE0A0,"EWRAM",0x28CE3,7,true},
  219. [82] = {7,"Room 136",0xFFFFE0A0,"EWRAM",0x28CE5,7,true},
  220. [83] = {7,"Room 137",0xFFFFE0A0,"EWRAM",0x28CE7,7,true},
  221. [84] = {7,"Room 138",0xFFFFE0A0,"EWRAM",0x28D03,7,true},
  222. [85] = {7,"Room 139",0xFFFFE0A0,"EWRAM",0x28D05,7,true},
  223. [86] = {7,"Room 140",0xFFFFE0A0,"EWRAM",0x28CD9,7,true},
  224. [87] = {7,"Room 141",0xFFFFE0A0,"EWRAM",0x28CDB,7,true},
  225. [88] = {7,"Room 142",0xFFFFE0A0,"EWRAM",0x28CDD,7,true},
  226. [89] = {7,"Room 143",0xFFFFE0A0,"EWRAM",0x28CDF,7,true},
  227. [90] = {7,"Room 171",0xFFFFE0A0,"EWRAM",0x28D07,7,true},
  228. [91] = {7,"Room 172",0xFFFFE0A0,"EWRAM",0x28D09,7,true},
  229. [92] = {7,"Room 173",0xFFFFE0A0,"EWRAM",0x28D0B,7,true},
  230. [93] = {7,"Room 174",0xFFFFE0A0,"EWRAM",0x28D0D,7,true},
  231. [94] = {7,"Room 175",0xFFFFE0A0,"EWRAM",0x28D0F,7,true},
  232. [95] = {7,"Room 176",0xFFFFE0A0,"EWRAM",0x28D11,7,true},
  233. [96] = {7,"Room 177",0xFFFFE0A0,"EWRAM",0x28D13,7,true},
  234. [97] = {7,"Room 178",0xFFFFE0A0,"EWRAM",0x28D15,7,true},
  235. [98] = {7,"Room 190",0xFFFFE0A0,"EWRAM",0x28CE1,7,true},
  236. [99] = {7,"Room 192",0xFFFFE0A0,"EWRAM",0x28D17,7,true},
  237. [100] = {7,"Room 194",0xFFFFE0A0,"EWRAM",0x28CE9,7,true},
  238. [101] = {7,"Room 503",0xFFFFE0A0,"EWRAM",0x28CF3,7,true},
  239. [102] = {7,"Room 504",0xFFFFE0A0,"EWRAM",0x28CEB,7,true},
  240. [103] = {7,"Room 507",0xFFFFE0A0,"EWRAM",0x28CED,7,true},
  241. [104] = {7,"Room 532",0xFFFFE0A0,"EWRAM",0x28CB5,7,true},
  242. [105] = {7,"Room 534",0xFFFFE0A0,"EWRAM",0x28CB7,7,true},
  243. [106] = {7,"Room 535",0xFFFFE0A0,"EWRAM",0x28CB9,7,true},
  244. [107] = {7,"Room 536",0xFFFFE0A0,"EWRAM",0x28CBB,7,true},
  245. [108] = {7,"Room 537",0xFFFFE0A0,"EWRAM",0x28CBD,7,true},
  246. [109] = {7,"Room 538",0xFFFFE0A0,"EWRAM",0x28CBF,7,true},
  247. [110] = {7,"Room 542",0xFFFFE0A0,"EWRAM",0x28CC1,7,true},
  248. [111] = {7,"Room 543",0xFFFFE0A0,"EWRAM",0x28CC3,7,true},
  249. [112] = {7,"Room 554",0xFFFFE0A0,"EWRAM",0x28CEF,7,true},
  250. [113] = {7,"Room 555",0xFFFFE0A0,"EWRAM",0x28CF1,7,true},
  251. [114] = {7,"Room 556",0xFFFFE0A0,"EWRAM",0x28CF5,7,true},
  252. [115] = {7,"Room 557",0xFFFFE0A0,"EWRAM",0x28CF7,7,true},
  253. [116] = {7,"Room 570",0xFFFFE0A0,"EWRAM",0x28CC5,7,true},
  254. [117] = {7,"Room 571",0xFFFFE0A0,"EWRAM",0x28CC7,7,true},
  255. [118] = {7,"Room 590",0xFFFFE0A0,"EWRAM",0x28CC9,7,true},
  256. [119] = {7,"Room 801",0xFFFFE0A0,"EWRAM",0x28CA1,7,true},
  257.  
  258. [120] = {0,"Area 2",0xFFB0B0B0},       
  259. [121] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C14,0,true},
  260. [122] = {7,"Lever",0xFFFFE0A0,"EWRAM",0x38962,2,true}, 
  261. [123] = {7,"R145 Chest",0xFFFFE0A0,"EWRAM",0x38961,3,true}, -- Music: Enemy Sounds
  262. [124] = {7,"R148 Chest",0xFFFFE0A0,"EWRAM",0x38961,5,true}, -- Spray: Chalk
  263. [125] = {7,"R148 Chest",0xFFFFE0A0,"EWRAM",0x38961,4,true}, -- maxim tomato
  264. [126] = {7,"R149 Chest",0xFFFFE0A0,"EWRAM",0x38961,6,true}, -- 1up
  265. [127] = {7,"R195 B.Chest",0xFFFFE0A0,"EWRAM",0x38961,7,true}, -- Map: Moonlight Mansion
  266. [128] = {7,"R709 Chest",0xFFFFE0A0,"EWRAM",0x38962,0,true}, -- Spray: Orange
  267. [129] = {7,"R742 Chest",0xFFFFE0A0,"EWRAM",0x38962,1,true}, -- meat
  268. [130] = {7,"Room 144",0xFFFFE0A0,"EWRAM",0x28D19,7,true},
  269. [131] = {7,"Room 145",0xFFFFE0A0,"EWRAM",0x28D1B,7,true},
  270. [132] = {7,"Room 146",0xFFFFE0A0,"EWRAM",0x28D1D,7,true},
  271. [133] = {7,"Room 147",0xFFFFE0A0,"EWRAM",0x28D1F,7,true},
  272. [134] = {7,"Room 148",0xFFFFE0A0,"EWRAM",0x28D21,7,true},
  273. [135] = {7,"Room 149",0xFFFFE0A0,"EWRAM",0x28D23,7,true},
  274. [136] = {7,"Room 180",0xFFFFE0A0,"EWRAM",0x28CB1,7,true},
  275. [137] = {7,"Room 195",0xFFFFE0A0,"EWRAM",0x28D25,7,true},
  276. [138] = {7,"Room 700",0xFFFFE0A0,"EWRAM",0x28D27,7,true},
  277. [139] = {7,"Room 700B",0xFFFFE0A0,"EWRAM",0x28D35,7,true},
  278. [140] = {7,"Room 702",0xFFFFE0A0,"EWRAM",0x28D43,7,true},
  279. [141] = {7,"Room 704",0xFFFFE0A0,"EWRAM",0x28D29,7,true},
  280. [142] = {7,"Room 705",0xFFFFE0A0,"EWRAM",0x28D2B,7,true},
  281. [143] = {7,"Room 706",0xFFFFE0A0,"EWRAM",0x28D2D,7,true},
  282. [144] = {7,"Room 707",0xFFFFE0A0,"EWRAM",0x28D2F,7,true},
  283. [145] = {7,"Room 708",0xFFFFE0A0,"EWRAM",0x28D31,7,true},
  284. [146] = {7,"Room 709",0xFFFFE0A0,"EWRAM",0x28D33,7,true},
  285. [147] = {7,"Room 711",0xFFFFE0A0,"EWRAM",0x28D37,7,true},
  286. [148] = {7,"Room 712",0xFFFFE0A0,"EWRAM",0x28D39,7,true},
  287. [149] = {7,"Room 740",0xFFFFE0A0,"EWRAM",0x28D3B,7,true},
  288. [150] = {7,"Room 741",0xFFFFE0A0,"EWRAM",0x28D3D,7,true},
  289. [151] = {7,"Room 742",0xFFFFE0A0,"EWRAM",0x28D3F,7,true},
  290. [152] = {7,"Room 743",0xFFFFE0A0,"EWRAM",0x28D45,7,true},
  291. [153] = {7,"Room 744",0xFFFFE0A0,"EWRAM",0x28D47,7,true},
  292. [154] = {7,"Room 745",0xFFFFE0A0,"EWRAM",0x28D49,7,true},
  293. [155] = {7,"Room 790",0xFFFFE0A0,"EWRAM",0x28D41,7,true},
  294.  
  295. [156] = {0,"Area 3",0xFFB0B0B0},       
  296. [157] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C28,0,true},
  297. [158] = {7,"Switch 2",0xFFFFE0A0,"EWRAM",0x28C24,0,true},
  298. [159] = {7,"R510 Chest",0xFFFFE0A0,"EWRAM",0x38966,5,true}, -- 1up
  299. [160] = {7,"R515 Chest",0xFFFFE0A0,"EWRAM",0x38967,0,true}, -- 1up
  300. [161] = {7,"R511 Chest",0xFFFFE0A0,"EWRAM",0x38966,7,true}, -- Music: Secret Sounds
  301. [162] = {7,"R517 Chest",0xFFFFE0A0,"EWRAM",0x38967,1,true}, -- Spray: Chocolate
  302. [163] = {7,"R527 Chest",0xFFFFE0A0,"EWRAM",0x38967,2,true}, -- Spray: Sapphire
  303. [164] = {7,"R528 Chest",0xFFFFE0A0,"EWRAM",0x38966,6,true}, -- Music: Spunky Notes
  304. [165] = {7,"R531 Chest",0xFFFFE0A0,"EWRAM",0x38967,4,true}, -- meat
  305. [166] = {7,"R531 B.Chest",0xFFFFE0A0,"EWRAM",0x38967,3,true}, -- Map: Cabbage Cavern
  306. [167] = {7,"Room 191",0xFFFFE0A0,"EWRAM",0x28E1B,7,true},
  307. [168] = {7,"Room 500",0xFFFFE0A0,"EWRAM",0x28DF5,7,true},
  308. [169] = {7,"Room 500B",0xFFFFE0A0,"EWRAM",0x28DFD,7,true},
  309. [170] = {7,"Room 501",0xFFFFE0A0,"EWRAM",0x28E01,7,true},
  310. [171] = {7,"Room 508",0xFFFFE0A0,"EWRAM",0x28DF7,7,true},
  311. [172] = {7,"Room 509",0xFFFFE0A0,"EWRAM",0x28DF9,7,true},
  312. [173] = {7,"Room 510",0xFFFFE0A0,"EWRAM",0x28DFB,7,true},
  313. [174] = {7,"Room 511",0xFFFFE0A0,"EWRAM",0x28E03,7,true},
  314. [175] = {7,"Room 512",0xFFFFE0A0,"EWRAM",0x28E05,7,true},
  315. [176] = {7,"Room 513",0xFFFFE0A0,"EWRAM",0x28E07,7,true},
  316. [177] = {7,"Room 514",0xFFFFE0A0,"EWRAM",0x28E09,7,true},
  317. [178] = {7,"Room 515",0xFFFFE0A0,"EWRAM",0x28E0B,7,true},
  318. [179] = {7,"Room 517",0xFFFFE0A0,"EWRAM",0x28E0D,7,true},
  319. [180] = {7,"Room 523",0xFFFFE0A0,"EWRAM",0x28E0F,7,true},
  320. [181] = {7,"Room 527",0xFFFFE0A0,"EWRAM",0x28E11,7,true},
  321. [182] = {7,"Room 528",0xFFFFE0A0,"EWRAM",0x28DFF,7,true},
  322. [183] = {7,"Room 529",0xFFFFE0A0,"EWRAM",0x28E13,7,true},
  323. [184] = {7,"Room 530",0xFFFFE0A0,"EWRAM",0x28E15,7,true},
  324. [185] = {7,"Room 531",0xFFFFE0A0,"EWRAM",0x28E17,7,true},
  325. [186] = {7,"Room 591",0xFFFFE0A0,"EWRAM",0x28E19,7,true},
  326. [187] = {7,"Room 592",0xFFFFE0A0,"EWRAM",0x28E57,7,true},
  327.  
  328. [188] = {0,"Area 4",0xFFB0B0B0},       
  329. [189] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C44,0,true},
  330. [190] = {7,"Switch 2",0xFFFFE0A0,"EWRAM",0x28C4C,0,true},
  331. [191] = {7,"R310 B.Chest",0xFFFFE0A0,"EWRAM",0x38964,7,true}, -- Map: Mustard Mountain
  332. [192] = {7,"R316 Chest",0xFFFFE0A0,"EWRAM",0x38965,0,true}, -- energy drink
  333. [193] = {7,"R321 Chest",0xFFFFE0A0,"EWRAM",0x38965,1,true}, -- 1up
  334. [194] = {7,"R322 Chest",0xFFFFE0A0,"EWRAM",0x38965,2,true}, -- 1up
  335. [195] = {7,"R326 Chest",0xFFFFE0A0,"EWRAM",0x38965,3,true}, -- Spray: Cherry
  336. [196] = {7,"Room 300",0xFFFFE0A0,"EWRAM",0x28D9B,7,true},
  337. [197] = {7,"Room 300B",0xFFFFE0A0,"EWRAM",0x28DB5,7,true},
  338. [198] = {7,"Room 304",0xFFFFE0A0,"EWRAM",0x28D9D,7,true},
  339. [199] = {7,"Room 308",0xFFFFE0A0,"EWRAM",0x28D9F,7,true},
  340. [200] = {7,"Room 310",0xFFFFE0A0,"EWRAM",0x28DA1,7,true},
  341. [201] = {7,"Room 312",0xFFFFE0A0,"EWRAM",0x28DA3,7,true},
  342. [202] = {7,"Room 313",0xFFFFE0A0,"EWRAM",0x28DA5,7,true},
  343. [203] = {7,"Room 315",0xFFFFE0A0,"EWRAM",0x28DA7,7,true},
  344. [204] = {7,"Room 316",0xFFFFE0A0,"EWRAM",0x28DA9,7,true},
  345. [205] = {7,"Room 317",0xFFFFE0A0,"EWRAM",0x28DAB,7,true},
  346. [206] = {7,"Room 318",0xFFFFE0A0,"EWRAM",0x28DAD,7,true},
  347. [207] = {7,"Room 321",0xFFFFE0A0,"EWRAM",0x28DAF,7,true},
  348. [208] = {7,"Room 322",0xFFFFE0A0,"EWRAM",0x28DB1,7,true},
  349. [209] = {7,"Room 323",0xFFFFE0A0,"EWRAM",0x28DB3,7,true},
  350. [210] = {7,"Room 325",0xFFFFE0A0,"EWRAM",0x28DB7,7,true},
  351. [211] = {7,"Room 326",0xFFFFE0A0,"EWRAM",0x28DB9,7,true},
  352. [212] = {7,"Room 390",0xFFFFE0A0,"EWRAM",0x28DBB,7,true},
  353. [213] = {7,"Room 533",0xFFFFE0A0,"EWRAM",0x28D8B,7,true},
  354. [214] = {7,"Room 539",0xFFFFE0A0,"EWRAM",0x28D8D,7,true},  
  355. [215] = {7,"Room 540",0xFFFFE0A0,"EWRAM",0x28D8F,7,true},
  356. [216] = {7,"Room 541",0xFFFFE0A0,"EWRAM",0x28D91,7,true},
  357. [217] = {7,"Room 544",0xFFFFE0A0,"EWRAM",0x28D93,7,true},
  358. [218] = {7,"Room 545",0xFFFFE0A0,"EWRAM",0x28D95,7,true},
  359. [219] = {7,"Room 546",0xFFFFE0A0,"EWRAM",0x28D97,7,true},
  360. [220] = {7,"Room 547",0xFFFFE0A0,"EWRAM",0x28D99,7,true},
  361.  
  362. [221] = {0,"Area 5",0xFFB0B0B0},   
  363. [222] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C34,0,true},
  364. [223] = {7,"Switch 2",0xFFFFE0A0,"EWRAM",0x28C38,0,true},
  365. [224] = {7,"Lever",0xFFFFE0A0,"EWRAM",0x38969,5,true}, 
  366. [225] = {7,"R719 Chest",0xFFFFE0A0,"EWRAM",0x38969,6,true}, -- cherry
  367. [226] = {7,"R732 B.Chest",0xFFFFE0A0,"EWRAM",0x38969,7,true}, -- Map: Carrot Castle
  368. [227] = {7,"R733 Chest",0xFFFFE0A0,"EWRAM",0x3896A,0,true}, -- Spray: Yellow
  369. [228] = {7,"R734 Chest 1",0xFFFFE0A0,"EWRAM",0x3896A,1,true}, -- Music: Secret Notes
  370. [229] = {7,"R734 Chest 2",0xFFFFE0A0,"EWRAM",0x3896A,2,true}, -- 1up
  371. [230] = {7,"R739 B.Chest",0xFFFFE0A0,"EWRAM",0x3896A,3,true}, -- Heart Piece
  372. [231] = {7,"Room 120",0xFFFFE0A0,"EWRAM",0x28E93,7,true},
  373. [232] = {7,"Room 121",0xFFFFE0A0,"EWRAM",0x28E95,7,true},
  374. [233] = {7,"Room 122",0xFFFFE0A0,"EWRAM",0x28E97,7,true},
  375. [234] = {7,"Room 170",0xFFFFE0A0,"EWRAM",0x28E99,7,true},
  376. [235] = {7,"Room 181",0xFFFFE0A0,"EWRAM",0x28CB3,7,true},
  377. [236] = {7,"Room 193",0xFFFFE0A0,"EWRAM",0x28E9B,7,true},
  378. [237] = {7,"Room 226",0xFFFFE0A0,"EWRAM",0x28D63,7,true},
  379. [238] = {7,"Room 600",0xFFFFE0A0,"EWRAM",0x28E9D,7,true},
  380. [239] = {7,"Room 600B",0xFFFFE0A0,"EWRAM",0x28EB3,7,true},
  381. [240] = {7,"Room 714",0xFFFFE0A0,"EWRAM",0x28E9F,7,true},
  382. [241] = {7,"Room 716",0xFFFFE0A0,"EWRAM",0x28EA1,7,true},
  383. [242] = {7,"Room 717",0xFFFFE0A0,"EWRAM",0x28EA3,7,true},
  384. [243] = {7,"Room 719",0xFFFFE0A0,"EWRAM",0x28EA5,7,true},
  385. [244] = {7,"Room 720",0xFFFFE0A0,"EWRAM",0x28EB7,7,true},
  386. [245] = {7,"Room 730",0xFFFFE0A0,"EWRAM",0x28EB9,7,true},
  387. [246] = {7,"Room 731",0xFFFFE0A0,"EWRAM",0x28EBB,7,true},
  388. [247] = {7,"Room 732",0xFFFFE0A0,"EWRAM",0x28EA7,7,true},
  389. [248] = {7,"Room 733",0xFFFFE0A0,"EWRAM",0x28EA9,7,true},
  390. [249] = {7,"Room 734",0xFFFFE0A0,"EWRAM",0x28EAB,7,true},
  391. [250] = {7,"Room 735",0xFFFFE0A0,"EWRAM",0x28EAD,7,true},
  392. [251] = {7,"Room 736",0xFFFFE0A0,"EWRAM",0x28EAF,7,true},
  393. [252] = {7,"Room 737",0xFFFFE0A0,"EWRAM",0x28EB1,7,true},
  394. [253] = {7,"Room 739",0xFFFFE0A0,"EWRAM",0x28EB5,7,true},
  395.  
  396. [254] = {0,"Area 6",0xFFB0B0B0},       
  397. [255] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C1C,0,true},
  398. [256] = {7,"Switch 2",0xFFFFE0A0,"EWRAM",0x28C20,0,true},
  399. [257] = {7,"Lever",0xFFFFE0A0,"EWRAM",0x38968,1,true},
  400. [258] = {7,"R134 Chest",0xFFFFE0A0,"EWRAM",0x38967,5,true}, -- Spray: Ocean
  401. [259] = {7,"R553 Chest",0xFFFFE0A0,"EWRAM",0x38967,6,true}, -- 1up
  402. [260] = {7,"R815 B.Chest",0xFFFFE0A0,"EWRAM",0x38967,7,true}, -- Heart Piece
  403. [261] = {7,"R816 B.Chest",0xFFFFE0A0,"EWRAM",0x38968,4,true}, -- Map: Olive Ocean
  404. [262] = {7,"R823 Chest",0xFFFFE0A0,"EWRAM",0x38968,0,true}, -- cherry
  405. [263] = {7,"R825 Chest",0xFFFFE0A0,"EWRAM",0x38968,2,true}, -- Music: Sound Effects
  406. [264] = {7,"R826 Chest",0xFFFFE0A0,"EWRAM",0x38968,3,true}, -- energy drink
  407. [265] = {7,"Room 130",0xFFFFE0A0,"EWRAM",0x28E1D,7,true},
  408. [266] = {7,"Room 131",0xFFFFE0A0,"EWRAM",0x28E1F,7,true},
  409. [267] = {7,"Room 132",0xFFFFE0A0,"EWRAM",0x28E21,7,true},
  410. [268] = {7,"Room 133",0xFFFFE0A0,"EWRAM",0x28E23,7,true},
  411. [269] = {7,"Room 134",0xFFFFE0A0,"EWRAM",0x28E25,7,true},
  412. [270] = {7,"Room 135",0xFFFFE0A0,"EWRAM",0x28E27,7,true},
  413. [271] = {7,"Room 551",0xFFFFE0A0,"EWRAM",0x28E29,7,true},
  414. [272] = {7,"Room 553",0xFFFFE0A0,"EWRAM",0x28E2B,7,true},
  415. [273] = {7,"Room 800",0xFFFFE0A0,"EWRAM",0x28E49,7,true},
  416. [274] = {7,"Room 800B",0xFFFFE0A0,"EWRAM",0x28E55,7,true},
  417. [275] = {7,"Room 802",0xFFFFE0A0,"EWRAM",0x28E4B,7,true},
  418. [276] = {7,"Room 810",0xFFFFE0A0,"EWRAM",0x28E4D,7,true},
  419. [277] = {7,"Room 811",0xFFFFE0A0,"EWRAM",0x28E2D,7,true},
  420. [278] = {7,"Room 814",0xFFFFE0A0,"EWRAM",0x28E2F,7,true},
  421. [279] = {7,"Room 815",0xFFFFE0A0,"EWRAM",0x28E31,7,true},
  422. [280] = {7,"Room 816",0xFFFFE0A0,"EWRAM",0x28E4F,7,true},
  423. [281] = {7,"Room 819",0xFFFFE0A0,"EWRAM",0x28E51,7,true},
  424. [282] = {7,"Room 821",0xFFFFE0A0,"EWRAM",0x28E53,7,true},
  425. [283] = {7,"Room 823",0xFFFFE0A0,"EWRAM",0x28E33,7,true},
  426. [284] = {7,"Room 824",0xFFFFE0A0,"EWRAM",0x28E35,7,true},
  427. [285] = {7,"Room 825",0xFFFFE0A0,"EWRAM",0x28E37,7,true},
  428. [286] = {7,"Room 826",0xFFFFE0A0,"EWRAM",0x28E39,7,true},
  429. [287] = {7,"Room 827",0xFFFFE0A0,"EWRAM",0x28E3B,7,true},
  430. [288] = {7,"Room 828",0xFFFFE0A0,"EWRAM",0x28E3D,7,true},
  431. [289] = {7,"Room 829",0xFFFFE0A0,"EWRAM",0x28E3F,7,true},
  432. [290] = {7,"Room 830",0xFFFFE0A0,"EWRAM",0x28E41,7,true},
  433. [291] = {7,"Room 831",0xFFFFE0A0,"EWRAM",0x28E43,7,true},
  434. [292] = {7,"Room 832",0xFFFFE0A0,"EWRAM",0x28E45,7,true},
  435. [293] = {7,"Room 890",0xFFFFE0A0,"EWRAM",0x28E47,7,true},
  436.  
  437. [294] = {0,"Area 7",0xFFB0B0B0},   
  438. [295] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C3C,0,true},
  439. [296] = {7,"Switch 2",0xFFFFE0A0,"EWRAM",0x28C40,0,true},
  440. [297] = {7,"R202 Chest 1",0xFFFFE0A0,"EWRAM",0x38962,3,true}, -- 1up
  441. [298] = {7,"R202 Chest 2",0xFFFFE0A0,"EWRAM",0x38962,4,true}, -- meat
  442. [299] = {7,"R206 Chest",0xFFFFE0A0,"EWRAM",0x38962,5,true}, -- Music: Dream Notes
  443. [300] = {7,"R209 B.Chest",0xFFFFE0A0,"EWRAM",0x38962,6,true}, -- Map: Peppermint Palace
  444. [301] = {7,"R209 Chest 1",0xFFFFE0A0,"EWRAM",0x38962,7,true}, -- 1up
  445. [302] = {7,"R209 Chest 2",0xFFFFE0A0,"EWRAM",0x38963,0,true}, -- energy drink
  446. [303] = {7,"R210 Chest",0xFFFFE0A0,"EWRAM",0x38963,1,true}, -- Spray: Snow 
  447. [304] = {7,"R216 Chest",0xFFFFE0A0,"EWRAM",0x38964,4,true}, -- 1up
  448. [305] = {7,"R220 Chest",0xFFFFE0A0,"EWRAM",0x38963,2,true}, -- meat
  449. [306] = {7,"R221 Chest",0xFFFFE0A0,"EWRAM",0x38964,5,true}, -- Spray: Pink
  450. [307] = {7,"R224 Chest",0xFFFFE0A0,"EWRAM",0x38964,6,true}, -- maxim tomato
  451. [308] = {7,"R227 Chest 1",0xFFFFE0A0,"EWRAM",0x38963,3,true}, -- Music: Happy Notes
  452. [309] = {7,"R227 Chest 2",0xFFFFE0A0,"EWRAM",0x38963,4,true}, -- maxim tomato
  453. [310] = {7,"R227 Chest 3",0xFFFFE0A0,"EWRAM",0x38963,5,true}, -- 1up
  454. [311] = {7,"R228 Chest 1",0xFFFFE0A0,"EWRAM",0x38963,6,true}, -- 1up
  455. [312] = {7,"R228 Chest 2",0xFFFFE0A0,"EWRAM",0x38963,7,true}, -- meat
  456. [313] = {7,"R229 Chest 1",0xFFFFE0A0,"EWRAM",0x38964,0,true}, -- Spray: Grape
  457. [314] = {7,"R229 Chest 2",0xFFFFE0A0,"EWRAM",0x38964,1,true}, -- 1up
  458. [315] = {7,"R229 Chest 3",0xFFFFE0A0,"EWRAM",0x38964,2,true}, -- energy drink
  459. [316] = {7,"R232 Chest",0xFFFFE0A0,"EWRAM",0x38964,3,true}, -- energy drink
  460. [317] = {7,"Room 200",0xFFFFE0A0,"EWRAM",0x28D4B,7,true},
  461. [318] = {7,"Room 200B",0xFFFFE0A0,"EWRAM",0x28D7D,7,true},
  462. [319] = {7,"Room 202",0xFFFFE0A0,"EWRAM",0x28D4D,7,true},
  463. [320] = {7,"Room 203",0xFFFFE0A0,"EWRAM",0x28D4F,7,true},
  464. [321] = {7,"Room 204",0xFFFFE0A0,"EWRAM",0x28D51,7,true},
  465. [322] = {7,"Room 205",0xFFFFE0A0,"EWRAM",0x28D53,7,true},
  466. [323] = {7,"Room 206",0xFFFFE0A0,"EWRAM",0x28D55,7,true},
  467. [324] = {7,"Room 208",0xFFFFE0A0,"EWRAM",0x28D57,7,true},
  468. [325] = {7,"Room 209",0xFFFFE0A0,"EWRAM",0x28D59,7,true},
  469. [326] = {7,"Room 210",0xFFFFE0A0,"EWRAM",0x28D5B,7,true},
  470. [327] = {7,"Room 211",0xFFFFE0A0,"EWRAM",0x28D5D,7,true},
  471. [328] = {7,"Room 212",0xFFFFE0A0,"EWRAM",0x28D73,7,true},
  472. [329] = {7,"Room 214",0xFFFFE0A0,"EWRAM",0x28D5F,7,true},
  473. [330] = {7,"Room 215",0xFFFFE0A0,"EWRAM",0x28D75,7,true},
  474. [331] = {7,"Room 216",0xFFFFE0A0,"EWRAM",0x28D77,7,true},
  475. [332] = {7,"Room 217",0xFFFFE0A0,"EWRAM",0x28D79,7,true},
  476. [333] = {7,"Room 218",0xFFFFE0A0,"EWRAM",0x28D7B,7,true},
  477. [334] = {7,"Room 220",0xFFFFE0A0,"EWRAM",0x28D61,7,true},
  478. [335] = {7,"Room 221",0xFFFFE0A0,"EWRAM",0x28D7F,7,true},
  479. [336] = {7,"Room 222",0xFFFFE0A0,"EWRAM",0x28D81,7,true},
  480. [337] = {7,"Room 223",0xFFFFE0A0,"EWRAM",0x28D83,7,true},
  481. [338] = {7,"Room 224",0xFFFFE0A0,"EWRAM",0x28D85,7,true},
  482. [339] = {7,"Room 225",0xFFFFE0A0,"EWRAM",0x28D87,7,true},
  483. [340] = {7,"Room 227",0xFFFFE0A0,"EWRAM",0x28D65,7,true},
  484. [341] = {7,"Room 228",0xFFFFE0A0,"EWRAM",0x28D67,7,true},
  485. [342] = {7,"Room 229",0xFFFFE0A0,"EWRAM",0x28D69,7,true},
  486. [343] = {7,"Room 230",0xFFFFE0A0,"EWRAM",0x28D6B,7,true},
  487. [344] = {7,"Room 231",0xFFFFE0A0,"EWRAM",0x28D6D,7,true},
  488. [345] = {7,"Room 232",0xFFFFE0A0,"EWRAM",0x28D6F,7,true},
  489. [346] = {7,"Room 290",0xFFFFE0A0,"EWRAM",0x28D71,7,true},
  490. [347] = {7,"Room 291",0xFFFFE0A0,"EWRAM",0x28D89,7,true},
  491.  
  492. [348] = {0,"Area 8",0xFFB0B0B0},   
  493. [349] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C2C,0,true},
  494. [350] = {7,"Switch 2",0xFFFFE0A0,"EWRAM",0x28C30,0,true},  
  495. [351] = {7,"Lever",0xFFFFE0A0,"EWRAM",0x38969,2,true}, 
  496. [352] = {7,"R102 Chest 1",0xFFFFE0A0,"EWRAM",0x38969,3,true}, -- cherry
  497. [353] = {7,"R102 Chest 2",0xFFFFE0A0,"EWRAM",0x38969,4,true}, -- Music: Battle Notes
  498. [354] = {7,"R608 Chest",0xFFFFE0A0,"EWRAM",0x38969,0,true}, -- 1up
  499. [355] = {7,"R617 B.Chest",0xFFFFE0A0,"EWRAM",0x38969,1,true}, -- Map: Radish Ruins
  500. [356] = {7,"R620 B.Chest",0xFFFFE0A0,"EWRAM",0x38968,5,true}, -- Heart Piece
  501. [357] = {7,"R622 Chest 1",0xFFFFE0A0,"EWRAM",0x38968,6,true}, -- Spray: Emerald
  502. [358] = {7,"R623 Chest 2",0xFFFFE0A0,"EWRAM",0x38968,7,true}, -- energy drink
  503. [359] = {7,"Room 102",0xFFFFE0A0,"EWRAM",0x28E8B,7,true},
  504. [360] = {7,"Room 113",0xFFFFE0A0,"EWRAM",0x28E8D,7,true},
  505. [361] = {7,"Room 114",0xFFFFE0A0,"EWRAM",0x28E8F,7,true},
  506. [362] = {7,"Room 114B",0xFFFFE0A0,"EWRAM",0x28E91,7,true},
  507. [363] = {7,"Room 502",0xFFFFE0A0,"EWRAM",0x28E83,7,true},
  508. [364] = {7,"Room 524",0xFFFFE0A0,"EWRAM",0x28E85,7,true},
  509. [365] = {7,"Room 525",0xFFFFE0A0,"EWRAM",0x28E87,7,true},
  510. [366] = {7,"Room 526",0xFFFFE0A0,"EWRAM",0x28E89,7,true},
  511. [367] = {7,"Room 601",0xFFFFE0A0,"EWRAM",0x28E59,7,true},
  512. [368] = {7,"Room 603",0xFFFFE0A0,"EWRAM",0x28E5B,7,true},
  513. [369] = {7,"Room 604",0xFFFFE0A0,"EWRAM",0x28E5D,7,true},
  514. [370] = {7,"Room 605",0xFFFFE0A0,"EWRAM",0x28E5F,7,true},
  515. [371] = {7,"Room 606",0xFFFFE0A0,"EWRAM",0x28E61,7,true},
  516. [372] = {7,"Room 608",0xFFFFE0A0,"EWRAM",0x28E6F,7,true},
  517. [373] = {7,"Room 609",0xFFFFE0A0,"EWRAM",0x28E71,7,true},
  518. [374] = {7,"Room 610",0xFFFFE0A0,"EWRAM",0x28E63,7,true},
  519. [375] = {7,"Room 611",0xFFFFE0A0,"EWRAM",0x28E65,7,true},
  520. [376] = {7,"Room 612",0xFFFFE0A0,"EWRAM",0x28E73,7,true},
  521. [377] = {7,"Room 613",0xFFFFE0A0,"EWRAM",0x28E75,7,true},
  522. [378] = {7,"Room 614",0xFFFFE0A0,"EWRAM",0x28E77,7,true},
  523. [379] = {7,"Room 616",0xFFFFE0A0,"EWRAM",0x28E79,7,true},
  524. [380] = {7,"Room 617",0xFFFFE0A0,"EWRAM",0x28E7B,7,true},
  525. [381] = {7,"Room 618",0xFFFFE0A0,"EWRAM",0x28E7D,7,true},
  526. [382] = {7,"Room 619",0xFFFFE0A0,"EWRAM",0x28E7F,7,true},
  527. [383] = {7,"Room 620",0xFFFFE0A0,"EWRAM",0x28E67,7,true},
  528. [384] = {7,"Room 621",0xFFFFE0A0,"EWRAM",0x28E69,7,true},
  529. [385] = {7,"Room 622",0xFFFFE0A0,"EWRAM",0x28E6B,7,true},
  530. [386] = {7,"Room 623",0xFFFFE0A0,"EWRAM",0x28E6D,7,true},
  531. [387] = {7,"Room 690",0xFFFFE0A0,"EWRAM",0x28E81,7,true},
  532.  
  533. [388] = {0,"Area 9",0xFFB0B0B0},   
  534. [389] = {7,"Switch 1",0xFFFFE0A0,"EWRAM",0x28C48,0,true},
  535. [390] = {7,"R402 Chest",0xFFFFE0A0,"EWRAM",0x38965,4,true}, -- 1up
  536. [391] = {7,"R403 Chest",0xFFFFE0A0,"EWRAM",0x38965,5,true}, -- Spray: Carbon
  537. [392] = {7,"R403 B.Chest",0xFFFFE0A0,"EWRAM",0x38965,6,true}, -- Heart Piece
  538. [393] = {7,"R406 B.Chest",0xFFFFE0A0,"EWRAM",0x38965,7,true}, -- Sound Player
  539. [394] = {7,"R418 Chest",0xFFFFE0A0,"EWRAM",0x38966,0,true}, -- cherry
  540. [395] = {7,"R424 Chest",0xFFFFE0A0,"EWRAM",0x38966,1,true}, -- Music: Kirby's Sounds
  541. [396] = {7,"R425 Chest",0xFFFFE0A0,"EWRAM",0x38966,2,true}, -- maxim tomato
  542. [397] = {7,"R426 B.Chest",0xFFFFE0A0,"EWRAM",0x38966,3,true}, -- Map: Candy Constellation
  543. [398] = {7,"R427 Chest",0xFFFFE0A0,"EWRAM",0x38966,4,true}, -- Spray: Red  
  544. [399] = {7,"Room 400",0xFFFFE0A0,"EWRAM",0x28DBD,7,true},
  545. [400] = {7,"Room 400B",0xFFFFE0A0,"EWRAM",0x28DDD,7,true},
  546. [401] = {7,"Room 401",0xFFFFE0A0,"EWRAM",0x28DBF,7,true},
  547. [402] = {7,"Room 402",0xFFFFE0A0,"EWRAM",0x28DC1,7,true},
  548. [403] = {7,"Room 403",0xFFFFE0A0,"EWRAM",0x28DC3,7,true},
  549. [404] = {7,"Room 404",0xFFFFE0A0,"EWRAM",0x28DC5,7,true},
  550. [405] = {7,"Room 405",0xFFFFE0A0,"EWRAM",0x28DC7,7,true},
  551. [406] = {7,"Room 406",0xFFFFE0A0,"EWRAM",0x28DC9,7,true},
  552. [407] = {7,"Room 407",0xFFFFE0A0,"EWRAM",0x28DCB,7,true},
  553. [408] = {7,"Room 408",0xFFFFE0A0,"EWRAM",0x28DCD,7,true},
  554. [409] = {7,"Room 409",0xFFFFE0A0,"EWRAM",0x28DCF,7,true},
  555. [410] = {7,"Room 411",0xFFFFE0A0,"EWRAM",0x28DD1,7,true},
  556. [411] = {7,"Room 412",0xFFFFE0A0,"EWRAM",0x28DD3,7,true},
  557. [412] = {7,"Room 413",0xFFFFE0A0,"EWRAM",0x28DD5,7,true},
  558. [413] = {7,"Room 414",0xFFFFE0A0,"EWRAM",0x28DD7,7,true},
  559. [414] = {7,"Room 415",0xFFFFE0A0,"EWRAM",0x28DD9,7,true},
  560. [415] = {7,"Room 416",0xFFFFE0A0,"EWRAM",0x28DDB,7,true},
  561. [416] = {7,"Room 418",0xFFFFE0A0,"EWRAM",0x28DDF,7,true},
  562. [417] = {7,"Room 419",0xFFFFE0A0,"EWRAM",0x28DE1,7,true},
  563. [418] = {7,"Room 420",0xFFFFE0A0,"EWRAM",0x28DE3,7,true},
  564. [419] = {7,"Room 421",0xFFFFE0A0,"EWRAM",0x28DE5,7,true},
  565. [420] = {7,"Room 422",0xFFFFE0A0,"EWRAM",0x28DE7,7,true},
  566. [421] = {7,"Room 423",0xFFFFE0A0,"EWRAM",0x28DE9,7,true},
  567. [422] = {7,"Room 424",0xFFFFE0A0,"EWRAM",0x28DEB,7,true},
  568. [423] = {7,"Room 425",0xFFFFE0A0,"EWRAM",0x28DED,7,true},
  569. [424] = {7,"Room 426",0xFFFFE0A0,"EWRAM",0x28DEF,7,true},
  570. [425] = {7,"Room 427",0xFFFFE0A0,"EWRAM",0x28DF1,7,true},
  571. [426] = {7,"Room 490",0xFFFFE0A0,"EWRAM",0x28DF3,7,true},
  572.  
  573. [427] = {0,"End Game",0xFFB0B0B0}, 
  574. [428] = {7,"Room 909",0xFFFFE0A0,"EWRAM",0x28EBD,7,true},
  575. [429] = {7,"Room 910",0xFFFFE0A0,"EWRAM",0x28EBF,7,true},
  576. [430] = {7,"Room 911",0xFFFFE0A0,"EWRAM",0x28EC1,7,true},
  577. [431] = {7,"Room 912",0xFFFFE0A0,"EWRAM",0x28EC3,7,true},
  578. [432] = {7,"Room 913",0xFFFFE0A0,"EWRAM",0x28EC5,7,true},
  579. [433] = {7,"Room 914",0xFFFFE0A0,"EWRAM",0x28EC7,7,true},
  580. [434] = {7,"Room 915",0xFFFFE0A0,"EWRAM",0x28EC9,7,true},
  581. [435] = {7,"Room 916",0xFFFFE0A0,"EWRAM",0x28ECB,7,true},
  582. [436] = {7,"Room 918",0xFFFFE0A0,"EWRAM",0x28ECD,7,true},
  583. [437] = {7,"Room 919",0xFFFFE0A0,"EWRAM",0x28ECF,7,true},
  584.  
  585. [438] = {0,"Arena",0xFFB0B0B0},
  586. [439] = {7,"Room 950",0xFFFFE0A0,"EWRAM",0x28ED1,7,true},
  587. [440] = {7,"Room 951",0xFFFFE0A0,"EWRAM",0x28ED3,7,true},
  588. [441] = {7,"Room 955",0xFFFFE0A0,"EWRAM",0x28ED5,7,true},
  589. [442] = {7,"Room 956",0xFFFFE0A0,"EWRAM",0x28ED7,7,true},
  590. [443] = {7,"Room 957",0xFFFFE0A0,"EWRAM",0x28ED9,7,true},
  591.  
  592. [444] = {0,"Beta Testing",0xFFB0B0B0}, 
  593. [445] = {7,"Room 969",0xFFFFE0A0,"EWRAM",0x28EDB,7,true},
  594.  
  595. [446] = {0,"Ability Room",0xFFB0B0B0}, 
  596. [447] = {7,"Room 970",0xFFFFE0A0,"EWRAM",0x28EDD,7,true},
  597.  
  598. [448] = {0,"Finish Rooms",0xFFB0B0B0}, 
  599. [449] = {7,"Room 980",0xFFFFE0A0,"EWRAM",0x28CAB,7,true},
  600. [450] = {7,"Room 981",0xFFFFE0A0,"EWRAM",0x28CAD,7,true},
  601. [451] = {7,"Room 982",0xFFFFE0A0,"EWRAM",0x28CAF,7,true}
  602. }
  603.  
  604. local AddressTableKirby= {
  605. [1] = {1,"X",0xFFFFB0C0,"EWRAM",0x020F20,4,true,false},
  606. [2] = {1,"Y",0xFFFFB0C0,"EWRAM",0x020F24,4,true,false},
  607. [3] = {1,"X Speed",0xFFFFB0C0,"EWRAM",0x020F30,2,true,true},
  608. [4] = {1,"Y Speed",0xFFFFB0C0,"EWRAM",0x020F32,2,true,true},
  609. [5] = {1,"Hitbox Offset X",0xFFFFB0C0,"EWRAM",0x020F18,1,true,true},
  610. [6] = {1,"Hitbox Offset Y",0xFFFFB0C0,"EWRAM",0x020F19,1,true,true},
  611. [7] = {1,"Hitbox Width",0xFFFFB0C0,"EWRAM",0x020F1A,1,true,true},
  612. [8] = {1,"Hitbox Height",0xFFFFB0C0,"EWRAM",0x020F1B,1,true,true},
  613. [9] = {1,"Ability",0xFFFFB0C0,"EWRAM",0x020FE3,1,true,false},
  614. [10] = {1,"Health",0xFFFFB0C0,"EWRAM",0x020FE0,1,true,false},
  615. [11] = {1,"Max Health",0xFFFFB0C0,"EWRAM",0x020FE1,1,true,false},
  616. [12] = {1,"Lives",0xFFFFB0C0,"EWRAM",0x020FE2,1,true,false},
  617. [13] = {1,"Phone Battery",0xFFFFB0C0,"EWRAM",0x020FBC,1,true,false},
  618. [14] = {1,"Room",0xFFFFB0C0,"EWRAM",0x020FE6,2,true,false}
  619. }
  620.  
  621. local AddressTableYellow= {
  622. [1] = {1,"X",0xFFFFE060,"EWRAM",0x0210C8,4,true,false},
  623. [2] = {1,"Y",0xFFFFE060,"EWRAM",0x0210CC,4,true,false},
  624. [3] = {1,"X Speed",0xFFFFE060,"EWRAM",0x0210D8,2,true,true},
  625. [4] = {1,"Y Speed",0xFFFFE060,"EWRAM",0x0210DA,2,true,true},
  626. [5] = {1,"Ability",0xFFFFE060,"EWRAM",0x02118B,1,true,false},
  627. [6] = {1,"Health",0xFFFFE060,"EWRAM",0x021188,1,true,false},
  628. [7] = {1,"Max Health",0xFFFFE060,"EWRAM",0x021189,1,true,false},
  629. [8] = {1,"Room",0xFFFFE060,"EWRAM",0x02118E,2,true,false}
  630. }
  631.  
  632. local AddressTableRed= {
  633. [1] = {1,"X",0xFFFF9090,"EWRAM",0x021270,4,true,false},
  634. [2] = {1,"Y",0xFFFF9090,"EWRAM",0x021274,4,true,false},
  635. [3] = {1,"X Speed",0xFFFF9090,"EWRAM",0x021280,2,true,true},
  636. [4] = {1,"Y Speed",0xFFFF9090,"EWRAM",0x021282,2,true,true},
  637. [5] = {1,"Ability",0xFFFF9090,"EWRAM",0x021333,1,true,false},
  638. [6] = {1,"Health",0xFFFF9090,"EWRAM",0x021330,1,true,false},
  639. [7] = {1,"Max Health",0xFFFF9090,"EWRAM",0x021331,1,true,false},
  640. [8] = {1,"Room",0xFFFF9090,"EWRAM",0x021336,2,true,false}
  641. }
  642.  
  643. local AddressTableGreen= {
  644. [1] = {1,"X",0xFFC0FF80,"EWRAM",0x021418,4,true,false},
  645. [2] = {1,"Y",0xFFC0FF80,"EWRAM",0x02141C,4,true,false},
  646. [3] = {1,"X Speed",0xFFC0FF80,"EWRAM",0x021428,2,true,true},
  647. [4] = {1,"Y Speed",0xFFC0FF80,"EWRAM",0x02142A,2,true,true},
  648. [5] = {1,"Ability",0xFFC0FF80,"EWRAM",0x0214DB,1,true,false},
  649. [6] = {1,"Health",0xFFC0FF80,"EWRAM",0x0214D8,1,true,false},
  650. [7] = {1,"Max Health",0xFFC0FF80,"EWRAM",0x0214D9,1,true,false},
  651. [8] = {1,"Room",0xFFC0FF80,"EWRAM",0x0214DE,2,true,false}
  652. }
  653.  
  654. local Displays = {
  655.     -- Name, active, col, x, y, width, height, offset of list, edit mode, table, entries shown
  656.     [1]= {"General", false, 0xFFFFE0A0, 40, 40, 168, 34, 0, false, AddressTableGeneral,2},
  657.     [2]= {"Kirby", false, 0xFFFFB0C0, 40, 40, 168, 66, 0, false, AddressTableKirby,6},
  658.     [3]= {"Yellow", false, 0xFFFFE060, 40, 40, 168, 66, 0, false, AddressTableYellow,6},
  659.     [4]= {"Red", false, 0xFFFF9090, 40, 40, 168, 66, 0, false, AddressTableRed,6},
  660.     [5]= {"Green", false, 0xFFC0FF80, 40, 40, 168, 66, 0, false, AddressTableGreen,6},
  661.     [6]= {"Flags", false, 0xFFFFE0A0, 40, 40, 168, 82, 0, false, AddressTableFlags,8},
  662.     [7]= {"Hitboxes", false, 0xFFFFE0A0, nil}
  663. }
  664. local DisplayCount = #Displays
  665.  
  666. local AdditionalDisplays = {
  667. }
  668.  
  669. local Enemies = {}
  670. local Other = {}
  671.  
  672. local HelperKirby = {
  673.     [1]={"Yellow",0xFFFFE060},
  674.     [2]={"Red",0xFFFF9090},
  675.     [3]={"Green",0xFFC0FF80}
  676. }
  677.  
  678. local HitboxSettings = {
  679.     [1]={"Kirby",true},
  680.     [2]={"Enemy",true},
  681.     [3]={"Attack",true}
  682. }
  683.  
  684. local Mouse = {
  685.     X               = 0,
  686.     Y               = 0,
  687.     XBefore         = 0,
  688.     YBefore         = 0,
  689.     clickedFrames   = 0,
  690.     clicked         = false
  691. }
  692.  
  693. local Color = {
  694.     Selected    = 0xB0A0A0A0,
  695.     Normal      = 0xA0303030,
  696.     Grey        = 0xA0C0C0C0
  697. }
  698.  
  699. function text(x, y, text, color, backcolor)
  700.     if backcolor==nil then backcolor=0x00000000 end
  701.     gui.drawText(x, y, text,color,backcolor,10,"Arial")
  702. end
  703.  
  704. function box(x,y,x2,y2)
  705.     gui.drawBox(x,y,x2,y2,0x00000000,0xD0000000)
  706. end
  707.  
  708. function boxNormal(x,y,x2,y2)
  709.     gui.drawBox(x,y,x2,y2,0xFF000000,0xA0000000)
  710. end
  711.  
  712. function boxSelected(x,y,x2,y2)
  713.     gui.drawBox(x,y,x2,y2,0xFF000000,0xA0505050)
  714. end
  715.  
  716. function arrowDown(xpos,ypos,col)
  717.     gui.drawLine(xpos,ypos,xpos+6,ypos,col)
  718.     gui.drawLine(xpos+1,ypos+1,xpos+5,ypos+1,col)
  719.     gui.drawLine(xpos+2,ypos+2,xpos+4,ypos+2,col)
  720.     gui.drawPixel(xpos+3,ypos+3,col)
  721. end
  722.  
  723. function arrowUp(xpos,ypos,col)
  724.     gui.drawLine(xpos,ypos,xpos+6,ypos,col)
  725.     gui.drawLine(xpos+1,ypos-1,xpos+5,ypos-1,col)
  726.     gui.drawLine(xpos+2,ypos-2,xpos+4,ypos-2,col)
  727.     gui.drawPixel(xpos+3,ypos-3,col)
  728. end
  729.  
  730. function drawDisplayBox(id,bordercolor,color)
  731.     posx=Displays[id][4]
  732.     posy=Displays[id][5]
  733.     width=Displays[id][6]
  734.     height=Displays[id][7]
  735.    
  736.     if Mouse.clicked then
  737.  
  738.         if Mouse.X > posx and Mouse.X < posx+width and Mouse.Y > posy and Mouse.Y < posy+height then
  739.  
  740.             if Mouse.clickedFrames > 0 then
  741.                 menuscreen=0 -- close menu
  742.                
  743.                 posy = posy + (Mouse.Y-Mouse.YBefore) -- enables mouse drag
  744.                 posx = posx + (Mouse.X-Mouse.XBefore)
  745.  
  746.                 vertical_padding = Padding.Top+Padding.Bottom
  747.                 horizontal_padding = Padding.Left+Padding.Right
  748.  
  749.                 if posy < 0 then posy=0 -- prevents display from going offscreen
  750.                 elseif posy > 159+vertical_padding-height then posy=159+vertical_padding-height end
  751.                 if posx < 0 then posx=0
  752.                 elseif posx > 239+horizontal_padding-width then posx=239+horizontal_padding-width end
  753.            
  754.                 Displays[id][4]=posx
  755.                 Displays[id][5]=posy
  756.             end
  757.         end
  758.     end
  759.     gui.drawBox(posx,posy,posx+width,posy+height,bordercolor,color)
  760.     text(posx+3,posy-1,Displays[id][1],0xFF808080)
  761. end
  762.        
  763. function drawCloseButton(id)
  764.     width=Displays[id][6]
  765.     x=Displays[id][4]
  766.     y=Displays[id][5]
  767.    
  768.     drawButton(x+width-10,y,10,10,"x",Color.Grey,15,function()
  769.         Displays[id][2] = false
  770.     end)
  771. end
  772.  
  773. function drawEditButton(id)
  774.  
  775.     width=Displays[id][6]
  776.     x=Displays[id][4]
  777.     y=Displays[id][5]
  778.     if Displays[id][9] then col=Color.Selected
  779.     else col=Color.Normal end
  780.    
  781.     drawButton(x+width-25,y,12,10,"e",col,15,function()
  782.         Displays[id][9]=not Displays[id][9]
  783.     end)
  784. end
  785.  
  786. function drawButton(posx,posy,width,height,label,color,frequency,clickedfunction)
  787.     if Mouse.X>posx and Mouse.X<posx+width and Mouse.Y>posy and Mouse.Y<posy+height then
  788.             if Mouse.clicked and Mouse.clickedFrames%frequency==1 then  
  789.                 clickedfunction()
  790.             end
  791.         gui.drawBox(posx,posy,posx+width,posy+height,color-0x00303030,color+0x30303030)
  792.     else
  793.         gui.drawBox(posx,posy,posx+width,posy+height,color-0x00303030,color)
  794.     end
  795.     text(posx+1,posy-2,label,0xFFFFFFFF)
  796. end
  797.  
  798. function drawMenuButton(posx,posy,width,height,label,z,drawindicator,indicator,col,clickedfunction)
  799.     if Mouse.X>posx and Mouse.X<posx+width and Mouse.Y>posy and Mouse.Y<posy+height then
  800.         if Mouse.clicked and Mouse.clickedFrames==z then
  801.             menuscreen=0
  802.             clickedfunction()
  803.         end
  804.         boxSelected(posx,posy,posx+width,posy+height)
  805.     else
  806.         boxNormal(posx,posy,posx+width,posy+height)
  807.     end
  808.     text(posx+2,posy-1,label,col)
  809.    
  810.     if drawindicator then
  811.         if indicator then text(posx+width-10,posy,"o",0xFF80FF80)
  812.         else text(posx+width-10,posy-1,"x",0xFFFF9090) end
  813.     end
  814. end
  815.  
  816. local getChangeAmount = function(valueChangeAmount)
  817.     if Mouse.clickedFrames>540 then
  818.         valueChangeAmount=valueChangeAmount*1000000
  819.     elseif Mouse.clickedFrames>450 then
  820.         valueChangeAmount=valueChangeAmount*100000
  821.     elseif Mouse.clickedFrames>360 then
  822.         valueChangeAmount=valueChangeAmount*10000
  823.     elseif Mouse.clickedFrames>270 then
  824.         valueChangeAmount=valueChangeAmount*1000
  825.     elseif Mouse.clickedFrames>180 then
  826.         valueChangeAmount=valueChangeAmount*100
  827.     elseif Mouse.clickedFrames>90 then
  828.         valueChangeAmount=valueChangeAmount*10
  829.     end
  830.     return valueChangeAmount
  831. end
  832.  
  833. local addressTableSetValue = function(address, addressSize, addressEndian, newvalue)
  834.  
  835.     if addressSize==1 then
  836.         memory.write_u8(address,newvalue)
  837.     elseif addressSize==2 then
  838.         if addressEndian then
  839.             memory.write_u16_le(address,newvalue)
  840.         else
  841.             memory.write_u16_be(address,newvalue)
  842.         end            
  843.     elseif addressSize==3 then
  844.         if addressEndian then
  845.             memory.write_u24_le(address,newvalue)
  846.         else
  847.             memory.write_u24_be(address,newvalue)
  848.         end
  849.     elseif addressSize==4 then
  850.         if addressEndian then
  851.             memory.write_u32_le(address,newvalue)
  852.         else
  853.             memory.write_u32_be(address,newvalue)
  854.         end
  855.     end
  856.    
  857. end
  858.  
  859. local addressTableGetValue = function(address, addressSize, addressEndian, addressSigned)
  860.  
  861.     if addressSigned then
  862.         if addressSize==1 then
  863.             value=memory.read_s8(address)
  864.         elseif addressSize==2 then
  865.             if addressEndian then
  866.                 value=memory.read_s16_le(address)
  867.             else
  868.                 value=memory.read_s16_be(address)
  869.             end            
  870.         elseif addressSize==3 then
  871.             if addressEndian then
  872.                 value=memory.read_s24_le(address)
  873.             else
  874.                 value=memory.read_s24_be(address)
  875.             end
  876.         elseif addressSize==4 then
  877.             if addressEndian then
  878.                 value=memory.read_s32_le(address)
  879.             else
  880.                 value=memory.read_s32_be(address)
  881.             end
  882.         end
  883.     else
  884.         if addressSize==1 then
  885.             value=memory.read_u8(address)
  886.         elseif addressSize==2 then
  887.             if addressEndian then
  888.                 value=memory.read_u16_le(address)
  889.             else
  890.                 value=memory.read_u16_be(address)
  891.             end            
  892.         elseif addressSize==3 then
  893.             if addressEndian then
  894.                 value=memory.read_u24_le(address)
  895.             else
  896.                 value=memory.read_u24_be(address)
  897.             end
  898.         elseif addressSize==4 then
  899.             if addressEndian then
  900.                 value=memory.read_u32_le(address)
  901.             else
  902.                 value=memory.read_u32_be(address)
  903.             end
  904.         end
  905.     end
  906.    
  907.     return value   
  908. end
  909.  
  910. local DisplayAddressTable = function(display_id, has_arrows,  has_buttons,  display_description,  description_offset,  arrows_offset,  buttons_offset)
  911.    
  912.     inputTable=Displays[display_id][10]
  913.     xpos=Displays[display_id][4]
  914.     ypos=Displays[display_id][5]
  915.     memorydomainBefore=memory.getcurrentmemorydomain()
  916.     tableSize=#inputTable
  917.     table_start=1
  918.     table_end=Displays[display_id][11]
  919.     table_iterations = 1
  920.     offset=Displays[display_id][8]
  921.     list_height = 8*(table_end - table_start)+14
  922.  
  923.     --display arrows:
  924.     if has_arrows then
  925.         --bottom arrow button
  926.         if (tableSize - offset) > table_end then
  927.             if Mouse.X>xpos+arrows_offset and Mouse.X<xpos+arrows_offset+12 and Mouse.Y>ypos+list_height and Mouse.Y<ypos+list_height+6 then
  928.                 if Mouse.clicked then
  929.                     Displays[display_id][8]=offset+1
  930.                 end
  931.                 arrowDown(xpos+arrows_offset+2,ypos+list_height,0xFFFFFFFF)
  932.             else
  933.                 arrowDown(xpos+arrows_offset+2,ypos+list_height,0xA0FFFFFF)
  934.             end
  935.         else
  936.             if offset < 0 then
  937.                 Displays[display_id][8]=0
  938.             end
  939.         end
  940.            
  941.         --top arrow button
  942.         if offset > 0 then
  943.             if Mouse.X>xpos+arrows_offset and Mouse.X<xpos+arrows_offset+12 and Mouse.Y>ypos+list_height-10 and Mouse.Y<ypos+list_height-4 then
  944.                 if Mouse.clicked then
  945.                     Displays[display_id][8]=offset-1
  946.                 end
  947.                 arrowUp(xpos+arrows_offset+2,ypos+list_height-6,0xFFFFFFFF)
  948.             else
  949.                 arrowUp(xpos+arrows_offset+2,ypos+list_height-6,0xA0FFFFFF)
  950.             end
  951.         end
  952.     end
  953.     -- applying display offset
  954.     table_start = table_start + offset
  955.     table_end   = table_end + offset
  956.  
  957.     -- going through the table
  958.     for i=table_start,table_end do --show a part of the list
  959.  
  960.         contenttype=inputTable[i][1]
  961.         description=inputTable[i][2]
  962.         textColor=inputTable[i][3]
  963.         memorydomain=inputTable[i][4]
  964.        
  965.         if contenttype==0 then  -- TITLE
  966.                
  967.             gui.drawBox(5+xpos,4+ypos+table_iterations*8,arrows_offset+xpos,12+ypos+table_iterations*8,0x00000000,0xFF505050)
  968.    
  969.         elseif contenttype==7 then -- BINARY
  970.            
  971.             memory.usememorydomain(memorydomain)
  972.             address=inputTable[i][5]
  973.             currentbit=inputTable[i][6]
  974.             value=memory.read_u8(address)
  975.  
  976.             value=bit.check(value, currentbit)
  977.            
  978.             if value then
  979.                 value="Yes"
  980.                 valueColor=0xFF80FF80
  981.             else
  982.                 value="No"
  983.                 valueColor=0xFFFF9090
  984.             end
  985.            
  986.             text(5+xpos,3+ypos+table_iterations*8,value,valueColor)
  987.        
  988.         else    -- OTHER TYPES 
  989.             memory.usememorydomain(memorydomain)
  990.             address=inputTable[i][5]
  991.             addressSize=inputTable[i][6]
  992.             addressEndian=inputTable[i][7] -- true:little endian, false:big endian
  993.             addressSigned=inputTable[i][8]
  994.             valueChangeAmount=1                  
  995.             value = addressTableGetValue(address,addressSize,addressEndian, addressSigned)
  996.             text(5+xpos,3+ypos+table_iterations*8,value, textColor)
  997.         end
  998.        
  999.         if display_description then
  1000.             text(xpos+description_offset,3+ypos+table_iterations*8,description, textColor)
  1001.         end
  1002.  
  1003.         if has_buttons then
  1004.            
  1005.             if contenttype==7 then -- binary
  1006.            
  1007.                 drawButton(xpos+buttons_offset,4+ypos+table_iterations*8,21,8,"Set",Color.Normal,8,function()
  1008.    
  1009.                     currentvalue=memory.read_u8(address)
  1010.  
  1011.                     if bit.check(currentvalue,currentbit) then
  1012.                         memory.write_u8(address, bit.clear(currentvalue,currentbit))
  1013.                     else
  1014.                         memory.write_u8(address, bit.set(currentvalue,currentbit)) 
  1015.                     end
  1016.                
  1017.                 end)
  1018.  
  1019.             elseif contenttype~=0 then -- normal values
  1020.            
  1021.                 drawButton(xpos+buttons_offset,4+ypos+table_iterations*8,9,8,"-",Color.Normal,5,function()
  1022.                     valueChangeAmount = getChangeAmount(valueChangeAmount) -- increases when holding mouse key 
  1023.                     newvalue = value - valueChangeAmount
  1024.                     addressTableSetValue(address,addressSize,addressEndian,newvalue)                   
  1025.                 end)
  1026.  
  1027.                 drawButton(12+xpos+buttons_offset,4+ypos+table_iterations*8,9,8,"+",Color.Normal,5,function()
  1028.                     valueChangeAmount = getChangeAmount(valueChangeAmount) -- increases when holding mouse key         
  1029.                     newvalue = value + valueChangeAmount
  1030.                     addressTableSetValue(address,addressSize,addressEndian,newvalue)               
  1031.                 end)
  1032.             end        
  1033.         end
  1034.         table_iterations=table_iterations+1
  1035.     end
  1036.     memory.usememorydomain(memorydomainBefore)
  1037. end
  1038.    
  1039. local drawDisplay = function(id)
  1040.     if Displays[id][4]~=nil then
  1041.         drawDisplayBox(id, 0xFF202020,0xA0000000)
  1042.         drawCloseButton(id)
  1043.         drawEditButton(id)
  1044.         if Displays[id][9] then
  1045.             DisplayAddressTable(id,true,true,true,66,158,42)   
  1046.         else
  1047.             DisplayAddressTable(id,true,false,true,46,158,0)
  1048.         end
  1049.     end
  1050. end
  1051.  
  1052. local updateEnemies = function(enemyTableSize,fullSearch)
  1053.  
  1054.     memory.usememorydomain("EWRAM")
  1055.     count=1
  1056.     Enemies = {}
  1057.     address=0x0
  1058.     found=false
  1059.     if fullSearch then end_address=0x36FF
  1060.     else end_address=enemyTableSize*0xBC + 0x3F0 end
  1061.    
  1062.     while address < end_address do     
  1063.         if memory.read_u32_le(address)== 0x1FFFFFF
  1064.         and memory.read_u8(address-1)~= 255 then
  1065.             Enemies[count]=address
  1066.             count=count+1
  1067.             found=true
  1068.         end
  1069.         if found then address=address+0x04
  1070.                  else address=address+0x01
  1071.         end
  1072.     end
  1073. end
  1074.  
  1075. local updateOther = function(enemyTableSize)
  1076.  
  1077.     memory.usememorydomain("IWRAM")
  1078.     count=1
  1079.     Other = {}
  1080.     address=0x3CB0
  1081.     end_address=0x4FFF
  1082.    
  1083.     while address < end_address do
  1084.         if memory.read_u32_le(address)== 0xFFFFFFFF
  1085.         and memory.read_u8(address-1)~= 255 then
  1086.             Other[count]=address
  1087.             count=count+1
  1088.         end
  1089.         address=address+0x04
  1090.     end
  1091.  
  1092. end
  1093.  
  1094. local makeEnemyTable = function(offset)
  1095.  
  1096.     if AddressTableEnemies[offset] == nil then -- only do this if it doesn't exist yet
  1097.         memory.usememorydomain("EWRAM")
  1098.        
  1099.         ID = memory.read_u8(offset+0x85)
  1100.         name = "-unknown-"
  1101.         if enemyNames[ID] ~= nil then name = enemyNames[ID] end
  1102.        
  1103.         AddressTableEnemies[offset] = {
  1104.             [01] = {1,"ID",0xFFFFE0A0,"EWRAM",offset+0x85,1,true},
  1105.             [02] = {1,"Health",0xFFFFE0A0,"EWRAM",offset+0x83,1,true},
  1106.             [03] = {1,"X",0xFFFFE0A0,"EWRAM",offset+0x44,3,true},
  1107.             [04] = {1,"Y",0xFFFFE0A0,"EWRAM",offset+0x48,3,true},
  1108.             [05] = {1,"Hitbox Offset X",0xFFFFE0A0,"EWRAM",offset+0x3B,1,true},
  1109.             [06] = {1,"Hitbox Offset Y",0xFFFFE0A0,"EWRAM",offset+0x3C,1,true},
  1110.             [07] = {1,"Hitbox Width",0xFFFFE0A0,"EWRAM",offset+0x3D,1,true},
  1111.             [08] = {1,"Hitbox Height",0xFFFFE0A0,"EWRAM",offset+0x3E,1,true},
  1112.             [09] = {1,"Custom 1",0xFFFFE0A0,"EWRAM",offset+0x07,1,true},
  1113.             [10] = {1,"Custom 2",0xFFFFE0A0,"EWRAM",offset+0x08,1,true},
  1114.             [11] = {1,"Kept Active By",0xFFFFE0A0,"EWRAM",offset+0x59,1,true},
  1115.             [12] = {1,"Ability",0xFFFFE0A0,"EWRAM",offset+0x87,1,true},
  1116.             [13] = {1,"Animation ID",0xFFFFE0A0,"EWRAM",offset+0x86,1,true},
  1117.             [14] = {1,"Animation Speed",0xFFFFE0A0,"EWRAM",offset+0x2f,1,true},
  1118.             [15] = {7,"Facing Left",0xFFFFE0A0,"EWRAM",offset+0x0B,0,true},
  1119.             [16] = {7,"No Gravity",0xFFFFE0A0,"EWRAM",offset+0x0B,6,true},
  1120.             [17] = {7,"Wall Collision",0xFFFFE0A0,"EWRAM",offset+0x0C,0,true},
  1121.             [18] = {7,"Player Collision",0xFFFFE0A0,"EWRAM",offset+0x0C,1,true},
  1122.             [19] = {7,"Wait/Hitstun",0xFFFFE0A0,"EWRAM",offset+0x0C,3,true},
  1123.             [20] = {7,"Should Despawn",0xFFFFE0A0,"EWRAM",offset+0x0C,4,true},
  1124.             [21] = {7,"Is Heavy",0xFFFFE0A0,"EWRAM",offset+0x5f,1,true},
  1125.             [22] = {7,"Ignores Damage",0xFFFFE0A0,"EWRAM",offset+0x5f,7,true}
  1126.            
  1127.             -- incorrect:
  1128.             --[23] = {7,"Ignores Inhale",0xFFFFE0A0,"EWRAM",offset+0x5f,4,true},
  1129.             --[21] = {7,"Invincible",0xFFFFE0A0,"EWRAM",offset+0x0D,0,true},
  1130.         }
  1131.        
  1132.         Displays[#Displays + 1] = {name, true, 0xFFFFE0A0, 40, 40, 168, 82, 0, false, AddressTableEnemies[offset],8,offset}
  1133.     else
  1134.         -- find and open display to this enemy
  1135.         if #Displays > DisplayCount then
  1136.             for i=DisplayCount, #Displays do
  1137.                 if Displays[i][12] == offset then
  1138.                     Displays[i][2] = true
  1139.                 end
  1140.             end
  1141.         end
  1142.     end
  1143. end
  1144.  
  1145. local drawEnemies = function()  -- Enemies
  1146.  
  1147.     local buttoncol,color,subcolor,verticalOffset=0
  1148.     local info=""
  1149.     local counterOffset=0
  1150.     local enemyTableSize = #Enemies
  1151.     local otherTableSize = #Other
  1152.    
  1153.     memory.usememorydomain("EWRAM")
  1154.     local cameraX = memory.read_u16_le(0x23660) - Padding.Left
  1155.     local cameraY = memory.read_u16_le(0x23662) - Padding.Top
  1156.    
  1157.     --buttons
  1158.     for s=1,#HitboxSettings do
  1159.         if HitboxSettings[s][2] then buttoncol=Color.Selected
  1160.         else buttoncol=Color.Normal end
  1161.         drawButton(14+s*40,0,36,9,HitboxSettings[s][1],buttoncol,15,function()
  1162.             HitboxSettings[s][2]=not HitboxSettings[s][2]
  1163.         end)
  1164.     end
  1165.    
  1166.     if HitboxSettings[1][2] then
  1167.         --display kirby hitbox         
  1168.             --careful: It's expected to be EWRAM here
  1169.         for i=0,3 do
  1170.             offset  =i*0x1A8
  1171.             room = memory.read_u16_le(0x020FE6+offset)
  1172.             kirbyX   = memory.read_u24_le(0x020F21+offset)
  1173.             kirbyY   = memory.read_u24_le(0x020F25+offset)
  1174.             hitboxX  = memory.read_s8(0x020F18+offset)
  1175.             hitboxY  = memory.read_s8(0x020F19+offset)
  1176.             width  = memory.read_s8(0x020F1A+offset)
  1177.             height = memory.read_s8(0x020F1B+offset)
  1178.             x=kirbyX-cameraX+hitboxX    -- screen x
  1179.             y=kirbyY-cameraY+hitboxY    -- screen y
  1180.             x2=x+width*2
  1181.             y2=y+height*2  
  1182.            
  1183.             if i>0
  1184.             and room ~= memory.read_u16_le(0x020FE6) then --kirby is in different room
  1185.                 color=HelperKirby[i][2]
  1186.                 subcolor=HelperKirby[i][2]
  1187.             else -- same room
  1188.                 color=0xFFFFFFFF
  1189.                 subcolor=0x00000000
  1190.             end
  1191.             gui.drawBox(x,y,x2,y2,color) -- hitbox rectangle
  1192.         end
  1193.     end
  1194.    
  1195.     if HitboxSettings[2][2] then
  1196.         --update enemy
  1197.         if frames%12==0 then
  1198.             updateEnemies(enemyTableSize,false)
  1199.         end
  1200.  
  1201.         --display
  1202.         enemyTableSize = #Enemies  
  1203.         if enemyTableSize>0 then
  1204.             memory.usememorydomain("EWRAM")
  1205.             for s=1,enemyTableSize do
  1206.  
  1207.                 offset = Enemies[s]    
  1208.                 ID = memory.read_u8(offset+0x85)
  1209.                 name = "-unknown-"
  1210.                 if enemyNames[ID] ~= nil then name = enemyNames[ID] end
  1211.                 status   = memory.read_u8(offset+0x32)
  1212.                 enemyX   = memory.read_u24_le(offset+0x44)
  1213.                 enemyY   = memory.read_u24_le(offset+0x48)
  1214.                 hitboxX  = memory.read_s8(offset+0x3B)
  1215.                 hitboxY  = memory.read_s8(offset+0x3C)
  1216.                 width  = memory.read_s8(offset+0x3D)
  1217.                 height = memory.read_s8(offset+0x3E)
  1218.                 heldAliveBy = memory.read_s8(offset+0x59)
  1219.                 health = memory.read_s8(offset+0x83)
  1220.                 x_base = enemyX-cameraX
  1221.                 y_base = enemyY-cameraY
  1222.                 x=x_base+hitboxX    -- screen x
  1223.                 y=y_base+hitboxY    -- screen y
  1224.                 x2=x+width*2
  1225.                 y2=y+height*2
  1226.                 x3=x+width      -- center
  1227.                
  1228.                 if Mouse.X > x-4 and Mouse.X < x2+4 and Mouse.Y > y-4 and Mouse.Y < y2+4 then
  1229.                     color = 0xFF00FFFF
  1230.                     subcolor = 0x80000000
  1231.                     verticalOffset = -36
  1232.                     info = health .. " HP\n" ..enemyX .. " X\n" ..enemyY .. " Y"   
  1233.                    
  1234.                     if Mouse.clicked and Mouse.clickedFrames==1 then
  1235.                         makeEnemyTable(offset)
  1236.                     end
  1237.                 else
  1238.                     color = 0xFF00FFFF
  1239.                     subcolor = 0x80000000
  1240.                     verticalOffset = -13
  1241.                     info = health .. " HP"
  1242.                 end
  1243.                
  1244.                 if status==0 then
  1245.                     color=color - 0x80000000
  1246.                     subcolor=subcolor - 0x40000000
  1247.                     if HelperKirby[heldAliveBy] ~= nil then
  1248.                         gui.drawLine(x,y2+1,x2,y2+1,HelperKirby[heldAliveBy][2])
  1249.                     end
  1250.                 end
  1251.            
  1252.                 text(x3-8,y+verticalOffset,info,color,subcolor) -- information
  1253.                 gui.drawBox(x,y,x2,y2,color) -- hitbox rectangle
  1254.                
  1255.                 -- this will display another box, currently unknown what this is used for
  1256.                 --[[
  1257.                 box2X  = memory.read_s8(offset+0x3F)
  1258.                 box2Y  = memory.read_s8(offset+0x40)
  1259.                 box2width  = memory.read_s8(offset+0x41)
  1260.                 box2height  = memory.read_s8(offset+0x42)
  1261.                 box2_x=enemyX-cameraX+box2X -- screen x
  1262.                 box2_y=enemyY-cameraY+box2Y -- screen y
  1263.                 box2_x2=box2_x+box2width*2
  1264.                 box2_y2=box2_y+box2height*2
  1265.                 gui.drawBox(box2_x,box2_y,box2_x2,box2_y2,0xFF00FF00)
  1266.                 ]]
  1267.                
  1268.                 --Mirra check box
  1269.                 if ID == 52 then
  1270.                     check_area_size  = memory.read_s8(offset+0x08)
  1271.                     check_bl_x = x_base-check_area_size
  1272.                     check_bl_y = y_base-check_area_size
  1273.                     check_tr_x = x_base+check_area_size
  1274.                     check_tr_y = y_base+check_area_size
  1275.                     gui.drawBox(check_bl_x, check_bl_y, check_tr_x, check_tr_y, 0xFF00FF00)
  1276.                 end
  1277.             end
  1278.             text(176,-2,"enemies: " .. enemyTableSize,0xFFFFFF00,0x80000000)               
  1279.             counterOffset=counterOffset+12
  1280.         end
  1281.     end
  1282.    
  1283.     if HitboxSettings[3][2] then
  1284.         --update other
  1285.         if frames%4==0 then
  1286.             updateOther(otherTableSize)
  1287.         end
  1288.  
  1289.         --display
  1290.         otherTableSize = #Other
  1291.         if otherTableSize>0 then
  1292.             memory.usememorydomain("IWRAM")
  1293.             for s=1,otherTableSize do
  1294.  
  1295.                 offset = Other[s]          
  1296.                 status   = memory.read_u8(offset-0x27)
  1297.                 status2      = memory.read_u8(offset-0x25)
  1298.                 otherX   = memory.read_u16_le(offset+0x11)
  1299.                 otherY   = memory.read_u16_le(offset+0x15)
  1300.                 hitboxX  = memory.read_s8(offset+0x8)
  1301.                 hitboxY  = memory.read_s8(offset+0x9)
  1302.                 width  = memory.read_s8(offset+0xA)
  1303.                 height = memory.read_s8(offset+0xB)
  1304.                 damage = memory.read_s8(offset+0x33)
  1305.                 x=otherX-cameraX+hitboxX    -- screen x
  1306.                 y=otherY-cameraY+hitboxY    -- screen y
  1307.                 x2=x+width*2
  1308.                 y2=y+height*2
  1309.                
  1310.                 if not bit.check(status, 4)
  1311.                 and (status2 == 0xA0
  1312.                     or status2 == 0xA2
  1313.                     or status2 == 0x10) then
  1314.                     gui.drawBox(x,y,x2,y2,0xFFFF4000)
  1315.                     text(x,y-13,damage .. " dmg",0xFFFF4000,0x40000000)
  1316.                 end
  1317.             end
  1318.             text(176,-2+counterOffset,"attack: " .. otherTableSize,0xFFFF4000,0x80000000)              
  1319.         end
  1320.     end
  1321. end
  1322.  
  1323. local Menu = {
  1324.     [1] =       {   [0] = "Script",
  1325.                     [1] = 2,
  1326.                     [2] = 3,
  1327.                     [3] = 4,
  1328.                     [4] = 5,
  1329.                     [5] = 1,
  1330.                     [6] = 6,
  1331.                     [7] = 7
  1332.                 }
  1333. }
  1334.  
  1335. local drawMenu = function()
  1336.  
  1337.     verticalOffset=0
  1338.  
  1339.     for a=1,#Menu,1 do
  1340.         drawMenuButton(-38+a*45,18,40,11,Menu[a][0],2,false,true,0xFFFFFFFF,function()
  1341.             menuscreen=a
  1342.         end)   
  1343.        
  1344.         if menuscreen==a then
  1345.            
  1346.             for b=1,#Menu[a],1 do
  1347.            
  1348.                 id              = Menu[a][b]
  1349.                 title           = Displays[id][1]
  1350.                 indicator       = Displays[id][2]
  1351.                 col             = Displays[id][3]
  1352.                
  1353.                 drawMenuButton(7,32+verticalOffset*10,72,10,title,1,true,indicator,col,function()
  1354.                     Displays[id][2] = not indicator
  1355.                 end)           
  1356.                
  1357.                 verticalOffset=verticalOffset+1
  1358.             end        
  1359.         end
  1360.     end
  1361.    
  1362.     if Mouse.clicked and Mouse.clickedFrames==1 then
  1363.            menuscreen = 0
  1364.     end
  1365. end
  1366.  
  1367. local PaddingRefresh = function()
  1368.     client.SetGameExtraPadding(Padding.Left,Padding.Top,Padding.Right,Padding.Bottom)
  1369. end
  1370.  
  1371. local PaddingOff = function()
  1372.     client.SetGameExtraPadding(0,0,0,0)
  1373. end
  1374.  
  1375. event.onloadstate(function()
  1376.     updateEnemies(3,true)
  1377.     updateOther(3)
  1378.     PaddingRefresh()
  1379. end)
  1380.  
  1381. event.onexit(function()
  1382.     PaddingOff()
  1383. end)
  1384.  
  1385. updateEnemies(3,true)
  1386. updateOther(3)
  1387. menuscreen=0
  1388. frames=0
  1389. console.clear()
  1390. for i=1,#ScriptInfo,1 do
  1391.     print(ScriptInfo[i])
  1392. end
  1393.  
  1394. PaddingRefresh()
  1395.  
  1396. -- Show Kirby display by default, assuming default padding values
  1397. --[[
  1398. Displays[2][2] = true
  1399. Displays[2][4] = 280
  1400. Displays[2][5] = 120
  1401. ]]
  1402.  
  1403. while true do
  1404.  
  1405.     Mouse.X = input.getmouse().X + Padding.Left
  1406.     Mouse.Y = input.getmouse().Y + Padding.Top
  1407.     Mouse.clicked = input.getmouse().Left
  1408.    
  1409.     -- enemies / hitboxes
  1410.     if Displays[7][2] then
  1411.         drawEnemies()
  1412.     else
  1413.         -- kill enemy displays
  1414.         if #Displays > DisplayCount then
  1415.             for i=DisplayCount + 1,#Displays do
  1416.                 Displays[i] = nil
  1417.             end
  1418.         end
  1419.         -- kill enemy tables
  1420.         AddressTableEnemies = {}
  1421.     end
  1422.    
  1423.     -- all displays / enemy displays
  1424.     for i=1,#Displays do
  1425.         if Displays[i] ~= nil then
  1426.             if Displays[i][2] then
  1427.                 drawDisplay(i)
  1428.             end
  1429.         end
  1430.     end
  1431.  
  1432.     --[[
  1433.     memory.usememorydomain("EWRAM")
  1434.     local room_id = memory.read_u16_le(0x020FE6)
  1435.        
  1436.         -- room
  1437.     text(176,24,"Room: "..room_id,0xFFFFFFFF,0xFF000000)
  1438.         -- "no puff lag" trick
  1439.     nopufflag = memory.read_u8(0x020EE1)
  1440.     nopuff_col = 0xFFFF0000
  1441.     if nopufflag == 0 then nopuff_col = 0xFF00FF00 end
  1442.     text(176,35,"Puff trick: " .. nopufflag,nopuff_col,0xFF000000)
  1443.         -- "holding up to float up" input count
  1444.     text(176,46,"HoldUp: "..memory.read_u8(0x020FB8),0xFFFFFFFF,0xFF000000)
  1445.     ]]
  1446.        
  1447.     drawMenu() -- menu
  1448.  
  1449.     Mouse.XBefore=Mouse.X
  1450.     Mouse.YBefore=Mouse.Y
  1451.     if Mouse.clicked then Mouse.clickedFrames = Mouse.clickedFrames + 1
  1452.     else Mouse.clickedFrames = 0 end
  1453.    
  1454.    if client.ispaused() then
  1455.         --gui.DrawFinish()
  1456.         emu.yield()
  1457.     else
  1458.         emu.frameadvance()
  1459.     end
  1460.    
  1461.     frames=frames+1
  1462. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement