mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
779 lines
27 KiB
Plaintext
779 lines
27 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// village_elder_2.script
|
|
// Copyright 2003, Sony Online Entertainment
|
|
//
|
|
//
|
|
// DO NOT EDIT THIS AUTO-GENERATED FILE. PLEASE USE THE CONVERATION EDITOR!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/village_elder_2";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean village_elder_2_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean village_elder_2_condition_needCrystal (obj_id player, obj_id npc)
|
|
{
|
|
if (utils.playerHasItemByTemplateInBankOrInventory(player, "object/tangible/loot/quest/force_sensitive/force_crystal.iff"))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void village_elder_2_action_giveCrystal (obj_id player, obj_id npc)
|
|
{
|
|
createObjectInInventoryAllowOverload("object/tangible/loot/quest/force_sensitive/force_crystal.iff", player);
|
|
return;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "npc.conversation.village_elder_2");
|
|
|
|
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, "npc.conversation.village_elder_2");
|
|
|
|
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)
|
|
{
|
|
if (ai_lib.isInCombat (self) || ai_lib.isInCombat (player))
|
|
return SCRIPT_OVERRIDE;
|
|
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Thanks for those supplies. They really are coming in handy.
|
|
string_id message = new string_id (c_stringFile, "s_5d7558d4");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What supplies? I didn't bring you any supplies.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You bet. Anything else I can do to help?
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I seem to have misplaced my Force crystal. May I have another?
|
|
boolean hasResponse2 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_8caad960");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5e0af20b");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_9dc8bf5d");
|
|
|
|
setObjVar (player, "conversation.village_elder_2.branchId", 1);
|
|
|
|
npcStartConversation (player, self, "village_elder_2", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (self, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "village_elder_2")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
int branchId = getIntObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thanks for those supplies. They really are coming in handy.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What supplies? I didn't bring you any supplies.
|
|
if (branchId == 1 && response == "s_8caad960")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Oh, excuse me then. There's been so many coming and going lately I have lost track. We're rebuilding after a recent attack.
|
|
string_id message = new string_id (c_stringFile, "s_96bf47c1");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who would attack an agro-colony?
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++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_cc6522f9");
|
|
|
|
setObjVar (player, "conversation.village_elder_2.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Thanks for those supplies. They really are coming in handy.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thanks for those supplies. They really are coming in handy.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You bet. Anything else I can do to help?
|
|
if (branchId == 1 && response == "s_5e0af20b")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.
|
|
string_id message = new string_id (c_stringFile, "s_bd4cef4a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: We need to take the fight to them.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Those supplies are key to everything else.
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like to help rebuild the defenses.
|
|
boolean hasResponse2 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like to help gather supplies and resources.
|
|
boolean hasResponse3 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++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_4ecdf473");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1607b22e");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5bdbe99a");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c7c2a3b0");
|
|
|
|
setObjVar (player, "conversation.village_elder_2.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Thanks for those supplies. They really are coming in handy.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thanks for those supplies. They really are coming in handy.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I seem to have misplaced my Force crystal. May I have another?
|
|
if (branchId == 1 && response == "s_9dc8bf5d")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition_needCrystal (player, self))
|
|
{
|
|
village_elder_2_action_giveCrystal (player, self);
|
|
|
|
//-- NPC: Here you are. Remember you may use the crystal to view your progress.
|
|
string_id message = new string_id (c_stringFile, "s_bdd3bae5");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!village_elder_2_condition_needCrystal (player, self))
|
|
{
|
|
//-- NPC: I sense you already have a crystal and do not need another.
|
|
string_id message = new string_id (c_stringFile, "s_199fe2af");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Thanks for those supplies. They really are coming in handy.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, excuse me then. There's been so many coming and going lately I have lost track. We're rebuilding after a recent attack.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who would attack an agro-colony?
|
|
if (branchId == 2 && response == "s_cc6522f9")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: A gang called the Sith Shadows. They are still out there, planning their next attack I am sure.
|
|
string_id message = new string_id (c_stringFile, "s_c3add11e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You need to find them and stop them at their source.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Sounds like you need better defenses. I can help you rebuild them.
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++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_9940e942");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70509760");
|
|
|
|
setObjVar (player, "conversation.village_elder_2.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Oh, excuse me then. There's been so many coming and going lately I have lost track. We're rebuilding after a recent attack.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A gang called the Sith Shadows. They are still out there, planning their next attack I am sure.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You need to find them and stop them at their source.
|
|
if (branchId == 3 && response == "s_9940e942")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: That's an excellent idea. Perhaps if we attack them directly we can take some of their attention away from their attacks on our supply convoys. They have been either destroying or turning back all of the convoys that have been headed to us.
|
|
string_id message = new string_id (c_stringFile, "s_d6a8b96b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: We need to take the fight to them.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Those supplies are key to everything else.
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++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_4ecdf473");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1607b22e");
|
|
|
|
setObjVar (player, "conversation.village_elder_2.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'A gang called the Sith Shadows. They are still out there, planning their next attack I am sure.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A gang called the Sith Shadows. They are still out there, planning their next attack I am sure.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds like you need better defenses. I can help you rebuild them.
|
|
if (branchId == 3 && response == "s_70509760")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: It sure couldn't hurt. Thank you for your help. We need both craftsmen and supplies. What would you prefer to do?
|
|
string_id message = new string_id (c_stringFile, "s_1414eb3a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'd like to help rebuild the defenses.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like to help gather supplies and resources.
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
++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_5bdbe99a");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c7c2a3b0");
|
|
|
|
setObjVar (player, "conversation.village_elder_2.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'A gang called the Sith Shadows. They are still out there, planning their next attack I am sure.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's an excellent idea. Perhaps if we attack them directly we can take some of their attention away from their attacks on our supply convoys. They have been either destroying or turning back all of the convoys that have been headed to us.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: We need to take the fight to them.
|
|
if (branchId == 4 && response == "s_4ecdf473")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: That's the spirit! Show them we won't lay down for this injustice. Speak to Dageerin to the west, over by the communal buildings.
|
|
string_id message = new string_id (c_stringFile, "s_7471e00a");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'That's an excellent idea. Perhaps if we attack them directly we can take some of their attention away from their attacks on our supply convoys. They have been either destroying or turning back all of the convoys that have been headed to us.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's an excellent idea. Perhaps if we attack them directly we can take some of their attention away from their attacks on our supply convoys. They have been either destroying or turning back all of the convoys that have been headed to us.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Those supplies are key to everything else.
|
|
if (branchId == 4 && response == "s_1607b22e")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Very logical. We are in desperate need of those supplies. Whip can get you set up for that. He's by the front gate just a few meters south of here.
|
|
string_id message = new string_id (c_stringFile, "s_70a99316");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'That's an excellent idea. Perhaps if we attack them directly we can take some of their attention away from their attacks on our supply convoys. They have been either destroying or turning back all of the convoys that have been headed to us.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It sure couldn't hurt. Thank you for your help. We need both craftsmen and supplies. What would you prefer to do?
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like to help rebuild the defenses.
|
|
if (branchId == 7 && response == "s_5bdbe99a")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Great, you need to speak with Quharek. You can find him at the construction site to the north along the wall..
|
|
string_id message = new string_id (c_stringFile, "s_57c6f33");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'It sure couldn't hurt. Thank you for your help. We need both craftsmen and supplies. What would you prefer to do?' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It sure couldn't hurt. Thank you for your help. We need both craftsmen and supplies. What would you prefer to do?
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like to help gather supplies and resources.
|
|
if (branchId == 7 && response == "s_c7c2a3b0")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Thank you so much. Our supplies are running dangerously low. Our first priority was to rebuild the dwellings that got destroyed in the attack, so now we are short on both building materials and supplies. Please check with Eozlin on what you can help with. You can find him to the northwest outside his hut.
|
|
string_id message = new string_id (c_stringFile, "s_c8f614a1");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'It sure couldn't hurt. Thank you for your help. We need both craftsmen and supplies. What would you prefer to do?' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: We need to take the fight to them.
|
|
if (branchId == 10 && response == "s_4ecdf473")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Yes... yes, maybe they will be too busy defending themselves to attack us again. Please speak to Dageerin as soon as possible. He is over by the communal buildings A few meters west of here.
|
|
string_id message = new string_id (c_stringFile, "s_2f1f1ed");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Those supplies are key to everything else.
|
|
if (branchId == 10 && response == "s_1607b22e")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: You have a point. I think you should talk to Whip by the front gate south of here.
|
|
string_id message = new string_id (c_stringFile, "s_a60bdc2c");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like to help rebuild the defenses.
|
|
if (branchId == 10 && response == "s_5bdbe99a")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Good idea. We wouldn't stand up to any attack in our current shape. Talk to Quharek. He's at the construction site north of here along the wall.
|
|
string_id message = new string_id (c_stringFile, "s_a601e626");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like to help gather supplies and resources.
|
|
if (branchId == 10 && response == "s_c7c2a3b0")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_2_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: I am sure the people would be very appreciative for whatever you could find. Please speak to Eozlin to the northwest.
|
|
string_id message = new string_id (c_stringFile, "s_278134b4");
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Yes, please. That Sith Shadow gang is still trying to destroy us. We're running low on supplies because our convoys can't get through, and we're sitting ducks right now if they decide to attack.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
removeObjVar (player, "conversation.village_elder_2.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|