Advertisement
Guest User

Katam Luascript Bizhawk 2019

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