Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/tatooine_espa_pilot.script
T
2013-09-10 23:17:15 -07:00

1085 lines
29 KiB
Plaintext

// ======================================================================
//
// tatooine_espa_pilot.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.groundquests;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/tatooine_espa_pilot";
// ======================================================================
// Script Conditions
// ======================================================================
boolean tatooine_espa_pilot_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean tatooine_espa_pilot_condition_pilotOnTask (obj_id player, obj_id npc)
{
return (groundquests.isTaskActive(player, "quest/tatooine_espa_leg_work", "tat_espa_leg_work_e2") ||
groundquests.isTaskActive(player, "quest/tatooine_espa_leg_work_2", "tat_espa_leg_work_e2"));
}
// ----------------------------------------------------------------------
boolean tatooine_espa_pilot_condition_pilotPastTask (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "quest/tatooine_espa_leg_work") ||
groundquests.hasCompletedQuest(player, "quest/tatooine_espa_leg_work_2"));
}
// ======================================================================
// Script Actions
// ======================================================================
void tatooine_espa_pilot_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void tatooine_espa_pilot_action_signalPilotTask (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "tat_espa_leg_work_e2");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int tatooine_espa_pilot_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: It's you again.
//-- [RESPONSE NOTE]
//-- PLAYER: Yea. Why are you still here.
if (response == "s_27")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: Just thinking about those soldiers that were in this thing.
string_id message = new string_id (c_stringFile, "s_28");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You're concerned?
boolean hasResponse0 = false;
if (tatooine_espa_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_29");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 2);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Just thinking about those soldiers that were in this thing.
//-- [RESPONSE NOTE]
//-- PLAYER: You're concerned?
if (response == "s_29")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: Of course, nobody deserves to die to Tuskens.
string_id message = new string_id (c_stringFile, "s_30");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Well, that's what happened.
boolean hasResponse0 = false;
if (tatooine_espa_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_31");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Of course, nobody deserves to die to Tuskens.
//-- [RESPONSE NOTE]
//-- PLAYER: Well, that's what happened.
if (response == "s_31")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: You found them?
string_id message = new string_id (c_stringFile, "s_32");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What's left of them is down the hill in those Tusken tents.
boolean hasResponse0 = false;
if (tatooine_espa_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_33");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You found them?
//-- [RESPONSE NOTE]
//-- PLAYER: What's left of them is down the hill in those Tusken tents.
if (response == "s_33")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: They're dead?
string_id message = new string_id (c_stringFile, "s_34");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yea, all of them.
boolean hasResponse0 = false;
if (tatooine_espa_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_35");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: They're dead?
//-- [RESPONSE NOTE]
//-- PLAYER: Yea, all of them.
if (response == "s_35")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: I see.
string_id message = new string_id (c_stringFile, "s_36");
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hey, who are you? What are you doing here?
//-- [RESPONSE NOTE]
//-- PLAYER: Your friend Syndil sent me, she is worried about you.
if (response == "s_17")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: She worries too much.
string_id message = new string_id (c_stringFile, "s_19");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What are you doing here?
boolean hasResponse0 = false;
if (tatooine_espa_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_21");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: She worries too much.
//-- [RESPONSE NOTE]
//-- PLAYER: What are you doing here?
if (response == "s_21")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: I saw this scout walker get blown up. Thought I would check it for survivors.
string_id message = new string_id (c_stringFile, "s_24");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Uh... sure. Did you find any?
boolean hasResponse0 = false;
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Don't give me that, Syndil told me you blew it up in your starfighter.
boolean hasResponse1 = false;
if (tatooine_espa_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_26");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_48");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I saw this scout walker get blown up. Thought I would check it for survivors.
//-- [RESPONSE NOTE]
//-- PLAYER: Uh... sure. Did you find any?
if (response == "s_26")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: No, I didn't even find any bodies. I think the Tuskens might have them.
string_id message = new string_id (c_stringFile, "s_38");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So what are you going to do now?
boolean hasResponse0 = false;
if (tatooine_espa_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_40");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Don't give me that, Syndil told me you blew it up in your starfighter.
if (response == "s_48")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "laugh");
//-- NPC: What does she know? She's not exactly the swiftest speeder in the race, if you know what I mean.
string_id message = new string_id (c_stringFile, "s_50");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You're the one that told her, what does that make you?
boolean hasResponse0 = false;
if (tatooine_espa_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_52");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 13);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No, I didn't even find any bodies. I think the Tuskens might have them.
//-- [RESPONSE NOTE]
//-- PLAYER: So what are you going to do now?
if (response == "s_40")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: Nothing. I'm not stupid enough to attack a Tusken camp. I'm heading back.
string_id message = new string_id (c_stringFile, "s_42");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Good call. Take it easy on the way back.
boolean hasResponse0 = false;
if (tatooine_espa_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_44");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Nothing. I'm not stupid enough to attack a Tusken camp. I'm heading back.
//-- [RESPONSE NOTE]
//-- PLAYER: Good call. Take it easy on the way back.
if (response == "s_44")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
tatooine_espa_pilot_action_signalPilotTask (player, npc);
//-- NPC: Yea, you too.
string_id message = new string_id (c_stringFile, "s_46");
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What does she know? She's not exactly the swiftest speeder in the race, if you know what I mean.
//-- [RESPONSE NOTE]
//-- PLAYER: You're the one that told her, what does that make you?
if (response == "s_52")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: I didn't tell her anything. She makes stuff up. I'm certainly not going to attack a scout walker and become a fugitive.
string_id message = new string_id (c_stringFile, "s_54");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Well, you're here. The wreckage is here. Seems pretty cut and dried.
boolean hasResponse0 = false;
if (tatooine_espa_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_56");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I didn't tell her anything. She makes stuff up. I'm certainly not going to attack a scout walker and become a fugitive.
//-- [RESPONSE NOTE]
//-- PLAYER: Well, you're here. The wreckage is here. Seems pretty cut and dried.
if (response == "s_56")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: Delusions. Sun-baked delusions, pal. I'm out of here. Good luck with those Tuskens down there.
string_id message = new string_id (c_stringFile, "s_58");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What a hero.
boolean hasResponse0 = false;
if (tatooine_espa_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_60");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Delusions. Sun-baked delusions, pal. I'm out of here. Good luck with those Tuskens down there.
//-- [RESPONSE NOTE]
//-- PLAYER: What a hero.
if (response == "s_60")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
tatooine_espa_pilot_action_signalPilotTask (player, npc);
//-- NPC: Better than a corpse.
string_id message = new string_id (c_stringFile, "s_62");
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int tatooine_espa_pilot_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Just searching the wreckage for survivors.
//-- [RESPONSE NOTE]
//-- PLAYER: What happened to it?
if (response == "s_66")
{
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
//-- NPC: No clue.
string_id message = new string_id (c_stringFile, "s_68");
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.tatooine_espa_pilot");
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
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.tatooine_espa_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 (tatooine_espa_pilot_condition_pilotPastTask (player, npc))
{
tatooine_espa_pilot_action_facePlayer (player, npc);
//-- NPC: It's you again.
string_id message = new string_id (c_stringFile, "s_23");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yea. Why are you still here.
boolean hasResponse0 = false;
if (tatooine_espa_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_27");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 1);
npcStartConversation (player, npc, "tatooine_espa_pilot", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tatooine_espa_pilot_condition_pilotOnTask (player, npc))
{
tatooine_espa_pilot_action_facePlayer (player, npc);
//-- NPC: Hey, who are you? What are you doing here?
string_id message = new string_id (c_stringFile, "s_15");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Your friend Syndil sent me, she is worried about you.
boolean hasResponse0 = false;
if (tatooine_espa_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_17");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 7);
npcStartConversation (player, npc, "tatooine_espa_pilot", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tatooine_espa_pilot_condition__defaultCondition (player, npc))
{
tatooine_espa_pilot_action_facePlayer (player, npc);
//-- NPC: Just searching the wreckage for survivors.
string_id message = new string_id (c_stringFile, "s_64");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What happened to it?
boolean hasResponse0 = false;
if (tatooine_espa_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_66");
utils.setScriptVar (player, "conversation.tatooine_espa_pilot.branchId", 17);
npcStartConversation (player, npc, "tatooine_espa_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 != "tatooine_espa_pilot")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
if (branchId == 1 && tatooine_espa_pilot_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 2 && tatooine_espa_pilot_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && tatooine_espa_pilot_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && tatooine_espa_pilot_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && tatooine_espa_pilot_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && tatooine_espa_pilot_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && tatooine_espa_pilot_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && tatooine_espa_pilot_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && tatooine_espa_pilot_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && tatooine_espa_pilot_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && tatooine_espa_pilot_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && tatooine_espa_pilot_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && tatooine_espa_pilot_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && tatooine_espa_pilot_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.tatooine_espa_pilot.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================