mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-29 23:15:55 -04:00
52 lines
1.8 KiB
Java
Executable File
52 lines
1.8 KiB
Java
Executable File
package script.theme_park.nym;
|
|
|
|
import script.*;
|
|
import script.library.groundquests;
|
|
|
|
public class computer extends script.base_script
|
|
{
|
|
public computer()
|
|
{
|
|
}
|
|
public static final String STF_FILE = "theme_park_nym/messages";
|
|
public static final string_id RETRIEVE = new string_id("celebrity/nym", "retrieve_hard_drive");
|
|
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info item) throws InterruptedException
|
|
{
|
|
item.addRootMenu(menu_info_types.ITEM_USE, RETRIEVE);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int makeNewDrive(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
obj_id filter = createObject("", self, "");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnObjectMenuSelect(obj_id self, obj_id player, int item) throws InterruptedException
|
|
{
|
|
location here = getLocation(player);
|
|
location term = getLocation(self);
|
|
float dist = getDistance(here, term);
|
|
if (isDead(player) || isIncapacitated(player) || dist > 6.0)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (item != menu_info_types.ITEM_USE)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (!groundquests.isTaskActive(player, "u16_nym_themepark_research_facility", "getResearchData"))
|
|
{
|
|
sendSystemMessage(player, new string_id("quest/groundquests", "retrieve_item_no_interest"));
|
|
}
|
|
groundquests.sendSignal(player, "hasReceivedResearchData");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnInitialize(obj_id self) throws InterruptedException
|
|
{
|
|
if (hasScript(self, "item.container.base.base_container"))
|
|
{
|
|
detachScript(self, "item.container.base.base_container");
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|