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)
text = gui.pixelText
memory.usememorydomain("Main RAM")
read8 = memory.read_u8
read16 = memory.read_u16_le
read24 = memory.read_u24_be
read32 = memory.read_u32_le
local Addresses = {
--to use ARM 7/9 System Bus, add 02000000 to the addresses
--[[
there's 3 Janis characters
1. Start
2. Spells unlocked
3. Spear unlocked
]]--
Area = 0x0B40C4, --2 bytes; 7 is battle; 579 total
Money = 0x0C4AB0,
-- Janis1_Start = 0x0c6469,
--Janis without any spells
Janis1_Item_1 = 0x0C64A4, --4 bytes
Janis1_Item_2 = 0x0C64A8, --4 bytes
Janis1_Item_3 = 0x0C64AC, --4 bytes
Janis1_Item_4 = 0x0C64B0, --4 bytes
Janis1_Item_5 = 0x0C64B4, --4 bytes
Janis1_Item_6 = 0x0C64B8, --4 bytes
Janis1_Item_7 = 0x0C64BC, --4 bytes
Janis1_Item_8 = 0x0C64C0, --4 bytes
Janis1_Item_9 = 0x0C64C4, --4 bytes
Janis1_Item_10 = 0x0C64C8, --4 bytes
Janis1_EXP = 0x0C64D6, --2 bytes
Janis1_HP = 0x0C64D8, --2 bytes
Janis1_EP = 0x0C64DA, --2 bytes
Janis1_MAX_HP = 0x0C64DC,--2 bytes
Janis1_MAX_EP = 0x0C64DE,--2 bytes
Janis1_LVL = 0x0C64FC,
Janis1_ATK = 0x0C64FD,
Janis1_DEF = 0x0C64FE,
Janis1_DEX = 0x0C64FF,
Janis1_AGI = 0x0C6500,
--Janis with spells unlocked
Janis2_Item_1 = 0x0C6538, --4 bytes
Janis2_Item_2 = 0x0C653C, --4 bytes
Janis2_Item_3 = 0x0C6540, --4 bytes
Janis2_Item_4 = 0x0C6544, --4 bytes
Janis2_Item_5 = 0x0C6548, --4 bytes
Janis2_Item_6 = 0x0C654C, --4 bytes
Janis2_Item_7 = 0x0C6550, --4 bytes
Janis2_Item_8 = 0x0C6554, --4 bytes
Janis2_Item_9 = 0x0C6558, --4 bytes
Janis2_Item_10 = 0x0C655C, --4 bytes
Janis2_EXP = 0x0C656A, --2 bytes
Janis2_HP = 0x0C656C, --2 bytes
Janis2_EP = 0x0C656CE, --2 bytes
Janis2_MAX_HP = 0x0C6570,--2 bytes
Janis2_MAX_EP = 0x0C6572,--2 bytes
Janis2_LVL = 0x0C6590,
Janis2_ATK = 0x0C6591,
Janis2_DEF = 0x0C6592,
Janis2_DEX = 0x0C6593,
Janis2_AGI = 0x0C6594,
--Janis with spear unlocked
Janis3_Item_1 = 0x0C65CC, --4 bytes
Janis3_Item_2 = 0x0C65D0, --4 bytes
Janis3_Item_3 = 0x0C65D4, --4 bytes
Janis3_Item_4 = 0x0C65D8, --4 bytes
Janis3_Item_5 = 0x0C65DC, --4 bytes
Janis3_Item_6 = 0x0C65E0, --4 bytes
Janis3_Item_7 = 0x0C65E4, --4 bytes
Janis3_Item_8 = 0x0C65E8, --4 bytes
Janis3_Item_9 = 0x0C65EC, --4 bytes
Janis3_Item_10 = 0x0C65F0, --4 bytes
Janis3_EXP = 0x0C65FE, --2 bytes
Janis3_HP = 0x0C6600, --2 bytes
Janis3_EP = 0x0C6602, --2 bytes
Janis3_MAX_HP = 0x0C6604,--2 bytes
Janis3_MAX_EP = 0x0C6606,--2 bytes
Janis3_LVL = 0x0C6624,
Janis3_ATK = 0x0C6625,
Janis3_DEF = 0x0C6626,
Janis3_DEX = 0x0C6627,
Janis3_AGI = 0x0C6628,
--Inu Yasha
Inuyasha1_Item_1 = 0x0C6660, --4 bytes
Inuyasha1_Item_2 = 0x0C6664, --4 bytes
Inuyasha1_Item_3 = 0x0C6668, --4 bytes
Inuyasha1_Item_4 = 0x0C666C, --4 bytes
Inuyasha1_Item_5 = 0x0C6670, --4 bytes
Inuyasha1_Item_6 = 0x0C6674, --4 bytes
Inuyasha1_Item_7 = 0x0C6678, --4 bytes
Inuyasha1_Item_8 = 0x0C667C, --4 bytes
Inuyasha1_Item_9 = 0x0C6680, --4 bytes
Inuyasha1_Item_10 = 0x0C6684, --4 bytes
Inuyasha1_EXP = 0x0C6692, --2 bytes
Inuyasha1_HP = 0x0C6694, --2 bytes
Inuyasha1_EP = 0x0C6696, --2 bytes
Inuyasha1_MAX_HP = 0x0C6698,--2 bytes
Inuyasha1_MAX_EP = 0x0C669A,--2 bytes
Inuyasha1_LVL = 0x0C66B8,
Inuyasha1_ATK = 0x0C66B9,
Inuyasha1_DEF = 0x0C66BA,
Inuyasha1_DEX = 0x0C66BB,
Inuyasha1_AGI = 0x0C66BC,
--Inu Yasha (Human)
Inuyasha2_Item_1 = 0x0C66F4, --4 bytes
Inuyasha2_Item_2 = 0x0C66F8, --4 bytes
Inuyasha2_Item_3 = 0x0C66FC, --4 bytes
Inuyasha2_Item_4 = 0x0C6700, --4 bytes
Inuyasha2_Item_5 = 0x0C6704, --4 bytes
Inuyasha2_Item_6 = 0x0C6708, --4 bytes
Inuyasha2_Item_7 = 0x0C670C, --4 bytes
Inuyasha2_Item_8 = 0x0C6710, --4 bytes
Inuyasha2_Item_9 = 0x0C6714, --4 bytes
Inuyasha2_Item_10 = 0x0C6718, --4 bytes
Inuyasha2_EXP = 0x0C6726, --2 bytes
Inuyasha2_HP = 0x0C6728, --2 bytes
Inuyasha2_EP = 0x0C672A, --2 bytes
Inuyasha2_MAX_HP = 0x0C672C,--2 bytes
Inuyasha2_MAX_EP = 0x0C672E,--2 bytes
Inuyasha2_LVL = 0x0C674C,
Inuyasha2_ATK = 0x0C674D,
Inuyasha2_DEF = 0x0C674E,
Inuyasha2_DEX = 0x0C674F,
Inuyasha2_AGI = 0x0C6750,
Kagome_Item_1 = 0x0C6788, --4 bytes
Kagome_Item_2 = 0x0C678C, --4 bytes
Kagome_Item_3 = 0x0C6790, --4 bytes
Kagome_Item_4 = 0x0C6794, --4 bytes
Kagome_Item_5 = 0x0C6798, --4 bytes
Kagome_Item_6 = 0x0C679C, --4 bytes
Kagome_Item_7 = 0x0C67A0, --4 bytes
Kagome_Item_8 = 0x0C67A4, --4 bytes
Kagome_Item_9 = 0x0C67A8, --4 bytes
Kagome_Item_10 = 0x0C67AC, --4 bytes
Kagome_EXP = 0x0C67BA, --2 bytes
Kagome_HP = 0x0C67BC, --2 bytes
Kagome_EP = 0x0C67BE, --2 bytes
Kagome_MAX_HP = 0x0C67C0,--2 bytes
Kagome_MAX_EP = 0x0C67C2,--2 bytes
Kagome_LVL = 0x0C67E0,
Kagome_ATK = 0x0C67E1,
Kagome_DEF = 0x0C67E2,
Kagome_DEX = 0x0C67E3,
Kagome_AGI = 0x0C67E4,
Miroku_Item_1 = 0x0C681C, --4 bytes
Miroku_Item_2 = 0x0C6820, --4 bytes
Miroku_Item_3 = 0x0C6824, --4 bytes
Miroku_Item_4 = 0x0C6828, --4 bytes
Miroku_Item_5 = 0x0C682C, --4 bytes
Miroku_Item_6 = 0x0C6830, --4 bytes
Miroku_Item_7 = 0x0C6834, --4 bytes
Miroku_Item_8 = 0x0C6838, --4 bytes
Miroku_Item_9 = 0x0C683C, --4 bytes
Miroku_Item_10 = 0x0C6840, --4 bytes
Miroku_EXP = 0x0C684E,
Miroku_HP = 0x0C6850,
Miroku_EP = 0x0C6852,
Miroku_MAX_HP = 0x0C6854,
Miroku_MAX_EP = 0x0C6856,
Miroku_LVL = 0x0C6874,
Miroku_ATK = 0x0C6875,
Miroku_DEF = 0x0C6876,
Miroku_DEX = 0x0C6877,
Miroku_AGI = 0x0C6878,
Sango_Item_1 = 0x0C68B0, --4 bytes
Sango_Item_2 = 0x0C68B4, --4 bytes
Sango_Item_3 = 0x0C68B8, --4 bytes
Sango_Item_4 = 0x0C68BC, --4 bytes
Sango_Item_5 = 0x0C68C0, --4 bytes
Sango_Item_6 = 0x0C68C4, --4 bytes
Sango_Item_7 = 0x0C68C8, --4 bytes
Sango_Item_8 = 0x0C68CC, --4 bytes
Sango_Item_9 = 0x0C68D0, --4 bytes
Sango_Item_10 = 0x0C68D4, --4 bytes
Sango_EXP = 0x0C68E2,
Sango_HP = 0x0C68E4,
Sango_EP = 0x0C68E6,
Sango_MAX_HP = 0x0C68E8,
Sango_MAX_EP = 0x0C68EA,
Sango_LVL = 0x0C6908,
Sango_ATK = 0x0C6909,
Sango_DEF = 0x0C690A,
Sango_DEX = 0x0C690B,
Sango_AGI = 0x0C690C,
Shippo1_Item_1 = 0x0C6944, --4 bytes
Shippo1_Item_2 = 0x0C6948, --4 bytes
Shippo1_Item_3 = 0x0C694C, --4 bytes
Shippo1_Item_4 = 0x0C6950, --4 bytes
Shippo1_Item_5 = 0x0C6954, --4 bytes
Shippo1_Item_6 = 0x0C6958, --4 bytes
Shippo1_Item_7 = 0x0C695C, --4 bytes
Shippo1_Item_8 = 0x0C6960, --4 bytes
Shippo1_Item_9 = 0x0C6964, --4 bytes
Shippo1_Item_10 = 0x0C6968, --4 bytes
Shippo1_EXP = 0x0C6976,
Shippo1_HP = 0x0C6978,
Shippo1_EP = 0x0C697A,
Shippo1_MAX_HP = 0x0C697C,
Shippo1_MAX_EP = 0x0C697E,
Shippo1_LVL = 0x0C699C,
Shippo1_ATK = 0x0C699D,
Shippo1_DEF = 0x0C699E,
Shippo1_DEX = 0x0C699F,
Shippo1_AGI = 0x0C69A0,
Shippo2_Item_1 = 0x0C69D8, --4 bytes
Shippo2_Item_2 = 0x0C69DC, --4 bytes
Shippo2_Item_3 = 0x0C69E0, --4 bytes
Shippo2_Item_4 = 0x0C69E4, --4 bytes
Shippo2_Item_5 = 0x0C69E8, --4 bytes
Shippo2_Item_6 = 0x0C69EC, --4 bytes
Shippo2_Item_7 = 0x0C69F0, --4 bytes
Shippo2_Item_8 = 0x0C69F4, --4 bytes
Shippo2_Item_9 = 0x0C69F8, --4 bytes
Shippo2_Item_10 = 0x0C69FC, --4 bytes
Shippo2_EXP = 0x0C6A0A,
Shippo2_HP = 0x0C6A0C,
Shippo2_EP = 0x0C6A0E,
Shippo2_MAX_HP = 0x0C6A10,
Shippo2_MAX_EP = 0x0C6A12,
Shippo2_LVL = 0x0C6A30,
Shippo2_ATK = 0x0C6A31,
Shippo2_DEF = 0x0C6A32,
Shippo2_DEX = 0x0C6A33,
Shippo2_AGI = 0x0C6A34,
--Shikioni 1
Shikioni1_EXP = 0x0C6CEE, --2 bytes
Shikioni1_HP = 0x0C6CF0, --2 bytes
Shikioni1_EP = 0x0C6CF2, --2 bytes
Shikioni1_MAX_HP = 0x0C6CF4,--2 bytes
Shikioni1_MAX_EP = 0x0C6CF6,--2 bytes
Shikioni1_LVL = 0x0C6D14,
Shikioni1_ATK = 0x0C6D15,
Shikioni1_DEF = 0x0C6D16,
Shikioni1_DEX = 0x0C6D17,
Shikioni1_AGI = 0x0C6D18,
--0C6DC8
NPC1_EXP = 0x0C6E16, --related to how much they will give me
NPC1_HP = 0x0C6E18,
NPC1_EP = 0x0C6E1A,
NPC1_MAX_HP = 0x0C6E1C,
NPC1_MAX_EP = 0x0C6E1E,
NPC1_Sprite_ID = 0x0C6E24, --2 bytes?
NPC1_Sprite_Palette = 0x0C6E34, --2 bytes?
NPC1_LVL = 0x0C6E3C,
NPC1_ATK = 0x0C6E3D,
NPC1_DEF = 0x0C6E3E,
NPC1_DEX = 0x0C6E3F,
NPC1_AGI = 0x0C6E40,
RNG1 = 0x107B98,
RNG2 = 0x107B9C,
X = 0x2AD49C,
Y = 0x2AD4A0
}
local Battle = {
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}
}
--starts from 1, 24BF06 for menu, 0C4A64 for overworld
local Character = {
"Janis 1", --1 start
"Janis 2", --2 spell unlocked
"Janis 3", --3 spear unlocked
"Inuyasha 1", --4 Demon
"Inuyasha 2", --5 Human
"Kagome", --6
"Miroku", --7
"Sango", --8
"Shippo 1", --9 Alone, no Kirara
"Shippo 2", --10 Riding Kirara
--not sure if following are playable
"Kohaku", --11
"Koga", --12
"Tsugumi", --13
"Sesshomaru", --14
"Shiki Demon 1", --15 from start
"Shiki Demon 2", --16 from start
}
--total amount of experience at current level to reach next. So you need 17 xp total to reach level 2 from 1
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
}
--checks the mouse position during a click relative to the client and see if its within some range
function get_mouse_pos(x,y,width,height)
mx = input.getmouse().X
my = input.getmouse().Y
--input.getmouse() is already relative to client :)
gui.drawRectangle(x, y, width, height, "red", nil) --So I know where the heck are the clickboxes
--subtract 192, since top of bottom screen is y == 0 for mouse Y
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)
--http://tasvideos.org/forum/viewtopic.php?p=489512#489512
local reslow = A * (B%0x10000) -- A multiplied with lower 16 bits of B
local reshigh = A * (math.floor(B/0x10000)%0x10000) -- A multiplied with higher 16 bits of B (shifted down)
reshigh = reshigh%0x10000 -- only 16 bits can matter here if result is 32 bits
return (reshigh*0x10000 + reslow + C)%0x100000000 -- recombine and cut off to 32 bits
end
function MUL64(A,B)
--http://tasvideos.org/forum/viewtopic.php?p=489523#489523
local reslow = A * (B%0x10000) -- 0x0000LLLLLLLLLLLL
local reshigh = A * math.floor(B/0x10000) -- 0xHHHHHHHHHHHH0000
local reslow_lo = reslow%0x100000000 -- 0x00000000LLLLLLLL
local reslow_hi = math.floor(reslow/0x100000000) -- 0x0000LLLL00000000
local reshigh_lo = reshigh%0x10000 -- 0x00000000HHHH0000
local reshigh_hi = math.floor(reshigh/0x10000) -- 0xHHHHHHHH00000000
local low32 = reshigh_lo*0x10000 + reslow_lo
local high32 = reshigh_hi + reslow_hi
high32 = high32 + math.floor(low32/0x100000000) -- add what carries over
low32 = low32%0x100000000 -- 32 bit
high32 = high32%0x100000000 -- 32 bit
return low32,high32
end
function rng(r0, rng1, rng2)
--020461c4: e59f1050 ldr r1, [pc, #+0x50]
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 --107b98
r4 = lr + carry
rng2_2 = r4 --107b9c
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_EXP --0x94 long
for i = 0, 9 do
Battle.EXP[i+1] = read16(start + (i * 0x94))
Battle.HP[i+1] = read16(start + 0x2 + (i * 0x94))
Battle.EP[i+1] = read16(start + 0x4 + (i * 0x94))
Battle.Max_HP[i+1] = read16(start + 0x6 + (i * 0x94))
Battle.Max_EP[i+1] = read16(start + 0x8 + (i * 0x94))
Battle.Sprite_ID[i+1] = read8(start + 0xE + (i * 0x94))
Battle.Sprite_ID2[i+1] = read8(start + 0xF + (i * 0x94))
Battle.Sprite_Palette[i+1] = read8(start + 0x1E + (i * 0x94))
Battle.Sprite_Palette2[i+1] = read8(start + 0x1F + (i * 0x94))
Battle.LVL[i+1] = read8(start + 0x26 + (i * 0x94))
Battle.ATK[i+1] = read8(start + 0x27 + (i * 0x94))
Battle.DEF[i+1] = read8(start + 0x28 + (i * 0x94))
Battle.DEX[i+1] = read8(start + 0x29 + (i * 0x94))
Battle.AGI[i+1] = read8(start + 0x2A + (i * 0x94))
end
end
function display_battle()
local text_x = 260
local text_y = 0
for i = 1, 13 do
if Battle.Max_HP[i] > 0 then
text(text_x,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,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
local toggle = {0,0,1,1,0,1,1,1,0,1}
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) --flip them
end
end
end
local i = 1
console.clear()
update_battle()
console.log(string.format('%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d', Battle.Sprite_ID[i], Battle.Sprite_ID2[i], Battle.Sprite_Palette[i], Battle.Sprite_Palette2[i], Battle.EXP[i], Battle.Max_HP[i], Battle.Max_EP[i], Battle.LVL[i], Battle.ATK[i], Battle.DEF[i], Battle.DEX[i], Battle.AGI[i]))
local toggle = 1
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
-- text(text_x, text_y, string.format('MX: %d MY: %d', input.getmouse().X, input.getmouse().Y))
if area == 7 then
update_battle()
display_battle()
end
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