void handleChips(int itemId) {
offense = defense = speed = brains = hp = mp = lifetime = 0
/*
* 0x800C454C
* 0x800C457C
* 0x800C458C
* 0x800C459C
* 0x800C45AC
* 0x800C45BC
* 0x800C45CC
* 0x800C45DC
* 0x800C4600
* 0x800C4624
* 0x800C4648
*/
switch(itemId - 0x16) {
case 0: // autopilot
if(load(0x134FF4) == 1) { // is not interacting/loading something?
0x000C55FC()
callScriptSection(0, 0x4DD, 0)
}
break
case 1:
offense = 50
break
case 2:
defense = 50
break
case 3:
brain = 50
break
case 4:
speed = 50
break
case 5:
hp = 500
break
case 6:
mp = 500
break
case 7:
offense = 100
brain = 100
lifetime = -24
break
case 8:
defense = 100
speed = 100
lifetime = -24
break
case 9:
hp = 1000
mp = 1000
lifetime = -24
break
case 10: // porta potty
handlePortaPotty()
return
}
healValue(0x1557F0, hp, 9999)
healValue(0x1557F2, mp, 9999)
healValue(0x1557E0, offense, 999)
healValue(0x1557E2, defense, 999)
healValue(0x1557E4, speed, 999)
healValue(0x1557E6, brain, 999)
modifyLifetime(lifetime)
if(itemId > 0x1D && itemId < 0x20) // check is DV Chip
addTamerLevel(10, -1)
}
0x000c44c0 addiu r29,r29,0xffc8
0x000c44c4 sw r31,0x0030(r29)
0x000c44c8 sw r23,0x002c(r29)
0x000c44cc sw r22,0x0028(r29)
0x000c44d0 sw r21,0x0024(r29)
0x000c44d4 sw r20,0x0020(r29)
0x000c44d8 sw r19,0x001c(r29)
0x000c44dc sw r18,0x0018(r29)
0x000c44e0 sw r17,0x0014(r29)
0x000c44e4 addu r23,r4,r0
0x000c44e8 sw r16,0x0010(r29)
0x000c44ec sll r19,r0,0x10
0x000c44f0 sll r17,r0,0x10
0x000c44f4 sll r22,r0,0x10
0x000c44f8 sll r21,r0,0x10
0x000c44fc sll r20,r0,0x10
0x000c4500 sll r18,r0,0x10
0x000c4504 addi r2,r23,-0x0016
0x000c4508 addu r16,r0,r0
0x000c450c sra r19,r19,0x10
0x000c4510 sra r17,r17,0x10
0x000c4514 sra r22,r22,0x10
0x000c4518 sra r21,r21,0x10
0x000c451c sra r20,r20,0x10
0x000c4520 sltiu r1,r2,0x000b
0x000c4524 beq r1,r0,0x000c4658
0x000c4528 sra r18,r18,0x10
0x000c452c lui r3,0x8011
0x000c4530 addiu r3,r3,0x4a3c
0x000c4534 sll r2,r2,0x02
0x000c4538 addu r2,r2,r3
0x000c453c lw r2,0x0000(r2)
0x000c4540 nop
0x000c4544 jr r2
0x000c4548 nop
0x000c454c lw r2,-0x6b38(r28)
0x000c4550 addiu r1,r0,0x0001
0x000c4554 bne r2,r1,0x000c4658
0x000c4558 nop
0x000c455c jal 0x000c55fc
0x000c4560 nop
0x000c4564 addu r4,r0,r0
0x000c4568 addiu r5,r0,0x04dd
0x000c456c jal 0x00105b14
0x000c4570 addu r6,r0,r0
0x000c4574 beq r0,r0,0x000c4658
0x000c4578 nop
0x000c457c addiu r2,r0,0x0032
0x000c4580 sll r18,r2,0x10
0x000c4584 beq r0,r0,0x000c4658
0x000c4588 sra r18,r18,0x10
0x000c458c addiu r2,r0,0x0032
0x000c4590 sll r20,r2,0x10
0x000c4594 beq r0,r0,0x000c4658
0x000c4598 sra r20,r20,0x10
0x000c459c addiu r2,r0,0x0032
0x000c45a0 sll r22,r2,0x10
0x000c45a4 beq r0,r0,0x000c4658
0x000c45a8 sra r22,r22,0x10
0x000c45ac addiu r2,r0,0x0032
0x000c45b0 sll r21,r2,0x10
0x000c45b4 beq r0,r0,0x000c4658
0x000c45b8 sra r21,r21,0x10
0x000c45bc addiu r2,r0,0x01f4
0x000c45c0 sll r17,r2,0x10
0x000c45c4 beq r0,r0,0x000c4658
0x000c45c8 sra r17,r17,0x10
0x000c45cc addiu r2,r0,0x01f4
0x000c45d0 sll r19,r2,0x10
0x000c45d4 beq r0,r0,0x000c4658
0x000c45d8 sra r19,r19,0x10
0x000c45dc addiu r2,r0,0x0064
0x000c45e0 sll r18,r2,0x10
0x000c45e4 sll r22,r2,0x10
0x000c45e8 addiu r2,r0,0xffe8
0x000c45ec sll r16,r2,0x10
0x000c45f0 sra r18,r18,0x10
0x000c45f4 sra r22,r22,0x10
0x000c45f8 beq r0,r0,0x000c4658
0x000c45fc sra r16,r16,0x10
0x000c4600 addiu r2,r0,0x0064
0x000c4604 sll r20,r2,0x10
0x000c4608 sll r21,r2,0x10
0x000c460c addiu r2,r0,0xffe8
0x000c4610 sll r16,r2,0x10
0x000c4614 sra r20,r20,0x10
0x000c4618 sra r21,r21,0x10
0x000c461c beq r0,r0,0x000c4658
0x000c4620 sra r16,r16,0x10
0x000c4624 addiu r2,r0,0x03e8
0x000c4628 sll r17,r2,0x10
0x000c462c sll r19,r2,0x10
0x000c4630 addiu r2,r0,0xffe8
0x000c4634 sll r16,r2,0x10
0x000c4638 sra r17,r17,0x10
0x000c463c sra r19,r19,0x10
0x000c4640 beq r0,r0,0x000c4658
0x000c4644 sra r16,r16,0x10
0x000c4648 jal 0x000c574c
0x000c464c nop
0x000c4650 beq r0,r0,0x000c4700
0x000c4654 lw r31,0x0030(r29)
0x000c4658 lui r4,0x8015
0x000c465c addiu r4,r4,0x57f0
0x000c4660 addu r5,r17,r0
0x000c4664 jal 0x000c563c
0x000c4668 addiu r6,r0,0x270f
0x000c466c lui r4,0x8015
0x000c4670 addiu r4,r4,0x57f2
0x000c4674 addu r5,r19,r0
0x000c4678 jal 0x000c563c
0x000c467c addiu r6,r0,0x270f
0x000c4680 lui r4,0x8015
0x000c4684 addiu r4,r4,0x57e0
0x000c4688 addu r5,r18,r0
0x000c468c jal 0x000c563c
0x000c4690 addiu r6,r0,0x03e7
0x000c4694 lui r4,0x8015
0x000c4698 addiu r4,r4,0x57e2
0x000c469c addu r5,r20,r0
0x000c46a0 jal 0x000c563c
0x000c46a4 addiu r6,r0,0x03e7
0x000c46a8 lui r4,0x8015
0x000c46ac addiu r4,r4,0x57e4
0x000c46b0 addu r5,r21,r0
0x000c46b4 jal 0x000c563c
0x000c46b8 addiu r6,r0,0x03e7
0x000c46bc lui r4,0x8015
0x000c46c0 addiu r4,r4,0x57e6
0x000c46c4 addu r5,r22,r0
0x000c46c8 jal 0x000c563c
0x000c46cc addiu r6,r0,0x03e7
0x000c46d0 jal 0x000c57d0
0x000c46d4 addu r4,r16,r0
0x000c46d8 slti r1,r23,0x001d
0x000c46dc bne r1,r0,0x000c46fc
0x000c46e0 nop
0x000c46e4 slti r1,r23,0x0020
0x000c46e8 beq r1,r0,0x000c46fc
0x000c46ec nop
0x000c46f0 addiu r4,r0,0x000a
0x000c46f4 jal 0x000acbf4
0x000c46f8 addiu r5,r0,0xffff
0x000c46fc lw r31,0x0030(r29)
0x000c4700 lw r23,0x002c(r29)
0x000c4704 lw r22,0x0028(r29)
0x000c4708 lw r21,0x0024(r29)
0x000c470c lw r20,0x0020(r29)
0x000c4710 lw r19,0x001c(r29)
0x000c4714 lw r18,0x0018(r29)
0x000c4718 lw r17,0x0014(r29)
0x000c471c lw r16,0x0010(r29)
0x000c4720 jr r31
0x000c4724 addiu r29,r29,0x0038