mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
1915 lines
59 KiB
Plaintext
1915 lines
59 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// novicecollector.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.collection;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.sui;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/novicecollector";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean novicecollector_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasPublishGiftToken (obj_id player, obj_id npc)
|
|
{
|
|
//return groundquests.isQuestActive(player, "chapter7_publish_gift_activation");
|
|
return (hasCompletedCollectionSlotPrereq(player, "publish_chapter7_click_activation_03"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasFoundClickCollection (obj_id player, obj_id npc)
|
|
{
|
|
|
|
return groundquests.isTaskActive(player, "chapter7_beginning_click_collection", "publishClickCollectionReturnToCollectionNPC");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasCompletedClickCollection (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "chapter7_beginning_click_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasFoundInventoryCollection (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.isTaskActive(player, "chapter7_beginning_inventory_collection_01", "returnToCollectorInventoryCollectionComplete"))
|
|
{
|
|
return true;
|
|
}
|
|
else if(groundquests.isTaskActive(player, "chapter7_beginning_inventory_collection_02", "returnToCollectorInventoryCollectionComplete"))
|
|
{
|
|
return true;
|
|
}
|
|
else if(groundquests.isTaskActive(player, "chapter7_beginning_inventory_collection_03", "returnToCollectorInventoryCollectionComplete"))
|
|
{
|
|
return true;
|
|
}
|
|
else if(groundquests.isTaskActive(player, "chapter7_beginning_inventory_collection_04", "returnToCollectorInventoryCollectionComplete"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasCompletedClickInventoryCollection (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.hasCompletedQuest(player, "chapter7_beginning_click_collection") && groundquests.hasCompletedQuest(player, "chapter7_beginning_inventory_collection_01"))
|
|
{
|
|
return true;
|
|
}
|
|
else if(groundquests.hasCompletedQuest(player, "chapter7_beginning_click_collection") && groundquests.hasCompletedQuest(player, "chapter7_beginning_inventory_collection_02"))
|
|
{
|
|
return true;
|
|
}
|
|
else if(groundquests.hasCompletedQuest(player, "chapter7_beginning_click_collection") && groundquests.hasCompletedQuest(player, "chapter7_beginning_inventory_collection_03"))
|
|
{
|
|
return true;
|
|
}
|
|
else if(groundquests.hasCompletedQuest(player, "chapter7_beginning_click_collection") && groundquests.hasCompletedQuest(player, "chapter7_beginning_inventory_collection_04"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasFulfilledCounterQuota (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "chapter7_beginning_counter_collection", "publishCounterReturn");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_allCollectionsComplete (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "chapter7_beginning_counter_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_clickCollectionActive (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "chapter7_beginning_click_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_inventoryCollectionActive (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isQuestActive(player, "chapter7_beginning_inventory_collection_01") || groundquests.isQuestActive(player, "chapter7_beginning_inventory_collection_02") || groundquests.isQuestActive(player, "chapter7_beginning_inventory_collection_03") || groundquests.isQuestActive(player, "chapter7_beginning_inventory_collection_04"))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_counterCollectionActive (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isQuestActive(player, "chapter7_beginning_counter_collection"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_noMoreCollections (obj_id player, obj_id npc)
|
|
{
|
|
if(hasObjVar(npc, "collection.columnName"))
|
|
{
|
|
string columnName = getStringObjVar(npc, "collection.columnName");
|
|
return collection.npcHasMoreCollections(player, npc, columnName);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_cantGetMore (obj_id player, obj_id npc)
|
|
{
|
|
if(hasObjVar(npc, "collection.columnName"))
|
|
{
|
|
string columnName = getStringObjVar(npc, "collection.columnName");
|
|
return collection.checkMaxActive(player, npc, columnName);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_isSomehowBroken (obj_id player, obj_id npc)
|
|
{
|
|
|
|
return (groundquests.isQuestActive(player, "chapter7_beginning_click_collection") && (getCollectionSlotValue(player, "publish_chapter7_click_activation_03") == 0));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_foundUnusedComlink (obj_id player, obj_id npc)
|
|
{
|
|
return utils.playerHasItemByTemplateInBankOrInventory(player, "object/tangible/quest/quest_start/chapter7_publish_gift_collection_token.iff");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasActivatedOne (obj_id player, obj_id npc)
|
|
{
|
|
return (getCollectionSlotValue(player, "publish_chapter7_click_activation_01") == 1);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasCollectionsToRemove (obj_id player, obj_id npc)
|
|
{
|
|
if(hasObjVar(npc, "collection.columnName"))
|
|
{
|
|
string columnName = getStringObjVar(npc, "collection.columnName");
|
|
return collection.npcHasCollectionsToRemove(player, npc, columnName);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_collectorHintEndor (obj_id player, obj_id npc)
|
|
{
|
|
string planetName = getCurrentSceneName();
|
|
sendSystemMessageTestingOnly(player, planetName);
|
|
if(planetName.equals("endor"))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_hasFinishedInventoryOutOfOrder (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.hasCompletedQuest(player, "chapter7_beginning_click_collection"))
|
|
{
|
|
int questNumber = 0;
|
|
boolean hasQuest = false;
|
|
for (int i = 1; i <=4; i++)
|
|
{
|
|
if(groundquests.isQuestActive(player, "chapter7_beginning_inventory_collection_0" + i))
|
|
{
|
|
questNumber = i;
|
|
hasQuest = true;
|
|
}
|
|
}
|
|
|
|
if(hasQuest && questNumber > 0)
|
|
{
|
|
if(getCollectionSlotValue(player, "publish_datapad_component_01") == 1)
|
|
{
|
|
if(groundquests.isTaskActive(player, "chapter7_beginning_inventory_collection_0" + questNumber, "publishInventoryCollectionProcessor"))
|
|
return true;
|
|
}
|
|
if(getCollectionSlotValue(player, "publish_datapad_component_02") == 1)
|
|
{
|
|
if(groundquests.isTaskActive(player, "chapter7_beginning_inventory_collection_0" + questNumber, "publishInventoryCollectionHousing"))
|
|
return true;
|
|
}
|
|
if(getCollectionSlotValue(player, "publish_datapad_component_03") == 1)
|
|
{
|
|
if(groundquests.isTaskActive(player, "chapter7_beginning_inventory_collection_0" + questNumber, "publishInventoryCollectionStorageDrive"))
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_collectorHintTatooine (obj_id player, obj_id npc)
|
|
{
|
|
string planetName = getCurrentSceneName();
|
|
sendSystemMessageTestingOnly(player, planetName);
|
|
if(planetName.equals("tatooine"))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_collectorHintYavin4 (obj_id player, obj_id npc)
|
|
{
|
|
string planetName = getCurrentSceneName();
|
|
sendSystemMessageTestingOnly(player, planetName);
|
|
if(planetName.equals("yavin4"))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean novicecollector_condition_collectorHintAurilia (obj_id player, obj_id npc)
|
|
{
|
|
string planetName = getCurrentSceneName();
|
|
int playerLevel = getLevel(player);
|
|
sendSystemMessageTestingOnly(player, planetName);
|
|
if(planetName.equals("dathomir") || playerLevel < 70)
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void novicecollector_action_grantCollectionQuest (obj_id player, obj_id npc)
|
|
{
|
|
//finish the go to collector quest
|
|
groundquests.sendSignal(player, "publishClickCollectionActivation");
|
|
//activate the click collection here
|
|
modifyCollectionSlotValue(player, "publish_chapter7_click_activation_03", 1);
|
|
//grant the click collection
|
|
groundquests.grantQuest(player, "chapter7_beginning_click_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_completeClickCollection (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "publishClickCollectionReturnToCollectionNPC");
|
|
if(hasObjVar(player, "publish_chapter7_click_activated"))
|
|
{
|
|
//this quest auto-completes and gives reward
|
|
groundquests.grantQuest(player, "chapter7_give_comlink_reward");
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_grantInventoryQuest (obj_id player, obj_id npc)
|
|
{
|
|
modifyCollectionSlotValue(player, "publish_chapter7_activation_02", 1);
|
|
|
|
boolean giveQuest = true;
|
|
for (int i = 1; i <=4; i++)
|
|
{
|
|
if(groundquests.isQuestActiveOrComplete(player, "chapter7_beginning_inventory_collection_0" + i))
|
|
{
|
|
giveQuest = false;
|
|
}
|
|
}
|
|
if(giveQuest)
|
|
{
|
|
//activate the inventory collection in the collection table
|
|
groundquests.grantQuest(player, "chapter7_beginning_inventory_collection_0" + rand(1,4));
|
|
}
|
|
//fix for players that managed to get the inventory items collected before they got the quest
|
|
if(getCollectionSlotValue(player, "publish_datapad_component_01") == 1)
|
|
groundquests.sendSignal(player, "publishInventoryCollectionProcessor");
|
|
if(getCollectionSlotValue(player, "publish_datapad_component_02") == 1)
|
|
groundquests.sendSignal(player, "publishInventoryCollectionHousing");
|
|
if(getCollectionSlotValue(player, "publish_datapad_component_03") == 1)
|
|
groundquests.sendSignal(player, "publishInventoryCollectionStorageDrive");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_completeInventoryCollection (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "returnToCollectorInventoryCollectionComplete");
|
|
if(hasObjVar(player, "publish_chapter7_click_activated"))
|
|
{
|
|
//this quest auto-completes and gives reward
|
|
groundquests.grantQuest(player, "chapter7_give_datapad_reward");
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_grantCounterQuest (obj_id player, obj_id npc)
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_tusken_activate", 1);
|
|
groundquests.grantQuest(player, "chapter7_beginning_counter_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_completeCounterCollection (obj_id player, obj_id npc)
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_tusken_complete", 1);
|
|
groundquests.sendSignal(player, "publishCounterReturn");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_sendActivationSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "publishClickCollectionActivation");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_showCollectionSui (obj_id player, obj_id npc)
|
|
{
|
|
if(hasObjVar(npc, "collection.columnName"))
|
|
{
|
|
string columnName = getStringObjVar(npc, "collection.columnName");
|
|
collection.showNpcCollections(player, npc, columnName);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_fixPlayer (obj_id player, obj_id npc)
|
|
{
|
|
modifyCollectionSlotValue(player, "publish_chapter7_click_activation_01", 1);
|
|
modifyCollectionSlotValue(player, "publish_chapter7_click_activation_02", 1);
|
|
modifyCollectionSlotValue(player, "publish_chapter7_click_activation_03", 1);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_tutorialNoGifts (obj_id player, obj_id npc)
|
|
{
|
|
modifyCollectionSlotValue(player, "publish_chapter7_click_activation_01", 1);
|
|
modifyCollectionSlotValue(player, "publish_chapter7_click_activation_02", 1);
|
|
modifyCollectionSlotValue(player, "publish_chapter7_click_activation_03", 1);
|
|
|
|
groundquests.grantQuest(player, "chapter7_beginning_click_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_showRemovalSui (obj_id player, obj_id npc)
|
|
{
|
|
if(hasObjVar(npc, "collection.columnName"))
|
|
{
|
|
string columnName = getStringObjVar(npc, "collection.columnName");
|
|
collection.showNpcCollectionsRemoval(player, npc, columnName);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void novicecollector_action_collectionQuestSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "grantCollectionRewardSignal");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int novicecollector_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Now that you've had a full introduction to collecting, I have a few collections you might be interested in.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds great. What do you have in mind?
|
|
if (response == "s_57")
|
|
{
|
|
//-- [NOTE]
|
|
if (!novicecollector_condition_noMoreCollections (player, npc))
|
|
{
|
|
//-- NPC: I dont have any more tasks for you at the moment. However, you may want to check back periodically. I'm always thinking of new things to collect.
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_cantGetMore (player, npc))
|
|
{
|
|
//-- NPC: You have enough tasks for now. Finish the tasks I gave to you, then we can see about giving you some more.
|
|
string_id message = new string_id (c_stringFile, "s_59");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, let's see. I have various tasks to choose from. However, in order to keep things organized, I can only give you two tasks at a time.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let me see what you have available. I'll help with whatever I can.
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I have plenty to keep me busy at the moment. I'll come back when I have less to do.
|
|
boolean hasResponse1 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_61");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_63");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Is there a way to remove a collection that you gave me?
|
|
if (response == "s_95")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasCollectionsToRemove (player, npc))
|
|
{
|
|
//-- NPC: I'd rather have you complete the collection. However, I can remove the collection for you if you wish.
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: hmm...Ok, I really can't complete it right now, so let's remove it. I'm ok with losing the progress i've made so far.
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: There's no way am I losing the progress I've made for this collection! Thanks, but i think I'll finish it.
|
|
boolean hasResponse1 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_97");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_98");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You don't have any Collections active that I gave you.
|
|
string_id message = new string_id (c_stringFile, "s_101");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you know of any other collectors that need help?
|
|
if (response == "s_111")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, yes, I have a few friends that are collectors as well. They sometimes help me finish up a collection if they have extra items that will help.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Do they offer collections as well? If so, can you point me to them?
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_113");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I am just passing through.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: If you change your mind, I could always use some help. Just come back and see me when you have more time.
|
|
string_id message = new string_id (c_stringFile, "s_66");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, let's see. I have various tasks to choose from. However, in order to keep things organized, I can only give you two tasks at a time.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let me see what you have available. I'll help with whatever I can.
|
|
if (response == "s_61")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
novicecollector_action_showCollectionSui (player, npc);
|
|
|
|
//-- NPC: Here's what I have available. You can choose any two tasks from the list.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I have plenty to keep me busy at the moment. I'll come back when I have less to do.
|
|
if (response == "s_63")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Just let know know. I'll be here for a while.
|
|
string_id message = new string_id (c_stringFile, "s_64");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'd rather have you complete the collection. However, I can remove the collection for you if you wish.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: hmm...Ok, I really can't complete it right now, so let's remove it. I'm ok with losing the progress i've made so far.
|
|
if (response == "s_97")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
novicecollector_action_showRemovalSui (player, npc);
|
|
|
|
//-- NPC: Here's a list of collections you received from me. Again, if you delete the collection you will lose all progress that you have made.
|
|
string_id message = new string_id (c_stringFile, "s_99");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: There's no way am I losing the progress I've made for this collection! Thanks, but i think I'll finish it.
|
|
if (response == "s_98")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good Luck on finishing the collection.
|
|
string_id message = new string_id (c_stringFile, "s_100");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, yes, I have a few friends that are collectors as well. They sometimes help me finish up a collection if they have extra items that will help.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do they offer collections as well? If so, can you point me to them?
|
|
if (response == "s_113")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sure thing, I'm sure they'd be happy to see new faces interested in finding rare items.
|
|
string_id message = new string_id (c_stringFile, "s_114");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Direct me to the Endor Collector, please.
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition_collectorHintEndor (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like to visit your friend on Yavin4.
|
|
boolean hasResponse1 = false;
|
|
if (novicecollector_condition_collectorHintYavin4 (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Aurilia, that's on Dathomir, correct? How do I get there?
|
|
boolean hasResponse2 = false;
|
|
if (novicecollector_condition_collectorHintAurilia (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tatooine, yes! I love the dry heat!
|
|
boolean hasResponse3 = false;
|
|
if (novicecollector_condition_collectorHintTatooine (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_115");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_116");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_117");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_118");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sure thing, I'm sure they'd be happy to see new faces interested in finding rare items.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Direct me to the Endor Collector, please.
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah, one of my best friends and a great collector.
|
|
string_id message = new string_id (c_stringFile, "s_119");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like to visit your friend on Yavin4.
|
|
if (response == "s_116")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sure thing, he's located around the Mining Outpost on Yavin4.
|
|
string_id message = new string_id (c_stringFile, "s_120");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Aurilia, that's on Dathomir, correct? How do I get there?
|
|
if (response == "s_117")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It sure is. You can get there by going to the Science Outpost on Dathomir and heading SE. You'll know you've arrive when you reach a dense fog.
|
|
string_id message = new string_id (c_stringFile, "s_121");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tatooine, yes! I love the dry heat!
|
|
if (response == "s_118")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: She's located in Mos Eisley. Very talented, and a great teacher. When you see her, tell her I said 'Hello'.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well now that didn't take you long to master did it? I think you have the hang of collecting. Here is a new title to show for it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: A title? What do you mean?
|
|
if (response == "s_53")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I just gave you a 'Novice Collector' title. Welcome to the collector's community!
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ready for your last collection?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am.
|
|
if (response == "s_43")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
novicecollector_action_grantCounterQuest (player, npc);
|
|
|
|
//-- NPC: The last one is more like a quota. Each time you...uh, 'liquidate' a target, the collection is tallied. Return to me once you have filled the quota.
|
|
string_id message = new string_id (c_stringFile, "s_45");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Uhm...how can I view my current collections?
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You can find a link to your collections and badges by opening your character sheet, selecting the personal tab and pushing the 'show badges' button. You can also see the badges of others by examining them and pushing the 'show badges' button.
|
|
string_id message = new string_id (c_stringFile, "s_49");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you ready for your next collection? It won't be as easy as picking things up this time. You might get your hands dirty.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll give it a try. What do I have to do?
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
novicecollector_action_grantInventoryQuest (player, npc);
|
|
|
|
//-- NPC: There are a few groups of Scavenger Thugs in the area and I have reason to believe they have acquired specific antique datapad components I am interested in. Of course, they won't be willing to give them up without a fight. These thugs can be found at the waypoint provided as well as other areas around Mos Eisley.
|
|
string_id message = new string_id (c_stringFile, "s_73");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Uhm...how can I view my current collections?
|
|
if (response == "s_75")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You can find a link to your collections and badges by opening your character sheet, selecting the personal tab and pushing the 'show badges' button. You can also see the badges of others by examining them and pushing the 'show badges' button.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah. Hello. You look like an aspiring collector. Are you interested in helping me out?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Uh, sure. But I don't know much about collecting things.
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Don't worry, I have some really easy tasks you can complete to prove that you are ready for the more complex collections.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay. Show me the ropes.
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Isn't it stealing if you collect items that belong to someone else?
|
|
boolean hasResponse1 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_90");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_94");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 34);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Don't worry, I have some really easy tasks you can complete to prove that you are ready for the more complex collections.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay. Show me the ropes.
|
|
if (response == "s_90")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
novicecollector_action_grantCollectionQuest (player, npc);
|
|
|
|
//-- NPC: I have several antique comlink components spread throughout the immediate area. All you have to do is go to the locations I have provided and pick them up. Pretty simple. But be cautious when collecting. Anyone in the immediate area may not 'appreciate' you tampering with their things.
|
|
string_id message = new string_id (c_stringFile, "s_92");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Isn't it stealing if you collect items that belong to someone else?
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: If you attempt to collect certain items with their owners in the vicinity, expect there to be some resistance. The best way to deal with this is to dispatch the hostiles before you attempt to collect an item.
|
|
string_id message = new string_id (c_stringFile, "s_103");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah. Someone new. Are you interested in learning about collections or just here to browse?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't know much about collecting things but I am interested.
|
|
if (response == "s_124")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Don't worry, I have some really easy tasks you can complete to prove that you are ready for the more complex collections.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay. Show me the ropes.
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Isn't it stealing if you collect items that belong to someone else?
|
|
boolean hasResponse1 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_128");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_132");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 40);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int novicecollector_handleBranch40 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Don't worry, I have some really easy tasks you can complete to prove that you are ready for the more complex collections.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay. Show me the ropes.
|
|
if (response == "s_128")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
novicecollector_action_tutorialNoGifts (player, npc);
|
|
|
|
//-- NPC: I have several antique comlink components spread throughout the immediate area. All you have to do is go to the locations I have provided and pick them up. Pretty simple. But be cautious when collecting. Anyone in the immediate area may not 'appreciate' you tampering with their things.
|
|
string_id message = new string_id (c_stringFile, "s_130");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Isn't it stealing if you collect items that belong to someone else?
|
|
if (response == "s_132")
|
|
{
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: If you attempt to collect certain items with their owners in the vicinity, expect there to be some resistance. The best way to deal with this is to dispatch the hostiles before you attempt to collect an item.
|
|
string_id message = new string_id (c_stringFile, "s_134");
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
const string PID_NAME = "collection_npc";
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.novicecollector");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler handleCollectionNpc()
|
|
{
|
|
int btn = sui.getIntButtonPressed(params);
|
|
int idx = sui.getListboxSelectedRow(params);
|
|
|
|
obj_id player = sui.getPlayerId(params);
|
|
if(btn == sui.BP_CANCEL || idx < 0)
|
|
{
|
|
sui.removePid(player, PID_NAME);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if(!sui.hasPid(player, PID_NAME))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if(btn == sui.BP_OK)
|
|
{
|
|
if(hasObjVar(self, "collection.columnName"))
|
|
{
|
|
string[] availableCollections = utils.getStringArrayScriptVar(player, "collection.allCollections");
|
|
string selectedCollection = availableCollections[idx];
|
|
collection.findAndGrantSlot(player, self, selectedCollection);
|
|
sui.removePid(player, PID_NAME);
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler handleCollectionRemoval()
|
|
{
|
|
int btn = sui.getIntButtonPressed(params);
|
|
int idx = sui.getListboxSelectedRow(params);
|
|
|
|
obj_id player = sui.getPlayerId(params);
|
|
if(btn == sui.BP_CANCEL || idx < 0)
|
|
{
|
|
sui.removePid(player, PID_NAME);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if(!sui.hasPid(player, PID_NAME))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if(btn == sui.BP_OK)
|
|
{
|
|
if(hasObjVar(self, "collection.columnName"))
|
|
{
|
|
string[] availableCollections = utils.getStringArrayScriptVar(player, "collection.allCollections");
|
|
string selectedCollection = availableCollections[idx];
|
|
utils.setScriptVar(player, "collection.selectedToDelete", selectedCollection);
|
|
int pid = sui.msgbox(self, player, "@collection:confirm_delete_prompt", sui.YES_NO, "@collection:confirm_delete_title", "handlePlayerConfirmedCollectionDelete");
|
|
sui.setPid(player, pid, PID_NAME);
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler handlePlayerConfirmedCollectionDelete()
|
|
{
|
|
int btn = sui.getIntButtonPressed(params);
|
|
|
|
obj_id player = sui.getPlayerId(params);
|
|
if(btn == sui.BP_CANCEL)
|
|
{
|
|
sui.removePid(player, PID_NAME);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if(!sui.hasPid(player, PID_NAME))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if(btn == sui.BP_OK)
|
|
{
|
|
if(utils.hasScriptVar(player, "collection.selectedToDelete"))
|
|
{
|
|
string selectedCollection = utils.getStringScriptVar(player, "collection.selectedToDelete");
|
|
collection.removeCollection(player, selectedCollection);
|
|
sui.removePid(player, PID_NAME);
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.novicecollector");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Triggers
|
|
// ======================================================================
|
|
|
|
//-- This function should move to base_class.java
|
|
boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses)
|
|
{
|
|
Object[] objects = new Object[responses.length];
|
|
System.arraycopy(responses, 0, objects, 0, responses.length);
|
|
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnStartNpcConversation (obj_id player)
|
|
{
|
|
obj_id npc = self;
|
|
|
|
if (ai_lib.isInCombat (npc) || ai_lib.isInCombat (player))
|
|
return SCRIPT_OVERRIDE;
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_isSomehowBroken (player, npc))
|
|
{
|
|
novicecollector_action_fixPlayer (player, npc);
|
|
|
|
//-- NPC: Ah...somehow we got off track but now we should be okay. I provided you with some waypoints. Go to the waypoints and collect all 10 of the comlink parts. We'll talk more then.
|
|
string_id message = new string_id (c_stringFile, "s_77");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_allCollectionsComplete (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
novicecollector_action_collectionQuestSignal (player, npc);
|
|
|
|
//-- NPC: Now that you've had a full introduction to collecting, I have a few collections you might be interested in.
|
|
string_id message = new string_id (c_stringFile, "s_37");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds great. What do you have in mind?
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Is there a way to remove a collection that you gave me?
|
|
boolean hasResponse1 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Do you know of any other collectors that need help?
|
|
boolean hasResponse2 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I am just passing through.
|
|
boolean hasResponse3 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_57");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_95");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_111");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_65");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "novicecollector", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasFulfilledCounterQuota (player, npc))
|
|
{
|
|
doAnimationAction (npc, "applause_polite");
|
|
|
|
doAnimationAction (player, "bow");
|
|
|
|
novicecollector_action_completeCounterCollection (player, npc);
|
|
|
|
//-- NPC: Well now that didn't take you long to master did it? I think you have the hang of collecting. Here is a new title to show for it.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: A title? What do you mean?
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_53");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 19);
|
|
|
|
npcStartConversation (player, npc, "novicecollector", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_counterCollectionActive (player, npc))
|
|
{
|
|
//-- NPC: You need to go find the Tusken Zealots and Tusken Soldiers at the waypoint I provided. Defeating either one of them will update your quota.
|
|
string_id message = new string_id (c_stringFile, "s_51");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasCompletedClickInventoryCollection (player, npc))
|
|
{
|
|
//-- NPC: Ready for your last collection?
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am.
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Uhm...how can I view my current collections?
|
|
boolean hasResponse1 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_43");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_47");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 22);
|
|
|
|
npcStartConversation (player, npc, "novicecollector", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasFoundInventoryCollection (player, npc))
|
|
{
|
|
doAnimationAction (npc, "thumbs_up");
|
|
|
|
novicecollector_action_completeInventoryCollection (player, npc);
|
|
|
|
//-- NPC: You made it back with all the components much quicker than I thought! Looks like you have what it takes to become a great collector. Come back when you are ready for your final mission.
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasFinishedInventoryOutOfOrder (player, npc))
|
|
{
|
|
novicecollector_action_grantInventoryQuest (player, npc);
|
|
|
|
//-- NPC: Hmmm. You somehow started the datapad collection before you should have. Let me fix that.
|
|
string_id message = new string_id (c_stringFile, "s_110");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_inventoryCollectionActive (player, npc))
|
|
{
|
|
//-- NPC: There are a lot of Scavenger Thugs around Mos Eisley but the waypoint I provided you with should be a good start. Go defeat a few and see if you can collect the datapad components you need.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasCompletedClickCollection (player, npc))
|
|
{
|
|
//-- NPC: Are you ready for your next collection? It won't be as easy as picking things up this time. You might get your hands dirty.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll give it a try. What do I have to do?
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Uhm...how can I view my current collections?
|
|
boolean hasResponse1 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_75");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 28);
|
|
|
|
npcStartConversation (player, npc, "novicecollector", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasFoundClickCollection (player, npc))
|
|
{
|
|
doAnimationAction (npc, "thumb_up");
|
|
|
|
novicecollector_action_completeClickCollection (player, npc);
|
|
|
|
//-- NPC: Looks like you have all the components. Great work! Come back when you are ready for the next collection.
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_clickCollectionActive (player, npc))
|
|
{
|
|
//-- NPC: I provided you with some waypoints. Go to the waypoints and collect all 10 of the comlink parts. We'll talk more then.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasPublishGiftToken (player, npc))
|
|
{
|
|
doAnimationAction (npc, "curtsey");
|
|
|
|
//-- NPC: Ah. Hello. You look like an aspiring collector. Are you interested in helping me out?
|
|
string_id message = new string_id (c_stringFile, "s_84");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Uh, sure. But I don't know much about collecting things.
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 33);
|
|
|
|
npcStartConversation (player, npc, "novicecollector", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_hasActivatedOne (player, npc))
|
|
{
|
|
//-- NPC: You need to inspect the collection exhibit before talking to me. Follow the waypoint you have to the exhibit, inspect it and then come talk to me.
|
|
string_id message = new string_id (c_stringFile, "s_105");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition_foundUnusedComlink (player, npc))
|
|
{
|
|
//-- NPC: My records show that you have received C-3P0's comlink but haven't used it. Use C-3P0's comlink outside of town to start the collection process.
|
|
string_id message = new string_id (c_stringFile, "s_107");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Ah. Someone new. Are you interested in learning about collections or just here to browse?
|
|
string_id message = new string_id (c_stringFile, "s_109");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I don't know much about collecting things but I am interested.
|
|
boolean hasResponse0 = false;
|
|
if (novicecollector_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_124");
|
|
|
|
utils.setScriptVar (player, "conversation.novicecollector.branchId", 39);
|
|
|
|
npcStartConversation (player, npc, "novicecollector", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "novicecollector")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
if (branchId == 2 && novicecollector_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && novicecollector_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && novicecollector_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && novicecollector_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && novicecollector_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && novicecollector_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && novicecollector_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && novicecollector_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && novicecollector_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && novicecollector_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && novicecollector_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && novicecollector_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.novicecollector.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|