self.hpself.statusenemy.statusenemy.alive
INT AIunknown19(1)say(0)self.varDC = 0battle.var60 = 0battle.var62 = 0--------TURN AIif (unknown(0x0A, 02) == 4) { if (battle.var60 == 0) { unknown1B(1, 0) battle.var60 = 1 battle.var60 = 1 }}else if (self.hp < 5) { if (self.varDC == 0) { target(200) domoveid(5) target(89) domoveid(3) self.varDC = 1 } else if (rand() % 3 == 0) { target(200) domoveid(3) } else { target(201) choose(1, 0, 0) }}else { target(201) choose(2, 0, 0)}
INT AIunknown19(1)target(200)domoveid(3)TURN AIif (rand() % 3 == 0) { return}target(201)choose(0, 0, 1)
if (self.varDE != 0) { return}if (self.varDD == 0) { self.varDD = 1 target(200) domoveid( 8 ) return}self.varDC += 1if (rand() % 3 == 0) { return}else if (self.varDC == 1) { if (gfStolen != 204) { if (rand() % 3 != 0) { target(200) choose(1, 2, 253) } else { return } } else { target(204) <----------------- i changed from 201 to 204 (hit all pary) domoveid(4) }}else if (self.varDC == 2) { if (gfStolen != 204) { target(204) domoveid(10) } else { target(201) domoveid(4) }}else if (self.varDC == 3) { if (gfStolen != 204) { target(201) choose(5, 6, 253) } else { target(201) domoveid(4) }}else { self.varDC = 0 target(201) domoveid(0)}
if (self.varDE != 0) { return}self.varDD += 1if (self.varDD == 4) { if (self.varDF == 0) { self.varDF = 1 target(201) domoveid(6) return }}if (gfstolen != 204) { if (self.hp < 5) { if (rand() % 4 == 0) { if (enemy.status == BLIND) { targetadv(0, 201, 0, 3) domoveid(5) } else { target(201) domoveid(6) } } else { target(201) choose(0, 0, 2) } } else { target(201) domoveid(0) }}else if (self.varDC == 0) { self.varDC = 1 target(204) domoveid(4)}else if (enemy.status != 9) { if (rand() % 3 == 0) { target(204) domoveid(4) } else { target(204) domoveid(3) }}else { target(204) domoveid(3)}
Well I think I may have found the root of the problem, it looks like if any if statement is > 255 bytes, the offset doesn't get patched correctly.I'll see if I can find the old code somewhere to patch since the version I'm working on is a bit of a mess atm.Edit: I've patched the issue and updated the link hereI'm not sure if it will fix the issue that is causing the problem but it does fix a very major issue - it completely screws the logic up but it doesn't show in the code because the decompiler ignores the offset.To fix any file, you should be able to adjust the textbox to get the compile button and a compile + save should fix it.