I was bingeing Inuyasha, and I thought I could try playing this game. This game is kinda really bad due to very high encounter rate, but that appears to be luck-manipulatable.
I made a script that displays stuff:
Download InuyashaDS.luaLanguage: lua
client.SetGameExtraPadding(0, 0, 200, 0)
local text = gui.pixelText
local image = gui.drawImage
memory.usememorydomain("Main RAM")
local read8 = memory.read_u8
local read16 = memory.read_u16_le
local read24 = memory.read_u24_be
local read32 = memory.read_u32_le
local Addresses = {
Area = 0x0B40C4,
Character_Overworld = 0x0C4A64,
Money = 0x0C4AB0,
Janis1_Start = 0x0C6488,
Janis1_Name_Index = 0x0C648C,
Janis1_Is_NPC = 0x0C648D,
Janis1_Item_1 = 0x0C64A4,
Janis1_Item_2 = 0x0C64A8,
Janis1_Item_3 = 0x0C64AC,
Janis1_Item_4 = 0x0C64B0,
Janis1_Item_5 = 0x0C64B4,
Janis1_Item_6 = 0x0C64B8,
Janis1_Item_7 = 0x0C64BC,
Janis1_Item_8 = 0x0C64C0,
Janis1_Item_9 = 0x0C64C4,
Janis1_Item_10 = 0x0C64C8,
Janis1_Equip1 = 0x0C64D0,
Janis1_Equip2 = 0x0C64D1,
Janis1_EXP = 0x0C64D6,
Janis1_HP = 0x0C64D8,
Janis1_EP = 0x0C64DA,
Janis1_MAX_HP = 0x0C64DC,
Janis1_MAX_EP = 0x0C64DE,
Janis1_Sprite_ID = 0x0C64E4,
Janis1_Sprite_Pallete = 0x0C64F4,
Janis1_LVL = 0x0C64FC,
Janis1_ATK = 0x0C64FD,
Janis1_DEF = 0x0C64FE,
Janis1_DEX = 0x0C64FF,
Janis1_AGI = 0x0C6500,
Janis1_Select = 0x0C650D,
Janis1_isPresent = 0x0C6510,
Janis1_Escaped = 0x0C6512,
Janis1_Status = 0x0C6513,
Janis1_Divine_Barrier = 0x0C6517,
Janis1_Sealing_Barrier = 0x0C6518,
Janis2_Start = 0x0C651C,
Janis2_Name_Index = 0x0C6520,
Janis2_Is_NPC = 0x0C6521,
Janis2_Item_1 = 0x0C6538,
Janis2_Item_2 = 0x0C653C,
Janis2_Item_3 = 0x0C6540,
Janis2_Item_4 = 0x0C6544,
Janis2_Item_5 = 0x0C6548,
Janis2_Item_6 = 0x0C654C,
Janis2_Item_7 = 0x0C6550,
Janis2_Item_8 = 0x0C6554,
Janis2_Item_9 = 0x0C6558,
Janis2_Item_10 = 0x0C655C,
Janis2_Equip1 = 0x0C6564,
Janis2_Equip2 = 0x0C6565,
Janis2_EXP = 0x0C656A,
Janis2_HP = 0x0C656C,
Janis2_EP = 0x0C656E,
Janis2_MAX_HP = 0x0C6570,
Janis2_MAX_EP = 0x0C6572,
Janis2_Sprite_ID = 0x0C6578,
Janis2_Sprite_Pallete = 0x0C6588,
Janis2_LVL = 0x0C6590,
Janis2_ATK = 0x0C6591,
Janis2_DEF = 0x0C6592,
Janis2_DEX = 0x0C6593,
Janis2_AGI = 0x0C6594,
Janis2_Select = 0x0C65A1,
Janis2_isPresent = 0x0C65A4,
Janis2_Escaped = 0x0C65A6,
Janis2_Status = 0x0C65A7,
Janis2_Divine_Barrier = 0x0C65AB,
Janis2_Sealing_Barrier = 0x0C65AC,
Janis3_Start = 0x0C65B0,
Janis3_Name_Index = 0x0C65B4,
Janis3_Is_NPC = 0x0C65B5,
Janis3_Item_1 = 0x0C65CC,
Janis3_Item_2 = 0x0C65D0,
Janis3_Item_3 = 0x0C65D4,
Janis3_Item_4 = 0x0C65D8,
Janis3_Item_5 = 0x0C65DC,
Janis3_Item_6 = 0x0C65E0,
Janis3_Item_7 = 0x0C65E4,
Janis3_Item_8 = 0x0C65E8,
Janis3_Item_9 = 0x0C65EC,
Janis3_Item_10 = 0x0C65F0,
Janis3_Equip1 = 0x0C65F8,
Janis3_Equip2 = 0x0C65F9,
Janis3_EXP = 0x0C65FE,
Janis3_HP = 0x0C6600,
Janis3_EP = 0x0C6602,
Janis3_MAX_HP = 0x0C6604,
Janis3_MAX_EP = 0x0C6606,
Janis3_Sprite_ID = 0x0C660C,
Janis3_Sprite_Pallete = 0x0C661C,
Janis3_LVL = 0x0C6624,
Janis3_ATK = 0x0C6625,
Janis3_DEF = 0x0C6626,
Janis3_DEX = 0x0C6627,
Janis3_AGI = 0x0C6628,
Janis3_Select = 0x0C6635,
Janis3_isPresent = 0x0C6638,
Janis3_Escaped = 0x0C663A,
Janis3_Status = 0x0C663B,
Janis3_Divine_Barrier = 0x0C663F,
Janis3_Sealing_Barrier = 0x0C6640,
Inuyasha1_Start = 0x0C6644,
Inuyasha1_Name_Index = 0x0C6648,
Inuyasha1_Is_NPC = 0x0C6649,
Inuyasha1_Item_1 = 0x0C6660,
Inuyasha1_Item_2 = 0x0C6664,
Inuyasha1_Item_3 = 0x0C6668,
Inuyasha1_Item_4 = 0x0C666C,
Inuyasha1_Item_5 = 0x0C6670,
Inuyasha1_Item_6 = 0x0C6674,
Inuyasha1_Item_7 = 0x0C6678,
Inuyasha1_Item_8 = 0x0C667C,
Inuyasha1_Item_9 = 0x0C6680,
Inuyasha1_Item_10 = 0x0C6684,
Inuyasha1_Equip1 = 0x0C668C,
Inuyasha1_Equip2 = 0x0C668D,
Inuyasha1_EXP = 0x0C6692,
Inuyasha1_HP = 0x0C6694,
Inuyasha1_EP = 0x0C6696,
Inuyasha1_MAX_HP = 0x0C6698,
Inuyasha1_MAX_EP = 0x0C669A,
Inuyasha1_Sprite_ID = 0x0C66A0,
Inuyasha1_Sprite_Pallete = 0x0C66B0,
Inuyasha1_LVL = 0x0C66B8,
Inuyasha1_ATK = 0x0C66B9,
Inuyasha1_DEF = 0x0C66BA,
Inuyasha1_DEX = 0x0C66BB,
Inuyasha1_AGI = 0x0C66BC,
Inuyasha1_Select = 0x0C66C9,
Inuyasha1_isPresent = 0x0C66CC,
Inuyasha1_Escaped = 0x0C66CE,
Inuyasha1_Status = 0x0C66CF,
Inuyasha1_Divine_Barrier = 0x0C66D3,
Inuyasha1_Sealing_Barrier = 0x0C66D4,
Inuyasha2_Start = 0x0C66D8,
Inuyasha2_Name_Index = 0x0C66DC,
Inuyasha2_Is_NPC = 0x0C66DD,
Inuyasha2_Item_1 = 0x0C66F4,
Inuyasha2_Item_2 = 0x0C66F8,
Inuyasha2_Item_3 = 0x0C66FC,
Inuyasha2_Item_4 = 0x0C6700,
Inuyasha2_Item_5 = 0x0C6704,
Inuyasha2_Item_6 = 0x0C6708,
Inuyasha2_Item_7 = 0x0C670C,
Inuyasha2_Item_8 = 0x0C6710,
Inuyasha2_Item_9 = 0x0C6714,
Inuyasha2_Item_10 = 0x0C6718,
Inuyasha2_Equip1 = 0x0C6720,
Inuyasha2_Equip2 = 0x0C6721,
Inuyasha2_EXP = 0x0C6726,
Inuyasha2_HP = 0x0C6728,
Inuyasha2_EP = 0x0C672A,
Inuyasha2_MAX_HP = 0x0C672C,
Inuyasha2_MAX_EP = 0x0C672E,
Inuyasha2_Sprite_ID = 0x0C6734,
Inuyasha2_Sprite_Pallete = 0x0C6744,
Inuyasha2_LVL = 0x0C674C,
Inuyasha2_ATK = 0x0C674D,
Inuyasha2_DEF = 0x0C674E,
Inuyasha2_DEX = 0x0C674F,
Inuyasha2_AGI = 0x0C6750,
Inuyasha2_Select = 0x0C675D,
Inuyasha2_isPresent = 0x0C6760,
Inuyasha2_Escaped = 0x0C6762,
Inuyasha2_Status = 0x0C6763,
Inuyasha2_Divine_Barrier = 0x0C6767,
Inuyasha2_Sealing_Barrier = 0x0C6768,
Kagome_Start = 0x0C676C,
Kagome_Name_Index = 0x0C6770,
Kagome_Is_NPC = 0x0C6771,
Kagome_Item_1 = 0x0C6788,
Kagome_Item_2 = 0x0C678C,
Kagome_Item_3 = 0x0C6790,
Kagome_Item_4 = 0x0C6794,
Kagome_Item_5 = 0x0C6798,
Kagome_Item_6 = 0x0C679C,
Kagome_Item_7 = 0x0C67A0,
Kagome_Item_8 = 0x0C67A4,
Kagome_Item_9 = 0x0C67A8,
Kagome_Item_10 = 0x0C67AC,
Kagome_Equip1 = 0x0C67B4,
Kagome_Equip2 = 0x0C67B5,
Kagome_EXP = 0x0C67BA,
Kagome_HP = 0x0C67BC,
Kagome_EP = 0x0C67BE,
Kagome_MAX_HP = 0x0C67C0,
Kagome_MAX_EP = 0x0C67C2,
Kagome_Sprite_ID = 0x0C67C8,
Kagome_Sprite_Pallete = 0x0C67D8,
Kagome_LVL = 0x0C67E0,
Kagome_ATK = 0x0C67E1,
Kagome_DEF = 0x0C67E2,
Kagome_DEX = 0x0C67E3,
Kagome_AGI = 0x0C67E4,
Kagome_Select = 0x0C67F1,
Kagome_isPresent = 0x0C67F4,
Kagome_Escaped = 0x0C67F6,
Kagome_Status = 0x0C67F7,
Kagome_Divine_Barrier = 0x0C67FB,
Kagome_Sealing_Barrier = 0x0C67FC,
Miroku_Start = 0x0C6800,
Miroku_Name_Index = 0x0C6804,
Miroku_Is_NPC = 0x0C6805,
Miroku_Item_1 = 0x0C681C,
Miroku_Item_2 = 0x0C6820,
Miroku_Item_3 = 0x0C6824,
Miroku_Item_4 = 0x0C6828,
Miroku_Item_5 = 0x0C682C,
Miroku_Item_6 = 0x0C6830,
Miroku_Item_7 = 0x0C6834,
Miroku_Item_8 = 0x0C6838,
Miroku_Item_9 = 0x0C683C,
Miroku_Item_10 = 0x0C6840,
Miroku_Equip1 = 0x0C6848,
Miroku_Equip2 = 0x0C6849,
Miroku_EXP = 0x0C684E,
Miroku_HP = 0x0C6850,
Miroku_EP = 0x0C6852,
Miroku_MAX_HP = 0x0C6854,
Miroku_MAX_EP = 0x0C6856,
Miroku_Sprite_ID = 0x0C685C,
Miroku_Sprite_Pallete = 0x0C686C,
Miroku_LVL = 0x0C6874,
Miroku_ATK = 0x0C6875,
Miroku_DEF = 0x0C6876,
Miroku_DEX = 0x0C6877,
Miroku_AGI = 0x0C6878,
Miroku_Select = 0x0C6885,
Miroku_isPresent = 0x0C6888,
Miroku_Escaped = 0x0C688A,
Miroku_Status = 0x0C688B,
Miroku_Divine_Barrier = 0x0C688F,
Miroku_Sealing_Barrier = 0x0C6890,
Sango_Start = 0x0C6894,
Sango_Name_Index = 0x0C6898,
Sango_Is_NPC = 0x0C6899,
Sango_Item_1 = 0x0C68B0,
Sango_Item_2 = 0x0C68B4,
Sango_Item_3 = 0x0C68B8,
Sango_Item_4 = 0x0C68BC,
Sango_Item_5 = 0x0C68C0,
Sango_Item_6 = 0x0C68C4,
Sango_Item_7 = 0x0C68C8,
Sango_Item_8 = 0x0C68CC,
Sango_Item_9 = 0x0C68D0,
Sango_Item_10 = 0x0C68D4,
Sango_Equip1 = 0x0C68DC,
Sango_Equip2 = 0x0C68DD,
Sango_EXP = 0x0C68E2,
Sango_HP = 0x0C68E4,
Sango_EP = 0x0C68E6,
Sango_MAX_HP = 0x0C68E8,
Sango_MAX_EP = 0x0C68EA,
Sango_Sprite_ID = 0x0C68F0,
Sango_Sprite_Pallete = 0x0C6900,
Sango_LVL = 0x0C6908,
Sango_ATK = 0x0C6909,
Sango_DEF = 0x0C690A,
Sango_DEX = 0x0C690B,
Sango_AGI = 0x0C690C,
Sango_Select = 0x0C6919,
Sango_isPresent = 0x0C691C,
Sango_Escaped = 0x0C691E,
Sango_Status = 0x0C691F,
Sango_Divine_Barrier = 0x0C6923,
Sango_Sealing_Barrier = 0x0C6924,
Shippo1_Start = 0x0C6928,
Shippo1_Name_Index = 0x0C692C,
Shippo1_Is_NPC = 0x0C692D,
Shippo1_Item_1 = 0x0C6944,
Shippo1_Item_2 = 0x0C6948,
Shippo1_Item_3 = 0x0C694C,
Shippo1_Item_4 = 0x0C6950,
Shippo1_Item_5 = 0x0C6954,
Shippo1_Item_6 = 0x0C6958,
Shippo1_Item_7 = 0x0C695C,
Shippo1_Item_8 = 0x0C6960,
Shippo1_Item_9 = 0x0C6964,
Shippo1_Item_10 = 0x0C6968,
Shippo1_Equip1 = 0x0C6970,
Shippo1_Equip2 = 0x0C6971,
Shippo1_EXP = 0x0C6976,
Shippo1_HP = 0x0C6978,
Shippo1_EP = 0x0C697A,
Shippo1_MAX_HP = 0x0C697C,
Shippo1_MAX_EP = 0x0C697E,
Shippo1_Sprite_ID = 0x0C6984,
Shippo1_Sprite_Pallete = 0x0C6994,
Shippo1_LVL = 0x0C699C,
Shippo1_ATK = 0x0C699D,
Shippo1_DEF = 0x0C699E,
Shippo1_DEX = 0x0C699F,
Shippo1_AGI = 0x0C69A0,
Shippo1_Select = 0x0C69AD,
Shippo1_isPresent = 0x0C69B0,
Shippo1_Escaped = 0x0C69B2,
Shippo1_Status = 0x0C69B3,
Shippo1_Divine_Barrier = 0x0C69B7,
Shippo1_Sealing_Barrier = 0x0C69B8,
Shippo2_Start = 0x0C69BC,
Shippo2_Name_Index = 0x0C69C0,
Shippo2_Is_NPC = 0x0C69C1,
Shippo2_Item_1 = 0x0C69D8,
Shippo2_Item_2 = 0x0C69DC,
Shippo2_Item_3 = 0x0C69E0,
Shippo2_Item_4 = 0x0C69E4,
Shippo2_Item_5 = 0x0C69E8,
Shippo2_Item_6 = 0x0C69EC,
Shippo2_Item_7 = 0x0C69F0,
Shippo2_Item_8 = 0x0C69F4,
Shippo2_Item_9 = 0x0C69F8,
Shippo2_Item_10 = 0x0C69FC,
Shippo2_Equip1 = 0x0C6A04,
Shippo2_Equip2 = 0x0C6A05,
Shippo2_EXP = 0x0C6A0A,
Shippo2_HP = 0x0C6A0C,
Shippo2_EP = 0x0C6A0E,
Shippo2_MAX_HP = 0x0C6A10,
Shippo2_MAX_EP = 0x0C6A12,
Shippo2_Sprite_ID = 0x0C6A18,
Shippo2_Sprite_Pallete = 0x0C6A28,
Shippo2_LVL = 0x0C6A30,
Shippo2_ATK = 0x0C6A31,
Shippo2_DEF = 0x0C6A32,
Shippo2_DEX = 0x0C6A33,
Shippo2_AGI = 0x0C6A34,
Shippo2_Select = 0x0C6A41,
Shippo2_isPresent = 0x0C6A44,
Shippo2_Escaped = 0x0C6A46,
Shippo2_Status = 0x0C6A47,
Shippo2_Divine_Barrier = 0x0C6A4B,
Shippo2_Sealing_Barrier = 0x0C6A4C,
Shikioni1_Item_1 = 0x0C6CBC,
Shikioni1_Item_2 = 0x0C6CC0,
Shikioni1_Item_3 = 0x0C6CC4,
Shikioni1_Item_4 = 0x0C6CC8,
Shikioni1_Item_5 = 0x0C6CCC,
Shikioni1_Item_6 = 0x0C6CD0,
Shikioni1_Item_7 = 0x0C6CD4,
Shikioni1_Item_8 = 0x0C6CD8,
Shikioni1_Item_9 = 0x0C6CDC,
Shikioni1_Item_10 = 0x0C6CE0,
Shikioni1_Equip1 = 0x0C6CE8,
Shikioni1_Equip2 = 0x0C6CE9,
Shikioni1_EXP = 0x0C6CEE,
Shikioni1_HP = 0x0C6CF0,
Shikioni1_EP = 0x0C6CF2,
Shikioni1_MAX_HP = 0x0C6CF4,
Shikioni1_MAX_EP = 0x0C6CF6,
Shikioni1_LVL = 0x0C6D14,
Shikioni1_ATK = 0x0C6D15,
Shikioni1_DEF = 0x0C6D16,
Shikioni1_DEX = 0x0C6D17,
Shikioni1_AGI = 0x0C6D18,
Shikioni1_Select = 0x0C6D25,
Shikioni1_Status = 0x0C6D2B,
Shikioni1_Divine_Barrier = 0x0C6D2F,
Shikioni1_Sealing_Barrier = 0x0C6D30,
Shikioni1_Power_Leaf = 0x0C6D31,
NPC1_Start = 0x0C6DC8,
NPC1_Name_Index = 0x0C6DCC,
NPC1_Item_1 = 0x0C6DE4,
NPC1_Item_2 = 0x0C6DE8,
NPC1_Item_3 = 0x0C6DEC,
NPC1_Item_4 = 0x0C6DF0,
NPC1_Item_5 = 0x0C6DF4,
NPC1_Item_6 = 0x0C6DF8,
NPC1_Item_7 = 0x0C6DFC,
NPC1_Item_8 = 0x0C6E00,
NPC1_Item_9 = 0x0C6E04,
NPC1_Item_10 = 0x0C6E08,
NPC1_Equip1 = 0x0C6E10,
NPC1_Equip2 = 0x0C6E11,
NPC1_EXP = 0x0C6E16,
NPC1_HP = 0x0C6E18,
NPC1_EP = 0x0C6E1A,
NPC1_MAX_HP = 0x0C6E1C,
NPC1_MAX_EP = 0x0C6E1E,
NPC1_Sprite_ID = 0x0C6E24,
NPC1_Sprite_Pallete = 0x0C6E34,
NPC1_LVL = 0x0C6E3C,
NPC1_ATK = 0x0C6E3D,
NPC1_DEF = 0x0C6E3E,
NPC1_DEX = 0x0C6E3F,
NPC1_AGI = 0x0C6E40,
NPC1_Select = 0x0C6E4D,
NPC1_isPresent = 0x0C6E50,
NPC1_Escaped = 0x0C6E52,
NPC1_Status = 0x0C6E53,
NPC1_Divine_Barrier = 0x0C6E57,
NPC1_Sealing_Barrier = 0x0C6E58,
NPC1_Power_Leaf = 0x0C6E59,
Moon_Phase = 0x107568,
Moon_Step = 0x10756C,
RNG1 = 0x107B98,
RNG2 = 0x107B9C,
Character_Menu = 0x24BF06,
Character_Attacking = 0x24C152,
X = 0x2AD49C,
Y = 0x2AD4A0,
Attack_Selected = 0x2B5E28
}
local Attack = {
[1] = {Name = "Attack", EP = 1, Value = 0x00},
[2] = {Name = "Charge", EP = 2, Value = 0},
[3] = {Name = "Shoot", EP = 1, Value = 0},
[4] = {Name = "Defense", EP = 0, Value = 0},
[6] = {Name = "?", EP = 0, Value = 0},
[7] = {Name = "?", EP = 0, Value = 0},
[8] = {Name = "?", EP = 0, Value = 0},
[9] = {Name = "?", EP = 0, Value = 0},
[10] = {Name = "Spirit Up", EP = 0, Value = 0},
[11] = {Name = "Item", EP = 0, Value = 0},
[12] = {Name = "?", EP = 0, Value = 0},
[13] = {Name = "Lightning Arrow", EP = 2, Value = 0x7B},
[14] = {Name = "Infernal Meteor", EP = 3, Value = 0x64},
[15] = {Name = "Heavenly Essence",EP = 3, Value = 0},
[16] = {Name = "Power Leaf", EP = 2, Value = 0},
[17] = {Name = "Iron Reaver", EP = 2, Value = 0x5F},
[18] = {Name = "Blades Of Blood", EP = 3, Value = 0x5A},
[19] = {"Wind Scar", EP = 4, Value = 0xAF},
[20] = {Name = "Backlash Wave", EP = 5, Value = 0xBE},
[21] = {Name = "Sacred Arrow", EP = 3, Value = 0x87},
[22] = {Name = "Purifying Light", EP = 3, Value = 0},
[23] = {Name = "Divine Barrier", EP = 3, Value = 0},
[24] = {Name = "Wind Tunnel", EP = 5, Value = 0},
[25] = {Name = "Healing Sutra", EP = 3, Value = 0},
[26] = {Name = "Sealing Barrier", EP = 4, Value = 0},
[27] = {Name = "Binding Sutra", EP = 3, Value = 0},
[28] = {Name = "Fury Of Taishaku", EP = 3, Value = 0x6E},
[29] = {Name = "Hiraikotsu", EP = 3, Value = 0x82},
[30] = {Name = "Great Cannon", EP = 3, Value = 0x5A},
[31] = {Name = "Fox Fire", EP = 1, Value = 0x41},
[32] = {Name = "Smashing Top", EP = 2, Value = 0x50},
[33] = {Name = "Smoke Illusion", EP = 2, Value = 0}
}
local Battle = {
Name_Index = {0,0,0,0,0,0,0,0,0,0,0,0,0},
EXP = {0,0,0,0,0,0,0,0,0,0,0,0,0},
HP = {0,0,0,0,0,0,0,0,0,0,0,0,0},
EP = {0,0,0,0,0,0,0,0,0,0,0,0,0},
Max_HP = {0,0,0,0,0,0,0,0,0,0,0,0,0},
Max_EP = {0,0,0,0,0,0,0,0,0,0,0,0,0},
Sprite_ID = {0,0,0,0,0,0,0,0,0,0,0,0,0},
Sprite_ID2 = {0,0,0,0,0,0,0,0,0,0,0,0,0},
Sprite_Palette = {0,0,0,0,0,0,0,0,0,0,0,0,0},
Sprite_Palette2 = {0,0,0,0,0,0,0,0,0,0,0,0,0},
LVL = {0,0,0,0,0,0,0,0,0,0,0,0,0},
ATK = {0,0,0,0,0,0,0,0,0,0,0,0,0},
DEF = {0,0,0,0,0,0,0,0,0,0,0,0,0},
DEX = {0,0,0,0,0,0,0,0,0,0,0,0,0},
AGI = {0,0,0,0,0,0,0,0,0,0,0,0,0}
}
local NPC = {
[0] = { Name = "Iron Dragon Spawn", Sprite_ID = 0x0114, Sprite_Pallete = 0x0114, Width = 80, Height = 76},
[1] = { Name = "Fire Dragon Spawn", Sprite_ID = 0x0114, Sprite_Pallete = 0x0115, Width = 80, Height = 76},
[2] = { Name = "Wandering Spirit", Sprite_ID = 0x0116, Sprite_Pallete = 0x0116, Width = 16, Height = 30},
[3] = { Name = "Lost Soul", Sprite_ID = 0x0116, Sprite_Pallete = 0x0118, Width = 16, Height = 30},
[4] = { Name = "Banshee", Sprite_ID = 0x011A, Sprite_Pallete = 0x011A, Width = 29, Height = 48},
[5] = { Name = "Ten-Eyed Monster", Sprite_ID = 0x011B, Sprite_Pallete = 0x011B, Width = 44, Height = 41},
[6] = { Name = "Disembodied Soul", Sprite_ID = 0x011B, Sprite_Pallete = 0x011C, Width = 44, Height = 41},
[7] = { Name = "Cackling Skull", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[8] = { Name = "Cursed Skull", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[9] = { Name = "Little Devil", Sprite_ID = 0x011D, Sprite_Pallete = 0x011D, Width = 31, Height = 43},
[10] = { Name = "Vile Demon", Sprite_ID = 0x011D, Sprite_Pallete = 0x011E, Width = 31, Height = 43},
[11] = { Name = "Malicious Demon", Sprite_ID = 0x011D, Sprite_Pallete = 0x011F, Width = 31, Height = 43},
[12] = { Name = "Wild Hermit", Sprite_ID = 0x0120, Sprite_Pallete = 0x0120, Width = 50, Height = 65},
[13] = { Name = "Masked Priest", Sprite_ID = 0x0120, Sprite_Pallete = 0x0121, Width = 50, Height = 65},
[14] = { Name = "Demon Handler", Sprite_ID = 0x0122, Sprite_Pallete = 0x0122, Width = 29, Height = 54},
[15] = { Name = "Revenant", Sprite_ID = 0x0122, Sprite_Pallete = 0x0124, Width = 29, Height = 54},
[16] = { Name = "Savage Rat", Sprite_ID = 0x0126, Sprite_Pallete = 0x0126, Width = 28, Height = 32},
[17] = { Name = "Filthy Rat", Sprite_ID = 0x0126, Sprite_Pallete = 0x0127, Width = 28, Height = 32},
[18] = { Name = "Giant Mantis", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[19] = { Name = "Shadow Mantis", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[20] = { Name = "Giant Spider", Sprite_ID = 0x0128, Sprite_Pallete = 0x0128, Width = 29, Height = 26},
[21] = { Name = "Hirasaka Spider", Sprite_ID = 0x0128, Sprite_Pallete = 0x012A, Width = 29, Height = 26},
[22] = { Name = "Sandman", Sprite_ID = 0x012C, Sprite_Pallete = 0x012C, Width = 30, Height = 46},
[23] = { Name = "Sludge", Sprite_ID = 0x012C, Sprite_Pallete = 0x012E, Width = 30, Height = 46},
[24] = { Name = "Wild Bear", Sprite_ID = 0x0130, Sprite_Pallete = 0x0130, Width = 45, Height = 52},
[25] = { Name = "Bloody Bear", Sprite_ID = 0x0130, Sprite_Pallete = 0x0131, Width = 45, Height = 52},
[26] = { Name = "Rock Monkey", Sprite_ID = 0x0132, Sprite_Pallete = 0x0132, Width = 46, Height = 36},
[27] = { Name = "Jizo Monkey", Sprite_ID = 0x0132, Sprite_Pallete = 0x0134, Width = 46, Height = 36},
[28] = { Name = "Iorimaru", Sprite_ID = 0x0136, Sprite_Pallete = 0x0136, Width = 23, Height = 43},
[29] = { Name = "Tosen King", Sprite_ID = 0x0138, Sprite_Pallete = 0x0138, Width = 23, Height = 43},
[30] = { Name = "Senryo", Sprite_ID = 0x013A, Sprite_Pallete = 0x013A, Width = 34, Height = 49},
[31] = { Name = "Manryo", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[32] = { Name = "Tengu", Sprite_ID = 0x013E, Sprite_Pallete = 0x013E, Width = 58, Height = 65},
[33] = { Name = "Dark Tengu", Sprite_ID = 0x013E, Sprite_Pallete = 0x0141, Width = 58, Height = 65},
[34] = { Name = "Wandering Demon", Sprite_ID = 0x0144, Sprite_Pallete = 0x0144, Width = 44, Height = 79},
[35] = { Name = "Iron-Souled Demon", Sprite_ID = 0x0144, Sprite_Pallete = 0x0147, Width = 44, Height = 79},
[36] = { Name = "One-Eyed Priest", Sprite_ID = 0x0144, Sprite_Pallete = 0x014A, Width = 44, Height = 79},
[37] = { Name = "Antero Demon", Sprite_ID = 0x014D, Sprite_Pallete = 0x014D, Width = 40, Height = 55},
[38] = { Name = "Ninestar Demon", Sprite_ID = 0x014D, Sprite_Pallete = 0x014E, Width = 40, Height = 55},
[39] = { Name = "Postero Demon", Sprite_ID = 0x014F, Sprite_Pallete = 0x014F, Width = 35, Height = 56},
[40] = { Name = "Shrouded Demon", Sprite_ID = 0x014F, Sprite_Pallete = 0x0150, Width = 35, Height = 56},
[41] = { Name = "Demon of Misfortune", Sprite_ID = 0x0151, Sprite_Pallete = 0x0151, Width = 50, Height = 111},
[42] = { Name = "Slashing Demon", Sprite_ID = 0x0151, Sprite_Pallete = 0x0156, Width = 50, Height = 111},
[43] = { Name = "Hades Demon", Sprite_ID = 0x0151, Sprite_Pallete = 0x015B, Width = 50, Height = 111},
[44] = { Name = "Saimyosho", Sprite_ID = 0x0160, Sprite_Pallete = 0x0160, Width = 40, Height = 38},
[45] = { Name = "Saimyosho", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[46] = { Name = "Saimyosho", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[47] = { Name = "Saimyosho", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[48] = { Name = "Wind Spirit", Sprite_ID = 0x0167, Sprite_Pallete = 0x0167, Width = 45, Height = 50},
[49] = { Name = "Wind God", Sprite_ID = 0x0167, Sprite_Pallete = 0x0168, Width = 45, Height = 50},
[50] = { Name = "Ice Dragon Spawn", Sprite_ID = 0x0114, Sprite_Pallete = 0x0169, Width = 80, Height = 76},
[51] = { Name = "Light Demon", Sprite_ID = 0x014D, Sprite_Pallete = 0x016A, Width = 40, Height = 55},
[52] = { Name = "Dark Demon", Sprite_ID = 0x014F, Sprite_Pallete = 0x016B, Width = 35, Height = 56},
[53] = { Name = "Akagane", Sprite_ID = 0x016C, Sprite_Pallete = 0x016C, Width = 65, Height = 109},
[54] = { Name = "Akagane", Sprite_ID = 0x016C, Sprite_Pallete = 0x016C, Width = 65, Height = 109},
[55] = { Name = "Akagane", Sprite_ID = 0x016C, Sprite_Pallete = 0x016C, Width = 65, Height = 109},
[56] = { Name = "Burai", Sprite_ID = 0x016F, Sprite_Pallete = 0x016F, Width = 66, Height = 78},
[57] = { Name = "Datara", Sprite_ID = 0x0170, Sprite_Pallete = 0x0170, Width = 55, Height = 106},
[58] = { Name = "Gorai", Sprite_ID = 0x0175, Sprite_Pallete = 0x0175, Width = 35, Height = 67},
[59] = { Name = "Gorai", Sprite_ID = 0x0175, Sprite_Pallete = 0x0175, Width = 35, Height = 67},
[60] = { Name = "Gorai", Sprite_ID = 0x0175, Sprite_Pallete = 0x0175, Width = 35, Height = 67},
[61] = { Name = "Haniwa Golem 1", Sprite_ID = 0x0177, Sprite_Pallete = 0x0177, Width = 23, Height = 36},
[62] = { Name = "Haniwa Golem 2", Sprite_ID = 0x0178, Sprite_Pallete = 0x0178, Width = 25, Height = 27},
[63] = { Name = "Haniwa Golem 3", Sprite_ID = 0x017A, Sprite_Pallete = 0x017A, Width = 64, Height = 48},
[64] = { Name = "Demon Puppet", Sprite_ID = 0x017C, Sprite_Pallete = 0x017C, Width = 80, Height = 80},
[65] = { Name = "Demon Puppet", Sprite_ID = 0x017C, Sprite_Pallete = 0x017C, Width = 80, Height = 80},
[66] = { Name = "Masuko", Sprite_ID = 0x017D, Sprite_Pallete = 0x017D, Width = 121, Height = 116},
[67] = { Name = "Mitsurugi", Sprite_ID = 0x017E, Sprite_Pallete = 0x017E, Width = 37, Height = 44},
[68] = { Name = "Mitsurugi", Sprite_ID = 0x017E, Sprite_Pallete = 0x017E, Width = 37, Height = 44},
[69] = { Name = "Sara", Sprite_ID = 0x0180, Sprite_Pallete = 0x0180, Width = 23, Height = 45},
[70] = { Name = "Sara", Sprite_ID = 0x0180, Sprite_Pallete = 0x0180, Width = 23, Height = 45},
[71] = { Name = "Monk Sen", Sprite_ID = 0x0182, Sprite_Pallete = 0x0182, Width = 33, Height = 61},
[72] = { Name = "Sugagaki", Sprite_ID = 0x0184, Sprite_Pallete = 0x0184, Width = 64, Height = 64},
[73] = { Name = "Sugagaki", Sprite_ID = 0x0184, Sprite_Pallete = 0x0184, Width = 64, Height = 64},
[74] = { Name = "Usuba", Sprite_ID = 0x0187, Sprite_Pallete = 0x0187, Width = 78, Height = 76},
[75] = { Name = "Crash", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[241] = { Name = "Crash", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[242] = { Name = "No name", Sprite_ID = 0x0000, Sprite_Pallete = 0x0000, Width = 255, Height = 255},
[243] = { Name = "Zombie", Sprite_ID = 0x00FA, Sprite_Pallete = 0x00FA, Width = 20, Height = 46},
[244] = { Name = "Zombie 2", Sprite_ID = 0x00FB, Sprite_Pallete = 0x00FB, Width = 48, Height = 64},
[245] = { Name = "Possessed Warrior", Sprite_ID = 0x00FC, Sprite_Pallete = 0x00FC, Width = 23, Height = 42},
[246] = { Name = "Deceased Warrior", Sprite_ID = 0x00FC, Sprite_Pallete = 0x00FE, Width = 23, Height = 42},
[247] = { Name = "Demon Soldier", Sprite_ID = 0x0100, Sprite_Pallete = 0x0100, Width = 59, Height = 35},
[248] = { Name = "Cave Insect", Sprite_ID = 0x0101, Sprite_Pallete = 0x0101, Width = 53, Height = 36},
[249] = { Name = "Rock Insect", Sprite_ID = 0x0101, Sprite_Pallete = 0x0103, Width = 53, Height = 36},
[250] = { Name = "Slimy Bug", Sprite_ID = 0x0101, Sprite_Pallete = 0x0105, Width = 53, Height = 36},
[251] = { Name = "Giant Centipede", Sprite_ID = 0x0107, Sprite_Pallete = 0x0107, Width = 93, Height = 78},
[252] = { Name = "Poisonous Centipede", Sprite_ID = 0x0107, Sprite_Pallete = 0x010A, Width = 93, Height = 78},
[253] = { Name = "Steel Centipede", Sprite_ID = 0x0107, Sprite_Pallete = 0x010D, Width = 93, Height = 78},
[254] = { Name = "Poisonous Child", Sprite_ID = 0x0110, Sprite_Pallete = 0x0110, Width = 20, Height = 33},
[255] = { Name = "Messenger of Hades", Sprite_ID = 0x0110, Sprite_Pallete = 0x0112, Width = 20, Height = 33}
}
local Character = {
"Janis 1",
"Janis 2",
"Janis 3",
"Inuyasha 1",
"Inuyasha 2",
"Kagome",
"Miroku",
"Sango",
"Shippo 1",
"Shippo 2",
"Kohaku",
"Koga",
"Tsugumi",
"Sesshomaru",
"Shiki Demon 1",
"Shiki Demon 2",
}
local XP = {
[1] = 17,
[2] = 49,
[3] = 94,
[4] = 153,
[5] = 231,
[6] = 330,
[7] = 450,
[8] = 590,
[9] = 746,
[10] = 919,
[11] = 1109,
[12] = 1314,
[13] = 1533,
[14] = 1769,
[15] = 2026,
[16] = 2300,
[17] = 2589,
[18] = 2899,
[19] = 3227,
[20] = 3572,
[21] = 3933,
[22] = 4308,
[23] = 4698,
[24] = 5102,
[25] = 5523,
[26] = 5959,
[27] = 6412,
[28] = 6884,
[29] = 7377,
[30] = 7889,
[31] = 8422,
[32] = 8977,
[33] = 9551,
[34] = 10147,
[35] = 10765,
[36] = 11401,
[37] = 12056,
[38] = 12734,
[39] = 13433,
[40] = 14154,
[41] = 14896,
[42] = 15661,
[43] = 16443,
[44] = 17244,
[45] = 18066,
[46] = 18905,
[47] = 19764,
[48] = 20645,
[49] = 21545,
[50] = 22466,
[51] = 23404,
[52] = 24363,
[53] = 25342,
[54] = 26342,
[55] = 27342,
[56] = 28342,
[57] = 29342,
[58] = 30342,
[59] = 31367,
[60] = 32392,
[61] = 33417,
[62] = 34442,
[63] = 35467,
[64] = 36517,
[65] = 37567,
[66] = 38617,
[67] = 39667,
[68] = 40717,
[69] = 41817,
[70] = 42917,
[71] = 44017,
[72] = 45117,
[73] = 46217,
[74] = 47367,
[75] = 48517,
[76] = 49667,
[77] = 50817,
[78] = 51967,
[79] = 53167,
[80] = 54367,
[81] = 55567,
[82] = 56767,
[83] = 57967,
[84] = 59217,
[85] = 60467,
[86] = 61717,
[87] = 62967,
[88] = 64217,
[89] = 65535,
[90] = 0
}
function get_mouse_pos(x,y,width,height)
mx = input.getmouse().X
my = input.getmouse().Y
gui.drawRectangle(x, y, width, height, "red", nil)
if (mx >= x and mx <= x+width) and (my >= y-192 and my <= y+height*2-192) then
return true
end
return false
end
function MLA(A,B,C)
local reslow = A * (B%0x10000)
local reshigh = A * (math.floor(B/0x10000)%0x10000)
reshigh = reshigh%0x10000
return (reshigh*0x10000 + reslow + C)%0x100000000
end
function MUL64(A,B)
local reslow = A * (B%0x10000)
local reshigh = A * math.floor(B/0x10000)
local reslow_lo = reslow%0x100000000
local reslow_hi = math.floor(reslow/0x100000000)
local reshigh_lo = reshigh%0x10000
local reshigh_hi = math.floor(reshigh/0x10000)
local low32 = reshigh_lo*0x10000 + reslow_lo
local high32 = reshigh_hi + reslow_hi
high32 = high32 + math.floor(low32/0x100000000)
low32 = low32%0x100000000
high32 = high32%0x100000000
return low32,high32
end
function rng(r0, rng1, rng2)
local r1 = 0
local r2, r3 = 0,0
local r4, lr, carry = 0,0,0
local rng1_2, rng2_2 = 0, 0
r4, lr = MUL64(0x6C078965, rng1)
lr = MLA(0x6C078965, rng2, lr)
lr = MLA(0x5D588B65, rng1, lr)
r3 = 0x00269EC3 + r4
carry = r3 > 4294967295 and 1 or 0
rng1_2 = r3 % 4294967296
r4 = lr + carry
rng2_2 = r4
if (r0 ~= 0) then
r4 = (r4 * r0) >> 0x20
end
r0 = r4
return r0, rng1_2, rng2_2
end
function update_battle()
local start = Addresses.NPC1_Start
for i = 0, 11 do
Battle.Name_Index[i+1] = read8(start + 0x4 + (i * 0x94))
Battle.EXP[i+1] = read16(start + 0x4E + (i * 0x94))
Battle.HP[i+1] = read16(start + 0x50 + (i * 0x94))
Battle.EP[i+1] = read16(start + 0x52 + (i * 0x94))
Battle.Max_HP[i+1] = read16(start + 0x54 + (i * 0x94))
Battle.Max_EP[i+1] = read16(start + 0x56 + (i * 0x94))
Battle.Sprite_ID[i+1] = read16(start + 0x5C + (i * 0x94))
Battle.Sprite_ID2[i+1] = read8(start + 0x5D + (i * 0x94))
Battle.Sprite_Palette[i+1] = read16(start + 0x6C + (i * 0x94))
Battle.Sprite_Palette2[i+1] = read8(start + 0x6D + (i * 0x94))
Battle.LVL[i+1] = read8(start + 0x74 + (i * 0x94))
Battle.ATK[i+1] = read8(start + 0x75 + (i * 0x94))
Battle.DEF[i+1] = read8(start + 0x76 + (i * 0x94))
Battle.DEX[i+1] = read8(start + 0x77 + (i * 0x94))
Battle.AGI[i+1] = read8(start + 0x78 + (i * 0x94))
end
end
local image_height = 22
function display_battle()
local text_x = 264
local text_y = 8
local name = ""
local image_x = 0
local total_xp = 0
local total_npcs = 0
for i = 1, 13 do
if NPC[Battle.Name_Index[i]] ~= 0 then
if Battle.Sprite_ID[i] == NPC[Battle.Name_Index[i]].Sprite_ID then
total_xp = total_xp + math.floor(Battle.EXP[i]/6)
total_npcs = total_npcs + 1
if NPC[i].Name ~= nil then
name = NPC[Battle.Name_Index[i]].Name
image_width = math.floor(NPC[Battle.Name_Index[i]].Width/(NPC[Battle.Name_Index[i]].Height/image_height))
image_x = (image_width > 29) and text_x-12 or text_x-12+(math.abs(image_width-29)/2)
image(name .. ".png", image_x, text_y, image_width, image_height)
else
name = ""
end
text(text_x + 16,text_y, string.format('%s (%d) EXP: %d', name, Battle.Name_Index[i],math.floor(Battle.EXP[i]/6)))
text_y = text_y + 8
text(text_x + 16,text_y, string.format('%d LV: %d HP: %d/%d EP: %d/%d', i, Battle.LVL[i], Battle.HP[i], Battle.Max_HP[i], Battle.EP[i], Battle.Max_EP[i]))
text_y = text_y + 8
text(text_x + 16,text_y, string.format('ATK: %d DEF: %d DEX: %d AGI: %d EXP: %d', Battle.ATK[i], Battle.DEF[i], Battle.DEX[i], Battle.AGI[i], Battle.EXP[i]))
text_y = text_y + 8
end
end
end
text(text_x,0, string.format("NPCS: %d Total XP: %d", total_npcs, total_xp))
end
local toggle = {0,0,0,0,0,0,0,0,0,0}
function display_stats()
local text_x = 260
local text_y = 216
local box_y = 192;
local box_x = {[1] = 0, [2] = 12, [3] = 24, [4] = 36, [5] = 48, [6] = 60, [7] = 72, [8] = 84, [9] = 96, [10] = 108};
local box_width = 8;
local box_height = 8;
local start = Addresses.Janis1_EXP
for i = 1, 10 do
if toggle[i] == 1 then
local XP = read16(start + (i-1) * 0x94)
local HP = read16(start + 0x2 + (i-1) * 0x94)
local EP = read16(start + 0x4 + (i-1) * 0x94)
local Max_HP = read16(start + 0x6 + (i-1) * 0x94)
local Max_EP = read16(start + 0x8 + (i-1) * 0x94)
local LVL = read8(start + 0x26 + (i-1) * 0x94)
local ATK = read8(start + 0x27 + (i-1) * 0x94)
local DEF = read8(start + 0x28 + (i-1) * 0x94)
local DEX = read8(start + 0x29 + (i-1) * 0x94)
local AGI = read8(start + 0x2A + (i-1) * 0x94)
color = "yellow"
text(text_x,text_y, string.format('%s', Character[i]))
text_y = text_y + 8
text(text_x,text_y, string.format('LV: %d HP: %d/%d EP: %d/%d', LVL, HP, Max_HP, EP, Max_EP))
text_y = text_y + 8
text(text_x,text_y, string.format('ATK: %d DEF: %d DEX: %d AGI: %d EXP: %d', ATK, DEF, DEX, AGI, XP))
text_y = text_y + 8
else
color = "green"
end
gui.drawRectangle(box_x[i]+text_x,box_y,box_width,box_height, color, nil)
if (input.getmouse().Left and get_mouse_pos(box_x[i]+text_x,box_y,box_width,box_height)) then
toggle[i] = (toggle[i] == 1 and 0 or 1)
end
end
end
local i = 1
console.clear()
update_battle()
while true do
local text_x = 260
local text_y = 202
local area = read16(Addresses.Area)
local x = read32(Addresses.X)
local y = read32(Addresses.Y)
display_stats()
text(text_x, text_y, string.format('X: %d Y: %d\nArea: %d', x, y, area))
text_y = text_y + 40
update_battle()
display_battle()
emu.frameadvance()
end
Notes:
1. There's 3 Janis characters. 1st one is from the start. You're completely defenseless, and cannot escape from battle. The 2nd one is after unlocking spells. The last one has a spear.
2. Similarly, there's 2 Inuyasha's (demon/human) and 2 Shippos (with/without Kirara)
3. Every character uses the same XP to next amount. They cap at level 90
4. Attack/Charge is based on your Attack/Dex, and the opponent's DEF. However, specials like Wind Scar is entirely based on your level. Unfortunately, this means you need to grind.
5. I couldn't figure out the NPC ids, but I did record their sprite/pallete
https://docs.google.com/spreadsheets/d/13ly3T8zQA1WYVDUFytGlAuNMhFBxtflyWnkJAUxzjRA/edit?usp=sharing