

 [August 11, 2018, 08:15:52 PM]

« Reply #213 on: August 11, 2018, 08:15:52 PM »
Hello there! I've been trying to develop a routine that allow you to either break or steal all equipment of the target, however I've hit a wall and do not know how to complete it. At first it was a rutine that will jump if an item wasn't present and the formula that calls the routine had multihit but the game crashed after stealing the helmet (the first item to remove in the routine). Now with this new one I attempt to break/steal on one single hit by creating a loop, although I don't know if trying to send a routine to go back to the beginning using a jump is valid. Can someone shed some light on this? This is the code so far: lui r3,0x8019 lw r3,0x2d90(r3) Current Action Data Pointer ori r2,r0,0x00fe sb r2,0x0019(r3) Store as 0x00FE lui r4,0x8019 lw r4,0x2d98(r4) Load Defender's Stats nop lbu r2,0x0006(r4) Load Defender's Gender nop andi r2,r2,0x0020 bne r2,r0,0x000002bc Branch to end if Gender is a Monster nop lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats nop lbu r3,0x001a(r2) Load Defender's Headgear ori r2,r0,0x00ff beq r3,r2,0x0000007c Branch if Headgear ID is FF (Doesn't exist?) nop ori r2,r0,0x0080 R2 = 80 lui r3,0x8019 lw r3,0x2d90(r3) Load Current Action Data Pointer nop sb r2,0x0019(r3) Store as remove helmet lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats lui r4,0x8019 lw r4,0x2d90(r4) Load Current Action Data Pointer lbu r3,0x001a(r2) Load Defender's Headgear j 0x0000025c Jump to store item nop lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats nop lbu r3,0x001b(r2) Load Defender's Armor ori r2,r0,0x00ff beq r3,r2,0x000000c8 Branch if Armor doesn't exist nop ori r2,r0,0x0040 R2=40 lui r3,0x8019 lw r3,0x2d90(r3) Load Current Action Data Pointer nop sb r2,0x0019(r3) Store as remove helmet? lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats lui r4,0x8019 lw r4,0x2d90(r4) Load Current Action Data Pointer lbu r3,0x001b(r2) Load Defender's Armor j 0x0000025c Jump to store item nop lbu r3,0x001e(r4) Load Defender's Right Hand Shield ori r2,r0,0x00ff beq r3,r2,0x00000110 Branch if Right Hand Shield doesn't exist? nop ori r2,r0,0x0008 R2 = 8 lui r3,0x8019 lw r3,0x2d90(r3) Load Current Action Data Pointer nop sb r2,0x0019(r3) Store as Remove Right Hand Shield lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats lui r4,0x8019 lw r4,0x2d90(r4) Load Current Action Data Pointer lbu r3,0x001e(r2) Load Defender's Shield j 0x0000025c Jump to store item nop lbu r2,0x0020(r4) Load Left Hand Shield nop beq r2,r3,0x00000148 Branch if Left Hand Shield doesn't exist nop ori r2,r0,0x0002 R2=2 lui r3,0x8019 lw r3,0x2d90(r3) Load Current Action Data Pointer nop sb r2,0x0019(r3) Store as remove Left Hand Shield lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats lui r4,0x8019 lw r4,0x2d90(r4) Load Current Action Data Pointer lbu r3,0x0020(r2) Load Left Hand Shield j 0x0000025c Jump to store item nop lbu r3,0x001c(r4) Load Defender's Accessory ori r2,r0,0x00ff beq r3,r2,0x00000188 Branch if Accessory doesn't exist? nop ori r2,r0,0x0020 R2=20 lui r3,0x8019 lw r3,0x2d90(r3) Load Current Action Data Pointer nop sb r2,0x0019(r3) Store as remove accessory lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats lui r4,0x8019 lw r4,0x2d90(r4) Load Current Action Data Pointer lbu r3,0x001c(r2) Load Defender's Accessory j 0x0000025c Jump to store item nop lui r6,0x8019 lw r6,0x2d98(r6) Load Defender's Stats nop lbu r3,0x001d(r6) Load Right Hand Weapon ori r7,r0,0x00ff beq r3,r7,0x000001c8 Branch if Right Hand Weapon doesn't exist nop addiu r4,r0,0xffff R4 = FFFF sll r2,r3,0x01 Right Hand Weapon * 2 addu r2,r2,r3 Right Hand Weapon * 3 sll r2,r2,0x02 Right Hand Weapon * 12 lui r1,0x8006 addu r1,r1,r2 lbu r4,0x2eba(r1) lbu r3,0x001f(r6) Load Left Hand Weapon nop beq r3,r7,0x000001e8 Branch if Left Hand Weapon doesn't exist nop sll r2,r3,0x01 Left Hand Weapon * 2 addu r2,r2,r3 Left Hand Weapon * 3 sll r2,r2,0x02 Left Hand Weapon * 12 lui r1,0x8006 addu r1,r1,r2 lbu r5,0x2eba(r1) addiu r2,r0,0xffff R2 = 0xFFFF bne r4,r2,0x000001fc nop beq r5,r4,0x0000024a nop slt r2,r4,r5 bne r2,r0,0x00000234 ori r2,r0,0x0004 R2=4 lui r3,0x8019 lw r3,0x2d90(r3) Load Current Action Data Pointer ori r2,r0,0x0010 R2=10 sb r2,0x0019(r3) Store as remove right hand weapon lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats lui r4,0x8019 lw r4,0x2d90(r4) Load Current Action Data Pointer lbu r3,0x001d(r2) Load Right Hand Weapon j 0x0000025c Jump to store item nop lui r3,0x8019 lw r3,0x2d90(r3) Load Current Action Data Pointer nop sb r2,0x0019(r3) Store as remove left hand weapon lui r2,0x8019 lw r2,0x2d98(r2) Load Defender's Stats lui r4,0x8019 lw r4,0x2d90(r4) Load Current Action Data Pointer lbu r3,0x001f(r2) Load Left Hand Weapon nop ori r2,r0,0x0073 lui r3,0x8019 lhu r3,0x38d6(r3) Load ability used nop beq r3,r2,0x0000028c Branch if not Great Heist (Thief) nop lui r3,0x8019 lw r3,0x2d90(r3) Target current action data pointer ori r2,r0,0x0010 Special flag Steal sh r2,0x0010(r3) Store as steal item j 0x00000000 nop lui r3,0x8019 lw r3,0x2d90(r3) ori r2,r0,0x0004 Special flag Break sh r2,0x0010(r3) Store as break item j 0x00000000 return to beginning nop lui r3,0x8019 lw r3,0x2d90(r3) Load Current Action Data Pointer addiu r2,r0,0xffff R2 = 0xFFFF sb r0,0x0019(r3) Store equipment as 0 ? ori r2,r0,0x0007 sb r2,0x0002(r3) jr r31 nop

Thanks in advance to anyone that can help. Regards. EDIT: Could someone remove this post. I made a new thread in Help section for this. Thanks
« Last Edit: August 12, 2018, 11:36:15 PM by Heisho »
Gnarw, hiss, grrr and some other zombie noises... 

