Advertisement
Guest User

Katam Luascript 0.4.1 rev1

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