Files
dsrc/sku.0/sys.server/compiled/game/script/npe/elevator_down.script
T

39 lines
948 B
Plaintext

include library.locations;
include library.groundquests;
const string STF_FILE = "elevator_text";
trigger OnObjectMenuRequest(obj_id player, menu_info mi)
{
int mnu2 = mi.addRootMenu (menu_info_types.ITEM_USE, new string_id(STF_FILE,"down"));
return SCRIPT_CONTINUE;
}
trigger OnObjectMenuSelect(obj_id player, int item)
{
location here = getLocation (player);
location term = getLocation (self);
float range = getDistance(here, term);
if (range > 3.0)
{
sendSystemMessage (player, new string_id(STF_FILE,"too_far"));
return SCRIPT_OVERRIDE;
}
if (item == menu_info_types.ITEM_USE)
{
playClientEffectObj(player, "clienteffect/elevator_descend.cef", player, null);
groundquests.sendSignal(player, "npe_elevator_main_down");
if (elevatorMove (player, -1) == 0)
{
sendSystemMessage (player, new string_id(STF_FILE,"lowest_floor"));
return SCRIPT_OVERRIDE;
}
return SCRIPT_CONTINUE;
}
return SCRIPT_CONTINUE;
}