Auto Potion

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Auto Potion?
0017e780: 908201ba lbu r2,0x01ba(r4)
0017e784: 00000000 nop
0017e788: 30420030 andi r2,r2,0x0030
0017e78c: 14400013 bne r2,r0,0x0017e7dc            Branch if unit isn't on player's team
0017e790: 340200f0 ori r2,r0,0x00f0                Return 0xf0 (Potion)
0017e794: 3c028006 lui r2,0x8006
0017e798: 904297d0 lbu r2,-0x6830(r2)              Load Potion quantity
0017e79c: 00000000 nop
0017e7a0: 1440000e bne r2,r0,0x0017e7dc            branch if potions are available
0017e7a4: 340200f0 ori r2,r0,0x00f0                Return 0xf0 (potion)
0017e7a8: 3c028006 lui r2,0x8006
0017e7ac: 904297d1 lbu r2,-0x682f(r2)              Load Hi potion quantity
0017e7b0: 00000000 nop
0017e7b4: 10400003 beq r2,r0,0x0017e7c4            branch if hi potions quantity = 0
0017e7b8: 00000000 nop
0017e7bc: 0805f9f7 j 0x0017e7dc                    Jump to end
0017e7c0: 340200f1 ori r2,r0,0x00f1                Return 0xF1 (Hi Potion)
0017e7c4: 3c038006 lui r3,0x8006
0017e7c8: 906397d2 lbu r3,-0x682e(r3)              Load X potion quantity
0017e7cc: 00000000 nop
0017e7d0: 14600002 bne r3,r0,0x0017e7dc            branch if X potions are available
0017e7d4: 340200f2 ori r2,r0,0x00f2                Return X potion
0017e7d8: 2402ffff addiu r2,r0,0xffff              If no potions are available, return 0xffff
0017e7dc: 03e00008 jr r31
0017e7e0: 00000000 nop


Return Locations

0017e360: