mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-09-12 23:45:12 -04:00
750 lines
24 KiB
Plaintext
750 lines
24 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_trandoshan_mssikss.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.space_quest;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/ep3_trandoshan_mssikss";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_trandoshan_mssikss_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_trandoshan_mssikss_condition_canTakeSpaceMission (obj_id player, obj_id npc)
|
|
{
|
|
if( hasSkill( player, "pilot_rebel_navy_novice" )||
|
|
( hasSkill( player, "pilot_imperial_navy_novice" )||
|
|
( hasSkill( player, "pilot_neutral_novice" ))))
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_trandoshan_mssikss_condition_hasFailedMission (obj_id player, obj_id npc)
|
|
{
|
|
if ( space_quest.hasFailedQuestRecursive( player, "recovery", "ep3_trando_mssikss") ||
|
|
space_quest.hasAbortedQuestRecursive( player, "recovery", "ep3_trando_mssikss" ) )
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_trandoshan_mssikss_condition_receivedReward (obj_id player, obj_id npc)
|
|
{
|
|
if (space_quest.hasReceivedReward(player, "recovery", "ep3_trando_mssikss") )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_trandoshan_mssikss_condition_hasWonMission (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasWonQuestRecursive( player, "recovery", "ep3_trando_mssikss"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_trandoshan_mssikss_condition_isOnMission (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_quest.hasQuest( player ) );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_trandoshan_mssikss_action_grantMission (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest( player, "recovery", "ep3_trando_mssikss" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_trandoshan_mssikss_action_grantReward (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.giveReward( player, "recovery", "ep3_trando_mssikss", 10000, "object/tangible/ship/components/weapon/wpn_trandoshan_fg1a.iff" );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_trandoshan_mssikss_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, these collars are going to do a world of good in the field. Once we get this around those stinking furball's necks they will be completely under our control. You have done me a great service today.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: About my reward?
|
|
if (response == "s_1121")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "laugh_titter");
|
|
|
|
ep3_trandoshan_mssikss_action_grantReward (player, npc);
|
|
|
|
//-- NPC: Yes, I promised to pay you handsomely and that is what I intend to do. We keep our deals unlike the furballs who will break their word at the slightest provocation. Here you go. Take care, pilot.
|
|
string_id message = new string_id (c_stringFile, "s_1123");
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_trandoshan_mssikss_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I must say that the Empire's representative isn't at all pleased with what happened. So they called in another shipment...and....and....that's right, you guessed it...that freighter got jumped too. Would you care to give it another shot?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will not fail again.
|
|
if (response == "s_1129")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "dismiss");
|
|
|
|
ep3_trandoshan_mssikss_action_grantMission (player, npc);
|
|
|
|
//-- NPC: Yes, please don't. The Empire gives us a lot of leeway here but if we keep losing their gear they might have a change of heart.
|
|
string_id message = new string_id (c_stringFile, "s_1131");
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am not doing that again.
|
|
if (response == "s_1133")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: Bah...I should have known you wouldn't be willing to try that again.
|
|
string_id message = new string_id (c_stringFile, "s_1135");
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_trandoshan_mssikss_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hey, you are a fighter pilot. One of my men saw you land in the space port. I will pay you top credit if you help me out of crisis. What do you say...do we have a deal?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Slow down. What is the problem?
|
|
if (response == "s_1139")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: I just received a shipment of these new prototype collars from the Empire r and d station on Naboo. These collars do it all...they can be used for control, they can inject a calming drug directly into the blood stream...they even have an air freshener built into them. These collars are absolutely cutting edge stuff.
|
|
string_id message = new string_id (c_stringFile, "s_1141");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That doesn't sound much like a problem.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_trandoshan_mssikss_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_1143");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks. I have some other stuff to do.
|
|
if (response == "s_1159")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: Yeah, right...whatever. Fine then don't stand around gawking at me.
|
|
string_id message = new string_id (c_stringFile, "s_1161");
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_trandoshan_mssikss_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I just received a shipment of these new prototype collars from the Empire r and d station on Naboo. These collars do it all...they can be used for control, they can inject a calming drug directly into the blood stream...they even have an air freshener built into them. These collars are absolutely cutting edge stuff.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That doesn't sound much like a problem.
|
|
if (response == "s_1143")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "gesticulate_wildly");
|
|
|
|
//-- NPC: Well, it wouldn't be if the freighter carrying them wasn't hijacked as soon as it entered Kashyyyk space. Would you go recover that freighter and those collars for me? I promise to make it worth your while. Someone had to tip the resistance off about its arrival.
|
|
string_id message = new string_id (c_stringFile, "s_1145");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, what do you need me to do.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks. Good luck getting those collars back.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_trandoshan_mssikss_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_1147");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1155");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_trandoshan_mssikss_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, it wouldn't be if the freighter carrying them wasn't hijacked as soon as it entered Kashyyyk space. Would you go recover that freighter and those collars for me? I promise to make it worth your while. Someone had to tip the resistance off about its arrival.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok, what do you need me to do.
|
|
if (response == "s_1147")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: I need you to fly out to my freighter before they can get it out of the system. Then kill all the resistance fighters that attacked it. Get the freighter back under our control. And then escort it to a safe landing spot. Do that for me and I will see to it you are rewarded.
|
|
string_id message = new string_id (c_stringFile, "s_1149");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's do this.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_trandoshan_mssikss_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_1151");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks. Good luck getting those collars back.
|
|
if (response == "s_1155")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: Fine...then quite wasting my time. I need to find a pilot before they destroy my collars.
|
|
string_id message = new string_id (c_stringFile, "s_1157");
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_trandoshan_mssikss_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I need you to fly out to my freighter before they can get it out of the system. Then kill all the resistance fighters that attacked it. Get the freighter back under our control. And then escort it to a safe landing spot. Do that for me and I will see to it you are rewarded.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's do this.
|
|
if (response == "s_1151")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
ep3_trandoshan_mssikss_action_grantMission (player, npc);
|
|
|
|
//-- NPC: That is the best news I have heard all day. I will see you when you get back.
|
|
string_id message = new string_id (c_stringFile, "s_1153");
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_trandoshan_mssikss");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable( self, true );
|
|
setCondition( self, CONDITION_SPACE_INTERESTING );
|
|
setName(self, "Mssikss");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable( self, true );
|
|
setCondition( self, CONDITION_SPACE_INTERESTING );
|
|
setName(self, "Mssikss");
|
|
|
|
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);
|
|
faceTo(self, player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.ep3_trandoshan_mssikss");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Triggers
|
|
// ======================================================================
|
|
|
|
//-- This function should move to base_class.java
|
|
boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses)
|
|
{
|
|
Object[] objects = new Object[responses.length];
|
|
System.arraycopy(responses, 0, objects, 0, responses.length);
|
|
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnStartNpcConversation (obj_id player)
|
|
{
|
|
obj_id npc = self;
|
|
|
|
if (ai_lib.isInCombat (npc) || ai_lib.isInCombat (player))
|
|
return SCRIPT_OVERRIDE;
|
|
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition_receivedReward (player, npc))
|
|
{
|
|
doAnimationAction (npc, "sigh_deeply");
|
|
|
|
//-- NPC: Hey, it is you again. You know what. Those collars are worthless. The scientists at the R and D center obviously didn't field test them...get a little bit of dirt or hair into them and they completely malfunction. Well, not completely...the air freshener still works. Oh, well...back to doing things the old fashioned way. Take care, pilot.
|
|
string_id message = new string_id (c_stringFile, "s_1117");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition_hasWonMission (player, npc))
|
|
{
|
|
doAnimationAction (npc, "celebrate1");
|
|
|
|
//-- NPC: Oh, these collars are going to do a world of good in the field. Once we get this around those stinking furball's necks they will be completely under our control. You have done me a great service today.
|
|
string_id message = new string_id (c_stringFile, "s_1119");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: About my reward?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_trandoshan_mssikss_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_1121");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "ep3_trandoshan_mssikss", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition_isOnMission (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: You already have a job to do. Finish what you started. I have need of a good pilot but I need you to be completely focused on my task before I am willing to give it to you.
|
|
string_id message = new string_id (c_stringFile, "s_1125");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition_hasFailedMission (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
//-- NPC: I must say that the Empire's representative isn't at all pleased with what happened. So they called in another shipment...and....and....that's right, you guessed it...that freighter got jumped too. Would you care to give it another shot?
|
|
string_id message = new string_id (c_stringFile, "s_1127");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will not fail again.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am not doing that again.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_trandoshan_mssikss_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_1129");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1133");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "ep3_trandoshan_mssikss", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition_canTakeSpaceMission (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_away");
|
|
|
|
//-- NPC: Hey, you are a fighter pilot. One of my men saw you land in the space port. I will pay you top credit if you help me out of crisis. What do you say...do we have a deal?
|
|
string_id message = new string_id (c_stringFile, "s_1137");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Slow down. What is the problem?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks. I have some other stuff to do.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_trandoshan_mssikss_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_1139");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1159");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "ep3_trandoshan_mssikss", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_trandoshan_mssikss_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: I do not have time to chat right now. I am in desperate need of a fighter pilot. Now please leave me alone.
|
|
string_id message = new string_id (c_stringFile, "s_1163");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "ep3_trandoshan_mssikss")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
if (branchId == 2 && ep3_trandoshan_mssikss_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && ep3_trandoshan_mssikss_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && ep3_trandoshan_mssikss_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && ep3_trandoshan_mssikss_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && ep3_trandoshan_mssikss_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && ep3_trandoshan_mssikss_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.ep3_trandoshan_mssikss.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|