mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-03 03:15:55 -04:00
1741 lines
48 KiB
Plaintext
1741 lines
48 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_civilian_pilot.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.30 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.space_combat;
|
|
include library.space_transition;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/ep3_civilian_pilot";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_civilian_pilot_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_civilian_pilot_condition_isTooFar (obj_id player, obj_id npc)
|
|
{
|
|
obj_id containingShip = space_transition.getContainingShip(player);
|
|
return ( getDistance( npc, containingShip ) > space_transition.STATION_COMM_MAX_DISTANCE );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_civilian_pilot_action_playCommSound (obj_id player, obj_id npc)
|
|
{
|
|
space_combat.playCombatTauntSound( player );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_civilian_pilot_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thank you for your help!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It's my pleasure.
|
|
if (response == "s_4")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I haven't seen you around here before... Are you a pilot from the Civilian Protection Guild?
|
|
string_id message = new string_id (c_stringFile, "s_9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_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_58");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who attacked you?
|
|
if (response == "s_5")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Gotal bandits! We were just cruising along, trying to make it through Kashyyyk without bothering anybody... then the Gotals attacked!
|
|
string_id message = new string_id (c_stringFile, "s_8");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I found you near their base.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: The Gotal will pay for this!
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_14");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_15");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why were you in Gotal territory?
|
|
if (response == "s_6")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We didn't go there on purpose! We were lured there... somehow...
|
|
string_id message = new string_id (c_stringFile, "s_7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you mean?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: That's hard to believe.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_10");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_11");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I haven't seen you around here before... Are you a pilot from the Civilian Protection Guild?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_58")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Really? Have you ever thought about joining them?
|
|
string_id message = new string_id (c_stringFile, "s_61");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes. I have.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No. I haven't.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_64");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_65");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Really? Have you ever thought about joining them?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes. I have.
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good. We pay dues to the CPG every cycle. In turn, they assign pilots to protect our goods on their way to market. Sometimes we get special protection on the ground, too.
|
|
string_id message = new string_id (c_stringFile, "s_66");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm pretty good in a fight.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_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_69");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No. I haven't.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's a shame. Seems you're interested in combat, though. You'll find out soon enough: protecting civilians is a great way to get into a fight! Especially around here!
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I may reconsider.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm just in this for the money.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_75");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good. We pay dues to the CPG every cycle. In turn, they assign pilots to protect our goods on their way to market. Sometimes we get special protection on the ground, too.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm pretty good in a fight.
|
|
if (response == "s_69")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: All the more reason to join CPG, my friend!
|
|
string_id message = new string_id (c_stringFile, "s_73");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's a shame. Seems you're interested in combat, though. You'll find out soon enough: protecting civilians is a great way to get into a fight! Especially around here!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I may reconsider.
|
|
if (response == "s_75")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That sounds very wise to me, friend!
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm just in this for the money.
|
|
if (response == "s_76")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well... if money is all that you love - that's probably all you'll ever receive.
|
|
string_id message = new string_id (c_stringFile, "s_77");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Gotal bandits! We were just cruising along, trying to make it through Kashyyyk without bothering anybody... then the Gotals attacked!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I found you near their base.
|
|
if (response == "s_14")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What's your point?
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Nothing. Forget it.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You're just asking for trouble.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_47");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: The Gotal will pay for this!
|
|
if (response == "s_15")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You are a true hero! What is your name?
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: [Give your name]
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I prefer to remain anonymous.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_43");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What's your point?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing. Forget it.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Are you trying to say that it was our fault? That we somehow deserve to be attacked by the Gotal just because we fly peacefully near their base by accident?!
|
|
string_id message = new string_id (c_stringFile, "s_49");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No. It's not your fault.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yes. You're to blame.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_51");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You're just asking for trouble.
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You're telling me they have a right to attack us because we stumbled onto their territory? Is this lawful territory control? Aren't they murdering pirates? What's your problem?!
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you trying to say that it was our fault? That we somehow deserve to be attacked by the Gotal just because we fly peacefully near their base by accident?!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No. It's not your fault.
|
|
if (response == "s_50")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I should say not!
|
|
string_id message = new string_id (c_stringFile, "s_53");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes. You're to blame.
|
|
if (response == "s_51")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Are you kidding me?! Look! I have at least a dozen injured civilians here. Women, men, and younglings! You're telling me it was their fault that they got attacked?
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's drop this.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not them. You.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_54");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you kidding me?! Look! I have at least a dozen injured civilians here. Women, men, and younglings! You're telling me it was their fault that they got attacked?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's drop this.
|
|
if (response == "s_54")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Gladly!
|
|
string_id message = new string_id (c_stringFile, "s_57");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not them. You.
|
|
if (response == "s_55")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fool. You don't know what you're talking about!
|
|
string_id message = new string_id (c_stringFile, "s_56");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are a true hero! What is your name?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: [Give your name]
|
|
if (response == "s_42")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you, %NU. Thank you from all of us aboard!
|
|
string_id message = new string_id (c_stringFile, "s_45");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I prefer to remain anonymous.
|
|
if (response == "s_43")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you anyway... whomever you are!
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We didn't go there on purpose! We were lured there... somehow...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you mean?
|
|
if (response == "s_10")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: When we arrived in Kashyyyk our navigation system appeared to be working properly. We set course for the Kashyyyk space station transport jump point... and ended up at the Gotal base!
|
|
string_id message = new string_id (c_stringFile, "s_13");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You're sure of the coordinates?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Your auto-pilot is broken?
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_16");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_17");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That's hard to believe.
|
|
if (response == "s_11")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh really? What would you know about transport navigation systems then? How do you know that my star system information hasn't been sliced by Gotal bandits?
|
|
string_id message = new string_id (c_stringFile, "s_12");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Relax. Let's just get you out of here.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Gotal slicers? Are you serious?
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_28");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_29");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 29);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: When we arrived in Kashyyyk our navigation system appeared to be working properly. We set course for the Kashyyyk space station transport jump point... and ended up at the Gotal base!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You're sure of the coordinates?
|
|
if (response == "s_16")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Of course, I'm sure! We've made this run hundreds of times.
|
|
string_id message = new string_id (c_stringFile, "s_18");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Your auto-pilot is broken?
|
|
if (response == "s_17")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I have to assume that... or someone has sliced the civilian waypoint data for the Kashyyyk system!
|
|
string_id message = new string_id (c_stringFile, "s_19");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Gotal slicers? That's ridiculous.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I guess it's possible.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_20");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_21");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I have to assume that... or someone has sliced the civilian waypoint data for the Kashyyyk system!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Gotal slicers? That's ridiculous.
|
|
if (response == "s_20")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I think you underestimate them! The Gotal are a cunning breed. A very successful pirate clan!
|
|
string_id message = new string_id (c_stringFile, "s_24");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: If you say so.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_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.ep3_civilian_pilot.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I guess it's possible.
|
|
if (response == "s_21")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: If so, then a lot more civilians are going to be tricked. They'll think they're heading to safe-space, but instead they'll end up at the Gotal bandits' base!
|
|
string_id message = new string_id (c_stringFile, "s_22");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll keep you safe.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_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_23");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I think you underestimate them! The Gotal are a cunning breed. A very successful pirate clan!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: If you say so.
|
|
if (response == "s_25")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That I do.
|
|
string_id message = new string_id (c_stringFile, "s_26");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: If so, then a lot more civilians are going to be tricked. They'll think they're heading to safe-space, but instead they'll end up at the Gotal bandits' base!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll keep you safe.
|
|
if (response == "s_23")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: And we appreciate it!
|
|
string_id message = new string_id (c_stringFile, "s_27");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh really? What would you know about transport navigation systems then? How do you know that my star system information hasn't been sliced by Gotal bandits?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Relax. Let's just get you out of here.
|
|
if (response == "s_28")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's the first reasonable thing you've said so far!
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Gotal slicers? Are you serious?
|
|
if (response == "s_29")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What? Why not a Gotal slicer? Do you think they're all just dumb thugs? I don't know for sure... I don't have any evidence, but I have a very strong suspicion that our navigation data has been tainted by pirates!
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Perhaps you're right.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I don't buy it.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_32");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_33");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 31);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What? Why not a Gotal slicer? Do you think they're all just dumb thugs? I don't know for sure... I don't have any evidence, but I have a very strong suspicion that our navigation data has been tainted by pirates!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Perhaps you're right.
|
|
if (response == "s_32")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Sure - but what are we going to do? The damage has already been done. Countless transports heading to Kashyyyk are going to get bad navigation data when they download... and it will lead them directly to the Gotal base!
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: There are more like me to protect them.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: They're going to have a tough time, then.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_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_36");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_37");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 32);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't buy it.
|
|
if (response == "s_33")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Suit yourself!
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_civilian_pilot_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sure - but what are we going to do? The damage has already been done. Countless transports heading to Kashyyyk are going to get bad navigation data when they download... and it will lead them directly to the Gotal base!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: There are more like me to protect them.
|
|
if (response == "s_36")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Let's hope so.
|
|
string_id message = new string_id (c_stringFile, "s_39");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: They're going to have a tough time, then.
|
|
if (response == "s_37")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You said it! Such a shame...
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_civilian_pilot");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
//setObjVar(self, "convo.appearance", "object/mobile/space_comm_ep3_droid_pilot.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
//setObjVar(self, "convo.appearance", "object/mobile/space_comm_ep3_droid_pilot.iff" );
|
|
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.ep3_civilian_pilot");
|
|
|
|
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 (ep3_civilian_pilot_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: Warning. You are out of transmission range!
|
|
string_id message = new string_id (c_stringFile, "s_185");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for your help!
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It's my pleasure.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Who attacked you?
|
|
boolean hasResponse1 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why were you in Gotal territory?
|
|
boolean hasResponse2 = false;
|
|
if (ep3_civilian_pilot_condition__defaultCondition (player, npc))
|
|
{
|
|
++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_4");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_5");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_civilian_pilot.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "ep3_civilian_pilot", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "ep3_civilian_pilot")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
if (branchId == 2 && ep3_civilian_pilot_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && ep3_civilian_pilot_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && ep3_civilian_pilot_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && ep3_civilian_pilot_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && ep3_civilian_pilot_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && ep3_civilian_pilot_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && ep3_civilian_pilot_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && ep3_civilian_pilot_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && ep3_civilian_pilot_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && ep3_civilian_pilot_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && ep3_civilian_pilot_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && ep3_civilian_pilot_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && ep3_civilian_pilot_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && ep3_civilian_pilot_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && ep3_civilian_pilot_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && ep3_civilian_pilot_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && ep3_civilian_pilot_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && ep3_civilian_pilot_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.ep3_civilian_pilot.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|