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

41 lines
962 B
Plaintext

include library.utils;
trigger OnWaypointGetAttributes (obj_id waypoint, obj_id player, string[] names, string[] attribs)
{
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;
}
trigger OnWaypointDestroyed(obj_id waypoint)
{
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;
}