mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-09-30 15:13:31 -04:00
who isn't sick of converting the freaking scripts? this negates the need
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package script.theme_park.utility;
|
||||
|
||||
import script.*;
|
||||
import script.base_class.*;
|
||||
import script.combat_engine.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import script.base_script;
|
||||
|
||||
import script.library.utils;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user