mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
2864 lines
88 KiB
Plaintext
2864 lines
88 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// tour_aryon.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// 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.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/tour_aryon";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean tour_aryon_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_electionEnded (obj_id player, obj_id npc)
|
|
{
|
|
return hasObjVar(npc, "bestine.electionEnded");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_alreadyVoted (obj_id player, obj_id npc)
|
|
{
|
|
boolean tour_aryon_condition_alreadyVoted = false;
|
|
|
|
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
|
|
if ( hasObjVar (player, "bestine.votedSean") )
|
|
{
|
|
int votedSeanElectionNum = getIntObjVar(player, "bestine.votedSean");
|
|
if ( votedSeanElectionNum >= electionNum )
|
|
tour_aryon_condition_alreadyVoted = true;
|
|
}
|
|
|
|
if ( hasObjVar (player, "bestine.votedVictor") )
|
|
{
|
|
int votedVictorElectionNum = getIntObjVar(player, "bestine.votedVictor");
|
|
if ( votedVictorElectionNum >= electionNum )
|
|
tour_aryon_condition_alreadyVoted = true;
|
|
}
|
|
|
|
return tour_aryon_condition_alreadyVoted;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_canVoteForVictor (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(player, "bestine.camp") )
|
|
{
|
|
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
|
|
int playerElectionNum = getIntObjVar(player, "bestine.camp");
|
|
if ( playerElectionNum >= electionNum)
|
|
{
|
|
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/victor_questp_testimony.iff") )
|
|
return true;
|
|
|
|
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/victor_questp_jregistry.iff") )
|
|
return true;
|
|
|
|
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/victor_questp_receipt.iff") )
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_canVoteForSean (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(player, "bestine.campaign") )
|
|
{
|
|
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
|
|
int playerElectionNum = getIntObjVar(player, "bestine.campaign");
|
|
if ( playerElectionNum >= electionNum)
|
|
{
|
|
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/sean_questp_ctestimony.iff") )
|
|
return true;
|
|
|
|
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/sean_questp_mdisk.iff") )
|
|
return true;
|
|
|
|
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/sean_questp_htestimony.iff") )
|
|
return true;
|
|
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_canVote (obj_id player, obj_id npc)
|
|
{
|
|
return ( (!tour_aryon_condition_alreadyVoted(player, npc)) && ( (tour_aryon_condition_canVoteForVictor(player, npc)) || (tour_aryon_condition_canVoteForSean(player, npc)) ) );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_electionStarted (obj_id player, obj_id npc)
|
|
{
|
|
return hasObjVar(npc, "bestine.electionStarted");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_seanWon (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionWinner") )
|
|
{
|
|
string winner = getStringObjVar(npc, "bestine.electionWinner");
|
|
if ( winner.equals("sean") || winner.equals("Sean") )
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_victorWon (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionWinner") )
|
|
{
|
|
string winner = getStringObjVar(npc, "bestine.electionWinner");
|
|
if ( winner.equals("victor") || winner.equals("Victor") )
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_allowTimeLeftRequest (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_moreThanAWeek (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
{
|
|
int timeNextElectionStarts = getIntObjVar(npc, "bestine.timeNextElectionStarts");
|
|
int currentTime = getGameTime();
|
|
int timeUntilElection = timeNextElectionStarts - currentTime;
|
|
if ( timeUntilElection >= 604800 && timeUntilElection < 1209600 )
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_lessThanAWeek (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
{
|
|
int timeNextElectionStarts = getIntObjVar(npc, "bestine.timeNextElectionStarts");
|
|
int currentTime = getGameTime();
|
|
int timeUntilElection = timeNextElectionStarts - currentTime;
|
|
if ( timeUntilElection >= 345600 && timeUntilElection < 604800 )
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_justAFewDays (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
{
|
|
int timeNextElectionStarts = getIntObjVar(npc, "bestine.timeNextElectionStarts");
|
|
int currentTime = getGameTime();
|
|
int timeUntilElection = timeNextElectionStarts - currentTime;
|
|
if ( timeUntilElection >= 172800 && timeUntilElection < 345600 )
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_lessThanADay (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
{
|
|
int timeNextElectionStarts = getIntObjVar(npc, "bestine.timeNextElectionStarts");
|
|
int currentTime = getGameTime();
|
|
int timeUntilElection = timeNextElectionStarts - currentTime;
|
|
if ( timeUntilElection >= 14400 && timeUntilElection < 86400 )
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_moreThan2Weeks (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
{
|
|
int timeNextElectionStarts = getIntObjVar(npc, "bestine.timeNextElectionStarts");
|
|
int currentTime = getGameTime();
|
|
int timeUntilElection = timeNextElectionStarts - currentTime;
|
|
if ( timeUntilElection >= 1209600 )
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_justAFewHours (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
{
|
|
int timeNextElectionStarts = getIntObjVar(npc, "bestine.timeNextElectionStarts");
|
|
int currentTime = getGameTime();
|
|
int timeUntilElection = timeNextElectionStarts - currentTime;
|
|
if ( timeUntilElection >= 3600 && timeUntilElection < 14400 )
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_withinTheHour (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
{
|
|
int timeNextElectionStarts = getIntObjVar(npc, "bestine.timeNextElectionStarts");
|
|
int currentTime = getGameTime();
|
|
int timeUntilElection = timeNextElectionStarts - currentTime;
|
|
if ( timeUntilElection < 3600 )
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean tour_aryon_condition_moreThanADay (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionEnded") )
|
|
{
|
|
if ( hasObjVar(npc, "bestine.timeNextElectionStarts") )
|
|
{
|
|
int timeNextElectionStarts = getIntObjVar(npc, "bestine.timeNextElectionStarts");
|
|
int currentTime = getGameTime();
|
|
int timeUntilElection = timeNextElectionStarts - currentTime;
|
|
if ( timeUntilElection >= 86400 && timeUntilElection < 172800 )
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void tour_aryon_action_removeSeanEvidence (obj_id player, obj_id npc)
|
|
{
|
|
obj_id evidenceItem01 = utils.getItemPlayerHasByTemplate(player, "object/tangible/loot/quest/sean_questp_ctestimony.iff");
|
|
obj_id evidenceItem02 = utils.getItemPlayerHasByTemplate(player, "object/tangible/loot/quest/sean_questp_mdisk.iff");
|
|
obj_id evidenceItem03 = utils.getItemPlayerHasByTemplate(player, "object/tangible/loot/quest/sean_questp_htestimony.iff");
|
|
|
|
if (isIdValid(evidenceItem01))
|
|
destroyObject(evidenceItem01);
|
|
|
|
if (isIdValid(evidenceItem02))
|
|
destroyObject(evidenceItem02);
|
|
|
|
if (isIdValid(evidenceItem03))
|
|
destroyObject(evidenceItem03);
|
|
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void tour_aryon_action_votedSean (obj_id player, obj_id npc)
|
|
{
|
|
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
|
|
setObjVar( player, "bestine.votedSean", electionNum);
|
|
tour_aryon_action_removeSeanEvidence(player, npc);
|
|
|
|
if ( hasObjVar( player, "bestine.votedVictor") )
|
|
removeObjVar( player, "bestine.votedVictor");
|
|
|
|
tour_aryon_action_removeElectionObjVars(player, npc);
|
|
|
|
if ( hasObjVar(npc, "bestine.votesForSean") )
|
|
{
|
|
int votesForSean = (getIntObjVar(npc, "bestine.votesForSean")) + 1;
|
|
setObjVar(npc, "bestine.votesForSean", votesForSean);
|
|
}
|
|
else
|
|
{
|
|
setObjVar(npc, "bestine.votesForSean", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void tour_aryon_action_votedVictor (obj_id player, obj_id npc)
|
|
{
|
|
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
|
|
setObjVar( player, "bestine.votedVictor", electionNum);
|
|
tour_aryon_action_removeVictorEvidence(player, npc);
|
|
|
|
if ( hasObjVar( player, "bestine.votedSean") )
|
|
removeObjVar( player, "bestine.votedSean");
|
|
|
|
tour_aryon_action_removeElectionObjVars(player, npc);
|
|
|
|
if ( hasObjVar(npc, "bestine.votesForVictor") )
|
|
{
|
|
int votesForVictor = (getIntObjVar(npc, "bestine.votesForVictor")) + 1;
|
|
setObjVar(npc, "bestine.votesForVictor", votesForVictor);
|
|
}
|
|
else
|
|
{
|
|
setObjVar(npc, "bestine.votesForVictor", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void tour_aryon_action_removeVictorEvidence (obj_id player, obj_id npc)
|
|
{
|
|
obj_id evidenceItem01 = utils.getItemPlayerHasByTemplate(player, "object/tangible/loot/quest/victor_questp_testimony.iff");
|
|
obj_id evidenceItem02 = utils.getItemPlayerHasByTemplate(player, "object/tangible/loot/quest/victor_questp_jregistry.iff");
|
|
obj_id evidenceItem03 = utils.getItemPlayerHasByTemplate(player, "object/tangible/loot/quest/victor_questp_receipt.iff");
|
|
|
|
if (isIdValid(evidenceItem01))
|
|
destroyObject(evidenceItem01);
|
|
|
|
if (isIdValid(evidenceItem02))
|
|
destroyObject(evidenceItem02);
|
|
|
|
if (isIdValid(evidenceItem03))
|
|
destroyObject(evidenceItem03);
|
|
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void tour_aryon_action_removeElectionObjVars (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(player, "bestine.campaign") )
|
|
removeObjVar(player, "bestine.campaign");
|
|
|
|
if ( hasObjVar(player, "bestine.camp") )
|
|
removeObjVar(player, "bestine.camp");
|
|
|
|
if ( hasObjVar(player, "bestine.negquests") )
|
|
removeObjVar(player, "bestine.negquests");
|
|
|
|
if ( hasObjVar(player, "bestine.negativeq") )
|
|
removeObjVar(player, "bestine.negativeq");
|
|
|
|
if ( hasObjVar(player, "bestine.opponent") )
|
|
removeObjVar(player, "bestine.opponent");
|
|
|
|
if ( hasObjVar(player, "bestine.rival") )
|
|
removeObjVar(player, "bestine.rival");
|
|
|
|
if ( hasObjVar(player, "bestine.sean_university_noroom") )
|
|
removeObjVar(player, "bestine.sean_university_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.sean_house_noroom") )
|
|
removeObjVar(player, "bestine.sean_house_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.sean_market_noroom") )
|
|
removeObjVar(player, "bestine.sean_market_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.sean_noroom") )
|
|
removeObjVar(player, "bestine.sean_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.victor_cantina_noroom") )
|
|
removeObjVar(player, "bestine.victor_cantina_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.victor_capitol_noroom") )
|
|
removeObjVar(player, "bestine.victor_capitol_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.victor_hospital_noroom") )
|
|
removeObjVar(player, "bestine.victor_hospital_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.victor_slums_noroom") )
|
|
removeObjVar(player, "bestine.victor_slums_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.victor_museum_noroom") )
|
|
removeObjVar(player, "bestine.victor_museum_noroom");
|
|
|
|
if ( hasObjVar(player, "bestine.victor_noroom") )
|
|
removeObjVar(player, "bestine.victor_noroom");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int tour_aryon_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] There is no election going on at this time.
|
|
//-- NPC: It's good to know that the citizens of Bestine care about the city. A fact much in evidence when so many people voted during the last election. And they chose wisely... I am quite satisfied with the winning candidate. You should come back in the next months. Listen to the people of Bestine. They usually talk about the events surrounding the city.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who was the winning candidate?
|
|
if (response == "s_5d2e1112")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_seanWon (player, npc))
|
|
{
|
|
//-- NPC: Sean Trenwell won the election. Sean seems quite interested in the financial and cultural health of Bestine. I'm sure he'll do a very good job.
|
|
string_id message = new string_id (c_stringFile, "s_1797f2fb");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_victorWon (player, npc))
|
|
{
|
|
//-- NPC: Victor Visalis won the election. Victor is very concerned with the welfare of those living in and visiting Bestine. He has strong ideas for increasing security and for providing better protection from the bands of Sand People that have been assaulting the city recently.
|
|
string_id message = new string_id (c_stringFile, "s_7420991b");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I seem to be confused and don't know who won. Maybe I should cut back on the Corellian ale.
|
|
string_id message = new string_id (c_stringFile, "s_f9c0d87f");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: When does the next election begin?
|
|
if (response == "s_68d96c4a")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_withinTheHour (player, npc))
|
|
{
|
|
//-- NPC: The next election starts within the hour.
|
|
string_id message = new string_id (c_stringFile, "s_a87968a2");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_justAFewHours (player, npc))
|
|
{
|
|
//-- NPC: The next election starts in just a few hours.
|
|
string_id message = new string_id (c_stringFile, "s_ae946995");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_lessThanADay (player, npc))
|
|
{
|
|
//-- NPC: In less than a day the next election will begin.
|
|
string_id message = new string_id (c_stringFile, "s_bc2f5e3d");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_moreThanADay (player, npc))
|
|
{
|
|
//-- NPC: The election won't begin for more than a day.
|
|
string_id message = new string_id (c_stringFile, "s_9fadb4cd");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_justAFewDays (player, npc))
|
|
{
|
|
//-- NPC: It's just a few days until the next election begins.
|
|
string_id message = new string_id (c_stringFile, "s_9e562b00");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_lessThanAWeek (player, npc))
|
|
{
|
|
//-- NPC: The next election will start in less than a week.
|
|
string_id message = new string_id (c_stringFile, "s_9b704e1e");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_moreThanAWeek (player, npc))
|
|
{
|
|
//-- NPC: The next election won't start for well over a week.
|
|
string_id message = new string_id (c_stringFile, "s_3dcd5980");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_moreThan2Weeks (player, npc))
|
|
{
|
|
//-- NPC: It will be more than two weeks before the next election begins.
|
|
string_id message = new string_id (c_stringFile, "s_45511d66");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It's always good to speak with one of our citizens. Are you here to speak about the little election I'm staging?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I have some evidence I'd like to show you. It's for the election.
|
|
if (response == "s_fad1aba")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I am glad you're taking a part in this election. So many people have voted already and there will be tons more by night's end. I'll only register your vote if you have the proper evidence. Are you ready to vote?
|
|
string_id message = new string_id (c_stringFile, "s_2a9eedba");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am ready to vote.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition_canVote (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I think I'm not quite ready.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_1a74caee");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ccae64dd");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I'd like to get involved.
|
|
if (response == "s_ca478f48")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_alreadyVoted (player, npc))
|
|
{
|
|
//-- NPC: I see you've already voted. Unfortunately, you can only vote once per election. Be sure to come back during the next election and participate then!
|
|
string_id message = new string_id (c_stringFile, "s_2230b5b1");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE] The election is on and a player can vote by bringing her positive evidence. In order to get evidence, the player must speak with the candidate of his/her choice whom will give out the quests. Returning to the governor with positive evidence will result in her tallying the player's vote.
|
|
if (!tour_aryon_condition_alreadyVoted (player, npc))
|
|
{
|
|
//-- NPC: The capitol has been very active recently with the news of the new election. I have a new project that I'm heading and have chosen two eligible candidates to work with me. However, to avoid the show of unfair favoritism, I have left it to the people of Bestine to select the politician who best represents them. I've been taking votes all day. It's been a long and tedious process, but it's been interesting. Are you here to vote?
|
|
string_id message = new string_id (c_stringFile, "s_b1c70765");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need more information.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'd like to vote, yes.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_condition_canVote (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I really need to go.
|
|
boolean hasResponse2 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_bb225c00");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_65a4282");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_fb124268");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, not really. Just wandering through Bestine.
|
|
if (response == "s_3001dad0")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I hope you enjoy your time here.
|
|
string_id message = new string_id (c_stringFile, "s_6beb48d3");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I am glad you're taking a part in this election. So many people have voted already and there will be tons more by night's end. I'll only register your vote if you have the proper evidence. Are you ready to vote?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am ready to vote.
|
|
if (response == "s_1a74caee")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForVictor (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Victor Visalis' campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_bf3641cd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_b51737ff");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_91852029");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForSean (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Sean Trenwell's campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_f3d3efe5");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Return when you have such data.
|
|
string_id message = new string_id (c_stringFile, "s_7603d7cd");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: On second thought, I think I'm not quite ready.
|
|
if (response == "s_ccae64dd")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Take what time you need, but be sure to return before the election ends.
|
|
string_id message = new string_id (c_stringFile, "s_3e9e3870");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE] The election is on and a player can vote by bringing her positive evidence. In order to get evidence, the player must speak with the candidate of his/her choice whom will give out the quests. Returning to the governor with positive evidence will result in her tallying the player's vote.
|
|
//-- NPC: The capitol has been very active recently with the news of the new election. I have a new project that I'm heading and have chosen two eligible candidates to work with me. However, to avoid the show of unfair favoritism, I have left it to the people of Bestine to select the politician who best represents them. I've been taking votes all day. It's been a long and tedious process, but it's been interesting. Are you here to vote?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need more information.
|
|
if (response == "s_bb225c00")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The two candidates are Victor Visalis, Officer of Defense and Sean Trenwell, Director of Commerce. You'll need to speak with either of the two and join their campaign. They'll most likely tell you what they propose for Bestine and the changes that will take hold if they win. After speaking with the politician of your choice, you'll need to decide if you wish to vote for him.
|
|
string_id message = new string_id (c_stringFile, "s_5ff564e3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Continue.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_540ac7e9");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'd like to vote, yes.
|
|
if (response == "s_65a4282")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I am glad you're taking a part in this election. So many people have voted already and there will be tons more by night's end. I'll only register your vote if you have the proper evidence. Do you need more information? Or are you ready to vote?
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I need more information, please.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What evidence?
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am ready to vote.
|
|
boolean hasResponse2 = false;
|
|
if (tour_aryon_condition_canVote (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_90");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I really need to go.
|
|
if (response == "s_fb124268")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I completely understand. I too have to complete a lot of work before the election. Feel free to come by when you have time and vote.
|
|
string_id message = new string_id (c_stringFile, "s_107");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The two candidates are Victor Visalis, Officer of Defense and Sean Trenwell, Director of Commerce. You'll need to speak with either of the two and join their campaign. They'll most likely tell you what they propose for Bestine and the changes that will take hold if they win. After speaking with the politician of your choice, you'll need to decide if you wish to vote for him.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Continue.
|
|
if (response == "s_540ac7e9")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It is imperative that I select the right man for the job. Just giving me a name won't do. You'll need to bring me evidence of a good deed in order for your vote to be registered. For example, if you wish to vote for Victor, you'll need to bring me evidence of a good deed he has done for the people of Bestine. The same goes for Sean. You'll want to speak with the various people around the capitol. I'm sure they will have ideas for evidence.
|
|
string_id message = new string_id (c_stringFile, "s_fbf7f817");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yeah?
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_e547fd1e");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It is imperative that I select the right man for the job. Just giving me a name won't do. You'll need to bring me evidence of a good deed in order for your vote to be registered. For example, if you wish to vote for Victor, you'll need to bring me evidence of a good deed he has done for the people of Bestine. The same goes for Sean. You'll want to speak with the various people around the capitol. I'm sure they will have ideas for evidence.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yeah?
|
|
if (response == "s_e547fd1e")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I only want to hear positive things about the candidates. There has been too many scandals and ill-spoken words thrown about during this thing. I'm really tired of it. I need to get back to work. I have a lot of things I need to get done. Go speak with either Victor Visalis or Sean Trenwell.
|
|
string_id message = new string_id (c_stringFile, "s_1ec9d0f0");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay. I'd like to vote.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition_canVote (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm... uh, gonna go. Bye!
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_47117f94");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3829680a");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I only want to hear positive things about the candidates. There has been too many scandals and ill-spoken words thrown about during this thing. I'm really tired of it. I need to get back to work. I have a lot of things I need to get done. Go speak with either Victor Visalis or Sean Trenwell.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay. I'd like to vote.
|
|
if (response == "s_47117f94")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I am glad you're taking a part in this election. So many people have voted already and there will be tons more by night's end. I'll only register your vote if you have the proper evidence. Do you need more information? Or are you ready to vote?
|
|
string_id message = new string_id (c_stringFile, "s_9bf39028");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am ready to vote.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need more information, please.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What evidence?
|
|
boolean hasResponse2 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_34");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_23b3506c");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a44272b4");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm... uh, gonna go. Bye!
|
|
if (response == "s_3829680a")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I completely understand. I too have to complete a lot of work before the election. Feel free to come by when you have time and vote.
|
|
string_id message = new string_id (c_stringFile, "s_dfebee34");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I am glad you're taking a part in this election. So many people have voted already and there will be tons more by night's end. I'll only register your vote if you have the proper evidence. Do you need more information? Or are you ready to vote?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am ready to vote.
|
|
if (response == "s_34")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForVictor (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Victor Visalis' campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_bf3641cd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_b51737ff");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_91852029");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForSean (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Sean Trenwell's campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_f3d3efe5");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Return when you have such data.
|
|
string_id message = new string_id (c_stringFile, "s_7603d7cd");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need more information, please.
|
|
if (response == "s_23b3506c")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are two candidates eligible to work with me on a new project. The candidates are Victor Visalis, Officer of Defense and Sean Trenwell, Director of Commerce. You'll need to speak with either of the two and join their campaign. They'll most likely tell you what they propose for Bestine and the changes that will take hold if they win.
|
|
string_id message = new string_id (c_stringFile, "s_16d541d2");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Continue.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_53");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 29);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What evidence?
|
|
if (response == "s_a44272b4")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Do you have such evidence?
|
|
string_id message = new string_id (c_stringFile, "s_9b77406a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I do.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition_canVote (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I need to go get it.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_90ec63e0");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1f2450ea");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 33);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Victor Visalis' campaign. Do you wish to vote for him?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
if (response == "s_b51737ff")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
tour_aryon_action_votedVictor (player, npc);
|
|
|
|
//-- NPC: Thank you for your vote. I will keep the tally in my database for when the election has been drawn to a close.
|
|
string_id message = new string_id (c_stringFile, "s_b1e3db3e");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
if (response == "s_91852029")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I understand. Please take what time you need, but be sure to return before the election ends.
|
|
string_id message = new string_id (c_stringFile, "s_de483def");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Sean Trenwell's campaign. Do you wish to vote for him?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
if (response == "s_42")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
tour_aryon_action_votedSean (player, npc);
|
|
|
|
//-- NPC: Thank you for your vote. I will keep the tally in my database for when the election has been drawn to a close.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I understand. Please take what time you need, but be sure to return before the election ends.
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are two candidates eligible to work with me on a new project. The candidates are Victor Visalis, Officer of Defense and Sean Trenwell, Director of Commerce. You'll need to speak with either of the two and join their campaign. They'll most likely tell you what they propose for Bestine and the changes that will take hold if they win.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Continue.
|
|
if (response == "s_53")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After speaking with the politician of your choice, you'll need to decide if you wish to vote for him. It is imperative that I select the right man for the job. Just giving me a name won't do. You'll need to bring me evidence of a good deed in order for your vote to be registered. For example, if you wish to vote for Victor, you'll need to bring me evidence of a good deed he has done for the people of Bestine. The same goes for Sean.
|
|
string_id message = new string_id (c_stringFile, "s_3c509be9");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yeah?
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_56");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 30);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: After speaking with the politician of your choice, you'll need to decide if you wish to vote for him. It is imperative that I select the right man for the job. Just giving me a name won't do. You'll need to bring me evidence of a good deed in order for your vote to be registered. For example, if you wish to vote for Victor, you'll need to bring me evidence of a good deed he has done for the people of Bestine. The same goes for Sean.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yeah?
|
|
if (response == "s_56")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You'll want to speak with the various people around the capitol. I'm sure they will have ideas for evidence. I only want to hear positive things about the candidates. There has been too many scandals and ill-spoken words thrown about during this thing. I'm really tired of it. I need to get back to work. I have a lot of things I need to get done. Go speak with either Victor Visalis or Sean Trenwell.
|
|
string_id message = new string_id (c_stringFile, "s_6ff89ddc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay. Thank you!
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_eea34749");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 31);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You'll want to speak with the various people around the capitol. I'm sure they will have ideas for evidence. I only want to hear positive things about the candidates. There has been too many scandals and ill-spoken words thrown about during this thing. I'm really tired of it. I need to get back to work. I have a lot of things I need to get done. Go speak with either Victor Visalis or Sean Trenwell.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay. Thank you!
|
|
if (response == "s_eea34749")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I wish you well!
|
|
string_id message = new string_id (c_stringFile, "s_ab50056b");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Do you have such evidence?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I do.
|
|
if (response == "s_90ec63e0")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Are you ready to vote?
|
|
string_id message = new string_id (c_stringFile, "s_23877744");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am ready to vote.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_65");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 34);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I need to go get it.
|
|
if (response == "s_1f2450ea")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I will be here when you return. I am looking forward to collecting your vote for the election!
|
|
string_id message = new string_id (c_stringFile, "s_567d69e1");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you ready to vote?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am ready to vote.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForVictor (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Victor Visalis' campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_bf3641cd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_b51737ff");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_91852029");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForSean (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Sean Trenwell's campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_f3d3efe5");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Return when you have such data.
|
|
string_id message = new string_id (c_stringFile, "s_7603d7cd");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I am glad you're taking a part in this election. So many people have voted already and there will be tons more by night's end. I'll only register your vote if you have the proper evidence. Do you need more information? Or are you ready to vote?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need more information, please.
|
|
if (response == "s_74")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are two candidates eligible to work with me on a new project. The candidates are Victor Visalis, Officer of Defense and Sean Trenwell, Director of Commerce. You'll need to speak with either of the two and join their campaign. They'll most likely tell you what they propose for Bestine and the changes that will take hold if they win.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Continue.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_78");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What evidence?
|
|
if (response == "s_90")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Do you have such evidence?
|
|
string_id message = new string_id (c_stringFile, "s_92");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I do.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition_canVote (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I need to go get it.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_94");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 42);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am ready to vote.
|
|
if (response == "s_104")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForVictor (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Victor Visalis' campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_bf3641cd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_b51737ff");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_91852029");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForSean (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Sean Trenwell's campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_f3d3efe5");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Return when you have such data.
|
|
string_id message = new string_id (c_stringFile, "s_7603d7cd");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are two candidates eligible to work with me on a new project. The candidates are Victor Visalis, Officer of Defense and Sean Trenwell, Director of Commerce. You'll need to speak with either of the two and join their campaign. They'll most likely tell you what they propose for Bestine and the changes that will take hold if they win.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Continue.
|
|
if (response == "s_78")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After speaking with the politician of your choice, you'll need to decide if you wish to vote for him. It is imperative that I select the right man for the job. Just giving me a name won't do. You'll need to bring me evidence of a good deed in order for your vote to be registered. For example, if you wish to vote for Victor, you'll need to bring me evidence of a good deed he has done for the people of Bestine. The same goes for Sean.
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yeah?
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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.tour_aryon.branchId", 39);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: After speaking with the politician of your choice, you'll need to decide if you wish to vote for him. It is imperative that I select the right man for the job. Just giving me a name won't do. You'll need to bring me evidence of a good deed in order for your vote to be registered. For example, if you wish to vote for Victor, you'll need to bring me evidence of a good deed he has done for the people of Bestine. The same goes for Sean.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yeah?
|
|
if (response == "s_82")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You'll want to speak with the various people around the capitol. I'm sure they will have ideas for evidence. I only want to hear positive things about the candidates. There has been too many scandals and ill-spoken words thrown about during this thing. I'm really tired of it. I need to get back to work. I have a lot of things I need to get done. Go speak with either Victor Visalis or Sean Trenwell.
|
|
string_id message = new string_id (c_stringFile, "s_84");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay. Thank you!
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_86");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 40);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch40 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You'll want to speak with the various people around the capitol. I'm sure they will have ideas for evidence. I only want to hear positive things about the candidates. There has been too many scandals and ill-spoken words thrown about during this thing. I'm really tired of it. I need to get back to work. I have a lot of things I need to get done. Go speak with either Victor Visalis or Sean Trenwell.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay. Thank you!
|
|
if (response == "s_86")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I wish you well!
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch42 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Do you have such evidence?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I do.
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Are you ready to vote?
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am ready to vote.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_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_98");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 43);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I need to go get it.
|
|
if (response == "s_100")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I will be here when you return. I am looking forward to collecting your vote for the election!
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int tour_aryon_handleBranch43 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you ready to vote?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am ready to vote.
|
|
if (response == "s_98")
|
|
{
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForVictor (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Victor Visalis' campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_bf3641cd");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_b51737ff");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_91852029");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_canVoteForSean (player, npc))
|
|
{
|
|
//-- NPC: Excellent! I see that you have positive evidence to support Sean Trenwell's campaign. Do you wish to vote for him?
|
|
string_id message = new string_id (c_stringFile, "s_f3d3efe5");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I wish to vote for him.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I've changed my mind and would like to think about this a bit more.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_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_42");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, without the proper evidence, I cannot register your vote. Evidence can be anywhere from a written testimony from someone in the city, to a data disk containing valuable information. The evidence needs to be tied to a good deed. Return when you have such data.
|
|
string_id message = new string_id (c_stringFile, "s_7603d7cd");
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.tour_aryon");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
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.tour_aryon");
|
|
|
|
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] There is no election going on at this time.
|
|
if (tour_aryon_condition_electionEnded (player, npc))
|
|
{
|
|
//-- NPC: It's good to know that the citizens of Bestine care about the city. A fact much in evidence when so many people voted during the last election. And they chose wisely... I am quite satisfied with the winning candidate. You should come back in the next months. Listen to the people of Bestine. They usually talk about the events surrounding the city.
|
|
string_id message = new string_id (c_stringFile, "s_57d5a9c4");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who was the winning candidate?
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: When does the next election begin?
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_condition_allowTimeLeftRequest (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_5d2e1112");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_68d96c4a");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "tour_aryon", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition_electionStarted (player, npc))
|
|
{
|
|
//-- NPC: It's always good to speak with one of our citizens. Are you here to speak about the little election I'm staging?
|
|
string_id message = new string_id (c_stringFile, "s_c1091f5a");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I have some evidence I'd like to show you. It's for the election.
|
|
boolean hasResponse0 = false;
|
|
if (tour_aryon_condition_canVote (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Yes, I'd like to get involved.
|
|
boolean hasResponse1 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, not really. Just wandering through Bestine.
|
|
boolean hasResponse2 = false;
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_fad1aba");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_ca478f48");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_3001dad0");
|
|
|
|
utils.setScriptVar (player, "conversation.tour_aryon.branchId", 13);
|
|
|
|
npcStartConversation (player, npc, "tour_aryon", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (tour_aryon_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome citizen. I hope you enjoy your time in Bestine.
|
|
string_id message = new string_id (c_stringFile, "s_3b657772");
|
|
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 != "tour_aryon")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
if (branchId == 1 && tour_aryon_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && tour_aryon_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && tour_aryon_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && tour_aryon_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && tour_aryon_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && tour_aryon_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && tour_aryon_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && tour_aryon_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && tour_aryon_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && tour_aryon_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && tour_aryon_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && tour_aryon_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && tour_aryon_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && tour_aryon_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && tour_aryon_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && tour_aryon_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && tour_aryon_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && tour_aryon_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && tour_aryon_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 42 && tour_aryon_handleBranch42 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 43 && tour_aryon_handleBranch43 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.tour_aryon.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|