mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-03 03:15:55 -04:00
887 lines
28 KiB
Plaintext
887 lines
28 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// village_elder_1.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_1";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean village_elder_1_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean village_elder_1_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_1_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_1");
|
|
|
|
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_1");
|
|
|
|
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_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Did you see them?
|
|
string_id message = new string_id (c_stringFile, "s_55273aaf");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Did I see whom?
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I seem to have misplaced my Force crystal. May I have another?
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_1_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_b6101821");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_9dc8bf5d");
|
|
|
|
setObjVar (player, "conversation.village_elder_1.branchId", 1);
|
|
|
|
npcStartConversation (player, self, "village_elder_1", 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_1")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
int branchId = getIntObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Did you see them?
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Did I see whom?
|
|
if (branchId == 1 && response == "s_b6101821")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Those Sith animals! They destroyed our village! They came out of nowhere... overwhelmed our defenses. We thought we were protected... but, we stood no chance.
|
|
string_id message = new string_id (c_stringFile, "s_72752682");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: The Sith have been extinct for ages. Their fire has gone out of the galaxy.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What kind of defenses are you talking about? This looks like a lost agro-colony.
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_1_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_5357267d");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_e477ab86");
|
|
|
|
setObjVar (player, "conversation.village_elder_1.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Did you see them?' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Did you see them?
|
|
//-- [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_1_condition_needCrystal (player, self))
|
|
{
|
|
village_elder_1_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_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!village_elder_1_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_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Did you see them?' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Those Sith animals! They destroyed our village! They came out of nowhere... overwhelmed our defenses. We thought we were protected... but, we stood no chance.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: The Sith have been extinct for ages. Their fire has gone out of the galaxy.
|
|
if (branchId == 2 && response == "s_5357267d")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
doAnimationAction (self, "explain");
|
|
|
|
//-- NPC: They aren't real Sith. They just have some strange devotion to that evil race.
|
|
string_id message = new string_id (c_stringFile, "s_455d6edc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ah, I see. real or not, from the looks of things they certainly were out for blood.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_1_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_f0e7a84");
|
|
|
|
setObjVar (player, "conversation.village_elder_1.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Those Sith animals! They destroyed our village! They came out of nowhere... overwhelmed our defenses. We thought we were protected... but, we stood no chance.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Those Sith animals! They destroyed our village! They came out of nowhere... overwhelmed our defenses. We thought we were protected... but, we stood no chance.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What kind of defenses are you talking about? This looks like a lost agro-colony.
|
|
if (branchId == 2 && response == "s_e477ab86")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: We were actually quite well defended. But they burned right through our shield. The turrets couldn't stop them and were destroyed. Then they reached the walls near the entrances. After that, all that was left was the pillaging and looting.
|
|
string_id message = new string_id (c_stringFile, "s_9ce75ab2");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: They aren't Sith, but they are certainly ruthless and powerful.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_1_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_a43672b0");
|
|
|
|
setObjVar (player, "conversation.village_elder_1.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Those Sith animals! They destroyed our village! They came out of nowhere... overwhelmed our defenses. We thought we were protected... but, we stood no chance.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They aren't real Sith. They just have some strange devotion to that evil race.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ah, I see. real or not, from the looks of things they certainly were out for blood.
|
|
if (branchId == 3 && response == "s_f0e7a84")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.
|
|
string_id message = new string_id (c_stringFile, "s_f8ff425b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm not too bad with a hydrospanner and power mallet.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I can help treat the wounded.
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I can help defend if they come back.
|
|
boolean hasResponse2 = false;
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am a good scout, maybe I can locate these gangers for you.
|
|
boolean hasResponse3 = false;
|
|
if (village_elder_1_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_83ac5888");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2eaf06cc");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_854985e0");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_858f16f4");
|
|
|
|
setObjVar (player, "conversation.village_elder_1.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'They aren't real Sith. They just have some strange devotion to that evil race. ' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not too bad with a hydrospanner and power mallet.
|
|
if (branchId == 4 && response == "s_83ac5888")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Our sensor array was damaged in the attack and our chief engineer was killed. Maybe you could see if you could fix it. It's East of here, against the wall.
|
|
string_id message = new string_id (c_stringFile, "s_ab969608");
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can help treat the wounded.
|
|
if (branchId == 4 && response == "s_2eaf06cc")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Thank you, that would be very helpful. Our medic has some droids to help her, but I am sure she would appreciate your help. Her name is Sivarra Mecheaux, and she can be found at the healers tent West from here along the wall.
|
|
string_id message = new string_id (c_stringFile, "s_7587a16a");
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can help defend if they come back.
|
|
if (branchId == 4 && response == "s_854985e0")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Many of our best defenders fell in the battle. We could certainly use the help. Check with Captain Sarguillo right over there.
|
|
string_id message = new string_id (c_stringFile, "s_47f6c42");
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am a good scout, maybe I can locate these gangers for you.
|
|
if (branchId == 4 && response == "s_858f16f4")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: What we really need is someone to find our captured villagers.
|
|
string_id message = new string_id (c_stringFile, "s_959b429b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will find the captives for you.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_1_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_3c6f20b4");
|
|
|
|
setObjVar (player, "conversation.village_elder_1.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'They sure got it. We're devastated. Most everything is in ruins, and many of our people are hurt.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What we really need is someone to find our captured villagers.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will find the captives for you.
|
|
if (branchId == 8 && response == "s_3c6f20b4")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Thank you. There has been enough loss of life already without their blood being spilled as well. Speak to Whip just South of here near the front entrance.
|
|
string_id message = new string_id (c_stringFile, "s_43fe619a");
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'What we really need is someone to find our captured villagers. ' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We were actually quite well defended. But they burned right through our shield. The turrets couldn't stop them and were destroyed. Then they reached the walls near the entrances. After that, all that was left was the pillaging and looting.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: They aren't Sith, but they are certainly ruthless and powerful.
|
|
if (branchId == 10 && response == "s_a43672b0")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: That they are and the ruins you see here bear witness to that statement.
|
|
string_id message = new string_id (c_stringFile, "s_f0d5416");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm not too bad with a hydrospanner and power mallet.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I can help treat the wounded.
|
|
boolean hasResponse1 = false;
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I can help defend if they come back..
|
|
boolean hasResponse2 = false;
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am a good scout, maybe I can locate these gangers for you.
|
|
boolean hasResponse3 = false;
|
|
if (village_elder_1_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_83ac5888");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_2eaf06cc");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_22163d24");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_858f16f4");
|
|
|
|
setObjVar (player, "conversation.village_elder_1.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'We were actually quite well defended. But they burned right through our shield. The turrets couldn't stop them and were destroyed. Then they reached the walls near the entrances. After that, all that was left was the pillaging and looting.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That they are and the ruins you see here bear witness to that statement.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not too bad with a hydrospanner and power mallet.
|
|
if (branchId == 11 && response == "s_83ac5888")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Yes we do. Our sensor array was damaged in the attack and our chief engineer was killed. Maybe you could see if you could fix it. It's East of here, against the wall.
|
|
string_id message = new string_id (c_stringFile, "s_ded598ce");
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'That they are and the ruins you see here bear witness to that statement.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That they are and the ruins you see here bear witness to that statement.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can help treat the wounded.
|
|
if (branchId == 11 && response == "s_2eaf06cc")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Thank you, that would be very helpful. Our medic has some droids to help her, but I am sure she would appreciate your help. Her name is Sivarra Mecheaux, and she can be found at the healers tent West from here along the wall.
|
|
string_id message = new string_id (c_stringFile, "s_7587a16a");
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'That they are and the ruins you see here bear witness to that statement.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That they are and the ruins you see here bear witness to that statement.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can help defend if they come back..
|
|
if (branchId == 11 && response == "s_22163d24")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Many of our best defenders fell in the battle. We could certainly use the help. Check with Captain Sarguillo right over there.
|
|
string_id message = new string_id (c_stringFile, "s_47f6c42");
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'That they are and the ruins you see here bear witness to that statement.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That they are and the ruins you see here bear witness to that statement.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am a good scout, maybe I can locate these gangers for you.
|
|
if (branchId == 11 && response == "s_858f16f4")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: What we really need is someone to find our captured villagers.
|
|
string_id message = new string_id (c_stringFile, "s_959b429b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will find the captives for you.
|
|
boolean hasResponse0 = false;
|
|
if (village_elder_1_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_3c6f20b4");
|
|
|
|
setObjVar (player, "conversation.village_elder_1.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'That they are and the ruins you see here bear witness to that statement.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What we really need is someone to find our captured villagers.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will find the captives for you.
|
|
if (branchId == 15 && response == "s_3c6f20b4")
|
|
{
|
|
//-- [NOTE]
|
|
if (village_elder_1_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Thank you. There has been enough loss of life already without their blood being spilled as well. Speak to Whip just South of here near the front entrance.
|
|
string_id message = new string_id (c_stringFile, "s_43fe619a");
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'What we really need is someone to find our captured villagers. ' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
removeObjVar (player, "conversation.village_elder_1.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|