mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
1748 lines
51 KiB
Plaintext
1748 lines
51 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// disable_sidequest.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.24 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.skill;
|
|
include library.space_quest;
|
|
include library.xp;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/disable_sidequest";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean disable_sidequest_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean disable_sidequest_condition_hasReward (obj_id player, obj_id npc)
|
|
{
|
|
if ( space_quest.hasReceivedReward( player, "inspect", "robot_sidequest" ) )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean disable_sidequest_condition_hasWonMission1 (obj_id player, obj_id npc)
|
|
{
|
|
if ( space_quest.hasWonQuest( player, "inspect", "robot_sidequest" ) )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean disable_sidequest_condition_readyForMission2 (obj_id player, obj_id npc)
|
|
{
|
|
if ( space_quest.hasReceivedReward( player, "destroy_surpriseattack", "tatooine_imperial_1_surprise" ) )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void disable_sidequest_action_grantMission1 (obj_id player, obj_id npc)
|
|
{
|
|
// Animation.
|
|
faceTo( npc, player );
|
|
|
|
// Mission grant.
|
|
space_quest.grantQuest( player, "inspect", "robot_sidequest" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animExplain (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "explain" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_giveRewardMission1 (obj_id player, obj_id npc)
|
|
{
|
|
// Animation.
|
|
faceTo( npc, player );
|
|
|
|
// Give credits.
|
|
if (!space_quest.hasReceivedReward( player, "inspect", "robot_sidequest") )
|
|
space_quest.giveReward( player, "inspect", "robot_sidequest", 3000 );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animNodHead (obj_id player, obj_id npc)
|
|
{
|
|
// Temporary hack:
|
|
setName( npc, "CSSD-7" );
|
|
setInvulnerable( npc, true );
|
|
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "nod_head_once" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animConverse (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "conversation_1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animStop (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "stop" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animSalute (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "salute1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animBye (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "goodbye" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animBothSalute (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "salute1" );
|
|
doAnimationAction( player, "salute1" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animDisgust (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "shake_head_disgust" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animGestureWild (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "gesticulate_wildly" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animPointAway (obj_id player, obj_id npc)
|
|
{
|
|
doAnimationAction( npc, "point_away" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animPoundFist (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "pound_fist_palm" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animRubChin (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "rub_chin_thoughtful" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animPoliteApplause (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( player, "salute1" );
|
|
doAnimationAction( npc, "applause_polite" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animWaveFinger (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "wave_finger_warning" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void disable_sidequest_action_animRaiseFist (obj_id player, obj_id npc)
|
|
{
|
|
faceTo( npc, player );
|
|
doAnimationAction( npc, "standing_raise_fist" );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int disable_sidequest_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good to see [see see] you again, citizen.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Good to see you, CSSD-7. I found your core.
|
|
if (response == "s_c9e7c48f")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You [you you you] found my core? I am shocked [shocked shocked shocked] please let me see it.
|
|
string_id message = new string_id (c_stringFile, "s_5ee9bf09");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Hand him the core.)
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_26966a66");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You [you you you] found my core? I am shocked [shocked shocked shocked] please let me see it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Hand him the core.)
|
|
if (response == "s_26966a66")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
disable_sidequest_action_animStop (player, npc);
|
|
|
|
//-- NPC: It appears to be undamaged [ged ged ged]. Please wait one second while I install it [it it it].
|
|
string_id message = new string_id (c_stringFile, "s_9b809db7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: (Wait.)
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_1224b289");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It appears to be undamaged [ged ged ged]. Please wait one second while I install it [it it it].
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: (Wait.)
|
|
if (response == "s_1224b289")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
disable_sidequest_action_animExplain (player, npc);
|
|
|
|
//-- NPC: Ah! My primary functions are now fully enabled. Performing system check. System Primary Functions are operating within standard guidelines. Warning: Secondary core has been damaged. All other secondary and tertiary systems are operating within standard guidelines.
|
|
string_id message = new string_id (c_stringFile, "s_3e25bf08");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Congratulations, CSSD-7!
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_6a5944bd");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah! My primary functions are now fully enabled. Performing system check. System Primary Functions are operating within standard guidelines. Warning: Secondary core has been damaged. All other secondary and tertiary systems are operating within standard guidelines.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Congratulations, CSSD-7!
|
|
if (response == "s_6a5944bd")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you, citizen. Without your help I would have been doomed to travel this desert. I can now return to the medical center and continue with my original operational directive. I am in your debt.
|
|
string_id message = new string_id (c_stringFile, "s_c85fb291");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What can I say...
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_a54ac5ac");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thank you, citizen. Without your help I would have been doomed to travel this desert. I can now return to the medical center and continue with my original operational directive. I am in your debt.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What can I say...
|
|
if (response == "s_a54ac5ac")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
disable_sidequest_action_giveRewardMission1 (player, npc);
|
|
|
|
//-- NPC: I understand that you are demonstrating modesty. I appreciate your assistance. I have some amount of credits I will transfer to you in recognition of your kind act. It is the least I can do to help you, citizen.
|
|
string_id message = new string_id (c_stringFile, "s_3019b01e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you, CSSD-7.
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_d28c8e75");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I understand that you are demonstrating modesty. I appreciate your assistance. I have some amount of credits I will transfer to you in recognition of your kind act. It is the least I can do to help you, citizen.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you, CSSD-7.
|
|
if (response == "s_d28c8e75")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You may call me 'CS'. Thank you again for your assistance. It feels good to have a functional core. I will go and repair my secondary core immediately. I can't wait to begin working on Neurilemmomas and Astrocytomas again! Excitement!
|
|
string_id message = new string_id (c_stringFile, "s_5eec7e62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Good luck, CS.
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_72b585f7");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You may call me 'CS'. Thank you again for your assistance. It feels good to have a functional core. I will go and repair my secondary core immediately. I can't wait to begin working on Neurilemmomas and Astrocytomas again! Excitement!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Good luck, CS.
|
|
if (response == "s_72b585f7")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good luck to you, citizen. Thank you again for your kind act.
|
|
string_id message = new string_id (c_stringFile, "s_de5882b1");
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Greetings citizen. [Greetings citizen. Greetings citizen. Greetings.]
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I heard you the first time.
|
|
if (response == "s_6b12b256")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
disable_sidequest_action_animConverse (player, npc);
|
|
|
|
//-- NPC: Oh, my. I apologize. [Apologize. Apologize. Apologize.] My core systems software has been compromised and [and and and] I am unable to communicate without stuttering [stuttering stuttering stuttering].
|
|
string_id message = new string_id (c_stringFile, "s_3e0deaf9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm sorry, I didn't realize...
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_6ea28bdf");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, my. I apologize. [Apologize. Apologize. Apologize.] My core systems software has been compromised and [and and and] I am unable to communicate without stuttering [stuttering stuttering stuttering].
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm sorry, I didn't realize...
|
|
if (response == "s_6ea28bdf")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
disable_sidequest_action_animNodHead (player, npc);
|
|
|
|
//-- NPC: Do not worry [worry worry worry]. I am used to other citizens reacting in that way. I am CS[SSSSSS]SD-7, a 2-1B surgical [surgical surgical] droid. My designation is an abbreviation for 'Cerebrospinal [inal inal inal] Surgical Droid'.
|
|
string_id message = new string_id (c_stringFile, "s_a893010");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Cerebrospinal? Brain surgery? Why are you out here?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_a4f3fede");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Do not worry [worry worry worry]. I am used to other citizens reacting in that way. I am CS[SSSSSS]SD-7, a 2-1B surgical [surgical surgical] droid. My designation is an abbreviation for 'Cerebrospinal [inal inal inal] Surgical Droid'.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Cerebrospinal? Brain surgery? Why are you out here?
|
|
if (response == "s_a4f3fede")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I have become lost [lost lost]. The same fault that affects my speech synthesis [esis esis] has also affected my motor functions [functions functions]. I am unable to properly navigate back [back back] to the medical center.
|
|
string_id message = new string_id (c_stringFile, "s_897e7261");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: If your motor functions are affected, how can you perform surgery?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_a017debb");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I have become lost [lost lost]. The same fault that affects my speech synthesis [esis esis] has also affected my motor functions [functions functions]. I am unable to properly navigate back [back back] to the medical center.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: If your motor functions are affected, how can you perform surgery?
|
|
if (response == "s_a017debb")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I cannot [not not]. I am no longer able to per[per per]form my intended function. I am no [no no] longer able to perform my intended function.
|
|
string_id message = new string_id (c_stringFile, "s_53d10098");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How did you become damaged?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_46712ca3");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I cannot [not not]. I am no longer able to per[per per]form my intended function. I am no [no no] longer able to perform my intended function.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How did you become damaged?
|
|
if (response == "s_46712ca3")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It is a long story [story story]. Due to the inaccuracies in my ability to synthesize speech [speech eeech ch] I will deliver a synopsis [sis sis sis].
|
|
string_id message = new string_id (c_stringFile, "s_2bc613ea");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ah, yeah you better keep it simple.
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_9eee12c7");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It is a long story [story story]. Due to the inaccuracies in my ability to synthesize speech [speech eeech ch] I will deliver a synopsis [sis sis sis].
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ah, yeah you better keep it simple.
|
|
if (response == "s_9eee12c7")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: To state it [it it] simply, I was employed to perform surgical modification [odification] on a local criminal [criminal criminal] warlord. After completing the operation [tion tion tion], the warlord's men assaulted me [me me] and stole my systems core [core core].
|
|
string_id message = new string_id (c_stringFile, "s_b1ed67bc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: They stole your core?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_c5495de6");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: To state it [it it] simply, I was employed to perform surgical modification [odification] on a local criminal [criminal criminal] warlord. After completing the operation [tion tion tion], the warlord's men assaulted me [me me] and stole my systems core [core core].
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: They stole your core?
|
|
if (response == "s_c5495de6")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: They must believe [lieve lieve] they can sell it. They also believed [lieved lieved] that removing my core would destroy me [me me].
|
|
string_id message = new string_id (c_stringFile, "s_3d54f7bd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why didn't it destroy you?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_907d29f3");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They must believe [lieve lieve] they can sell it. They also believed [lieved lieved] that removing my core would destroy me [me me].
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why didn't it destroy you?
|
|
if (response == "s_907d29f3")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I am equipped with a secondary core [core core]. This is to ensure the [the the the] integrity of my function during a surgical procedure. However, my secondary core [core core] is apparently damaged.
|
|
string_id message = new string_id (c_stringFile, "s_96d51a4e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who stole your core?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_d92cbbea");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This line is never spoken.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: This line is never spoken.
|
|
if (response == "s_5d0b3789")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I am equipped with a secondary core [core core]. This is to ensure the [the the the] integrity of my function during a surgical procedure. However, my secondary core [core core] is apparently damaged.
|
|
string_id message = new string_id (c_stringFile, "s_96d51a4e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who stole your core?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_d92cbbea");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I am equipped with a secondary core [core core]. This is to ensure the [the the the] integrity of my function during a surgical procedure. However, my secondary core [core core] is apparently damaged.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who stole your core?
|
|
if (response == "s_d92cbbea")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A local Tatooine pirate [pirate] leader known as [as as as] Madd Markos [mad mad]. The appellation [tion tion] is a result of his behavior after many [many many] brain altering modifications [tions tions].
|
|
string_id message = new string_id (c_stringFile, "s_76eb7e3b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I've heard of him. He flies around Tatooine. I might be able to find him.
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_192752ed");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A local Tatooine pirate [pirate] leader known as [as as as] Madd Markos [mad mad]. The appellation [tion tion] is a result of his behavior after many [many many] brain altering modifications [tions tions].
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've heard of him. He flies around Tatooine. I might be able to find him.
|
|
if (response == "s_192752ed")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
disable_sidequest_action_grantMission1 (player, npc);
|
|
|
|
//-- NPC: You could? [could? could?] Excitement! It is likely [ly ly] that Madd Markos [kos kos kos] still has my primary core [ore ore]. If you locate him you can retrieve it [it it]. You will have to cycle through various ships near Tatooine until you find Markos.
|
|
string_id message = new string_id (c_stringFile, "s_1e6f479b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How do I retrieve the core?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_2b9397ba");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You could? [could? could?] Excitement! It is likely [ly ly] that Madd Markos [kos kos kos] still has my primary core [ore ore]. If you locate him you can retrieve it [it it]. You will have to cycle through various ships near Tatooine until you find Markos.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How do I retrieve the core?
|
|
if (response == "s_2b9397ba")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: First, you must disable his ship [ship ship]. To do this, target his ship and [and] select his reactor using CTRL-] (control right bracket). Then fire on him as you would [would] normally. After you inflict some damage, his ship will become disabled [disabled].
|
|
string_id message = new string_id (c_stringFile, "s_648ee28b");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What next?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_16148f5c");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: First, you must disable his ship [ship ship]. To do this, target his ship and [and] select his reactor using CTRL-] (control right bracket). Then fire on him as you would [would] normally. After you inflict some damage, his ship will become disabled [disabled].
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What next?
|
|
if (response == "s_16148f5c")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Second, you must inspect his [his his] ship. To do this, you must fly close to the disabled ship [ship ship] and use the /inspect command. After [after] a short time, any unique contents of his ship will be displayed.
|
|
string_id message = new string_id (c_stringFile, "s_eeeb19c9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And if he has the core?
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_376a2b9c");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Second, you must inspect his [his his] ship. To do this, you must fly close to the disabled ship [ship ship] and use the /inspect command. After [after] a short time, any unique contents of his ship will be displayed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And if he has the core?
|
|
if (response == "s_376a2b9c")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Third, if he [he] has the core, you [you you] must transfer it to your own ship. Use the /transfer command to load the command core into your hold [hold hold]. It is small so you do not need a cargo ship [ship ship].
|
|
string_id message = new string_id (c_stringFile, "s_90c59f1a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: CSSD-7, I think I can help you. I'll return with your core soon.
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_3b78667c");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 24);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int disable_sidequest_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Third, if he [he] has the core, you [you you] must transfer it to your own ship. Use the /transfer command to load the command core into your hold [hold hold]. It is small so you do not need a cargo ship [ship ship].
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: CSSD-7, I think I can help you. I'll return with your core soon.
|
|
if (response == "s_3b78667c")
|
|
{
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank [thank thank] you, citizen. Remember, first disable with CTRL-], then /inspect, then /transfer. I have [have have] confidence in you [you you you]. Good luck [luck luck luck luck luck luck]. Oh my [my my].
|
|
string_id message = new string_id (c_stringFile, "s_d1b59965");
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.disable_sidequest");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable( self, true );
|
|
setCondition( self, CONDITION_SPACE_INTERESTING );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable( self, true );
|
|
setCondition( self, CONDITION_SPACE_INTERESTING );
|
|
|
|
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.disable_sidequest");
|
|
|
|
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 (disable_sidequest_condition_hasReward (player, npc))
|
|
{
|
|
disable_sidequest_action_animBothSalute (player, npc);
|
|
|
|
//-- NPC: Good to see you again, citizen.
|
|
string_id message = new string_id (c_stringFile, "s_b451a4a3");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition_hasWonMission1 (player, npc))
|
|
{
|
|
disable_sidequest_action_animBothSalute (player, npc);
|
|
|
|
//-- NPC: Good to see [see see] you again, citizen.
|
|
string_id message = new string_id (c_stringFile, "s_c55d7e2");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Good to see you, CSSD-7. I found your core.
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_c9e7c48f");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "disable_sidequest", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition__defaultCondition (player, npc))
|
|
{
|
|
disable_sidequest_action_animNodHead (player, npc);
|
|
|
|
//-- NPC: Greetings citizen. [Greetings citizen. Greetings citizen. Greetings.]
|
|
string_id message = new string_id (c_stringFile, "s_3c6ee0a0");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I heard you the first time.
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_6b12b256");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "disable_sidequest", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (disable_sidequest_condition_readyForMission2 (player, npc))
|
|
{
|
|
//-- NPC: This line is never spoken.
|
|
string_id message = new string_id (c_stringFile, "s_5d0b3789");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: This line is never spoken.
|
|
boolean hasResponse0 = false;
|
|
if (disable_sidequest_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_5d0b3789");
|
|
|
|
setObjVar (player, "conversation.disable_sidequest.branchId", 18);
|
|
|
|
npcStartConversation (player, npc, "disable_sidequest", 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 != "disable_sidequest")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = getIntObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
if (branchId == 2 && disable_sidequest_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && disable_sidequest_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && disable_sidequest_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && disable_sidequest_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && disable_sidequest_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && disable_sidequest_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && disable_sidequest_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && disable_sidequest_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && disable_sidequest_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && disable_sidequest_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && disable_sidequest_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && disable_sidequest_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && disable_sidequest_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && disable_sidequest_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && disable_sidequest_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && disable_sidequest_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && disable_sidequest_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && disable_sidequest_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && disable_sidequest_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && disable_sidequest_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && disable_sidequest_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && disable_sidequest_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
removeObjVar (player, "conversation.disable_sidequest.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|