Files
dsrc/sku.0/sys.server/compiled/game/script/theme_park/utility/waypoint.java
T

49 lines
1.5 KiB
Java
Executable File

package script.theme_park.utility;
import script.dictionary;
import script.obj_id;
import script.string_id;
public class waypoint extends script.base_script
{
public waypoint()
{
}
public int OnWaypointGetAttributes(obj_id self, obj_id waypoint, obj_id player, String[] names, String[] attribs) throws InterruptedException
{
String questId = getStringObjVar(player, "questID");
String file = getStringObjVar(player, questId + ".file");
String entry = getStringObjVar(player, questId + ".entry");
string_id detail = new string_id(file, entry);
String questDetails = "@" + detail.toString();
int idx = 0;
while (idx >= 0)
{
String currentName = names[idx];
if (names[idx] == null)
{
names[idx] = "quest_details";
attribs[idx] = questDetails;
idx = -1;
}
else
{
idx = idx + 1;
}
}
return SCRIPT_CONTINUE;
}
public int OnWaypointDestroyed(obj_id self, obj_id waypoint) throws InterruptedException
{
String questID = getStringObjVar(self, "questID");
if (questID == null)
{
questID = "none";
}
dictionary questBook = new dictionary();
questBook.put("questID", questID);
messageTo(self, "removeQuestInfo", questBook, 5, true);
return SCRIPT_CONTINUE;
}
}