Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/nym.script
T

2200 lines
60 KiB
Plaintext

// ======================================================================
//
// nym.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.conversation;
include library.groundquests;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/nym";
// ======================================================================
// Script Conditions
// ======================================================================
boolean nym_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean nym_condition_hasCompletedFacility (obj_id player, obj_id npc)
{
return groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_kole_to_nym")
&& !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_nym_arena");
}
// ----------------------------------------------------------------------
boolean nym_condition_hasNotCompletedArena (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "u16_nym_themepark_nym_arena");
}
// ----------------------------------------------------------------------
boolean nym_condition_hasCompletedArenaTask (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "u16_nym_themepark_nym_arena", "hasCompletedArenaForNym");
}
// ----------------------------------------------------------------------
boolean nym_condition_isReadyForQuestAfterArena (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_nym_arena");
}
// ----------------------------------------------------------------------
boolean nym_condition_hasCompletedShuttleTask (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "u16_nym_themepark_shuttle_ambush", "hasCompletedShuttleForNym");
}
// ----------------------------------------------------------------------
boolean nym_condition_isReadyForFinale (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_negotiate_peace");
}
// ----------------------------------------------------------------------
boolean nym_condition_hasFinishedTownsPeople (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "u16_nym_return_townsperson", "nymTownpersonDone");
}
// ----------------------------------------------------------------------
boolean nym_condition_isReadyPeaceMission (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "u16_nym_return_townsperson")
&& !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_negotiate_peace");
}
// ----------------------------------------------------------------------
boolean nym_condition_hasCompletedPeaceMission (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "u16_nym_themepark_negotiate_peace", "returnToNymSheeli");
}
// ----------------------------------------------------------------------
boolean nym_condition_isDoneThemePark (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_shuttle_ambush");
}
// ----------------------------------------------------------------------
boolean nym_condition_hasPeaceMission (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "u16_nym_themepark_negotiate_peace");
}
// ----------------------------------------------------------------------
boolean nym_condition_hasShuttleQuest (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "u16_nym_themepark_shuttle_ambush");
}
// ======================================================================
// Script Actions
// ======================================================================
void nym_action_grantArenaQuest (obj_id player, obj_id npc)
{
if(!groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_nym_arena"))
groundquests.grantQuest(player, "u16_nym_themepark_nym_arena");
}
// ----------------------------------------------------------------------
void nym_action_completeArenaQuest (obj_id player, obj_id npc)
{
if(groundquests.isTaskActive(player, "u16_nym_themepark_nym_arena", "hasCompletedArenaForNym"))
{
groundquests.sendSignal(player, "nymAwardedArenaCompletion");
}
if(!hasCompletedCollectionSlot(player, "bdge_nmys_arena_champion_badge"))
{
modifyCollectionSlotValue(player, "bdge_nmys_arena_champion_badge", 1);
}
if(!hasCompletedCollectionSlot(player, "icon_arena_badge_received"))
{
modifyCollectionSlotValue(player, "icon_arena_badge_received", 1);
}
}
// ----------------------------------------------------------------------
void nym_action_grantShuttleQuest (obj_id player, obj_id npc)
{
if(!groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_shuttle_ambush"))
groundquests.grantQuest(player, "u16_nym_themepark_shuttle_ambush");
}
// ----------------------------------------------------------------------
void nym_action_completeShuttleQuest (obj_id player, obj_id npc)
{
if(groundquests.isTaskActive(player, "u16_nym_themepark_shuttle_ambush", "hasCompletedShuttleForNym"))
{
groundquests.sendSignal(player, "nymAwardedShuttleCompletion");
}
if(!hasCompletedCollectionSlot(player, "bdge_nyms_emissary_badge"))
{
modifyCollectionSlotValue(player, "bdge_nyms_emissary_badge", 1);
}
if(!hasCompletedCollectionSlot(player, "icon_emissary_badge_received"))
{
modifyCollectionSlotValue(player, "icon_emissary_badge_received", 1);
}
}
// ----------------------------------------------------------------------
void nym_action_hasFoundNym (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "hasFoundNym");
}
// ----------------------------------------------------------------------
void nym_action_grantTownspersonQuest (obj_id player, obj_id npc)
{
if(!groundquests.isQuestActiveOrComplete(player, "u16_nym_meet_townspeople"))
groundquests.grantQuest(player, "u16_nym_meet_townspeople");
}
// ----------------------------------------------------------------------
void nym_action_finishTownsPeople (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "hasCompletedTownPersonQuest");
}
// ----------------------------------------------------------------------
void nym_action_givePeaceMission (obj_id player, obj_id npc)
{
if(!groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_negotiate_peace"))
groundquests.grantQuest(player, "u16_nym_themepark_negotiate_peace");
}
// ----------------------------------------------------------------------
void nym_action_finishPeaceMission (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "hasReturnedToNymSheeli");
}
// ----------------------------------------------------------------------
void nym_action_validateAllNymRewards (obj_id player, obj_id npc)
{
nym_action_completeArenaQuest(player, npc);
nym_action_completeShuttleQuest(player, npc);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int nym_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Fantastic work, %TU. You handled yourself well out there...like a true ambassador! I'm rewarding you for you help with a badge of appreciation.
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you, sir!
if (response == "s_38")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
doAnimationAction (player, "salute1");
nym_action_completeShuttleQuest (player, npc);
//-- NPC: You are now Ambassador of the Lok Revenants.
string_id message = new string_id (c_stringFile, "s_39");
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: %TU! I hope you are well rested. I need you to meet an envoy of politicians from Tatooine.
//-- [RESPONSE NOTE]
//-- PLAYER: You want me to kill them?
if (response == "s_25")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: No, I want someone that can speak Basic that I can also trust, to meet them then bring them here to the Stronghold lobby to discuss...business.
string_id message = new string_id (c_stringFile, "s_26");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Are they at the Starport?
boolean hasResponse0 = false;
if (nym_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_27");
utils.setScriptVar (player, "conversation.nym.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No, I want someone that can speak Basic that I can also trust, to meet them then bring them here to the Stronghold lobby to discuss...business.
//-- [RESPONSE NOTE]
//-- PLAYER: Are they at the Starport?
if (response == "s_27")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: No, they are orbiting in low orbit in a shuttle. You are to go to the Landing Clearance terminal in front of the Stronghold and grant them permission. The terminal will temporarily lower our defenses for the shuttle to land.
string_id message = new string_id (c_stringFile, "s_28");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I understand.
boolean hasResponse0 = false;
if (nym_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_29");
utils.setScriptVar (player, "conversation.nym.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No, they are orbiting in low orbit in a shuttle. You are to go to the Landing Clearance terminal in front of the Stronghold and grant them permission. The terminal will temporarily lower our defenses for the shuttle to land.
//-- [RESPONSE NOTE]
//-- PLAYER: I understand.
if (response == "s_29")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
nym_action_grantShuttleQuest (player, npc);
//-- NPC: Good! And, %TU, do try to be courteous to the guests.
string_id message = new string_id (c_stringFile, "s_30");
utils.removeScriptVar (player, "conversation.nym.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Great work rescuing Choster's sister, Sheeli.
//-- [RESPONSE NOTE]
//-- PLAYER: I failed to broker peace, sir.
if (response == "s_87")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: Yeah, well. We can't have everything. Maybe we can try again when things blow over. Although, after the punishment you have provided, I'm not too sure that will forgotten soon.
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Anything else?
boolean hasResponse0 = false;
if (nym_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_101");
utils.setScriptVar (player, "conversation.nym.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yeah, well. We can't have everything. Maybe we can try again when things blow over. Although, after the punishment you have provided, I'm not too sure that will forgotten soon.
//-- [RESPONSE NOTE]
//-- PLAYER: Anything else?
if (response == "s_101")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
nym_action_finishPeaceMission (player, npc);
//-- NPC: Get some rest, %TU. Come back when you are ready for more work.
string_id message = new string_id (c_stringFile, "s_102");
utils.removeScriptVar (player, "conversation.nym.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: %TU! I have a new mission for you.
//-- [RESPONSE NOTE]
//-- PLAYER: Sir?
if (response == "s_89")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: I've sent a message to the Sulfur Lake Pirates requesting a cease fire pending a negotiation of peace between us and them.
string_id message = new string_id (c_stringFile, "s_90");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You're negotiating with them?
boolean hasResponse0 = false;
if (nym_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_104");
utils.setScriptVar (player, "conversation.nym.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I've sent a message to the Sulfur Lake Pirates requesting a cease fire pending a negotiation of peace between us and them.
//-- [RESPONSE NOTE]
//-- PLAYER: You're negotiating with them?
if (response == "s_104")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: Yes, I know. I know. I'm sick of losing time and money to these wanna-be pirates but at this point it might be cheaper to bribe them into staying on their little part of the planet. Having to keep those hooligans in check is a real drain on profits.
string_id message = new string_id (c_stringFile, "s_105");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Do you think they'll go for it?
boolean hasResponse0 = false;
if (nym_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_106");
utils.setScriptVar (player, "conversation.nym.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes, I know. I know. I'm sick of losing time and money to these wanna-be pirates but at this point it might be cheaper to bribe them into staying on their little part of the planet. Having to keep those hooligans in check is a real drain on profits.
//-- [RESPONSE NOTE]
//-- PLAYER: Do you think they'll go for it?
if (response == "s_106")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: I'm sending you to find out.
string_id message = new string_id (c_stringFile, "s_107");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Me?
boolean hasResponse0 = false;
if (nym_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_108");
utils.setScriptVar (player, "conversation.nym.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I'm sending you to find out.
//-- [RESPONSE NOTE]
//-- PLAYER: Me?
if (response == "s_108")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: You are the emissary, %TU. Did you think you were going to be rubbing elbows with nobles and partying with the elite?
string_id message = new string_id (c_stringFile, "s_109");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Well, I've remained optimistic until now.
boolean hasResponse0 = false;
if (nym_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_110");
utils.setScriptVar (player, "conversation.nym.branchId", 17);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You are the emissary, %TU. Did you think you were going to be rubbing elbows with nobles and partying with the elite?
//-- [RESPONSE NOTE]
//-- PLAYER: Well, I've remained optimistic until now.
if (response == "s_110")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: We've established a neutral meeting location. Go there, find out their terms and contact me. You can defend yourself, but don't pick any fights. They know who you are, so don't expect it to be cordial.
string_id message = new string_id (c_stringFile, "s_111");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will.
boolean hasResponse0 = false;
if (nym_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_112");
utils.setScriptVar (player, "conversation.nym.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We've established a neutral meeting location. Go there, find out their terms and contact me. You can defend yourself, but don't pick any fights. They know who you are, so don't expect it to be cordial.
//-- [RESPONSE NOTE]
//-- PLAYER: I will.
if (response == "s_112")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
nym_action_givePeaceMission (player, npc);
//-- NPC: Dismissed pirate!
string_id message = new string_id (c_stringFile, "s_113");
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You were gone a while, %TU. I thought maybe the townspeople might have chased you out of town.
//-- [RESPONSE NOTE]
//-- PLAYER: They just needed a drink and a bath.
if (response == "s_83")
{
doAnimationAction (player, "hold_nose");
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
nym_action_finishTownsPeople (player, npc);
//-- NPC: I can imagine! Good job providing both!
string_id message = new string_id (c_stringFile, "s_84");
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Is the Arena Champion ready for some more work or early retirement?
//-- [RESPONSE NOTE]
//-- PLAYER: Retirement?
if (response == "s_50")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: What? Lok Revenants don't retire! Besides, I have something important that needs doing and you are just the hero for the job.
string_id message = new string_id (c_stringFile, "s_52");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Bash skulls?
boolean hasResponse0 = false;
if (nym_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_54");
utils.setScriptVar (player, "conversation.nym.branchId", 23);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: More skulls to bash, please.
if (response == "s_56")
{
doAnimationAction (player, "flex_biceps");
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: No. Although that is tempting. I actually need some help addressing grievances from the common folk in the Stronghold Proper. The commoners just won't leave me alone. I need an ambassador of sorts.
string_id message = new string_id (c_stringFile, "s_58");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Me? An ambassador to Nym?
boolean hasResponse0 = false;
if (nym_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_60");
utils.setScriptVar (player, "conversation.nym.branchId", 24);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What? Lok Revenants don't retire! Besides, I have something important that needs doing and you are just the hero for the job.
//-- [RESPONSE NOTE]
//-- PLAYER: Bash skulls?
if (response == "s_54")
{
doAnimationAction (player, "fakepunch");
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: No. Although that is tempting. I actually need some help addressing grievances from the common folk in the Stronghold Proper. The commoners just won't leave me alone. I need an ambassador of sorts.
string_id message = new string_id (c_stringFile, "s_58");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Me? An ambassador to Nym?
boolean hasResponse0 = false;
if (nym_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_60");
utils.setScriptVar (player, "conversation.nym.branchId", 24);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch24 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No. Although that is tempting. I actually need some help addressing grievances from the common folk in the Stronghold Proper. The commoners just won't leave me alone. I need an ambassador of sorts.
//-- [RESPONSE NOTE]
//-- PLAYER: Me? An ambassador to Nym?
if (response == "s_60")
{
doAnimationAction (player, "point_to_self");
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
doAnimationAction (player, "nod");
//-- NPC: No better person than the Champion of the Arena.
string_id message = new string_id (c_stringFile, "s_65");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do I need to do?
boolean hasResponse0 = false;
if (nym_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_66");
utils.setScriptVar (player, "conversation.nym.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No better person than the Champion of the Arena.
//-- [RESPONSE NOTE]
//-- PLAYER: What do I need to do?
if (response == "s_66")
{
doAnimationAction (player, "shrug_hands");
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
doAnimationAction (player, "nod");
//-- NPC: There seems to be a mob gathering outside. My guards are keeping things from getting out of control but it still annoys me.
string_id message = new string_id (c_stringFile, "s_67");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do you want me to do about it?
boolean hasResponse0 = false;
if (nym_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_68");
utils.setScriptVar (player, "conversation.nym.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: There seems to be a mob gathering outside. My guards are keeping things from getting out of control but it still annoys me.
//-- [RESPONSE NOTE]
//-- PLAYER: What do you want me to do about it?
if (response == "s_68")
{
doAnimationAction (player, "point_to_self");
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
nym_action_grantTownspersonQuest (player, npc);
//-- NPC: I've marked the location in your datapad to the most annoying townie. I believe he speaks for the others. They say that they are disgruntled so go find out what it would take to make them... I don't know... gruntled, I guess. Whatever it is, make it happen..
string_id message = new string_id (c_stringFile, "s_70");
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch30 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So you are %TU? The way everyone has spoken about you, I'd expected something more.
//-- [RESPONSE NOTE]
//-- PLAYER: You wanted to see me?
if (response == "s_78")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: Who do you think you are? You'll address me properly as your superior!
string_id message = new string_id (c_stringFile, "s_80");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You wanted to see me, sir?
boolean hasResponse0 = false;
if (nym_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_91");
utils.setScriptVar (player, "conversation.nym.branchId", 31);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: You wanted to see me, sir?
if (response == "s_93")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: Yes! I wanted to see the newest face. You want to be a Lok Revenant or is this all a big waste of my time?
string_id message = new string_id (c_stringFile, "s_95");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I very much want to be a Lok Revenant, sir!
boolean hasResponse0 = false;
if (nym_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: That depends on what the pay is like, sir!
boolean hasResponse1 = false;
if (nym_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_122");
utils.setScriptVar (player, "conversation.nym.branchId", 32);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch31 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Who do you think you are? You'll address me properly as your superior!
//-- [RESPONSE NOTE]
//-- PLAYER: You wanted to see me, sir?
if (response == "s_91")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: Yes! I wanted to see the newest face. You want to be a Lok Revenant or is this all a big waste of my time?
string_id message = new string_id (c_stringFile, "s_95");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I very much want to be a Lok Revenant, sir!
boolean hasResponse0 = false;
if (nym_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: That depends on what the pay is like, sir!
boolean hasResponse1 = false;
if (nym_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_122");
utils.setScriptVar (player, "conversation.nym.branchId", 32);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch32 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes! I wanted to see the newest face. You want to be a Lok Revenant or is this all a big waste of my time?
//-- [RESPONSE NOTE]
//-- PLAYER: I very much want to be a Lok Revenant, sir!
if (response == "s_97")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: We'll see. I have a unique opportunity for you. I've recently built a Stronghold Arena on the roof of this building. I think you're just the type of no name, fringe survivor that can handle yourself in a fight. Interested?
string_id message = new string_id (c_stringFile, "s_99");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Fight in the arena?
boolean hasResponse0 = false;
if (nym_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_114");
utils.setScriptVar (player, "conversation.nym.branchId", 33);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: That depends on what the pay is like, sir!
if (response == "s_122")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: The pay? You are indeed my type of pirate-spacer-garbage. The pay is okay. Occasionally when you don't make me mad it will be better. Still interested?
string_id message = new string_id (c_stringFile, "s_124");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I very much want to be a Lok Revenant, sir!
boolean hasResponse0 = false;
if (nym_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_126");
utils.setScriptVar (player, "conversation.nym.branchId", 36);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch33 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We'll see. I have a unique opportunity for you. I've recently built a Stronghold Arena on the roof of this building. I think you're just the type of no name, fringe survivor that can handle yourself in a fight. Interested?
//-- [RESPONSE NOTE]
//-- PLAYER: Fight in the arena?
if (response == "s_114")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: Yes. I've got a short list of opponents that have angered me. Survive the arena and you'll get to be one of us. And of course, some credits to go with your new found fame.
string_id message = new string_id (c_stringFile, "s_116");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll do it.
boolean hasResponse0 = false;
if (nym_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_118");
utils.setScriptVar (player, "conversation.nym.branchId", 34);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch34 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes. I've got a short list of opponents that have angered me. Survive the arena and you'll get to be one of us. And of course, some credits to go with your new found fame.
//-- [RESPONSE NOTE]
//-- PLAYER: I'll do it.
if (response == "s_118")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
nym_action_grantArenaQuest (player, npc);
//-- NPC: Of course you will. Take the stairs to the ladder behind me. The ladder will take you to the roof. I'll be watching. Don't make me look like a fool.
string_id message = new string_id (c_stringFile, "s_120");
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int nym_handleBranch36 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The pay? You are indeed my type of pirate-spacer-garbage. The pay is okay. Occasionally when you don't make me mad it will be better. Still interested?
//-- [RESPONSE NOTE]
//-- PLAYER: I very much want to be a Lok Revenant, sir!
if (response == "s_126")
{
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: We'll see. I have a unique opportunity for you. I've recently built a Stronghold Arena on the roof of this building. I think you're just the type of no name, fringe survivor that can handle yourself in a fight. Interested?
string_id message = new string_id (c_stringFile, "s_99");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Fight in the arena?
boolean hasResponse0 = false;
if (nym_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_114");
utils.setScriptVar (player, "conversation.nym.branchId", 33);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.nym.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isTangible (self)) || (isPlayer (self)))
detachScript(self, "conversation.nym");
setCondition (self, CONDITION_CONVERSABLE);
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.nym");
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 (nym_condition_isDoneThemePark (player, npc))
{
nym_action_validateAllNymRewards (player, npc);
//-- NPC: You are a Lok Revenant now, %TU. Feel free to make yourself at home in the Stronghold. Great work.
string_id message = new string_id (c_stringFile, "s_103");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_hasCompletedShuttleTask (player, npc))
{
//-- NPC: Fantastic work, %TU. You handled yourself well out there...like a true ambassador! I'm rewarding you for you help with a badge of appreciation.
string_id message = new string_id (c_stringFile, "s_37");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you, sir!
boolean hasResponse0 = false;
if (nym_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_38");
utils.setScriptVar (player, "conversation.nym.branchId", 2);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "nym", null, pp, responses);
}
else
{
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_hasShuttleQuest (player, npc))
{
//-- NPC: Go meet the shuttle, %TU. Escort the politicians back here.
string_id message = new string_id (c_stringFile, "s_128");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_isReadyForFinale (player, npc))
{
//-- NPC: %TU! I hope you are well rested. I need you to meet an envoy of politicians from Tatooine.
string_id message = new string_id (c_stringFile, "s_22");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You want me to kill them?
boolean hasResponse0 = false;
if (nym_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_25");
utils.setScriptVar (player, "conversation.nym.branchId", 5);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "nym", null, pp, responses);
}
else
{
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_hasCompletedPeaceMission (player, npc))
{
//-- NPC: Great work rescuing Choster's sister, Sheeli.
string_id message = new string_id (c_stringFile, "s_85");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I failed to broker peace, sir.
boolean hasResponse0 = false;
if (nym_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_87");
utils.setScriptVar (player, "conversation.nym.branchId", 9);
npcStartConversation (player, npc, "nym", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_hasPeaceMission (player, npc))
{
//-- NPC: Why are you still here, %TU? I need you to negotiate peace with the Sulfur Lake Pirates. Now get goin'!
string_id message = new string_id (c_stringFile, "s_127");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_isReadyPeaceMission (player, npc))
{
//-- NPC: %TU! I have a new mission for you.
string_id message = new string_id (c_stringFile, "s_86");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sir?
boolean hasResponse0 = false;
if (nym_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_89");
utils.setScriptVar (player, "conversation.nym.branchId", 13);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "nym", null, pp, responses);
}
else
{
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_hasFinishedTownsPeople (player, npc))
{
//-- NPC: You were gone a while, %TU. I thought maybe the townspeople might have chased you out of town.
string_id message = new string_id (c_stringFile, "s_82");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: They just needed a drink and a bath.
boolean hasResponse0 = false;
if (nym_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_83");
utils.setScriptVar (player, "conversation.nym.branchId", 20);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "nym", null, pp, responses);
}
else
{
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_isReadyForQuestAfterArena (player, npc))
{
//-- NPC: Is the Arena Champion ready for some more work or early retirement?
string_id message = new string_id (c_stringFile, "s_48");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Retirement?
boolean hasResponse0 = false;
if (nym_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: More skulls to bash, please.
boolean hasResponse1 = false;
if (nym_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_50");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
utils.setScriptVar (player, "conversation.nym.branchId", 22);
npcStartConversation (player, npc, "nym", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_hasCompletedArenaTask (player, npc))
{
nym_action_completeArenaQuest (player, npc);
//-- NPC: Great work, %TU! Here is your cut of the arena winnings. You are now a Lok Revenant. Congratulations! Now go get some rest. Come back when you're ready for more work.
string_id message = new string_id (c_stringFile, "s_72");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_hasNotCompletedArena (player, npc))
{
//-- NPC: What are you doing down here? Get up on the roof and prove you are worthy!
string_id message = new string_id (c_stringFile, "s_74");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition_hasCompletedFacility (player, npc))
{
nym_action_hasFoundNym (player, npc);
//-- NPC: So you are %TU? The way everyone has spoken about you, I'd expected something more.
string_id message = new string_id (c_stringFile, "s_76");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You wanted to see me?
boolean hasResponse0 = false;
if (nym_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: You wanted to see me, sir?
boolean hasResponse1 = false;
if (nym_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_78");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_93");
utils.setScriptVar (player, "conversation.nym.branchId", 30);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "nym", null, pp, responses);
}
else
{
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (nym_condition__defaultCondition (player, npc))
{
//-- NPC: Does it look like I speak to just any fringer? Go find someone else. I don't have the time.
string_id message = new string_id (c_stringFile, "s_130");
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 != "nym")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.nym.branchId");
if (branchId == 2 && nym_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && nym_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && nym_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && nym_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && nym_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && nym_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && nym_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && nym_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && nym_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && nym_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && nym_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && nym_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && nym_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && nym_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 23 && nym_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 24 && nym_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && nym_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && nym_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 30 && nym_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 31 && nym_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 32 && nym_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 33 && nym_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 34 && nym_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 36 && nym_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.nym.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================