Crusader_Decomp/USECODE/EUSECODE_extracted/pseudocode/SCANNER/slot_01_use.txt

37 lines
978 B
Text
Raw Normal View History

2026-03-25 23:32:36 +01:00
function scanner_use() /* entry=304 class_id=0x052D slot=0x01 */
{
var
referent, /* [BP+00h] type=0x69 */
n; /* [BP-02h] type=0x24 */
2026-03-26 00:37:17 +01:00
set_info(0x0207, *(arg_06));
process_exclude();
set_info(0x00F0, 0);
/* global_address global_id=0x3C */
if (Actor.getMana() >= 0x03E8) {
spawn FREE.slot_21(pid, 0x00B0, 0x00000000);
2026-03-25 23:32:36 +01:00
suspend;
spawn FREE.waitNTimerTicks(pid, 100, 0x00000000);
2026-03-25 23:32:36 +01:00
suspend;
2026-03-26 00:37:17 +01:00
return;
}
else {
2026-03-25 23:32:36 +01:00
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* loop_selector n in nearby_items(family=6, origin=global[0x003C]) */
2026-03-26 00:37:17 +01:00
while (!condition) {
if ((Actor.isDead(n) == 0) && (n != getTargetNPCNumMaybe())) {
NPC.slot_2B(n);
2026-03-26 00:37:17 +01:00
if (!retval) {
spawn SCANNER.slot_20(n, arg_06);
2026-03-26 00:37:17 +01:00
}
}
/* loopnext */
}
spawn FREE.slot_21(pid, 0x00BA, 0x00000000);
2026-03-25 23:32:36 +01:00
suspend;
spawn FREE.waitNTimerTicks(pid, 120, 0x00000000);
2026-03-25 23:32:36 +01:00
suspend;
2026-03-26 00:37:17 +01:00
}
return;
2026-03-25 23:32:36 +01:00
}