52 lines
1.4 KiB
Text
52 lines
1.4 KiB
Text
function alarmhat_equip() /* entry=321 class_id=0x0561 slot=0x0A */
|
|
{
|
|
var
|
|
referent, /* [BP+00h] type=0x69 */
|
|
var, /* [BP+0Ah] type=0x69 */
|
|
item, /* [BP-02h] type=0x24 */
|
|
npc; /* [BP-04h] type=0x24 */
|
|
|
|
set_info(0x0211, *(arg_06));
|
|
process_exclude();
|
|
if (!Item.getFrame(arg_06)) {
|
|
/* loopscr value_u8=0x24 */
|
|
/* loopscr value_u8=0x3D */
|
|
/* loopscr value_u8=0x40 */
|
|
/* loopscr value_u8=0x25 */
|
|
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
|
|
while (!condition) {
|
|
if (Item.getFrame(item) == 0) {
|
|
suspend;
|
|
}
|
|
/* loopnext */
|
|
}
|
|
return;
|
|
}
|
|
else if (Item.isOnScreen(arg_06)) {
|
|
/* loopscr value_u8=0x24 */
|
|
/* loopscr value_u8=0x3D */
|
|
/* loopscr value_u8=0x3A */
|
|
/* loopscr value_u8=0x25 */
|
|
/* loop current_var=0xFC string_bytes=0x6 loop_type=0x2 */
|
|
while (!condition) {
|
|
if (!Actor.isNPC(npc)) {
|
|
if ((Item.getZ(npc) > (Item.getZ(arg_06) - 10)) && (Item.getZ(npc) >= (Item.getZ(arg_06) + 10))) {
|
|
return;
|
|
}
|
|
}
|
|
/* loopnext */
|
|
}
|
|
/* loopscr value_u8=0x24 */
|
|
/* loopscr value_u8=0x3D */
|
|
/* loopscr value_u8=0x40 */
|
|
/* loopscr value_u8=0x25 */
|
|
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
|
|
while (!condition) {
|
|
if (Item.getFrame(item) == 0) {
|
|
suspend;
|
|
}
|
|
/* loopnext */
|
|
}
|
|
}
|
|
return;
|
|
}
|