mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
2355 lines
63 KiB
Plaintext
2355 lines
63 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// rebel_broker.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.25 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.factions;
|
|
include library.features;
|
|
include library.space_skill;
|
|
include library.trainerlocs;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/rebel_broker";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean rebel_broker_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean rebel_broker_condition_isImperialFaction (obj_id player, obj_id npc)
|
|
{
|
|
string factionName = factions.getFaction( player );
|
|
if ( factionName == null || factionName == "" )
|
|
return false;
|
|
else
|
|
return ( factionName.equals( factions.FACTION_IMPERIAL ));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean rebel_broker_condition_wasBrushedOff (obj_id player, obj_id npc)
|
|
{
|
|
return utils.hasScriptVar( player, "rebelBroker.brushoff" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean rebel_broker_condition_isRebelPilot (obj_id player, obj_id npc)
|
|
{
|
|
return space_skill.hasRebelSkill(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean rebel_broker_condition_isPilot (obj_id player, obj_id npc)
|
|
{
|
|
return space_skill.hasSpaceSkills(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean rebel_broker_condition_hasSpaceExp (obj_id player, obj_id npc)
|
|
{
|
|
return features.isSpaceEdition( player );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void rebel_broker_action_brushedOffImp (obj_id player, obj_id npc)
|
|
{
|
|
utils.setScriptVar( player, "rebelBroker.brushoff", true );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void rebel_broker_action_addNabooWaypoint (obj_id player, obj_id npc)
|
|
{
|
|
trainerlocs.getTrainerLocationWaypoint( player, "rebel", "naboo" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void rebel_broker_action_addCorellianWaypoint (obj_id player, obj_id npc)
|
|
{
|
|
trainerlocs.getTrainerLocationWaypoint( player, "rebel", "corellia" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void rebel_broker_action_addTatooineWaypoint (obj_id player, obj_id npc)
|
|
{
|
|
trainerlocs.getTrainerLocationWaypoint( player, "rebel", "tatooine" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void rebel_broker_action_retireSkill (obj_id player, obj_id npc)
|
|
{
|
|
space_skill.retire(player, space_skill.REBEL);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int rebel_broker_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hello, friend. It's always good to see that another skilled pilot has joined the ranks of the Alliance. What can I do for you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to retire as a Rebel Pilot.
|
|
if (response == "s_fc2710b9")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
//-- NPC: Wow, that's quite a bombshell. Are you sure? If you retire, you will lose all of your pilot skills and your mission logs will be erased. If you join up with the Alliance again, you will start out as a new recruit.
|
|
string_id message = new string_id (c_stringFile, "s_b42be0ca");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I want to retire.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind. I'll stay.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_658b5a75");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_697a1143");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing, really.
|
|
if (response == "s_3fd213c")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I see. Best of luck to you in the future, then!
|
|
string_id message = new string_id (c_stringFile, "s_7671cbe2");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Wow, that's quite a bombshell. Are you sure? If you retire, you will lose all of your pilot skills and your mission logs will be erased. If you join up with the Alliance again, you will start out as a new recruit.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I want to retire.
|
|
if (response == "s_658b5a75")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_once");
|
|
|
|
//-- NPC: Alright. I'll start getting the paperwork ready. If you want to change your mind, now's the time...
|
|
string_id message = new string_id (c_stringFile, "s_c3bfda20");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want to retire.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind. I'll stay.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_f72f24be");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_697a1143");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've changed my mind. I'll stay.
|
|
if (response == "s_697a1143")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's a relief. We'd really hate to lose a good pilot like yourself.
|
|
string_id message = new string_id (c_stringFile, "s_568d0bc");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Alright. I'll start getting the paperwork ready. If you want to change your mind, now's the time...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want to retire.
|
|
if (response == "s_f72f24be")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "sigh_deeply");
|
|
|
|
rebel_broker_action_retireSkill (player, npc);
|
|
|
|
//-- NPC: Very well. We hate to lose a good pilot like yourself, but in the end, it's your decision.
|
|
string_id message = new string_id (c_stringFile, "s_6ed0d2aa");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've changed my mind. I'll stay.
|
|
if (response == "s_697a1143")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's a relief. We'd really hate to lose a good pilot like yourself.
|
|
string_id message = new string_id (c_stringFile, "s_568d0bc");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Is there something I can help you with?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_d70dba34")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "yawn");
|
|
|
|
//-- NPC: And what would that be?
|
|
string_id message = new string_id (c_stringFile, "s_ef21d878");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Are you recruiting pilots for the Rebel Alliance?
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_c2a4c0b1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No.
|
|
if (response == "s_4c695dbd")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave2");
|
|
|
|
//-- NPC: It was nice meeting you.
|
|
string_id message = new string_id (c_stringFile, "s_d6b3d709");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: And what would that be?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Are you recruiting pilots for the Rebel Alliance?
|
|
if (response == "s_c2a4c0b1")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_no");
|
|
|
|
//-- NPC: No, of course not. That would be illegal.
|
|
string_id message = new string_id (c_stringFile, "s_5af29bb7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I don't believe you.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_895d093");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_c4d665ba");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_169df3bb")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave2");
|
|
|
|
//-- NPC: It was nice meeting you.
|
|
string_id message = new string_id (c_stringFile, "s_d6b3d709");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: No, of course not. That would be illegal.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok.
|
|
if (response == "s_895d093")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave2");
|
|
|
|
//-- NPC: It was nice meeting you.
|
|
string_id message = new string_id (c_stringFile, "s_d6b3d709");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't believe you.
|
|
if (response == "s_c4d665ba")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "slow_down");
|
|
|
|
//-- NPC: I cannot imagine why not. If someone has been spreading rumors about me, you should report them... not me. I'm not doing anything wrong at all. Nothing whatsoever.
|
|
string_id message = new string_id (c_stringFile, "s_1c0a2eb0");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, just checking.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: You are lying!
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_50f22f35");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_dbb2bd71");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I cannot imagine why not. If someone has been spreading rumors about me, you should report them... not me. I'm not doing anything wrong at all. Nothing whatsoever.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok, just checking.
|
|
if (response == "s_50f22f35")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave2");
|
|
|
|
//-- NPC: It was nice meeting you.
|
|
string_id message = new string_id (c_stringFile, "s_d6b3d709");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You are lying!
|
|
if (response == "s_dbb2bd71")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
//-- NPC: I most certainly am not! And I resent the implication! It's an absurd accusation! Ridiculous! Now if you'll excuse me, this conversation is over. Good day!
|
|
string_id message = new string_id (c_stringFile, "s_28a5ab46");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are you?
|
|
if (response == "s_ca776e30")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_to_self");
|
|
|
|
//-- NPC: My name is J'pai Brek. How can I help you?
|
|
string_id message = new string_id (c_stringFile, "s_8a4e6549");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want to be a pilot.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Never mind.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_e81a1436");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_169df3bb");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: My name is J'pai Brek. How can I help you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want to be a pilot.
|
|
if (response == "s_e81a1436")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_multiple");
|
|
|
|
//-- NPC: I see. Well, that does sound very exciting. But what makes you think I can help you with that?
|
|
string_id message = new string_id (c_stringFile, "s_1adbb986");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I received a transmission from the Rebel Alliance
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_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_c0dd7feb");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Never mind.
|
|
if (response == "s_169df3bb")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave2");
|
|
|
|
//-- NPC: It was nice meeting you.
|
|
string_id message = new string_id (c_stringFile, "s_d6b3d709");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I see. Well, that does sound very exciting. But what makes you think I can help you with that?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I received a transmission from the Rebel Alliance
|
|
if (response == "s_c0dd7feb")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "snap_finger2");
|
|
|
|
//-- NPC: In that case, yes, I can direct you to a unit in need of volunteers. Do you have a preference for duty anywhere in particular?
|
|
string_id message = new string_id (c_stringFile, "s_3bde39e1");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Naboo.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Corellia.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tatooine.
|
|
boolean hasResponse2 = false;
|
|
if (rebel_broker_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_63cd6ccb");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d15ec255");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6491bb19");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: In that case, yes, I can direct you to a unit in need of volunteers. Do you have a preference for duty anywhere in particular?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Naboo.
|
|
if (response == "s_63cd6ccb")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "pound_fist_palm");
|
|
|
|
//-- NPC: Now that's quite a dangerous assignment! We have managed to install an Alliance Trainer droid in the city of Moenia. The Empire is quite strong in the Naboo system, but Moenia belongs to Borvo the Hutt... and he's indifferent to the Rebellion - so long as we stay out of his way.
|
|
string_id message = new string_id (c_stringFile, "s_3714bdfe");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Corellia.
|
|
if (response == "s_d15ec255")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Corellia's official stance is to remain neutral in the war against the Empire, but that has made it a useful place for us to marshal our forces.
|
|
string_id message = new string_id (c_stringFile, "s_98a75031");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tatooine.
|
|
if (response == "s_6491bb19")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: Tatooine is a backwater world far removed from most of the action. It seems the criminals and pirates give us as much trouble there as the Empire. Still, it's an important assignment as the remote location allows us to gather resources and supplies without constant harassment from the Empire.
|
|
string_id message = new string_id (c_stringFile, "s_80d99409");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Now that's quite a dangerous assignment! We have managed to install an Alliance Trainer droid in the city of Moenia. The Empire is quite strong in the Naboo system, but Moenia belongs to Borvo the Hutt... and he's indifferent to the Rebellion - so long as we stay out of his way.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more.
|
|
if (response == "s_159911f5")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_finger_warning");
|
|
|
|
rebel_broker_action_addNabooWaypoint (player, npc);
|
|
|
|
//-- NPC: Here, I'll add the location of our FX-model droid to your datapad. Whatever you do, don't allow that to fall into Imperial hands! Go there and speak with the droid.
|
|
string_id message = new string_id (c_stringFile, "s_c0ca92b1");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not interested in that.
|
|
if (response == "s_70f18874")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: I don't blame you. The Empire has been absolutely ruthless in its war against the Alliance. What about Corellia or Tatooine?
|
|
string_id message = new string_id (c_stringFile, "s_84d6bcaa");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Naboo.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Corellia.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tatooine.
|
|
boolean hasResponse2 = false;
|
|
if (rebel_broker_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_63cd6ccb");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d15ec255");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6491bb19");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I don't blame you. The Empire has been absolutely ruthless in its war against the Alliance. What about Corellia or Tatooine?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Naboo.
|
|
if (response == "s_63cd6ccb")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "pound_fist_palm");
|
|
|
|
//-- NPC: Now that's quite a dangerous assignment! We have managed to install an Alliance Trainer droid in the city of Moenia. The Empire is quite strong in the Naboo system, but Moenia belongs to Borvo the Hutt... and he's indifferent to the Rebellion - so long as we stay out of his way.
|
|
string_id message = new string_id (c_stringFile, "s_3714bdfe");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Corellia.
|
|
if (response == "s_d15ec255")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Corellia's official stance is to remain neutral in the war against the Empire, but that has made it a useful place for us to marshal our forces.
|
|
string_id message = new string_id (c_stringFile, "s_98a75031");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tatooine.
|
|
if (response == "s_6491bb19")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: Tatooine is a backwater world far removed from most of the action. It seems the criminals and pirates give us as much trouble there as the Empire. Still, it's an important assignment as the remote location allows us to gather resources and supplies without constant harassment from the Empire.
|
|
string_id message = new string_id (c_stringFile, "s_80d99409");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Corellia's official stance is to remain neutral in the war against the Empire, but that has made it a useful place for us to marshal our forces.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more.
|
|
if (response == "s_159911f5")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_away");
|
|
|
|
rebel_broker_action_addCorellianWaypoint (player, npc);
|
|
|
|
//-- NPC: Then let me add this location to your datapad. We have an operative stationed in a 'safe house' here in Tyrena... in the slums not far from here.
|
|
string_id message = new string_id (c_stringFile, "s_31bc521f");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not interested in that.
|
|
if (response == "s_70f18874")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shrug_hands");
|
|
|
|
//-- NPC: What about Naboo or Tatooine then?
|
|
string_id message = new string_id (c_stringFile, "s_18dad60e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Naboo.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Corellia.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tatooine.
|
|
boolean hasResponse2 = false;
|
|
if (rebel_broker_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_63cd6ccb");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d15ec255");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6491bb19");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What about Naboo or Tatooine then?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Naboo.
|
|
if (response == "s_63cd6ccb")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "pound_fist_palm");
|
|
|
|
//-- NPC: Now that's quite a dangerous assignment! We have managed to install an Alliance Trainer droid in the city of Moenia. The Empire is quite strong in the Naboo system, but Moenia belongs to Borvo the Hutt... and he's indifferent to the Rebellion - so long as we stay out of his way.
|
|
string_id message = new string_id (c_stringFile, "s_3714bdfe");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Corellia.
|
|
if (response == "s_d15ec255")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Corellia's official stance is to remain neutral in the war against the Empire, but that has made it a useful place for us to marshal our forces.
|
|
string_id message = new string_id (c_stringFile, "s_98a75031");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tatooine.
|
|
if (response == "s_6491bb19")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: Tatooine is a backwater world far removed from most of the action. It seems the criminals and pirates give us as much trouble there as the Empire. Still, it's an important assignment as the remote location allows us to gather resources and supplies without constant harassment from the Empire.
|
|
string_id message = new string_id (c_stringFile, "s_80d99409");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Tatooine is a backwater world far removed from most of the action. It seems the criminals and pirates give us as much trouble there as the Empire. Still, it's an important assignment as the remote location allows us to gather resources and supplies without constant harassment from the Empire.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more.
|
|
if (response == "s_159911f5")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "manipulate_medium");
|
|
|
|
rebel_broker_action_addTatooineWaypoint (player, npc);
|
|
|
|
//-- NPC: Here, I'll add the location of our Tatooine contact to your datapad. Whatever you do, don't allow that to fall into Imperial hands! This will take you to the Mos Espa cantina. Speak with Commander Da'la Socuna.
|
|
string_id message = new string_id (c_stringFile, "s_43cd3e42");
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not interested in that.
|
|
if (response == "s_70f18874")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "snap_finger2");
|
|
|
|
//-- NPC: Want to be a little closer to the action, huh? I'd recommend Corellia or Naboo, in that case.
|
|
string_id message = new string_id (c_stringFile, "s_bbc28ec8");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Naboo.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Corellia.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tatooine.
|
|
boolean hasResponse2 = false;
|
|
if (rebel_broker_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_63cd6ccb");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_d15ec255");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_6491bb19");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int rebel_broker_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Want to be a little closer to the action, huh? I'd recommend Corellia or Naboo, in that case.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Naboo.
|
|
if (response == "s_63cd6ccb")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "pound_fist_palm");
|
|
|
|
//-- NPC: Now that's quite a dangerous assignment! We have managed to install an Alliance Trainer droid in the city of Moenia. The Empire is quite strong in the Naboo system, but Moenia belongs to Borvo the Hutt... and he's indifferent to the Rebellion - so long as we stay out of his way.
|
|
string_id message = new string_id (c_stringFile, "s_3714bdfe");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Corellia.
|
|
if (response == "s_d15ec255")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Corellia's official stance is to remain neutral in the war against the Empire, but that has made it a useful place for us to marshal our forces.
|
|
string_id message = new string_id (c_stringFile, "s_98a75031");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tatooine.
|
|
if (response == "s_6491bb19")
|
|
{
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: Tatooine is a backwater world far removed from most of the action. It seems the criminals and pirates give us as much trouble there as the Empire. Still, it's an important assignment as the remote location allows us to gather resources and supplies without constant harassment from the Empire.
|
|
string_id message = new string_id (c_stringFile, "s_80d99409");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not interested in that.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_159911f5");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70f18874");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.rebel_broker.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.rebel_broker");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_SPACE_INTERESTING);
|
|
setInvulnerable( self, true );
|
|
factions.setFaction( self, factions.FACTION_REBEL );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_SPACE_INTERESTING);
|
|
setInvulnerable( self, true );
|
|
factions.setFaction( self, factions.FACTION_REBEL );
|
|
|
|
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);
|
|
|
|
faceTo( self, player );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.rebel_broker");
|
|
|
|
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 (!rebel_broker_condition_hasSpaceExp (player, npc))
|
|
{
|
|
rebel_broker_action_brushedOffImp (player, npc);
|
|
|
|
//-- NPC: Nothing I can do for you, friend. But if you know anyone that might make a good pilot, you ought to send them to see me. Good day.
|
|
string_id message = new string_id (c_stringFile, "s_2a805b93");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition_isRebelPilot (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Hello, friend. It's always good to see that another skilled pilot has joined the ranks of the Alliance. What can I do for you?
|
|
string_id message = new string_id (c_stringFile, "s_b8e72ced");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to retire as a Rebel Pilot.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Nothing, really.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_fc2710b9");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3fd213c");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "rebel_broker", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition_wasBrushedOff (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: I said 'Good day'!
|
|
string_id message = new string_id (c_stringFile, "s_ee2fdf32");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition_isImperialFaction (player, npc))
|
|
{
|
|
doAnimationAction (npc, "stretch");
|
|
|
|
//-- NPC: Is there something I can help you with?
|
|
string_id message = new string_id (c_stringFile, "s_c4b91b55");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No.
|
|
boolean hasResponse1 = false;
|
|
if (rebel_broker_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_d70dba34");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_4c695dbd");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "rebel_broker", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition_isPilot (player, npc))
|
|
{
|
|
//-- NPC: Hello, friend. Good day to you!
|
|
string_id message = new string_id (c_stringFile, "s_aad360f4");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (rebel_broker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yes?
|
|
string_id message = new string_id (c_stringFile, "s_9fdd7cf3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse0 = false;
|
|
if (rebel_broker_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_ca776e30");
|
|
|
|
setObjVar (player, "conversation.rebel_broker.branchId", 17);
|
|
|
|
npcStartConversation (player, npc, "rebel_broker", 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 != "rebel_broker")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = getIntObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
if (branchId == 2 && rebel_broker_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && rebel_broker_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && rebel_broker_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && rebel_broker_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && rebel_broker_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && rebel_broker_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && rebel_broker_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && rebel_broker_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && rebel_broker_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && rebel_broker_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && rebel_broker_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && rebel_broker_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && rebel_broker_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && rebel_broker_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && rebel_broker_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && rebel_broker_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && rebel_broker_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
removeObjVar (player, "conversation.rebel_broker.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|