mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
2709 lines
75 KiB
Plaintext
2709 lines
75 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// legacy_head_ev9d9.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.features;
|
|
include library.groundquests;
|
|
include library.space_quest;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/legacy_head_ev9d9";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean legacy_head_ev9d9_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_failedRunaways (obj_id player, obj_id npc)
|
|
{
|
|
|
|
/* int questId1 = questGetQuestId("quest/legacy_head_remodel");
|
|
int questId2 = questGetQuestId("quest/legacy_head_runaway");
|
|
int questId3 = questGetQuestId("quest/legacy_head_space");
|
|
|
|
|
|
|
|
|
|
boolean OnTask = ((questIsQuestComplete (questId1, player))
|
|
&& (!(questIsQuestActive(questId2, player)))
|
|
&& (!(questIsQuestComplete (questId2, player))))
|
|
&& ((questIsQuestComplete (questId1, player))
|
|
&& (!(questIsQuestActive(questId3, player)))
|
|
&& (!(questIsQuestComplete (questId3, player))));
|
|
|
|
|
|
|
|
|
|
return OnTask; */
|
|
return (groundquests.hasCompletedQuest(player, "legacy_head_remodel") &&
|
|
!groundquests.isQuestActiveOrComplete(player, "legacy_head_runaway") &&
|
|
!groundquests.isQuestActiveOrComplete(player, "legacy_head_space"));
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_failedRod (obj_id player, obj_id npc)
|
|
{
|
|
|
|
int questId1 = questGetQuestId("quest/legacy_head_start");
|
|
int questId2 = questGetQuestId("quest/legacy_head_rod");
|
|
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player))
|
|
&& ( !(questIsQuestActive(questId2, player))
|
|
&& !(questIsQuestComplete (questId2, player)));
|
|
|
|
|
|
|
|
return OnTask;
|
|
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_failedRemodel (obj_id player, obj_id npc)
|
|
{
|
|
|
|
int questId1 = questGetQuestId("quest/legacy_head_rod");
|
|
int questId2 = questGetQuestId("quest/legacy_head_remodel");
|
|
|
|
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player))
|
|
&& ( !(questIsQuestActive(questId2, player))
|
|
&& !(questIsQuestComplete (questId2, player)));
|
|
|
|
|
|
|
|
return OnTask;
|
|
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_onRunawayGround (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "legacy_head_runaway");
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_onRods (obj_id player, obj_id npc)
|
|
{
|
|
int questId1 = questGetQuestId("quest/legacy_head_rod");
|
|
|
|
boolean OnTask = (questIsQuestActive(questId1, player));
|
|
|
|
return OnTask;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_onRemodel (obj_id player, obj_id npc)
|
|
{
|
|
int questId1 = questGetQuestId("quest/legacy_head_remodel");
|
|
|
|
boolean OnTask = (questIsQuestActive(questId1, player));
|
|
|
|
return OnTask;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_failedReward (obj_id player, obj_id npc)
|
|
{
|
|
int questId1 = questGetQuestId("quest/legacy_head_remodel");
|
|
int questId2 = questGetQuestId("quest/legacy_head_ground");
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player))
|
|
&& ( !(questIsQuestActive(questId2, player))
|
|
&& !(questIsQuestComplete (questId2, player)));
|
|
|
|
|
|
|
|
return OnTask;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_onStartEV (obj_id player, obj_id npc)
|
|
{
|
|
|
|
int questId1 = questGetQuestId("quest/legacy_head_start");
|
|
int ground = groundquests.getTaskId(questId1, "legacy_head_start_e11");
|
|
|
|
|
|
boolean onTask = (questIsTaskActive(questId1, ground, player));
|
|
|
|
return onTask;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_hasPilotSkill (obj_id player, obj_id npc)
|
|
{
|
|
return (hasSkill(player, "pilot_rebel_navy_novice") ||
|
|
hasSkill(player, "pilot_imperial_navy_novice") ||
|
|
hasSkill(player, "pilot_neutral_novice"));
|
|
|
|
|
|
/*boolean OnTask = ( features.isSpaceEdition( player ) );
|
|
|
|
return OnTask;*/
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_onRemodelReward (obj_id player, obj_id npc)
|
|
{
|
|
|
|
int questId1 = questGetQuestId("quest/legacy_head_remodel");
|
|
int ground = groundquests.getTaskId(questId1, "legacy_head_remodel_e67");
|
|
|
|
|
|
boolean onTask = (questIsTaskActive(questId1, ground, player));
|
|
|
|
return onTask;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_failedR3Space (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasFailedQuestRecursive(player, "assassinate", "tatooine_legacy_head_runaway1_space") ||
|
|
space_quest.hasAbortedQuestRecursive(player, "assassinate", "tatooine_legacy_head_runaway1_space");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_onSpaceQuests (obj_id player, obj_id npc)
|
|
{
|
|
int questId1 = questGetQuestId("quest/legacy_head_space");
|
|
|
|
boolean OnTask = (questIsQuestActive(questId1, player));
|
|
|
|
return OnTask;
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_hasHead (obj_id player, obj_id npc)
|
|
{
|
|
boolean legacy_head_ev9d9_condition_hasHead = false;
|
|
obj_id[] playerStuff = getInventoryAndEquipment(player);
|
|
//loop thru players inventory, make sure they dont have the item already.
|
|
for(int i =0; i < playerStuff.length; i++)
|
|
{
|
|
string templateName = getTemplateName(playerStuff[i]);
|
|
if(templateName != null)
|
|
{
|
|
if(templateName == "object/tangible/loot/simple_kit/legacy_droid_head.iff")
|
|
legacy_head_ev9d9_condition_hasHead = true;
|
|
}
|
|
}
|
|
return legacy_head_ev9d9_condition_hasHead;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_remodelComplete (obj_id player, obj_id npc)
|
|
{
|
|
|
|
// PC has completed all the remodel quests and needs to report to EV-9D9 OR
|
|
// PC cancelled conversation after completing remodel quest before getting runaway
|
|
if((groundquests.isTaskActive(player, "legacy_head_remodel", "legacy_head_remodel_e67")) ||
|
|
(groundquests.hasCompletedQuest(player, "legacy_head_remodel") &&
|
|
!groundquests.isQuestActiveOrComplete(player, "legacy_head_runaway")))
|
|
return true;
|
|
else
|
|
return false;
|
|
/* int questId1 = questGetQuestId("quest/legacy_head_remodel");
|
|
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player));
|
|
return OnTask; */
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_winR3Space (obj_id player, obj_id npc)
|
|
{
|
|
return ((space_quest.hasWonQuestRecursive( player, "assassinate", "tatooine_legacy_head_runaway3_space" ))
|
|
&& (groundquests.isQuestActive(player, "legacy_head_space")));
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_endEV9D9 (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "legacy_together_2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_QuestComplete (obj_id player, obj_id npc)
|
|
{
|
|
return ((groundquests.hasCompletedQuest(player, "quest/legacy_head_runaway") ||
|
|
groundquests.hasCompletedQuest(player, "quest/legacy_head_space")) &&
|
|
!groundquests.hasCompletedQuest(player, "legacy_together_2"));
|
|
/*
|
|
int questId1 = questGetQuestId("quest/legacy_head_runaway");
|
|
int questId2 = questGetQuestId("quest/legacy_head_space");
|
|
|
|
|
|
boolean OnTask = (questIsQuestComplete (questId1, player))
|
|
|| (questIsQuestComplete (questId2, player));
|
|
return OnTask; */
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean legacy_head_ev9d9_condition_rewardQuestground (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "legacy_head_runaway", "legacy_head_runaway_e91");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void legacy_head_ev9d9_action_spaceQuestGranted (obj_id player, obj_id npc)
|
|
{
|
|
// grant the quest to get things started. Task 1 will now be active.
|
|
|
|
groundquests.grantQuest(player, "legacy_head_space");
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway1_space" );
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway2_space" );
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway3_space" );
|
|
//space_quest.grantQuest( player, "assassinate", "tatooine_legacy_head_runaway1_space" );
|
|
groundquests.sendSignal(player, "legacy_head_start_launch_e2");
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_r3SpaceCompletedSignal (obj_id player, obj_id npc)
|
|
{
|
|
// Send the signal for the wait for signal task following task 1.
|
|
// This will activate task 2.
|
|
groundquests.sendSignal(player, "legacy_head_space_launch_e3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_grantR3 (obj_id player, obj_id npc)
|
|
{
|
|
|
|
|
|
groundquests.clearQuest(player,"legacy_head_space");
|
|
groundquests.grantQuest(player,"legacy_head_space");
|
|
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway1_space" );
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway2_space" );
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway3_space" );
|
|
//space_quest.grantQuest( player, "assassinate", "tatooine_legacy_head_runaway1_space" );
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_regrantGround (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_head_runaway");
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_facePlayer (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_regrantSpace (obj_id player, obj_id npc)
|
|
{
|
|
// grant the quest to get things started. Task 1 will now be active.
|
|
|
|
groundquests.clearQuest(player,"legacy_head_space");
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway1_space" );
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway2_space" );
|
|
space_quest.clearQuestFlags( player, "assassinate", "tatooine_legacy_head_runaway3_space" );
|
|
groundquests.grantQuest(player, "legacy_head_space");
|
|
//space_quest.grantQuest( player, "assassinate", "tatooine_legacy_head_runaway1_space" );
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_grantReward (obj_id player, obj_id npc)
|
|
{
|
|
// grant the quest to get things started. 1 quests will now be active.
|
|
|
|
groundquests.grantQuest(player, "legacy_head_ground");
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_rewardRemodel (obj_id player, obj_id npc)
|
|
{
|
|
// Send the signal for the wait for signal task following task 1.
|
|
// This will activate task 2.
|
|
faceTo(npc, player);
|
|
groundquests.sendSignal(player, "legacy_head_remodel_launch_e8");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_foundev9d9 (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "legacy_head_start_launch_e2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_regrantTogether (obj_id player, obj_id npc)
|
|
{
|
|
// If the player does not already have the second version of the quest active
|
|
// Clear the old version and regrant a clean second version of the quest
|
|
if(!groundquests.isQuestActiveOrComplete(player, "legacy_together_2"))
|
|
{
|
|
groundquests.clearQuest(player, "legacy_together");
|
|
groundquests.clearQuest(player, "legacy_together_2");
|
|
groundquests.grantQuest(player, "legacy_together_2");
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_regrantTogetherWithNewHead (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.clearQuest(player, "legacy_together");
|
|
groundquests.clearQuest(player, "legacy_together_2");
|
|
groundquests.grantQuest(player, "legacy_together_2");
|
|
obj_id[] head = new obj_id[1];
|
|
head[0] = createObjectInInventoryAllowOverload("object/tangible/loot/simple_kit/legacy_droid_head.iff", player);
|
|
showLootBox(player, head);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_grantTogetherQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_together_2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_spaceRewardSignal (obj_id player, obj_id npc)
|
|
{
|
|
// Send the signal for the wait for signal task following task 1.
|
|
// This will activate task 2.
|
|
faceTo(npc, player);
|
|
groundquests.sendSignal(player, "legacy_head_ground_launch_e92");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_grantRunawayGround (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "legacy_head_runaway");
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_grantShock (obj_id player, obj_id npc)
|
|
{
|
|
// grant the quest to get things started. 1 quests will now be active.
|
|
groundquests.grantQuest(player, "legacy_head_rod");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_grantRemodel (obj_id player, obj_id npc)
|
|
{
|
|
// grant the quest to get things started. 1 quests will now be active.
|
|
groundquests.grantQuest(player, "legacy_head_remodel");
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_cleanOldQuests (obj_id player, obj_id npc)
|
|
{
|
|
if(groundquests.isQuestActiveOrComplete(player, "legacy_together_2") || groundquests.isQuestActiveOrComplete(player, "legacy_together"))
|
|
{
|
|
if(groundquests.isQuestActive(player, "legacy_head_remodel"))
|
|
groundquests.completeQuest(player, "legacy_head_remodel");
|
|
|
|
if(groundquests.isQuestActive(player, "legacy_head_rod"))
|
|
groundquests.completeQuest(player, "legacy_head_rod");
|
|
|
|
if(groundquests.isQuestActive(player, "legacy_head_runaway"))
|
|
groundquests.completeQuest(player, "legacy_head_runaway");
|
|
|
|
if(groundquests.isQuestActive(player, "legacy_head_space"))
|
|
groundquests.completeQuest(player, "legacy_head_space");
|
|
}
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void legacy_head_ev9d9_action_givePainBolts (obj_id player, obj_id npc)
|
|
{
|
|
boolean hasBolt_1 = false;
|
|
boolean hasBolt_2 = false;
|
|
boolean hasBolt_3 = false;
|
|
resizeable obj_id[] boltsResizable = new obj_id[0];
|
|
obj_id[] playerStuff = getInventoryAndEquipment(player);
|
|
//loop thru players inventory, make sure they dont have the item already.
|
|
for(int i =0; i < playerStuff.length; i++)
|
|
{
|
|
string templateName = getTemplateName(playerStuff[i]);
|
|
if(templateName != null)
|
|
{
|
|
if(templateName == "object/tangible/quest/legacy_head_pain1.iff")
|
|
hasBolt_1 = true;
|
|
if(templateName == "object/tangible/quest/legacy_head_pain2.iff")
|
|
hasBolt_2 = true;
|
|
if(templateName == "object/tangible/quest/legacy_head_pain3.iff")
|
|
hasBolt_3 = true;
|
|
}
|
|
}
|
|
if(hasBolt_1 == false)
|
|
utils.addElement(boltsResizable, createObjectInInventoryAllowOverload("object/tangible/quest/legacy_head_pain1.iff", player));
|
|
if(hasBolt_2 == false)
|
|
utils.addElement(boltsResizable, createObjectInInventoryAllowOverload("object/tangible/quest/legacy_head_pain2.iff", player));
|
|
if(hasBolt_3 == false)
|
|
utils.addElement(boltsResizable, createObjectInInventoryAllowOverload("object/tangible/quest/legacy_head_pain3.iff", player));
|
|
obj_id[] bolts = boltsResizable;
|
|
|
|
if(bolts.length > 0)
|
|
showLootBox(player, bolts);
|
|
|
|
return;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int legacy_head_ev9d9_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: All tasks accomplished. No other actions necessary
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I seem to have misplaced the droid head, can I get another?
|
|
if (response == "s_77")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_regrantTogetherWithNewHead (player, npc);
|
|
|
|
//-- NPC: Droid head found. Take, and do not lose again.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where do I need to go again?
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_regrantTogether (player, npc);
|
|
|
|
//-- NPC: Searching memory banks.... There was mention of one Watto. Perhaps that is where you were going.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: All tasks accomplished. EV-9D9 performance efficiency at 100%. What do you desire?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want the droid head.
|
|
if (response == "s_117")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_spaceRewardSignal (player, npc);
|
|
|
|
//-- NPC: Jabba has many incorrigible droids. Acquired head to study neural pathway feedback circuitry and safety cut offs. Built pain bolts on knowledge.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Do you have the head?
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_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_119");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Jabba has many incorrigible droids. Acquired head to study neural pathway feedback circuitry and safety cut offs. Built pain bolts on knowledge.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Do you have the head?
|
|
if (response == "s_119")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantTogetherQuest (player, npc);
|
|
|
|
//-- NPC: I kept head as trophy. I give to you for your service.
|
|
string_id message = new string_id (c_stringFile, "s_120");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Assigned task not complete. Can you accomplish the task? Or do you have something to report?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can handle the tasks.
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_r3SpaceCompletedSignal (player, npc);
|
|
|
|
//-- NPC: Very good. Return when tasks are fully complete.
|
|
string_id message = new string_id (c_stringFile, "s_51");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: The droids' transports got away.
|
|
if (response == "s_53")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantR3 (player, npc);
|
|
|
|
//-- NPC: Tapping into cargo manifests ... Droids transshipped onto different transports ... New targets identified ... Uploading data.
|
|
string_id message = new string_id (c_stringFile, "s_55");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: The droids' transports have been destroyed.
|
|
if (response == "s_98")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_r3SpaceCompletedSignal (player, npc);
|
|
|
|
//-- NPC: Confirming ... kill confirmed.
|
|
string_id message = new string_id (c_stringFile, "s_103");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want the head.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_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_91");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Confirming ... kill confirmed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I want the head.
|
|
if (response == "s_91")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_spaceRewardSignal (player, npc);
|
|
|
|
//-- NPC: Jabba has many incorrigible droids. Acquired head to study neural pathway feedback circuitry and safety cut offs. Built pain bolts on knowledge.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Do you have the head?
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_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_119");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Runaway droids not chastised. Return when you have accomplished tasks.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I lost the locations.
|
|
if (response == "s_90")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantRunawayGround (player, npc);
|
|
|
|
//-- NPC: Data and mission parameters uploaded to subject's datapad.
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Task completed. Equipment recovered. Compensation granted. Are you accessible for one more task?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you need?
|
|
if (response == "s_139")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_hasPilotSkill (player, npc))
|
|
{
|
|
//-- NPC: Accessing database ... subject is space qualified. Do you wish to accept employment involving space combat?
|
|
string_id message = new string_id (c_stringFile, "s_145");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I prefer to do my work on the ground.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yes I can fight in space.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_149");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_199");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!legacy_head_ev9d9_condition_hasPilotSkill (player, npc))
|
|
{
|
|
//-- NPC: Accessing database ... subject is not space qualified. Do you wish to accept employment involving combat?
|
|
string_id message = new string_id (c_stringFile, "s_255");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes I will accept employment.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No not right now.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_257");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_259");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not right now.
|
|
if (response == "s_141")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exit this facility.
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Accessing database ... subject is space qualified. Do you wish to accept employment involving space combat?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I prefer to do my work on the ground.
|
|
if (response == "s_149")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Escaped droids must be made example of. Are you willing?
|
|
string_id message = new string_id (c_stringFile, "s_153");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes I am
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_157");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_260");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes I can fight in space.
|
|
if (response == "s_199")
|
|
{
|
|
legacy_head_ev9d9_action_facePlayer (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: To keep droids disciplined I need escaped droids destroyed before they exit system. Are you willing?
|
|
string_id message = new string_id (c_stringFile, "s_201");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes I am.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought no.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_203");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_207");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Escaped droids must be made example of. Are you willing?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes I am
|
|
if (response == "s_157")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantRunawayGround (player, npc);
|
|
|
|
//-- NPC: Data and mission parameters uploaded to subject's datapad.
|
|
string_id message = new string_id (c_stringFile, "s_161");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not right now.
|
|
if (response == "s_260")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exit this facility.
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: To keep droids disciplined I need escaped droids destroyed before they exit system. Are you willing?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes I am.
|
|
if (response == "s_203")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_spaceQuestGranted (player, npc);
|
|
|
|
//-- NPC: Data and mission parameters uploaded to subject's datapad.
|
|
string_id message = new string_id (c_stringFile, "s_205");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: On second thought no.
|
|
if (response == "s_207")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exit this facility.
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Accessing database ... subject is not space qualified. Do you wish to accept employment involving combat?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes I will accept employment.
|
|
if (response == "s_257")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Escaped droids must be made example of. Are you willing?
|
|
string_id message = new string_id (c_stringFile, "s_153");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes I am
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_157");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_260");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No not right now.
|
|
if (response == "s_259")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exit this facility.
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Equipment recovered. Speak to me again for final task.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will.
|
|
if (response == "s_262")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_rewardRemodel (player, npc);
|
|
|
|
//-- NPC: Compensation granted.
|
|
string_id message = new string_id (c_stringFile, "s_263");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you need?
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_139");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_141");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Compensation granted.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you need?
|
|
if (response == "s_139")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_hasPilotSkill (player, npc))
|
|
{
|
|
//-- NPC: Accessing database ... subject is space qualified. Do you wish to accept employment involving space combat?
|
|
string_id message = new string_id (c_stringFile, "s_145");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I prefer to do my work on the ground.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yes I can fight in space.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_149");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_199");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!legacy_head_ev9d9_condition_hasPilotSkill (player, npc))
|
|
{
|
|
//-- NPC: Accessing database ... subject is not space qualified. Do you wish to accept employment involving combat?
|
|
string_id message = new string_id (c_stringFile, "s_255");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes I will accept employment.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No not right now.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_257");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_259");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not right now.
|
|
if (response == "s_141")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exit this facility.
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Detecting anomalous datapad function. Droids not chastised. Do you need a reboot?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need the locations of the runaways.
|
|
if (response == "s_226")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_hasPilotSkill (player, npc))
|
|
{
|
|
//-- NPC: Punishment in space or on the ground?
|
|
string_id message = new string_id (c_stringFile, "s_230");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Space.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Ground.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_232");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_236");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!legacy_head_ev9d9_condition_hasPilotSkill (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantRunawayGround (player, npc);
|
|
|
|
//-- NPC: Information uploaded to datapad.
|
|
string_id message = new string_id (c_stringFile, "s_228");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Punishment in space or on the ground?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Space.
|
|
if (response == "s_232")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_regrantSpace (player, npc);
|
|
|
|
//-- NPC: Data uploaded.
|
|
string_id message = new string_id (c_stringFile, "s_234");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ground.
|
|
if (response == "s_236")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_regrantGround (player, npc);
|
|
|
|
//-- NPC: Data uploaded.
|
|
string_id message = new string_id (c_stringFile, "s_238");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Detecting anomalous datapad function. Equipment needed. Do you need a reboot?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need the location of your equipment.
|
|
if (response == "s_240")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantRemodel (player, npc);
|
|
|
|
//-- NPC: Information uploaded to datapad.
|
|
string_id message = new string_id (c_stringFile, "s_242");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Detecting anomalous datapad function. Punishment devices needed. Do you need a reboot?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where do I go for the shock rods?
|
|
if (response == "s_216")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantShock (player, npc);
|
|
|
|
//-- NPC: Information uploaded to datapad.
|
|
string_id message = new string_id (c_stringFile, "s_218");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Detecting anomalous datapad function. Do you need a reboot?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I have done everything you asked.
|
|
if (response == "s_246")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantReward (player, npc);
|
|
|
|
//-- NPC: Yes you have.
|
|
string_id message = new string_id (c_stringFile, "s_248");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch36 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Scanning authorized personnel database ... individual authorized. What is its need?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am looking for a missing droid part.
|
|
if (response == "s_81")
|
|
{
|
|
legacy_head_ev9d9_action_foundev9d9 (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Droids must obey. Droids that do not obey are to be disciplined. I lack the assets necessary to discipline. Will you help?
|
|
string_id message = new string_id (c_stringFile, "s_83");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will if you give me the part I require.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What do you need?
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse2 = false;
|
|
if (legacy_head_ev9d9_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_85");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_135");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sorry to bother you.
|
|
if (response == "s_174")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exit this facility.
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Droids must obey. Droids that do not obey are to be disciplined. I lack the assets necessary to discipline. Will you help?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will if you give me the part I require.
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantShock (player, npc);
|
|
|
|
//-- NPC: Conditions acceptable. Mission parameters uploaded to subject's datapad.
|
|
string_id message = new string_id (c_stringFile, "s_137");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you need?
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I require shock rods. Jabba's beastmaster has items but will not cooperate with this unit. I require someone to aquire rods for me.
|
|
string_id message = new string_id (c_stringFile, "s_93");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_94");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_95");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 39);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not right now.
|
|
if (response == "s_135")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exit this facility.
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int legacy_head_ev9d9_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I require shock rods. Jabba's beastmaster has items but will not cooperate with this unit. I require someone to aquire rods for me.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll do it.
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_grantShock (player, npc);
|
|
|
|
//-- NPC: Conditions acceptable. Mission parameters uploaded to subject's datapad.
|
|
string_id message = new string_id (c_stringFile, "s_137");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not right now.
|
|
if (response == "s_95")
|
|
{
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Exit this facility.
|
|
string_id message = new string_id (c_stringFile, "s_176");
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.legacy_head_ev9d9");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
setName (self, "EV-9D9");
|
|
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
setName (self, "EV-9D9");
|
|
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.legacy_head_ev9d9");
|
|
|
|
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 (legacy_head_ev9d9_condition_endEV9D9 (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_cleanOldQuests (player, npc);
|
|
|
|
//-- NPC: All tasks accomplished. Authorization for this area has been revoked. Leave immediately.
|
|
string_id message = new string_id (c_stringFile, "s_99");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_QuestComplete (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_spaceRewardSignal (player, npc);
|
|
|
|
//-- NPC: All tasks accomplished. No other actions necessary
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I seem to have misplaced the droid head, can I get another?
|
|
boolean hasResponse0 = false;
|
|
if (!legacy_head_ev9d9_condition_hasHead (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Where do I need to go again?
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_condition_hasHead (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_77");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_rewardQuestground (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: All tasks accomplished. EV-9D9 performance efficiency at 100%. What do you desire?
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I want the droid head.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_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_117");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_onSpaceQuests (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Assigned task not complete. Can you accomplish the task? Or do you have something to report?
|
|
string_id message = new string_id (c_stringFile, "s_47");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I can handle the tasks.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: The droids' transports got away.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_condition_failedR3Space (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: The droids' transports have been destroyed.
|
|
boolean hasResponse2 = false;
|
|
if (legacy_head_ev9d9_condition_winR3Space (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_49");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_53");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_98");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_onRunawayGround (player, npc))
|
|
{
|
|
//-- NPC: Runaway droids not chastised. Return when you have accomplished tasks.
|
|
string_id message = new string_id (c_stringFile, "s_123");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I lost the locations.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_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_90");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 12);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_remodelComplete (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_rewardRemodel (player, npc);
|
|
|
|
//-- NPC: Task completed. Equipment recovered. Compensation granted. Are you accessible for one more task?
|
|
string_id message = new string_id (c_stringFile, "s_133");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you need?
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_139");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_141");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 14);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_onRemodelReward (player, npc))
|
|
{
|
|
//-- NPC: Equipment recovered. Speak to me again for final task.
|
|
string_id message = new string_id (c_stringFile, "s_261");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_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_262");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 21);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_onRemodel (player, npc))
|
|
{
|
|
//-- NPC: Equipment not recovered. Recover equipment.
|
|
string_id message = new string_id (c_stringFile, "s_127");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_onRods (player, npc))
|
|
{
|
|
//-- NPC: Rods not recovered. Return when you have gained the rods.
|
|
string_id message = new string_id (c_stringFile, "s_125");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_failedRunaways (player, npc))
|
|
{
|
|
//-- NPC: Detecting anomalous datapad function. Droids not chastised. Do you need a reboot?
|
|
string_id message = new string_id (c_stringFile, "s_224");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need the locations of the runaways.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_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_226");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 25);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_failedRemodel (player, npc))
|
|
{
|
|
//-- NPC: Detecting anomalous datapad function. Equipment needed. Do you need a reboot?
|
|
string_id message = new string_id (c_stringFile, "s_223");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need the location of your equipment.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition_failedRemodel (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_240");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 30);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_failedRod (player, npc))
|
|
{
|
|
//-- NPC: Detecting anomalous datapad function. Punishment devices needed. Do you need a reboot?
|
|
string_id message = new string_id (c_stringFile, "s_196");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where do I go for the shock rods?
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition_failedRod (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_216");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 32);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_failedReward (player, npc))
|
|
{
|
|
//-- NPC: Detecting anomalous datapad function. Do you need a reboot?
|
|
string_id message = new string_id (c_stringFile, "s_244");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I have done everything you asked.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_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_246");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 34);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition_onStartEV (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Scanning authorized personnel database ... individual authorized. What is its need?
|
|
string_id message = new string_id (c_stringFile, "s_79");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am looking for a missing droid part.
|
|
boolean hasResponse0 = false;
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Sorry to bother you.
|
|
boolean hasResponse1 = false;
|
|
if (legacy_head_ev9d9_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_81");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_174");
|
|
|
|
utils.setScriptVar (player, "conversation.legacy_head_ev9d9.branchId", 36);
|
|
|
|
npcStartConversation (player, npc, "legacy_head_ev9d9", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (legacy_head_ev9d9_condition__defaultCondition (player, npc))
|
|
{
|
|
legacy_head_ev9d9_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Scanning authorized personnel database ...You are not authorized to be in this area. Leave immediately.
|
|
string_id message = new string_id (c_stringFile, "s_180");
|
|
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 != "legacy_head_ev9d9")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
if (branchId == 2 && legacy_head_ev9d9_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && legacy_head_ev9d9_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && legacy_head_ev9d9_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && legacy_head_ev9d9_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && legacy_head_ev9d9_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && legacy_head_ev9d9_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && legacy_head_ev9d9_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && legacy_head_ev9d9_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && legacy_head_ev9d9_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && legacy_head_ev9d9_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && legacy_head_ev9d9_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && legacy_head_ev9d9_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && legacy_head_ev9d9_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && legacy_head_ev9d9_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && legacy_head_ev9d9_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && legacy_head_ev9d9_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && legacy_head_ev9d9_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && legacy_head_ev9d9_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 36 && legacy_head_ev9d9_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && legacy_head_ev9d9_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && legacy_head_ev9d9_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.legacy_head_ev9d9.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|