mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
2421 lines
69 KiB
Plaintext
2421 lines
69 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// grenz_zittoun.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.collection;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/grenz_zittoun";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean grenz_zittoun_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_isElligibleHideoutBoss (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_boss_1")
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasReturnedHideoutBoss (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_pirate_boss_1", "returnKillHideoutBossComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasHideoutBossNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_pirate_boss_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_isElligibleMineBoss (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine_boss")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_boss_1")
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_isElligibleLabBoss (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_lab_boss")
|
|
&& groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_research_facility")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_mine_boss");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasReturnedMineBoss (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_mine_boss", "returnKillMineBossComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasReturnedLabBoss (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_lab_boss", "returnKillLabBossComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasMineBossNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_mine_boss");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasLabBossNotComplete (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_lab_boss");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasntDoneHideout (obj_id player, obj_id npc)
|
|
{
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_pirate_hideout");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasntDoneMine (obj_id player, obj_id npc)
|
|
{
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_hideout")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_boss_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasntDoneLab (obj_id player, obj_id npc)
|
|
{
|
|
return !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_research_facility")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_mine")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_mine_boss");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasCompletedPirateBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "kill_nyms_themepark_boss_hideout")
|
|
&& groundquests.isQuestActive(player, "u16_nym_themepark_pirate_boss_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasCompletedMinerBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "kill_nyms_themepark_boss_mine")
|
|
&& groundquests.isQuestActive(player, "u16_nym_themepark_mine_boss");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasCompletedLabBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
return hasCompletedCollection(player, "kill_nyms_themepark_boss_lab")
|
|
&& groundquests.isQuestActive(player, "u16_nym_themepark_lab_boss");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasCompletedAll (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_lab_boss");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasIncompletePirateBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
return !hasCompletedCollection(player, "kill_nyms_themepark_boss_hideout")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_boss_1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasIncompleteMinerBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
return !hasCompletedCollection(player, "kill_nyms_themepark_boss_mine")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_mine_boss");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean grenz_zittoun_condition_hasIncompleteLabBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
return !hasCompletedCollection(player, "kill_nyms_themepark_boss_lab")
|
|
&& groundquests.hasCompletedQuest(player, "u16_nym_themepark_lab_boss");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void grenz_zittoun_action_grantHideoutBossQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_pirate_boss_1");
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_boss_hideout_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_hideout_activate", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_completeHideoutBossQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedKillHideoutBoss");
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_boss_1"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_1", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_grantMineBossQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_mine_boss");
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_boss_mine_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_mine_activate", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_completeMineBossQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedKillMineBoss");
|
|
if(!hasCompletedCollectionSlot(player, "u16_nym_themepark_mine_boss"))
|
|
{
|
|
modifyCollectionSlotValue(player, "u16_nym_themepark_mine_boss", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_grantLabBossQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_lab_boss");
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_boss_lab_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_lab_activate", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_completeLabBoss (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasCompletedKillLabBoss");
|
|
if(!hasCompletedCollectionSlot(player, "u16_nym_themepark_lab_boss"))
|
|
{
|
|
modifyCollectionSlotValue(player, "u16_nym_themepark_lab_boss", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_BruteForceCompletePirateBoss (obj_id player, obj_id npc)
|
|
{
|
|
if(grenz_zittoun_condition_hasCompletedPirateBossCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_pirate_boss_1"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_pirate_boss_1 for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_pirate_boss_1");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_BruteForceCompleteMineBoss (obj_id player, obj_id npc)
|
|
{
|
|
if(grenz_zittoun_condition_hasCompletedMinerBossCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_mine_boss"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_mine_boss for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_mine_boss");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_BruteForceCompleteLabBoss (obj_id player, obj_id npc)
|
|
{
|
|
if(grenz_zittoun_condition_hasCompletedLabBossCollection(player,npc))
|
|
{
|
|
if(groundquests.isQuestActive(player, "u16_nym_themepark_lab_boss"))
|
|
{
|
|
CustomerServiceLog("nyms_themepark", "NPC Conversation - Brute Force completing quest: u16_nym_themepark_lab_boss for player: "+player+" so they do not remailn bugged.");
|
|
int questid = questGetQuestId("quest/u16_nym_themepark_lab_boss");
|
|
if((questid != 0) && questIsQuestActive(questid, player))
|
|
{
|
|
questCompleteQuest(questid, player);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_verifyAndCorrectErrors (obj_id player, obj_id npc)
|
|
{
|
|
if(grenz_zittoun_condition_hasCompletedLabBossCollection(player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompleteLabBoss(player,npc);
|
|
}
|
|
if(grenz_zittoun_condition_hasCompletedMinerBossCollection(player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompleteMineBoss(player,npc);
|
|
}
|
|
if(grenz_zittoun_condition_hasCompletedPirateBossCollection(player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompletePirateBoss(player,npc);
|
|
}
|
|
if(grenz_zittoun_condition_hasIncompleteLabBossCollection(player,npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompleteLabBossCollection(player,npc);
|
|
}
|
|
if(grenz_zittoun_condition_hasIncompleteMinerBossCollection(player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompleteMineBossCollection(player,npc);
|
|
}
|
|
if(grenz_zittoun_condition_hasIncompletePirateBossCollection(player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompletePirateBossCollection(player,npc);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_BruteForceCompleteLabBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
if(hasCompletedCollectionSlot(player, "kill_nyms_themepark_boss_lab_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_4", 1);
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_5", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_BruteForceCompleteMineBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
if(hasCompletedCollectionSlot(player, "kill_nyms_themepark_boss_mine_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_2", 1);
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_3", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void grenz_zittoun_action_BruteForceCompletePirateBossCollection (obj_id player, obj_id npc)
|
|
{
|
|
if(hasCompletedCollectionSlot(player, "kill_nyms_themepark_boss_hideout_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_boss_1", 1);
|
|
}
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string grenz_zittoun_tokenTO_firstName (obj_id player, obj_id npc)
|
|
{
|
|
return new string(getFirstName(player));
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int grenz_zittoun_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Intelligence reports both Mercenary Bosses are no longer an issue, %TU!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Of course not.
|
|
if (response == "s_82")
|
|
{
|
|
doAnimationAction (player, "flex_biceps");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_once");
|
|
|
|
//-- NPC: Indeed. Grenz has come to expect no less than success from %TO.
|
|
string_id message = new string_id (c_stringFile, "s_83");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: As you should.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_84");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 3);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Indeed. Grenz has come to expect no less than success from %TO.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: As you should.
|
|
if (response == "s_84")
|
|
{
|
|
doAnimationAction (player, "flex3");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "handshake_tandem");
|
|
|
|
grenz_zittoun_action_completeLabBoss (player, npc);
|
|
|
|
//-- NPC: Grenz looks forward to the possibility of working with %TO again in the future.
|
|
string_id message = new string_id (c_stringFile, "s_85");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Intelligence reports two Mercenary Bosses, %TU has seen to both?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not quite.
|
|
if (response == "s_79")
|
|
{
|
|
doAnimationAction (player, "shake_head_no");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: Then Grenz has nothing more to say.
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Grenz needs %TU's attention to another few minor details.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How minor?
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: It seems that the Mercenaries hired to protect a certain Imperial Research Facility are not content to sit and collect a salary.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: This is beginning to sound like less-than-minor details, Grenz.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_68");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Can I get back to you on that?
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please return and speak with Grenz again soon.
|
|
string_id message = new string_id (c_stringFile, "s_65");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It seems that the Mercenaries hired to protect a certain Imperial Research Facility are not content to sit and collect a salary.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: This is beginning to sound like less-than-minor details, Grenz.
|
|
if (response == "s_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
//-- NPC: %TO is astute. It seems that boredom has driven the Bosses of these Research Facility Mercenaries to send underlings to poke Mercenary noses where Mercenary noses do not belong.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And these noses are getting close to something Nym would rather they not, correct?
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_70");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 11);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: %TO is astute. It seems that boredom has driven the Bosses of these Research Facility Mercenaries to send underlings to poke Mercenary noses where Mercenary noses do not belong.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And these noses are getting close to something Nym would rather they not, correct?
|
|
if (response == "s_70")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "elbow");
|
|
|
|
//-- NPC: Uncomfortably so. These Bosses deserve a vacation in a most grave way, understand?
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Did you just make a joke? Are you ok? Do you want to lie down?
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_72");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Uncomfortably so. These Bosses deserve a vacation in a most grave way, understand?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Did you just make a joke? Are you ok? Do you want to lie down?
|
|
if (response == "s_72")
|
|
{
|
|
doAnimationAction (player, "belly_laugh");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "he_dies");
|
|
|
|
//-- NPC: Rather than Grenz, perhaps %TO can arrange for these Bosses to lie down... in a most permanent way?
|
|
string_id message = new string_id (c_stringFile, "s_73");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm on it.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Let me sleep on it.
|
|
boolean hasResponse1 = false;
|
|
if (grenz_zittoun_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_74");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_75");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 13);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Rather than Grenz, perhaps %TO can arrange for these Bosses to lie down... in a most permanent way?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm on it.
|
|
if (response == "s_74")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
grenz_zittoun_action_grantLabBossQuest (player, npc);
|
|
|
|
//-- NPC: Grenz has provided the datapad of %TO with the location of the Imperial Research Facility.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let me sleep on it.
|
|
if (response == "s_75")
|
|
{
|
|
doAnimationAction (player, "yawn");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: Return soon, %TO, so that this matter may be laid to rest.
|
|
string_id message = new string_id (c_stringFile, "s_77");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Intelligence reports that the Controller and Grand Foreman are no more. Is this true, %TU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It is, Grenz.
|
|
if (response == "s_61")
|
|
{
|
|
doAnimationAction (player, "nod_head_once");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_once");
|
|
|
|
grenz_zittoun_action_completeMineBossQuest (player, npc);
|
|
|
|
//-- NPC: Excellent! %TO does good work. Grenz approves.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Controller and Grand Foreman not much of a challenge for %TO?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Um... I wouldn't know, yet.
|
|
if (response == "s_58")
|
|
{
|
|
doAnimationAction (player, "apologize");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: Grenz is disappointed.
|
|
string_id message = new string_id (c_stringFile, "s_59");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: If %TU can find the time, Grenz has another situation...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What kind of situation?
|
|
if (response == "s_47")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Vana Sage has given Grenz intelligence on happenings within the Imperial Mine.
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And...
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_49");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sorry, Grenz, but I can not find the time right now.
|
|
if (response == "s_87")
|
|
{
|
|
doAnimationAction (player, "check_wrist_device");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
//-- NPC: Grenz will be here when %TO locates a moment.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Vana Sage has given Grenz intelligence on happenings within the Imperial Mine.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And...
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Grenz believes that the figures known as the Controller and the Grand Foreman are to some degree responsible for the seemingly random attacks by the miners upon inhabitants of Lok.
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And Nym doesn't like attacks on the people of Lok, right?
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_51");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Grenz believes that the figures known as the Controller and the Grand Foreman are to some degree responsible for the seemingly random attacks by the miners upon inhabitants of Lok.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And Nym doesn't like attacks on the people of Lok, right?
|
|
if (response == "s_51")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_once");
|
|
|
|
//-- NPC: Correct, %TO! That makes this a situation with which Grenz must deal.
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And that's where I come in.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: But not one that I have to deal with.
|
|
boolean hasResponse1 = false;
|
|
if (grenz_zittoun_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_53");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 27);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Correct, %TO! That makes this a situation with which Grenz must deal.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And that's where I come in.
|
|
if (response == "s_53")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
grenz_zittoun_action_grantMineBossQuest (player, npc);
|
|
|
|
//-- NPC: Correct again! Seek out Ran Machado and Teemu Komo, the Controller and Grand Foreman, in the Imperial Mine and eliminate them so that these attacks may cease. Grenz has placed the location of the Imperial Mine in the datapad of %TO.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: But not one that I have to deal with.
|
|
if (response == "s_55")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_no");
|
|
|
|
//-- NPC: Not yet, anyway...
|
|
string_id message = new string_id (c_stringFile, "s_56");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: %TU has taken care of that little situation, Grenz trusts?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Consider the breakup complete.
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "bow5");
|
|
|
|
grenz_zittoun_action_completeHideoutBossQuest (player, npc);
|
|
|
|
//-- NPC: Wonderful, %TO! Remember, this is just between %TO and Grenz. No need to mention it ever again. Ever.
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch35 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: And has %TU so quickly done what Grenz asked?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh yeah the 'Girlfriend', I'll get right on that!
|
|
if (response == "s_101")
|
|
{
|
|
doAnimationAction (player, "tap_head");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: Quietly, quietly! Grenz is beginning to have second thoughts about the ability of %TO to keep a secret!
|
|
string_id message = new string_id (c_stringFile, "s_103");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: %TU, just the being Grenz was looking for. Grenz needs the assistance of %TO with a very sensitive situation. Can %TO keep a secret?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Of course I can. What's going on?
|
|
if (response == "s_107")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Those Sulfur Lake Pirates are about as bright as Darth Vader's wardrobe but occasionally the Sulfur Lake Pirates show a spark of animal cunning.
|
|
string_id message = new string_id (c_stringFile, "s_109");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What did they do?
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_111");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Certainly, but I'm a little busy right now.
|
|
if (response == "s_127")
|
|
{
|
|
doAnimationAction (player, "check_wrist_device");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: Grenz sees. Well do try to hurry; this could be a major embarrassment.
|
|
string_id message = new string_id (c_stringFile, "s_131");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Those Sulfur Lake Pirates are about as bright as Darth Vader's wardrobe but occasionally the Sulfur Lake Pirates show a spark of animal cunning.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What did they do?
|
|
if (response == "s_111")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nervous");
|
|
|
|
//-- NPC: The Sulfur Lake Pirates have created a most embarrassing situation. This must remain strictly between %TO and Grenz. Grenz shudders to think what would happen should Nym find out!
|
|
string_id message = new string_id (c_stringFile, "s_113");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, I get it, Nym can't know. Are you going to tell me or make me guess?
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_115");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 39);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Sulfur Lake Pirates have created a most embarrassing situation. This must remain strictly between %TO and Grenz. Grenz shudders to think what would happen should Nym find out!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok, I get it, Nym can't know. Are you going to tell me or make me guess?
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "whisper");
|
|
|
|
//-- NPC: Hastily squashed rumor has it that the Sulfur Lake Pirates captured a particularly repulsive creature native to Lok and have taken to referring to it as 'Nym's Girlfriend'!
|
|
string_id message = new string_id (c_stringFile, "s_117");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *snicker*
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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.grenz_zittoun.branchId", 40);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch40 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hastily squashed rumor has it that the Sulfur Lake Pirates captured a particularly repulsive creature native to Lok and have taken to referring to it as 'Nym's Girlfriend'!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *snicker*
|
|
if (response == "s_119")
|
|
{
|
|
doAnimationAction (player, "cover_mouth");
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "gesticulate_wildly");
|
|
|
|
//-- NPC: This is no laughing matter! This creature must be found and destroyed before Nym finds out!
|
|
string_id message = new string_id (c_stringFile, "s_121");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Ok, ok. I'll take care of it.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_123");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 41);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int grenz_zittoun_handleBranch41 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This is no laughing matter! This creature must be found and destroyed before Nym finds out!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Ok, ok. I'll take care of it.
|
|
if (response == "s_123")
|
|
{
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
grenz_zittoun_action_grantHideoutBossQuest (player, npc);
|
|
|
|
//-- NPC: Grenz has placed the location of the Sulfur Lake Pirates' hideout in the datapad of %TO. Please act with utmost speed and discretion!
|
|
string_id message = new string_id (c_stringFile, "s_125");
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.grenz_zittoun");
|
|
|
|
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.grenz_zittoun");
|
|
|
|
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 (grenz_zittoun_condition_hasCompletedAll (player, npc))
|
|
{
|
|
grenz_zittoun_action_verifyAndCorrectErrors (player, npc);
|
|
|
|
//-- NPC: I can't believe it myself, but I don't have any more enemies left for you to kill, %TU. Great working with you.
|
|
string_id message = new string_id (c_stringFile, "s_139");
|
|
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 (grenz_zittoun_condition_hasReturnedLabBoss (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Intelligence reports both Mercenary Bosses are no longer an issue, %TU!
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Of course not.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_82");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 2);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", 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 (grenz_zittoun_condition_hasCompletedLabBossCollection (player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompleteLabBoss (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up with those Imperial Research Facility Bosses. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_135");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_hasLabBossNotComplete (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Intelligence reports two Mercenary Bosses, %TU has seen to both?
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Not quite.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_79");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 6);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", 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 (grenz_zittoun_condition_hasIncompleteMinerBossCollection (player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompleteMineBossCollection (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up with those Imperial Mine Bosses. Let me help you out with that.
|
|
string_id message = new string_id (c_stringFile, "s_141");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_isElligibleLabBoss (player, npc))
|
|
{
|
|
doAnimationAction (npc, "beckon");
|
|
|
|
//-- NPC: Grenz needs %TU's attention to another few minor details.
|
|
string_id message = new string_id (c_stringFile, "s_63");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How minor?
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Can I get back to you on that?
|
|
boolean hasResponse1 = false;
|
|
if (grenz_zittoun_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_66");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_64");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 9);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", 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 (grenz_zittoun_condition_hasntDoneLab (player, npc))
|
|
{
|
|
//-- NPC: %TU must speak with Kole before Grenz will work with %TO again.
|
|
string_id message = new string_id (c_stringFile, "s_129");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_hasReturnedMineBoss (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Intelligence reports that the Controller and Grand Foreman are no more. Is this true, %TU?
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It is, Grenz.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_61");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 18);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", 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 (grenz_zittoun_condition_hasCompletedMinerBossCollection (player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompleteMineBoss (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up with those Imperial Mine Bosses. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_134");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_hasMineBossNotComplete (player, npc))
|
|
{
|
|
doAnimationAction (npc, "cough_polite");
|
|
|
|
//-- NPC: The Controller and Grand Foreman not much of a challenge for %TO?
|
|
string_id message = new string_id (c_stringFile, "s_57");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Um... I wouldn't know, yet.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_58");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 21);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_hasIncompletePirateBossCollection (player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompletePirateBossCollection (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up with that Pirate Hideout Boss. Let me help you with that.
|
|
string_id message = new string_id (c_stringFile, "s_140");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_isElligibleMineBoss (player, npc))
|
|
{
|
|
doAnimationAction (npc, "beckon");
|
|
|
|
//-- NPC: If %TU can find the time, Grenz has another situation...
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of situation?
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Sorry, Grenz, but I can not find the time right now.
|
|
boolean hasResponse1 = false;
|
|
if (grenz_zittoun_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_47");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_87");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 24);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", 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 (grenz_zittoun_condition_hasntDoneMine (player, npc))
|
|
{
|
|
//-- NPC: %TU must speak with Jinkins before Grenz will work with %TO again.
|
|
string_id message = new string_id (c_stringFile, "s_128");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_hasReturnedHideoutBoss (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: %TU has taken care of that little situation, Grenz trusts?
|
|
string_id message = new string_id (c_stringFile, "s_92");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Consider the breakup complete.
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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.grenz_zittoun.branchId", 32);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", 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 (grenz_zittoun_condition_hasCompletedPirateBossCollection (player, npc))
|
|
{
|
|
grenz_zittoun_action_BruteForceCompletePirateBoss (player, npc);
|
|
|
|
//-- NPC: Looks like things got a little bit mixed up with that Pirate Hideout Boss. Let me help.
|
|
string_id message = new string_id (c_stringFile, "s_133");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_hasHideoutBossNotComplete (player, npc))
|
|
{
|
|
doAnimationAction (npc, "cough_polite");
|
|
|
|
//-- NPC: And has %TU so quickly done what Grenz asked?
|
|
string_id message = new string_id (c_stringFile, "s_99");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh yeah the 'Girlfriend', I'll get right on that!
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_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_101");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 35);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", 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 (grenz_zittoun_condition_isElligibleHideoutBoss (player, npc))
|
|
{
|
|
doAnimationAction (npc, "beckon");
|
|
|
|
//-- NPC: %TU, just the being Grenz was looking for. Grenz needs the assistance of %TO with a very sensitive situation. Can %TO keep a secret?
|
|
string_id message = new string_id (c_stringFile, "s_105");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Of course I can. What's going on?
|
|
boolean hasResponse0 = false;
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Certainly, but I'm a little busy right now.
|
|
boolean hasResponse1 = false;
|
|
if (grenz_zittoun_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_107");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_127");
|
|
|
|
utils.setScriptVar (player, "conversation.grenz_zittoun.branchId", 37);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
npcStartConversation (player, npc, "grenz_zittoun", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition_hasntDoneHideout (player, npc))
|
|
{
|
|
//-- NPC: %TU must speak with Vana before Grenz will work with %TO.
|
|
string_id message = new string_id (c_stringFile, "s_136");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (grenz_zittoun_tokenTO_firstName (player, npc));
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (grenz_zittoun_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_once");
|
|
|
|
//-- NPC: Grenz deals with things so that Nym doesn't have to, get it?
|
|
string_id message = new string_id (c_stringFile, "s_138");
|
|
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 != "grenz_zittoun")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
if (branchId == 2 && grenz_zittoun_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && grenz_zittoun_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && grenz_zittoun_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && grenz_zittoun_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && grenz_zittoun_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && grenz_zittoun_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && grenz_zittoun_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && grenz_zittoun_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && grenz_zittoun_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && grenz_zittoun_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && grenz_zittoun_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && grenz_zittoun_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && grenz_zittoun_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && grenz_zittoun_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && grenz_zittoun_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 35 && grenz_zittoun_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && grenz_zittoun_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && grenz_zittoun_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && grenz_zittoun_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && grenz_zittoun_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 41 && grenz_zittoun_handleBranch41 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.grenz_zittoun.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|