mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
include library.create;
|
|
include library.utils;
|
|
include library.npe;
|
|
include library.groundquests;
|
|
|
|
const string_id HYPERSPACE = new string_id("npe", "hyperspace");
|
|
|
|
trigger OnAttach()
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest(obj_id player, menu_info mi)
|
|
{
|
|
|
|
mi.addRootMenu(menu_info_types.ITEM_USE, HYPERSPACE);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuSelect(obj_id player, int item)
|
|
{
|
|
if ( item == menu_info_types.ITEM_USE )
|
|
{
|
|
//remove any objvars the player used in the hangar
|
|
|
|
if (checkGod(player))
|
|
return SCRIPT_CONTINUE;
|
|
//sendSystemMessageTestingOnly(player, "Going to space station...");
|
|
groundquests.grantQuest(player, "quest/npe_solo_profession");
|
|
|
|
messageTo(getTopMostContainer(player), "endEncounter", null, 0, false);
|
|
|
|
npe.movePlayerFromFalconToSharedStation(player);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
boolean checkGod(obj_id self)
|
|
{
|
|
if (isGod(self))
|
|
{
|
|
sendSystemMessageTestingOnly(self, "Please turn off god mode when moving between npe locations. God mode and instances do not get along");
|
|
return true;
|
|
}
|
|
return false;
|
|
} |