mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
1777 lines
53 KiB
Plaintext
1777 lines
53 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// mako_ghast.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/mako_ghast";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean mako_ghast_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_canDoEliteHideout (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_elite_kill_pirate_cave_collection")
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasEliteHideoutNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_pirate_cave_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasReturnedEliteHideout (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_elite_kill_pirate_cave_collection", "returnKillCaveTrollComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_canDoEliteCave (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_elite_kill_miner_cave_collection")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_elite_kill_pirate_cave_collection")
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasEliteCaveNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_miner_cave_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasReturnedEliteCave (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_elite_kill_miner_cave_collection", "returnMineElitesComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_canDoEliteLab (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_elite_kill_imperial_facility_collection")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_elite_kill_miner_cave_collection")
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_research_facility");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasEliteLabNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_imperial_facility_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasReturnedEliteLab (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_elite_kill_imperial_facility_collection", "returnResearchFacilityElitesComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasntDoneLab (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_research_facility")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_mine")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_elite_kill_miner_cave_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasntDoneCave (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_hideout")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_elite_kill_pirate_cave_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasntDoneHideout (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasCompletedPirateEliteCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "kill_nyms_themepark_elite_hideout")
|
|
&& groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_pirate_cave_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasCompletedLabEliteCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "kill_nyms_themepark_elite_lab")
|
|
&& groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_imperial_facility_collection");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mako_ghast_condition_hasCompletedMinerEliteCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "kill_nyms_themepark_elite_cave")
|
|
&& groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_miner_cave_collection");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void mako_ghast_action_grantHideoutKill (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_elite_kill_pirate_cave_collection");
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_cave_troll_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_cave_troll_activate", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mako_ghast_action_completeHideoutKill (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedKillCaveTroll");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mako_ghast_action_grantCaveKill (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_elite_kill_miner_cave_collection");
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_elite_cave_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_elite_cave_activate", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mako_ghast_action_completeCaveKill (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedMineElites");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mako_ghast_action_grantLabKill (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_elite_kill_imperial_facility_collection");
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_elite_lab_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_elite_lab_activate", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mako_ghast_action_completeLabKill (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedResearchFacilityElites");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mako_ghast_action_BruteForceCompletePirateElite (obj_id player, obj_id npc)
|
|
{
|
|
if(mako_ghast_condition_hasCompletedPirateEliteCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_pirate_cave_collection"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_elite_kill_pirate_cave_collection for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_elite_kill_pirate_cave_collection");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mako_ghast_action_BruteForceCompleteLabElite (obj_id player, obj_id npc)
|
|
{
|
|
if(mako_ghast_condition_hasCompletedLabEliteCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_imperial_facility_collection"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_elite_kill_imperial_facility_collection for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_elite_kill_imperial_facility_collection");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void mako_ghast_action_BruteForceCompleteMinerElite (obj_id player, obj_id npc)
|
|
{
|
|
if(mako_ghast_condition_hasCompletedMinerEliteCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_elite_kill_miner_cave_collection"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_elite_kill_miner_cave_collection for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_elite_kill_miner_cave_collection");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int mako_ghast_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Congratulations! You've managed to do what no other scum or villain around here has been able to.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nothing I couldn't handle.
|
|
if (response == "s_36")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Indeed you are a force to be reckoned with, %TU. You have my thanks, and more importantly, the thanks of Nym.
|
|
string_id message = new string_id (c_stringFile, "s_37");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I just did what needed to be done.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_94");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 2);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Indeed you are a force to be reckoned with, %TU. You have my thanks, and more importantly, the thanks of Nym.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I just did what needed to be done.
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
mako_ghast_action_completeLabKill (player, npc);
|
|
|
|
//-- NPC: And it has not gone unnoticed. You've done a great service for us all today. It will be some time before any of Nym's enemies crawl out from under their rocks.
|
|
string_id message = new string_id (c_stringFile, "s_95");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Perhaps I did not stress enough the urgency of this task. What are you still doing here?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sorry, i'll get right on it.
|
|
if (response == "s_34")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Don't come back until your mission is accomplished!
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: %TU, I have one last mission for you. This could prove much more dangerous than your last assignment. Are you ready?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sign me up.
|
|
if (response == "s_32")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I knew we could count on you.
|
|
string_id message = new string_id (c_stringFile, "s_33");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Just tell me what needs to be done.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_88");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I knew we could count on you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just tell me what needs to be done.
|
|
if (response == "s_88")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There is an Imperial Research Facility being operated primarily by mercenaries. The details of their operation, however, are not important for you to complete this operation.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Get to the point.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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.mako_ghast.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There is an Imperial Research Facility being operated primarily by mercenaries. The details of their operation, however, are not important for you to complete this operation.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Get to the point.
|
|
if (response == "s_90")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are four targets working in the facility. These four have proved elusive for Nym and have meddled in his affairs for long enough.
|
|
string_id message = new string_id (c_stringFile, "s_91");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: They will be dealt with.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_92");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are four targets working in the facility. These four have proved elusive for Nym and have meddled in his affairs for long enough.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: They will be dealt with.
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
mako_ghast_action_grantLabKill (player, npc);
|
|
|
|
//-- NPC: Nym will consider this a personal favor if you manage to eliminate these targets. Be quick about it, and let this be a message to anyone who opposes Nym.
|
|
string_id message = new string_id (c_stringFile, "s_93");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are the rumors true? Were successful in your task?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Indeed.
|
|
if (response == "s_27")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
mako_ghast_action_completeCaveKill (player, npc);
|
|
|
|
//-- NPC: You are proving to be a very useful asset to us. Nym will be very pleased to hear this. This could provide us with the necessary opening to take control of the mining operation. We'll talk again when you are ready for your last task.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That was quick...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I forgot what I was supposed to do.
|
|
if (response == "s_41")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Get to the mine cave, and help us with our little problem. Stop wasting time!
|
|
string_id message = new string_id (c_stringFile, "s_43");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Glad you're back. Are you interested in performing another task for Nym?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am. Let's hear it.
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There is a mining operation in a cave not far from here. The miners should not pose too much of a problem, but they aren't the main targets.
|
|
string_id message = new string_id (c_stringFile, "s_49");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: There is more than one target?
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_67");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There is a mining operation in a cave not far from here. The miners should not pose too much of a problem, but they aren't the main targets.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: There is more than one target?
|
|
if (response == "s_67")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'm getting to that!
|
|
string_id message = new string_id (c_stringFile, "s_68");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm sorry, please continue.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_69");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm getting to that!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm sorry, please continue.
|
|
if (response == "s_69")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As I was saying, there are two high priority targets in this mining cave that Nym would like... Lets just say, they wouldn't be missed.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who or what are the targets?
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_71");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: As I was saying, there are two high priority targets in this mining cave that Nym would like... Lets just say, they wouldn't be missed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who or what are the targets?
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A Rodian named Raynar Cath and a Sullustan named Wes Riggers.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Any particular reason these two need to go away?
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_73");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A Rodian named Raynar Cath and a Sullustan named Wes Riggers.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any particular reason these two need to go away?
|
|
if (response == "s_73")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Lets just say they were a bit too vocal for their own good. You don't need to know the details.
|
|
string_id message = new string_id (c_stringFile, "s_74");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll take care of it.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_75");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Lets just say they were a bit too vocal for their own good. You don't need to know the details.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll take care of it.
|
|
if (response == "s_75")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
mako_ghast_action_grantCaveKill (player, npc);
|
|
|
|
//-- NPC: Excellent. Head to the mine cave and take care of this little problem. Do this for us and I may have more work for you in the future.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Nice job taking down that bridge troll. I thought it might prove impossible for you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just like bull's-eyeing womp rats back home.
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
mako_ghast_action_completeHideoutKill (player, npc);
|
|
|
|
//-- NPC: Great kid, but don't get cocky. This was only a minor victory against one of Nym's enemies. But, you did provide a good service for Nym today. Come talk to me when you're up for something a little more challenging.
|
|
string_id message = new string_id (c_stringFile, "s_66");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Is it dead?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where was I supposed to go again?
|
|
if (response == "s_81")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: To the Sulfur Lake Pirate hideout!
|
|
string_id message = new string_id (c_stringFile, "s_83");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: %TU, I am looking for someone who can handle themselves in a fight. If that isn't you then please leave me to my work.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've been known to get my hands dirty from time to time.
|
|
if (response == "s_87")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That is just what I wanted to hear. Ready for the details?
|
|
string_id message = new string_id (c_stringFile, "s_97");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm ready, willing, and able. What do you need done?
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_99");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 32);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That is just what I wanted to hear. Ready for the details?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm ready, willing, and able. What do you need done?
|
|
if (response == "s_99")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The word around the stronghold is that the local Sulfur Lake Pirates have a pretty nasty beast under their control. I want you to travel to their hideout and take it down.
|
|
string_id message = new string_id (c_stringFile, "s_101");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Any particular reason?
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_103");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 33);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mako_ghast_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The word around the stronghold is that the local Sulfur Lake Pirates have a pretty nasty beast under their control. I want you to travel to their hideout and take it down.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Any particular reason?
|
|
if (response == "s_103")
|
|
{
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
mako_ghast_action_grantHideoutKill (player, npc);
|
|
|
|
//-- NPC: It's very simple. The Sulfur Lake Pirates and Nym never exactly saw eye to eye. We want to let them know who still runs this planet.
|
|
string_id message = new string_id (c_stringFile, "s_107");
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.mako_ghast");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition( self, CONDITION_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);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.mako_ghast");
|
|
|
|
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 (mako_ghast_condition_hasReturnedEliteLab (player, npc))
|
|
{
|
|
//-- NPC: Congratulations! You've managed to do what no other scum or villain around here has been able to.
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Nothing I couldn't handle.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_36");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasCompletedLabEliteCollection (player, npc))
|
|
{
|
|
mako_ghast_action_BruteForceCompleteLabElite (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up with those Imperial Research Facility Elites. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_109");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasEliteLabNotComplete (player, npc))
|
|
{
|
|
//-- NPC: Perhaps I did not stress enough the urgency of this task. What are you still doing here?
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sorry, i'll get right on it.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_34");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_canDoEliteLab (player, npc))
|
|
{
|
|
//-- NPC: %TU, I have one last mission for you. This could prove much more dangerous than your last assignment. Are you ready?
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sign me up.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_32");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 7);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasntDoneLab (player, npc))
|
|
{
|
|
//-- NPC: Get cleared by Kole and come back to me.
|
|
string_id message = new string_id (c_stringFile, "s_105");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasReturnedEliteCave (player, npc))
|
|
{
|
|
//-- NPC: Are the rumors true? Were successful in your task?
|
|
string_id message = new string_id (c_stringFile, "s_23");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Indeed.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_27");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 13);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasCompletedMinerEliteCollection (player, npc))
|
|
{
|
|
mako_ghast_action_BruteForceCompleteMinerElite (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up with those Mining Cave Elites. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_110");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasEliteCaveNotComplete (player, npc))
|
|
{
|
|
//-- NPC: That was quick...
|
|
string_id message = new string_id (c_stringFile, "s_39");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I forgot what I was supposed to do.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_41");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 16);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_canDoEliteCave (player, npc))
|
|
{
|
|
//-- NPC: Glad you're back. Are you interested in performing another task for Nym?
|
|
string_id message = new string_id (c_stringFile, "s_45");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am. Let's hear it.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_47");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 18);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasntDoneCave (player, npc))
|
|
{
|
|
//-- NPC: Get cleared by Jinkins and come back to me.
|
|
string_id message = new string_id (c_stringFile, "s_104");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasReturnedEliteHideout (player, npc))
|
|
{
|
|
//-- NPC: Nice job taking down that bridge troll. I thought it might prove impossible for you.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Just like bull's-eyeing womp rats back home.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_64");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 26);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasCompletedPirateEliteCollection (player, npc))
|
|
{
|
|
mako_ghast_action_BruteForceCompletePirateElite (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up with the Bridge Troll. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_111");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasEliteHideoutNotComplete (player, npc))
|
|
{
|
|
//-- NPC: Is it dead?
|
|
string_id message = new string_id (c_stringFile, "s_79");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where was I supposed to go again?
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_81");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 29);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_canDoEliteHideout (player, npc))
|
|
{
|
|
//-- NPC: %TU, I am looking for someone who can handle themselves in a fight. If that isn't you then please leave me to my work.
|
|
string_id message = new string_id (c_stringFile, "s_85");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I've been known to get my hands dirty from time to time.
|
|
boolean hasResponse0 = false;
|
|
if (mako_ghast_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_87");
|
|
|
|
utils.setScriptVar (player, "conversation.mako_ghast.branchId", 31);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "mako_ghast", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition_hasntDoneHideout (player, npc))
|
|
{
|
|
//-- NPC: Get cleared by Vana and come back to me.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mako_ghast_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have time for this right now.
|
|
string_id message = new string_id (c_stringFile, "s_114");
|
|
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 != "mako_ghast")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
if (branchId == 1 && mako_ghast_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && mako_ghast_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && mako_ghast_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && mako_ghast_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && mako_ghast_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && mako_ghast_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && mako_ghast_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && mako_ghast_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && mako_ghast_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && mako_ghast_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && mako_ghast_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && mako_ghast_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && mako_ghast_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && mako_ghast_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && mako_ghast_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && mako_ghast_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && mako_ghast_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && mako_ghast_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && mako_ghast_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && mako_ghast_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.mako_ghast.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|