Files
dsrc/sku.0/sys.server/compiled/game/script/quest/som/xandank_trophy.java
T
TekaohandGitHub 5c2e112349 Java 11.0.2 migration (#32)
* Code compiles - execution NOT tested

* updating gitignore

* Removed intellij settings files

* Removed more intellij files

* Added exclusion for JDK classes.

* Fixed purchasing script for vendors that have listed coin types.

* Updated script to not kick off until the entire preload is complete.

* adds static name entry for Solo movie poster and tcg9 vendor entry

* clean up empty and orphaned object templates

* adds placeholder black market (static) spawns

* corrects entries for the video game table to correctly set it in tcg series 2 and remove series 1 console errors

* Updated gitignore and removed intellij project files

* Fixed appearance reference for thranta payroll and kashyyyk door, added skipLosCheck objvar due to cannit see issue. Requires updated src

* Fixed appearance and template for terminal (#2)

* Fixed appearance and template for terminal (#3)

* Fixed appearance and template for terminal (#4)

* Deleted another faulty/orphaned object template

* Fixed gcw ranks option on frog. Only issue is that it doesn't award the officer commands or badges.

* Fixed some unneeded java 11 changes
2019-04-18 18:31:52 -05:00

84 lines
3.3 KiB
Java
Executable File

package script.quest.som;
import script.*;
import script.library.groundquests;
public class xandank_trophy extends script.base_script
{
public xandank_trophy()
{
}
public static final String STF = "som/som_quest";
public static final string_id TRACK = new string_id(STF, "xandank_trophy_track");
public static final string_id TRACK_FOUND_ONE = new string_id(STF, "xandank_trophy_track_one");
public static final string_id TRACK_FOUND_TWO = new string_id(STF, "xandank_trophy_track_two");
public static final string_id TRACK_COMPLETE = new string_id(STF, "xandank_trophy_track_complete");
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException
{
if (groundquests.isQuestActive(player, "som_xandank_trophey"))
{
int menu = mi.addRootMenu(menu_info_types.ITEM_USE, TRACK);
menu_info_data mid = mi.getMenuItemByType(menu_info_types.ITEM_USE);
if (mid == null)
{
return SCRIPT_CONTINUE;
}
mid.setServerNotify(true);
}
return SCRIPT_CONTINUE;
}
public int OnObjectMenuSelect(obj_id self, obj_id player, int item) throws InterruptedException
{
if (item == menu_info_types.ITEM_USE)
{
if (hasObjVar(self, "xandank_trophy_one"))
{
if (groundquests.isTaskActive(player, "som_xandank_trophey", "xandank_trophy_two"))
{
doAnimationAction(player, "search");
dictionary dict = new dictionary();
dict.put("target", player);
messageTo(self, "handleFindTrackOne", dict, 5.0f, false);
return SCRIPT_CONTINUE;
}
else
{
sendSystemMessage(player, TRACK_COMPLETE);
return SCRIPT_CONTINUE;
}
}
if (hasObjVar(self, "xandank_trophy_two"))
{
if (groundquests.isTaskActive(player, "som_xandank_trophey", "xandank_trophy_four"))
{
doAnimationAction(player, "search");
dictionary dict = new dictionary();
dict.put("target", player);
messageTo(self, "handleFindTrackTwo", dict, 5.0f, false);
return SCRIPT_CONTINUE;
}
else
{
sendSystemMessage(player, TRACK_COMPLETE);
return SCRIPT_CONTINUE;
}
}
}
return SCRIPT_CONTINUE;
}
public int handleFindTrackOne(obj_id self, dictionary params) throws InterruptedException
{
obj_id player = params.getObjId("target");
sendSystemMessage(player, TRACK_FOUND_ONE);
groundquests.sendSignal(player, "xandank_trophy_signal_one");
return SCRIPT_CONTINUE;
}
public int handleFindTrackTwo(obj_id self, dictionary params) throws InterruptedException
{
obj_id player = params.getObjId("target");
sendSystemMessage(player, TRACK_FOUND_TWO);
groundquests.sendSignal(player, "xandank_trophy_signal_two");
return SCRIPT_CONTINUE;
}
}