37 lines
932 B
Text
37 lines
932 B
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)) {
|
|
for item in nearby_items(shape=0x04D0, origin=arg_06) {
|
|
if (Item.getFrame(item) == 0) {
|
|
suspend;
|
|
}
|
|
/* loopnext */
|
|
}
|
|
return;
|
|
}
|
|
else if (Item.isOnScreen(arg_06)) {
|
|
for npc in nearby_items(family=6, origin=arg_06) {
|
|
if (!Actor.isNPC(npc)) {
|
|
if ((Item.getZ(npc) > (Item.getZ(arg_06) - 10)) && (Item.getZ(npc) >= (Item.getZ(arg_06) + 10))) {
|
|
return;
|
|
}
|
|
}
|
|
/* loopnext */
|
|
}
|
|
for item in nearby_items(shape=0x04D0, origin=arg_06) {
|
|
if (Item.getFrame(item) == 0) {
|
|
suspend;
|
|
}
|
|
/* loopnext */
|
|
}
|
|
}
|
|
return;
|
|
}
|