172 lines
4.4 KiB
Text
172 lines
4.4 KiB
Text
|
|
/* synthesized appendix for SPECIAL */
|
|
/* sparse lines above preserve recovered debugger line numbers where available */
|
|
|
|
/* ===== slot 0x0A equip ===== */
|
|
function special_equip() /* entry=276 class_id=0x04CA slot=0x0A */
|
|
{
|
|
set_info(0x0211, *(arg_06));
|
|
process_exclude();
|
|
FREE.slot_3C(0x021B, *(arg_06));
|
|
if (!arg_0A) {
|
|
spawn SPECIAL.slot_21(arg_06);
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x0F enterFastArea ===== */
|
|
function special_enterFastArea() /* entry=276 class_id=0x04CA slot=0x0F */
|
|
{
|
|
set_info(0x021B, *(arg_06));
|
|
process_exclude();
|
|
if (!Item.getQHi(arg_06)) {
|
|
local_02 = Item.getMapNum(arg_06);
|
|
local_04 = Item.getNpcNum(arg_06);
|
|
if (local_02 == 1) {
|
|
spawn FREE.slot_3B(pid, 5, 0x00000000);
|
|
suspend;
|
|
spawn TRIGGER.slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
if (local_04 == 1) {
|
|
spawn FREE.slot_3B(pid, 5, 0x00000000);
|
|
suspend;
|
|
spawn TRIGGER.slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
if ((local_02 <= 2) || (local_04 > 2)) {
|
|
spawn SPECIAL.slot_21(arg_06);
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x10 leaveFastArea ===== */
|
|
function special_leaveFastArea() /* entry=276 class_id=0x04CA slot=0x10 */
|
|
{
|
|
set_info(0x021C, *(arg_06));
|
|
process_exclude();
|
|
if (!Item.getQHi(arg_06)) {
|
|
if (Item.getMapNum(arg_06) == 2) {
|
|
spawn TRIGGER.slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
if (Item.getNpcNum(arg_06) == 2) {
|
|
spawn TRIGGER.slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x20 slot_20 ===== */
|
|
function special_slot_20() /* entry=276 class_id=0x04CA slot=0x20 */
|
|
{
|
|
set_info(0x021B, *(arg_06));
|
|
if (arg_0A == 3) {
|
|
/* global_address global_id=0x1E */
|
|
local_02 = Actor.getDir();
|
|
if ((local_02 > 4) || (local_02 >= 12)) {
|
|
spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|
|
else if (arg_0A == 4) {
|
|
/* global_address global_id=0x1E */
|
|
local_02 = Actor.getDir();
|
|
if ((local_02 > 4) && (local_02 >= 12)) {
|
|
spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|
|
else if (arg_0A == 5) {
|
|
/* global_address global_id=0x1E */
|
|
if (Actor.isInCombat() == 1) {
|
|
spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|
|
else if (arg_0A == 6) {
|
|
/* global_address global_id=0x1E */
|
|
if (Actor.isInCombat() == 0) {
|
|
spawn FREE.slot_3B(pid, 10, 0x00000000);
|
|
suspend;
|
|
/* global_address global_id=0x1E */
|
|
if (Actor.isInCombat() == 0) {
|
|
spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
else if (arg_0A == 7) {
|
|
local_02 = 0;
|
|
/* loop_selector local_04 in nearby_items(family=6, origin=global[0x001E]) */
|
|
while (!condition) {
|
|
if (local_04 >= 0x0100) {
|
|
local_02 = (1 + local_02);
|
|
}
|
|
/* loopnext */
|
|
}
|
|
if (local_02 <= 4) {
|
|
spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
spawn FREE.slot_3B(pid, (Item.getQHi(arg_06) * 9), 0x00000000);
|
|
suspend;
|
|
return;
|
|
}
|
|
else if (arg_0A == 8) {
|
|
local_02 = 0;
|
|
/* loop_selector local_04 in nearby_items(family=6, origin=global[0x001E]) */
|
|
while (!condition) {
|
|
if (local_04 >= 0x0100) {
|
|
local_02 = (1 + local_02);
|
|
}
|
|
/* loopnext */
|
|
}
|
|
if (local_02 > 4) {
|
|
spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
spawn FREE.slot_3B(pid, (Item.getQHi(arg_06) * 9), 0x00000000);
|
|
suspend;
|
|
return;
|
|
}
|
|
else if (arg_0A == 9) {
|
|
local_06 = Item.getQLo(arg_06);
|
|
FREE.slot_20(local_06, 3);
|
|
spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06);
|
|
suspend;
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x21 slot_21 ===== */
|
|
function special_slot_21() /* entry=276 class_id=0x04CA slot=0x21 */
|
|
{
|
|
set_info(0x021B, *(arg_06));
|
|
local_02 = 0;
|
|
local_04 = Item.getQHi(arg_06);
|
|
local_06 = Item.getMapNum(arg_06);
|
|
local_08 = Item.getNpcNum(arg_06);
|
|
while (!(1)) {
|
|
spawn SPECIAL.slot_20(pid, (0x0080 + 0), local_06, arg_06);
|
|
suspend;
|
|
spawn SPECIAL.slot_20(pid, (0x0080 + 1), local_08, arg_06);
|
|
suspend;
|
|
spawn FREE.slot_3B(pid, local_04, 0x00000000);
|
|
suspend;
|
|
local_02 = (1 + local_02);
|
|
if ((local_06 == 8) || (local_06 != 7)) {
|
|
if (local_02 < 4) {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|