Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/victor_visalis.script
T

3986 lines
124 KiB
Plaintext

// ======================================================================
//
// victor_visalis.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;
include library.weapons;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/victor_visalis";
// ======================================================================
// Script Conditions
// ======================================================================
boolean victor_visalis_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_CampObj (obj_id player, obj_id npc)
{
if ( victor_visalis_condition_votedVictorCurrentElection(player, npc) )
return false;
if ( hasObjVar(npc, "bestine.electionStarted") )
{
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
if ( hasObjVar(player, "bestine.camp" ) )
{
int electionPlayerIsIn = getIntObjVar(player, "bestine.camp");
if ( electionPlayerIsIn >= electionNum)
{
return true;
}
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_OpponentObj (obj_id player, obj_id npc)
{
if ( victor_visalis_condition_votedVictorCurrentElection(player, npc) )
return false;
if ( hasObjVar(npc, "bestine.electionStarted") )
{
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
if ( hasObjVar(player, "bestine.opponent" ) )
{
int electionPlayerIsIn = getIntObjVar(player, "bestine.opponent");
if ( electionPlayerIsIn >= electionNum)
return true;
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_votedVictorCurrentElection (obj_id player, obj_id npc)
{
if ( hasObjVar(npc, "bestine.electionStarted") )
{
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
if ( hasObjVar(player, "bestine.votedVictor" ) )
{
int electionPlayerIsIn = getIntObjVar(player, "bestine.votedVictor");
if ( electionPlayerIsIn >= electionNum)
return true;
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_NoroomObj (obj_id player, obj_id npc)
{
if ( hasObjVar(npc, "bestine.electionStarted") )
{
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
if ( hasObjVar(player, "bestine.victor_noroom" ) )
{
int electionPlayerIsIn = getIntObjVar(player, "bestine.victor_noroom");
if ( electionPlayerIsIn >= electionNum)
{
return true;
}
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_voted (obj_id player, obj_id npc)
{
int electionNum = 1;
if ( hasObjVar(npc, "bestine.electionEnded") )
electionNum = getIntObjVar(npc, "bestine.electionEnded");
else if ( hasObjVar(npc, "bestine.electionStarted") )
electionNum = getIntObjVar(npc, "bestine.electionStarted") - 1;
if ( hasObjVar(player, "bestine.votedVictor" ) )
{
int electionPlayerIsIn = getIntObjVar(player, "bestine.votedVictor");
if ( electionPlayerIsIn <= electionNum)
{
return true;
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_hasEvidence (obj_id player, obj_id npc)
{
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/sean_questn_gpapers.iff") )
return true;
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/sean_questn_tdisk.iff") )
return true;
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/sean_questn_alog.iff") )
return true;
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_NegativeqsOBJ (obj_id player, obj_id npc)
{
if ( victor_visalis_condition_votedVictorCurrentElection(player, npc) )
return false;
if ( hasObjVar(npc, "bestine.electionStarted") )
{
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
if ( hasObjVar(player, "bestine.negquests" ) )
{
int electionPlayerIsIn = getIntObjVar(player, "bestine.negquests");
if ( electionPlayerIsIn >= electionNum)
{
return true;
}
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_notInOffice_noElection (obj_id player, obj_id npc)
{
if ( hasObjVar(npc, "bestine.electionEnded") )
{
if ( hasObjVar(npc, "bestine.electionWinner") )
{
string winner = getStringObjVar(npc, "bestine.electionWinner");
if ( (winner != "victor") && (winner != "Victor") )
{
return true;
}
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_InOffice_noElection (obj_id player, obj_id npc)
{
if ( hasObjVar(npc, "bestine.electionEnded") )
{
if ( hasObjVar(npc, "bestine.electionWinner") )
{
string winner = getStringObjVar(npc, "bestine.electionWinner");
if ( (winner == "victor") || (winner == "Victor") )
{
return true;
}
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_noInventorySpace (obj_id player, obj_id npc)
{
boolean hasNoInvRoom = false;
obj_id playerInv = utils.getInventoryContainer(player);
if ( isIdValid(playerInv) )
{
int free_space = getVolumeFree(playerInv);
if (free_space < 1 )
{
hasNoInvRoom = true;
}
}
return hasNoInvRoom;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_newElectionStarted (obj_id player, obj_id npc)
{
if ( hasObjVar(npc, "bestine.electionStarted") )
return true;
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_alreadyReceivedElectionReward (obj_id player, obj_id npc)
{
int electionNum = 1;
if ( hasObjVar(npc, "bestine.electionEnded") )
electionNum = getIntObjVar(npc, "bestine.electionEnded");
else if ( hasObjVar(npc, "bestine.electionStarted") )
electionNum = getIntObjVar(npc, "bestine.electionStarted") - 1;
if ( hasObjVar(player, "bestine.rewardgiven" ) )
{
int electionPlayerIsIn = getIntObjVar(player, "bestine.rewardgiven");
if ( electionPlayerIsIn <= electionNum)
{
return true;
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_votedSeanCurrentElection (obj_id player, obj_id npc)
{
if ( hasObjVar(npc, "bestine.electionStarted") )
{
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
if ( hasObjVar(player, "bestine.votedSean" ) )
{
int electionPlayerIsIn = getIntObjVar(player, "bestine.votedSean");
if ( electionPlayerIsIn >= electionNum)
return true;
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_inOffice (obj_id player, obj_id npc)
{
if ( hasObjVar(npc, "bestine.electionWinner") )
{
string winner = getStringObjVar(npc, "bestine.electionWinner");
if ( (winner == "victor") || (winner == "Victor") )
{
return true;
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_CheckOnTuskenQuest (obj_id player, obj_id npc)
{
if (hasObjVar(player, "bestine.tuskenquest") )
{
if (hasObjVar(player, "bestine.tuskenquestdone") )
{
if (hasObjVar(player, "bestine.tuskengotreward") )
{
return true;
}
else
{
int playerQuestNum = getIntObjVar(player, "bestine.tuskengotreward");
int currentQuestNum = 0;
if ( hasObjVar(npc, "bestine.electionStarted") )
currentQuestNum = getIntObjVar(npc, "bestine.electionStarted") - 1;
else if ( hasObjVar(npc, "bestine.electionEnded") )
currentQuestNum = getIntObjVar(npc, "bestine.electionEnded");
if ( playerQuestNum < currentQuestNum )
return true;
}
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_CompleteTuskenQuest (obj_id player, obj_id npc)
{
return hasObjVar( player, "bestine.tuskengotreward");
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_CheckforStones (obj_id player, obj_id npc)
{
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/carved_stone.iff") )
return true;
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/smooth_stone.iff") )
return true;
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_CheckforTuskenHead (obj_id player, obj_id npc)
{
if ( utils.playerHasItemByTemplate(player, "object/tangible/loot/quest/tusken_head.iff") )
{
if (hasObjVar(player, "bestine.tuskenquest"))
return true;
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_CheckForTuskeReward (obj_id player, obj_id npc)
{
int electionNum = 1;
if ( hasObjVar(npc, "bestine.electionEnded") )
electionNum = getIntObjVar(npc, "bestine.electionEnded");
else if ( hasObjVar(npc, "bestine.electionStarted") )
electionNum = getIntObjVar(npc, "bestine.electionStarted") - 1 ;
if ( hasObjVar(player, "bestine.tuskengotreward" ) )
{
int electionPlayerRewarded = getIntObjVar(player, "bestine.tuskengotreward");
if ( electionPlayerRewarded <= electionNum)
{
return true;
}
}
return false;
}
// ----------------------------------------------------------------------
boolean victor_visalis_condition_ChkTuskenQuest (obj_id player, obj_id npc)
{
if (hasObjVar(player, "bestine.tuskenquest") )
return true;
return false;
}
// ======================================================================
// Script Actions
// ======================================================================
void victor_visalis_action_OnTuskenQuest (obj_id player, obj_id npc)
{
if ( hasObjVar(player, "bestine.tuskengotreward") )
removeObjVar(player, "bestine.tuskengotreward");
setObjVar(player, "bestine.tuskenquest", true);
location site = new location(-3960, 0, 6233);
obj_id waypoint1 = createWaypointInDatapad(player, site);
setWaypointName(waypoint1, "Fort Tusken");
setWaypointColor( waypoint1, "blue" );
setWaypointVisible( waypoint1, true );
setWaypointActive( waypoint1, true );
setObjVar(player, "bestine.tuskenWaypoint", waypoint1);
setObjVar(player, "bestine.tuskenquest", true);
}
// ----------------------------------------------------------------------
void victor_visalis_action_NoRoom (obj_id player, obj_id npc)
{
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
setObjVar( player, "bestine.victor_noroom", true );
}
// ----------------------------------------------------------------------
void victor_visalis_action_WayPointTusken (obj_id player, obj_id npc)
{
if( hasObjVar(player, "bestine.tuskenWaypoint") )
{
obj_id waypoint = getObjIdObjVar(player, "bestine.tuskenWaypoint");
if ( isIdValid(waypoint) )
{
return;
}
else
{
setObjVar(player, "bestine.tuskenquest", true);
location site = new location(-3960, 0, 6233);
obj_id waypoint1 = createWaypointInDatapad(player, site);
setWaypointName(waypoint1, "Fort Tusken");
setWaypointColor( waypoint1, "blue" );
setWaypointVisible( waypoint1, true );
setWaypointActive( waypoint1, true );
setObjVar(player, "bestine.tuskenWaypoint", waypoint1);
setObjVar(player, "bestine.tuskenquest", true);
}
}
}
// ----------------------------------------------------------------------
void victor_visalis_action_NegativeQs (obj_id player, obj_id npc)
{
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
setObjVar( player, "bestine.negquests", electionNum);
removeObjVar(player, "bestine.opponent");
if ( hasObjVar(player, "bestine.searched") )
removeObjVar(player, "bestine.searched");
if ( hasObjVar(player, "bestine.already_searched") )
removeObjVar(player, "bestine.already_searched");
}
// ----------------------------------------------------------------------
void victor_visalis_action_RemoveNeg (obj_id player, obj_id npc)
{
removeObjVar( player, "bestine.negquests");
}
// ----------------------------------------------------------------------
void victor_visalis_action_giveDiskAndJoinCampaign (obj_id player, obj_id npc)
{
victor_visalis_action_removeEvidence(player, npc);
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
setObjVar(player, "bestine.camp", electionNum);
setObjVar( player, "bestine.rival", electionNum);
if ( hasObjVar(player, "bestine.opponent") )
removeObjVar(player, "bestine.opponent");
if ( hasObjVar(player, "bestine.campaign") )
removeObjVar(player, "bestine.campaign");
if ( hasObjVar(player, "bestine.negquests") )
removeObjVar(player, "bestine.negquests");
if ( hasObjVar(player, "bestine.victor_noroom") )
removeObjVar(player, "bestine.victor_noroom");
if ( hasObjVar(player, "bestine.searched") )
removeObjVar(player, "bestine.searched");
if ( hasObjVar(player, "bestine.already_searched") )
removeObjVar(player, "bestine.already_searched");
string CAMPAIGN = "object/tangible/loot/quest/victor_campaign_disk.iff";
if (isIdValid(player))
{
obj_id playerInv = getObjectInSlot( player, "inventory" );
if(isIdValid(playerInv))
{
obj_id item = createObject( CAMPAIGN, playerInv, "" );
}
}
return;
}
// ----------------------------------------------------------------------
void victor_visalis_action_Givereward (obj_id player, obj_id npc)
{
int electionNum = 1;
if ( hasObjVar(npc, "bestine.electionEnded") )
electionNum = getIntObjVar(npc, "bestine.electionEnded");
else if ( hasObjVar(npc, "bestine.electionStarted") )
electionNum = getIntObjVar(npc, "bestine.electionStarted") - 1;
string commonReward = "object/tangible/wearables/necklace/bestine_quest_badge.iff";
string mediumReward = "object/tangible/furniture/all/bestine_quest_imp_banner.iff";
string rareReward = "object/weapon/melee/sword/bestine_quest_sword.iff";
string reward = commonReward;
int chance = rand(1, 5000);
if (chance == 1)
{
reward = rareReward;
}
if ( (chance >= 2) && (chance <= 2500) )
{
reward = mediumReward;
}
if (isIdValid(player))
{
obj_id playerInv = getObjectInSlot( player, "inventory" );
if(isIdValid(playerInv))
{
obj_id item = createObject( reward, playerInv, "" );
if(isIdValid(item))
{
setObjVar(player, "bestine.rewardgiven", electionNum);
removeObjVar(player, "bestine.votedVictor" );
return;
}
}
}
return;
}
// ----------------------------------------------------------------------
void victor_visalis_action_RemoveTuskenQuest (obj_id player, obj_id npc)
{
removeObjVar(player, "bestine.tuskenquest");
if( hasObjVar(player, "bestine.tuskenWaypoint") )
{
obj_id waypoint = getObjIdObjVar(player, "bestine.tuskenWaypoint");
if ( isIdValid(waypoint) )
destroyWaypointInDatapad(waypoint, player);
removeObjVar(player, "bestine.tuskenquest");
}
}
// ----------------------------------------------------------------------
void victor_visalis_action_GiveTuskenReward (obj_id player, obj_id npc)
{
string REWARD = "object/weapon/ranged/rifle/rifle_victor_tusken.iff";
if (isIdValid(player))
{
obj_id objInventory = utils.getInventoryContainer(player);
if(isIdValid(objInventory))
{
obj_id[] objContents = utils.getContents(objInventory);
if( objContents != null )
{
//obj_id item = createObject( REWARD, playerInv, "" );
//if(isIdValid(item))
//{
for( int intI = 0; intI<objContents.length; intI++ )
{
if ( isIdValid(objContents[intI]) )
{
string strItemTemplate = getTemplateName(objContents[intI]);
if( strItemTemplate=="object/tangible/loot/quest/tusken_head.iff" )
{
destroyObject( objContents[intI] );
obj_id item = weapons.createWeapon(REWARD, objInventory, rand(0.8f, 1.1f));
if ( hasObjVar(player, "bestine.tuskenquest") )
removeObjVar( player, "bestine.tuskenquest");
if ( hasObjVar(player, "bestine.tuskenquestdone") )
removeObjVar(player, "bestine.tuskenquestdone");
int currentQuestNum = 0;
if ( hasObjVar(npc, "bestine.electionStarted") )
currentQuestNum = getIntObjVar(npc, "bestine.electionStarted") - 1;
else if ( hasObjVar(npc, "bestine.electionEnded") )
currentQuestNum = getIntObjVar(npc, "bestine.electionEnded");
setObjVar(player, "bestine.tuskengotreward", currentQuestNum);
return;
}
}
}
}
}
}
return;
}
// ----------------------------------------------------------------------
void victor_visalis_action_removeEvidence (obj_id player, obj_id npc)
{
obj_id objInventory = utils.getInventoryContainer(player);
if( isIdValid(objInventory) )
{
obj_id[] objContents = utils.getContents(objInventory);
if( objContents != null )
{
for( int intI = 0; intI<objContents.length; intI++ )
{
string strItemTemplate = getTemplateName(objContents[intI]);
if( strItemTemplate=="object/tangible/loot/quest/sean_questn_gpapers.iff" )
{
destroyObject( objContents[intI] );
return;
}
if( strItemTemplate=="object/tangible/loot/quest/sean_questn_tdisk.iff" )
{
destroyObject( objContents[intI] );
return;
}
if( strItemTemplate=="object/tangible/loot/quest/sean_questn_alog.iff" )
{
destroyObject( objContents[intI] );
return;
}
}
}
}
return;
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int victor_visalis_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] No room in inventory.
//-- NPC: I see you have returned. Last we spoke, you didn't have room for the diskette. Would you like it now?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, please.
if (response == "s_c82e9a2f")
{
//-- [NOTE]
if (!victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_giveDiskAndJoinCampaign (player, npc);
//-- NPC: Here you are. You'll need evidence in order for your vote to be registered. It is my understanding that my secretary receives letters from the people of Bestine, thanking me for my assistance. She may know the information you seek. I must return to my duties.
string_id message = new string_id (c_stringFile, "s_1b6edbfe");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_NoRoom (player, npc);
//-- NPC: You'll need to come back when you have more room.
string_id message = new string_id (c_stringFile, "s_a58217e0");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No thanks!
if (response == "s_ee26e33e")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_28586fd5");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Victor asks about the positive evidence used for voting.
//-- NPC: You have returned. Did you find the proper evidence the governor requires?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes and I voted for you.
if (response == "s_798f58f7")
{
//-- [NOTE]
if (victor_visalis_condition_voted (player, npc))
{
//-- NPC: Thank you. Soon, Bestine will be safe again. I thank you for your support. If I win the election, return to me and you will be greatly rewarded.
string_id message = new string_id (c_stringFile, "s_73f65b89");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: I am a bit suspicious... Thank you, then, for your vote. I must get back to work. Good day.
string_id message = new string_id (c_stringFile, "s_c74fd908");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I can't find any evidence.
if (response == "s_700330a5")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: You can speak with my secretary on the subject. She will know all the details for what you seek.
string_id message = new string_id (c_stringFile, "s_41012fd2");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I decided not to vote for you.
if (response == "s_8999ec9b")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: That is a pity. And to think I thought you were the intelligent sort... Very well. Good day.
string_id message = new string_id (c_stringFile, "s_cf6147b3");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have to go.
if (response == "s_dea56128")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_18");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Victor sees that the player joined his rival's campaign and offers him the option to join his instead.
//-- NPC: I see that you have joined the campaign of my opponent. I am disappointed.
//-- [RESPONSE NOTE]
//-- PLAYER: I want to join your campaign.
if (response == "s_b826b85a")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
victor_visalis_action_NegativeQs (player, npc);
//-- NPC: Unfortunately, you cannot just change your mind when the time is only convenient for you. To prove yourself, you'll need to find evidence that will prove my rival is as ruthless as I think he is. Again, talk with my secretary. I have too much to do at the moment to explain it to you.
string_id message = new string_id (c_stringFile, "s_e6a20ca5");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Sorry, I have to go.
if (response == "s_67dbab18")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_24");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Victor needs negative evidence against Sean Trenwell in order to allow the player to join his campaign. The player is asked about the evidence here.
//-- NPC: I see that you are eager to join my campaign. Do you have the proper evidence against Sean Trenwell? Without it, you'll not be able to join my campaign.
//-- [RESPONSE NOTE]
//-- PLAYER: I have it, yes.
if (response == "s_6ac98e49")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Ahh, excellent. I am satisfied. You have proven your worth and want to join my campaign. Are you sure you want to join us?
string_id message = new string_id (c_stringFile, "s_7c4e7b68");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, I am sure.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I've changed my mind.
boolean hasResponse1 = false;
if (victor_visalis_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_9e0196ed");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_5c46daeb");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: No, not yet.
if (response == "s_da9a29e9")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: If you're serious about joining my campaign, you'll stop wasting my time and go find the evidence I seek. Again, talk with my secretary for more details.
string_id message = new string_id (c_stringFile, "s_52a836a3");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Ahh, excellent. I am satisfied. You have proven your worth and want to join my campaign. Are you sure you want to join us?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, I am sure.
if (response == "s_9e0196ed")
{
//-- [NOTE]
if (!victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_giveDiskAndJoinCampaign (player, npc);
//-- NPC: Good. You are wise to agree with my views regarding Bestine and its state of defense. As I may have mentioned, I will give you a diskette to explain anything you may have missed. As for evidence, you will need to speak with several others. It is my understanding that my secretary receives letters from the people of Bestine, thanking me for my assistance. She may know the information you seek. I must return to my duties.
string_id message = new string_id (c_stringFile, "s_572eae57");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_NoRoom (player, npc);
//-- NPC: I'm glad you have agreed to join my campaign. However, in order to receive the diskette, you'll need more room. Please come back when you do.
string_id message = new string_id (c_stringFile, "s_eafac099");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I've changed my mind.
if (response == "s_5c46daeb")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well, then. Be sure to return when you've seen that our views are the right path.
string_id message = new string_id (c_stringFile, "s_d987b9fe");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I am now in office, this much is true. However, I have matters on my mind to which I must attend. Is there something you need?
//-- [RESPONSE NOTE]
//-- PLAYER: How goes your work now that you're in office?
if (response == "s_edafb11b")
{
//-- [NOTE]
if (victor_visalis_condition_ChkTuskenQuest (player, npc))
{
//-- NPC: Everything's going well. I am awaiting word from Fort Tusken. Excuse me. I must return to my work.
string_id message = new string_id (c_stringFile, "s_f594d753");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_CompleteTuskenQuest (player, npc))
{
//-- NPC: Things are going extremely well. Thank you for your help earlier. Bestine is now a safer place. Is there anything I can help you with?
string_id message = new string_id (c_stringFile, "s_ce06af62");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Just checking up on things. Bye!
boolean hasResponse0 = false;
if (!victor_visalis_condition_CheckforStones (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I found these weird stones.
boolean hasResponse1 = false;
if (victor_visalis_condition_CheckforStones (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_30e8118");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_380817dd");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!victor_visalis_condition_CheckOnTuskenQuest (player, npc))
{
//-- NPC: Stressful. I will use my place in office to my advantage during this dangerous time. We must strike at the heart of the Sand People resistance. I have sent some of Bestine's toughest soldiers to the Tusken Fortress. Unfortunately, they have not returned to us. I fear for the worst. For the first time in my life, I am at a loss...
string_id message = new string_id (c_stringFile, "s_6775ddea");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Let me help!
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sounds like a tough deal.
boolean hasResponse1 = false;
if (victor_visalis_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_390b2857");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_e9a49e3");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have destroyed the intended target.
if (response == "s_6641e79e")
{
//-- [NOTE]
if (!victor_visalis_condition_CheckForTuskeReward (player, npc))
{
victor_visalis_action_GiveTuskenReward (player, npc);
//-- NPC: Ah yes! Indeed you have. Perhaps now the Sand People will leave the people of Bestine alone. I am grateful. Here is your reward.
string_id message = new string_id (c_stringFile, "s_df711673");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_CheckForTuskeReward (player, npc))
{
//-- NPC: I see that I have already given you your reward for this particular task. Unfortunately, I cannot give you another. I wish you well. Please continue to serve Bestine. Our city is already in debt to you.
string_id message = new string_id (c_stringFile, "s_81eb46c0");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm lost. What do I need to do?
if (response == "s_42c394e0")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
victor_visalis_action_WayPointTusken (player, npc);
//-- NPC: You must travel to the site of the Sand People Fortress and search it for a very powerful Tusken Raider. The Sand People place significance on this particular leader. It has never been seen before, has never been mentioned in any book. We can only assume that, with its destruction, the Sand People will leave the people of Bestine alone for good. My contacts have mentioned an extensive cave system below the Fortress. Search there first.
string_id message = new string_id (c_stringFile, "s_269510f1");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm still looking for our target.
if (response == "s_cbb4f307")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
victor_visalis_action_WayPointTusken (player, npc);
//-- NPC: Our 'target' is in the Fortress. I am unsure of the direct location of where it may be hiding. Most likely, it could be within the cave system beneath the actual Fortress. Return to me when you have succeeded in your task. Remember, I need proof you have eliminated the target.
string_id message = new string_id (c_stringFile, "s_e955e18");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I quit!
if (response == "s_f70821a3")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
victor_visalis_action_RemoveTuskenQuest (player, npc);
//-- NPC: I am disappointed. Very well. You have been released from your mission.
string_id message = new string_id (c_stringFile, "s_7ce36b97");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I found these weird stones.
if (response == "s_62")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Odd. I've never seen objects like these before. However, they do seem to be very valuable. You may be able to find more information regarding these stones in the new market place. A merchant may know what to do with them. I hear that many of the merchants come and go regularly so you may not be able to find this particular merchant immediately. Keep your eye out though. Merchants can be fickle about their business hours.
string_id message = new string_id (c_stringFile, "s_8d1a9cd2");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Hey wait! What about my reward for voting for you?
if (response == "s_82af0027")
{
//-- [NOTE]
if (victor_visalis_condition_alreadyReceivedElectionReward (player, npc))
{
//-- NPC: Greedy, are you? You already received a 'reward' from me. I must return to my duties. Now, be gone.
string_id message = new string_id (c_stringFile, "s_24f8534b");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_noInventorySpace (player, npc))
{
//-- NPC: Return when you have more room. I must return to my duties.
string_id message = new string_id (c_stringFile, "s_adc1f0dc");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_Givereward (player, npc);
//-- NPC: Oh yes! It almost slipped my mind. Here you are.
string_id message = new string_id (c_stringFile, "s_cc9cab18");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Now that another election has begun, are you planning to get re-elected?
if (response == "s_de1eacb3")
{
//-- [NOTE] Victor is not in office during an election. In that election, the player has already voted for him.
if (victor_visalis_condition_votedVictorCurrentElection (player, npc))
{
//-- NPC: Of course, and I thank you for voting for me. I greatly appreciate it. If I win, come back and speak to me so that I can reward your loyalty.
string_id message = new string_id (c_stringFile, "s_578e3372");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Victor is not in office during an election. In that election, the player has already voted for Sean Trenwell.
if (victor_visalis_condition_votedSeanCurrentElection (player, npc))
{
//-- NPC: That is my intention, though I'm surprised to discover that you already voted for Sean Trenwell. I don't see how anyone could justify doing that, but apparently you found his ideas palatable. I can't imagine what had to happen to make that possible, and frankly, I don't want to know.
string_id message = new string_id (c_stringFile, "s_5bccff58");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Absolutely. I fully intend to win over Mr.Trenwell once again. We need to keep his meddlesome ideas out of Bestine. Bestine needs more defense and it is defense that I shall give them! Keep me in office and vote in the next election with the governor.
string_id message = new string_id (c_stringFile, "s_e8aff3cd");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Hey wait! What about my reward for voting for you in the last election?
boolean hasResponse0 = false;
if (victor_visalis_condition_voted (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What are your proposed changes for Bestine?
boolean hasResponse1 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I'm here to vote for you.
boolean hasResponse2 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Tell me more about the Tuskens.
boolean hasResponse3 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: I need to go. I'm sorry.
boolean hasResponse4 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_435f07d4");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_bae6b22d");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_d6a9a15d");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_1a50f0d3");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_87b97dc");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 41);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Things are going extremely well. Thank you for your help earlier. Bestine is now a safer place. Is there anything I can help you with?
//-- [RESPONSE NOTE]
//-- PLAYER: Just checking up on things. Bye!
if (response == "s_30e8118")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well. Be safe, my friend.
string_id message = new string_id (c_stringFile, "s_26684a50");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I found these weird stones.
if (response == "s_380817dd")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Stones? Hmm... They seem to be valuable. Rare, you say? I heard that there are merchants looking for such things over in the city's new market place. However, I hear that those particular merchants are rare. You may have to keep an eye out for them. That is all I know, really.
string_id message = new string_id (c_stringFile, "s_1c1db559");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Stressful. I will use my place in office to my advantage during this dangerous time. We must strike at the heart of the Sand People resistance. I have sent some of Bestine's toughest soldiers to the Tusken Fortress. Unfortunately, they have not returned to us. I fear for the worst. For the first time in my life, I am at a loss...
//-- [RESPONSE NOTE]
//-- PLAYER: Let me help!
if (response == "s_390b2857")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: You? What could you do? I-ugh. Very well. You may help us. I need for you to go to the Fortress. Our spies have witnessed a power never seen before and it lurks there. A 'brand' of Sand People never mentioned in any book. We think it may be the leading power in the Tusken community, if one could call it that. Kill it. Bring back some significant proof that you've killed it, yes?
string_id message = new string_id (c_stringFile, "s_113169f8");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Um.. no.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Yes! I will help you!
boolean hasResponse1 = false;
if (victor_visalis_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_23e4ded2");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_177e9cb7");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds like a tough deal.
if (response == "s_e9a49e3")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: It is my hope that my soldiers will return. I must return to my duties. Good day.
string_id message = new string_id (c_stringFile, "s_e52ed44");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You? What could you do? I-ugh. Very well. You may help us. I need for you to go to the Fortress. Our spies have witnessed a power never seen before and it lurks there. A 'brand' of Sand People never mentioned in any book. We think it may be the leading power in the Tusken community, if one could call it that. Kill it. Bring back some significant proof that you've killed it, yes?
//-- [RESPONSE NOTE]
//-- PLAYER: Um.. no.
if (response == "s_23e4ded2")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: I see that you're a coward. Very well.
string_id message = new string_id (c_stringFile, "s_3516c87");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Yes! I will help you!
if (response == "s_177e9cb7")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
victor_visalis_action_OnTuskenQuest (player, npc);
//-- NPC: Good. Leave with haste. Our target may leave for a more... safe place soon. We must strike when it least expects it and when it is most vulnerable. Travel to Fort Tusken and search there. I wish you luck.
string_id message = new string_id (c_stringFile, "s_72a766a9");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch41 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Absolutely. I fully intend to win over Mr.Trenwell once again. We need to keep his meddlesome ideas out of Bestine. Bestine needs more defense and it is defense that I shall give them! Keep me in office and vote in the next election with the governor.
//-- [RESPONSE NOTE]
//-- PLAYER: Hey wait! What about my reward for voting for you in the last election?
if (response == "s_435f07d4")
{
//-- [NOTE]
if (victor_visalis_condition_alreadyReceivedElectionReward (player, npc))
{
//-- NPC: Greedy, are you? You already received a 'reward' from me. I must return to my duties. Now, be gone.
string_id message = new string_id (c_stringFile, "s_24f8534b");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_noInventorySpace (player, npc))
{
//-- NPC: Return when you have more room. I must return to my duties.
string_id message = new string_id (c_stringFile, "s_adc1f0dc");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_Givereward (player, npc);
//-- NPC: Oh yes! It almost slipped my mind. Here you are.
string_id message = new string_id (c_stringFile, "s_cc9cab18");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What are your proposed changes for Bestine?
if (response == "s_bae6b22d")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: The city of Bestine is severly lacking when it comes to defense. It is my main concern. The Tusken Raiders have become more daring and have constantly tried to launch attacks against the outer walls of the city. Several people have died. The Empire has kept it quiet, preventing it from reaching the common folk of Bestine. I fear the Tuskens will launch a more devastating attack in the days to come. Several of my sources have confirmed my suspicions.
string_id message = new string_id (c_stringFile, "s_70973a58");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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.victor_visalis.branchId", 47);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to vote for you.
if (response == "s_d6a9a15d")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
string_id message = new string_id (c_stringFile, "s_146");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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_148");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 67);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me more about the Tuskens.
if (response == "s_1a50f0d3")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: What is there to tell... The Tuskens have become more and more restless with each passing day. New cities have sprung up from the sand literally overnight, backing the Sand People into a small corner of the planet. I fear Bestine is next on the chopping board, so to speak. I have sent several scouts to keep an eye on them.
string_id message = new string_id (c_stringFile, "s_172");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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_174");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 74);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need to go. I'm sorry.
if (response == "s_87b97dc")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_78");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch46 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE] Introduction: Victor Visalis tries to convince the player to join his campaign. If the player agrees, he/she will be sent on missions in order to bring back positive evidence used for voting.
//-- NPC: Can you feel that? The Sand People are getting restless. I can sense it from here. Bestine will not be safe unless we recruit more Imperial Troopers to defend the city. If my... opponent wins the election, I am afraid of what may happen to the people of Bestine. But enough of this. How may I help you?
//-- [RESPONSE NOTE]
//-- PLAYER: What are your proposed changes for Bestine?
if (response == "s_84")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: The city of Bestine is severly lacking when it comes to defense. It is my main concern. The Tusken Raiders have become more daring and have constantly tried to launch attacks against the outer walls of the city. Several people have died. The Empire has kept it quiet, preventing it from reaching the common folk of Bestine. I fear the Tuskens will launch a more devastating attack in the days to come. Several of my sources have confirmed my suspicions.
string_id message = new string_id (c_stringFile, "s_70973a58");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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.victor_visalis.branchId", 47);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to vote for you.
if (response == "s_144")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
string_id message = new string_id (c_stringFile, "s_146");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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_148");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 67);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me more about the Tuskens.
if (response == "s_170")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: What is there to tell... The Tuskens have become more and more restless with each passing day. New cities have sprung up from the sand literally overnight, backing the Sand People into a small corner of the planet. I fear Bestine is next on the chopping board, so to speak. I have sent several scouts to keep an eye on them.
string_id message = new string_id (c_stringFile, "s_172");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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_174");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 74);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need to go. I'm sorry.
if (response == "s_208")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_210");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch47 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The city of Bestine is severly lacking when it comes to defense. It is my main concern. The Tusken Raiders have become more daring and have constantly tried to launch attacks against the outer walls of the city. Several people have died. The Empire has kept it quiet, preventing it from reaching the common folk of Bestine. I fear the Tuskens will launch a more devastating attack in the days to come. Several of my sources have confirmed my suspicions.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_540ac7e9")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: To make it short and clear, my proposed changes for Bestine would be to increase the number of Storm Troopers within Bestine. I plan to establish a special force of Troopers to eradicate the more... dangerous of scum from the city.
string_id message = new string_id (c_stringFile, "s_486664dd");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I've decided to vote for you.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Tell me more about the Tuskens.
boolean hasResponse1 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I should go.
boolean hasResponse2 = false;
if (victor_visalis_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_1285849e");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_106");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 48);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch48 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: To make it short and clear, my proposed changes for Bestine would be to increase the number of Storm Troopers within Bestine. I plan to establish a special force of Troopers to eradicate the more... dangerous of scum from the city.
//-- [RESPONSE NOTE]
//-- PLAYER: I've decided to vote for you.
if (response == "s_1285849e")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
string_id message = new string_id (c_stringFile, "s_c34a7f30");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_91");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 49);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me more about the Tuskens.
if (response == "s_106")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: What is there to tell... The Tuskens have become more and more restless with each passing day. New cities have sprung up from the sand literally overnight, backing the Sand People into a small corner of the planet. I fear Bestine is next on the chopping board, so to speak. I have sent several scouts to keep an eye on them.
string_id message = new string_id (c_stringFile, "s_dcd4d8d5");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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_109");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 56);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I should go.
if (response == "s_140")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_142");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch49 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_91")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Regardless... if you are serious about the whole ordeal, I suggest you speak with others within the capitol and throughout the city. I am sure I have touched a few lives in my passing, but I do not remember such frivolous things. Should you decide to join my opponent's campaign and uncover the dirt that's bound to be in his past, bring it to me. It is the only way I'll let you back into my campaign if you decide to help him instead.
string_id message = new string_id (c_stringFile, "s_6c1a2811");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_94");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 50);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch50 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Regardless... if you are serious about the whole ordeal, I suggest you speak with others within the capitol and throughout the city. I am sure I have touched a few lives in my passing, but I do not remember such frivolous things. Should you decide to join my opponent's campaign and uncover the dirt that's bound to be in his past, bring it to me. It is the only way I'll let you back into my campaign if you decide to help him instead.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_94")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Time is running out and I have too much to do to explain the intricacies of politics with you. If you decide to join my campaign, I will offer you a diskette that will further explain the process.
string_id message = new string_id (c_stringFile, "s_59c941ec");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I wish to join your campaign.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I don't want to join your campaign.
boolean hasResponse1 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I have to go. Bye!
boolean hasResponse2 = false;
if (victor_visalis_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_5492e753");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_d041eb82");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_9201d81b");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 51);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch51 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Time is running out and I have too much to do to explain the intricacies of politics with you. If you decide to join my campaign, I will offer you a diskette that will further explain the process.
//-- [RESPONSE NOTE]
//-- PLAYER: I wish to join your campaign.
if (response == "s_5492e753")
{
//-- [NOTE]
if (!victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_giveDiskAndJoinCampaign (player, npc);
//-- NPC: You are wise to agree with my views regarding Bestine and its state of defense. As I may have mentioned, I will give you a diskette to explain anything you may have missed. As for evidence, you will need to speak with several others. It is my understanding that my secretary receives letters from the people of Bestine, thanking me for my assistance. She may know the information you seek. I must return to my duties.
string_id message = new string_id (c_stringFile, "s_b0c249bb");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_NoRoom (player, npc);
//-- NPC: I'm glad you have agreed to join my campaign. However, in order to receive the diskette, you'll need more room. Please come back when you do.
string_id message = new string_id (c_stringFile, "s_99");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to join your campaign.
if (response == "s_d041eb82")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: That's unfortunate. I suppose you care more of museums, historians and new market places than the lives of others. Very well.
string_id message = new string_id (c_stringFile, "s_c135d871");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have to go. Bye!
if (response == "s_9201d81b")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_104");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch56 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What is there to tell... The Tuskens have become more and more restless with each passing day. New cities have sprung up from the sand literally overnight, backing the Sand People into a small corner of the planet. I fear Bestine is next on the chopping board, so to speak. I have sent several scouts to keep an eye on them.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_109")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: My opponent will put the city's money into worthless things--markets, hiring historians, a museum--which will severely reduce our defenses. I cannot have that happen. We need to increase the defense... or many will die.
string_id message = new string_id (c_stringFile, "s_fc5485d3");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm going to vote for you.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I should go.
boolean hasResponse1 = false;
if (victor_visalis_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_a76ad142");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_6cf7afee");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 57);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch57 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: My opponent will put the city's money into worthless things--markets, hiring historians, a museum--which will severely reduce our defenses. I cannot have that happen. We need to increase the defense... or many will die.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm going to vote for you.
if (response == "s_a76ad142")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
string_id message = new string_id (c_stringFile, "s_113");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_115");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 58);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I should go.
if (response == "s_6cf7afee")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_138");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch58 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_115")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Regardless... if you are serious about the whole ordeal, I suggest you speak with others within the capitol and throughout the city. I am sure I have touched a few lives in my passing, but I do not remember such frivolous things. Should you decide to join my opponent's campaign and uncover the dirt that's bound to be in his past, bring it to me. It is the only way I'll let you back into my campaign if you decide to help him instead.
string_id message = new string_id (c_stringFile, "s_117");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_119");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 59);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch59 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Regardless... if you are serious about the whole ordeal, I suggest you speak with others within the capitol and throughout the city. I am sure I have touched a few lives in my passing, but I do not remember such frivolous things. Should you decide to join my opponent's campaign and uncover the dirt that's bound to be in his past, bring it to me. It is the only way I'll let you back into my campaign if you decide to help him instead.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_119")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Time is running out and I have too much to do to explain the intricacies of politics with you. If you decide to join my campaign, I will offer you a diskette that will further explain the process.
string_id message = new string_id (c_stringFile, "s_121");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I wish to join your campaign.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I don't want to join your campaign.
boolean hasResponse1 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I have to go. Bye!
boolean hasResponse2 = false;
if (victor_visalis_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_123");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_129");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_133");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 60);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch60 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Time is running out and I have too much to do to explain the intricacies of politics with you. If you decide to join my campaign, I will offer you a diskette that will further explain the process.
//-- [RESPONSE NOTE]
//-- PLAYER: I wish to join your campaign.
if (response == "s_123")
{
//-- [NOTE]
if (!victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_giveDiskAndJoinCampaign (player, npc);
//-- NPC: You are wise to agree with my views regarding Bestine and its state of defense. As I may have mentioned, I will give you a diskette to explain anything you may have missed. As for evidence, you will need to speak with several others. It is my understanding that my secretary receives letters from the people of Bestine, thanking me for my assistance. She may know the information you seek. I must return to my duties.
string_id message = new string_id (c_stringFile, "s_125");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_NoRoom (player, npc);
//-- NPC: I'm glad you have agreed to join my campaign. However, in order to receive the diskette, you'll need more room. Please come back when you do.
string_id message = new string_id (c_stringFile, "s_127");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to join your campaign.
if (response == "s_129")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: That's unfortunate. I suppose you care more of museums, historians and new market places than the lives of others. Very well.
string_id message = new string_id (c_stringFile, "s_131");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have to go. Bye!
if (response == "s_133")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_135");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch67 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_148")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Regardless... if you are serious about the whole ordeal, I suggest you speak with others within the capitol and throughout the city. I am sure I have touched a few lives in my passing, but I do not remember such frivolous things. Should you decide to join my opponent's campaign and uncover the dirt that's bound to be in his past, bring it to me. It is the only way I'll let you back into my campaign if you decide to help him instead.
string_id message = new string_id (c_stringFile, "s_150");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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_152");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 68);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch68 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Regardless... if you are serious about the whole ordeal, I suggest you speak with others within the capitol and throughout the city. I am sure I have touched a few lives in my passing, but I do not remember such frivolous things. Should you decide to join my opponent's campaign and uncover the dirt that's bound to be in his past, bring it to me. It is the only way I'll let you back into my campaign if you decide to help him instead.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_152")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Time is running out and I have too much to do to explain the intricacies of politics with you. If you decide to join my campaign, I will offer you a diskette that will further explain the process.
string_id message = new string_id (c_stringFile, "s_154");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I wish to join your campaign.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I don't want to join your campaign.
boolean hasResponse1 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I have to go. Bye!
boolean hasResponse2 = false;
if (victor_visalis_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_156");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_162");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_166");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 69);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch69 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Time is running out and I have too much to do to explain the intricacies of politics with you. If you decide to join my campaign, I will offer you a diskette that will further explain the process.
//-- [RESPONSE NOTE]
//-- PLAYER: I wish to join your campaign.
if (response == "s_156")
{
//-- [NOTE]
if (!victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_giveDiskAndJoinCampaign (player, npc);
//-- NPC: You are wise to agree with my views regarding Bestine and its state of defense. As I may have mentioned, I will give you a diskette to explain anything you may have missed. As for evidence, you will need to speak with several others. It is my understanding that my secretary receives letters from the people of Bestine, thanking me for my assistance. She may know the information you seek. I must return to my duties.
string_id message = new string_id (c_stringFile, "s_158");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_NoRoom (player, npc);
//-- NPC: I'm glad you have agreed to join my campaign. However, in order to receive the diskette, you'll need more room. Please come back when you do.
string_id message = new string_id (c_stringFile, "s_160");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to join your campaign.
if (response == "s_162")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: That's unfortunate. I suppose you care more of museums, historians and new market places than the lives of others. Very well.
string_id message = new string_id (c_stringFile, "s_164");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have to go. Bye!
if (response == "s_166")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_168");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch74 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What is there to tell... The Tuskens have become more and more restless with each passing day. New cities have sprung up from the sand literally overnight, backing the Sand People into a small corner of the planet. I fear Bestine is next on the chopping board, so to speak. I have sent several scouts to keep an eye on them.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_174")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: My opponent will put the city's money into worthless things--markets, hiring historians, a museum--which will severely reduce our defenses. I cannot have that happen. We need to increase the defense... or many will die.
string_id message = new string_id (c_stringFile, "s_176");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm going to vote for you.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I should go.
boolean hasResponse1 = false;
if (victor_visalis_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_178");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_204");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 75);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch75 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: My opponent will put the city's money into worthless things--markets, hiring historians, a museum--which will severely reduce our defenses. I cannot have that happen. We need to increase the defense... or many will die.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm going to vote for you.
if (response == "s_178")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
string_id message = new string_id (c_stringFile, "s_180");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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_182");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 76);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I should go.
if (response == "s_204")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_206");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch76 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: A wise choice. However, I know that words do not weigh much in this life. It is action that makes or breaks a nation. The governor has ridiculous restrictions on the voting process. By her words, you will need evidence in order to vote; evidence of a good deed I have done. Childish.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_182")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Regardless... if you are serious about the whole ordeal, I suggest you speak with others within the capitol and throughout the city. I am sure I have touched a few lives in my passing, but I do not remember such frivolous things. Should you decide to join my opponent's campaign and uncover the dirt that's bound to be in his past, bring it to me. It is the only way I'll let you back into my campaign if you decide to help him instead.
string_id message = new string_id (c_stringFile, "s_184");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Continue.
boolean hasResponse0 = false;
if (victor_visalis_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_186");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 77);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch77 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Regardless... if you are serious about the whole ordeal, I suggest you speak with others within the capitol and throughout the city. I am sure I have touched a few lives in my passing, but I do not remember such frivolous things. Should you decide to join my opponent's campaign and uncover the dirt that's bound to be in his past, bring it to me. It is the only way I'll let you back into my campaign if you decide to help him instead.
//-- [RESPONSE NOTE]
//-- PLAYER: Continue.
if (response == "s_186")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Time is running out and I have too much to do to explain the intricacies of politics with you. If you decide to join my campaign, I will offer you a diskette that will further explain the process.
string_id message = new string_id (c_stringFile, "s_188");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I wish to join your campaign.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I don't want to join your campaign.
boolean hasResponse1 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I have to go. Bye!
boolean hasResponse2 = false;
if (victor_visalis_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_190");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_196");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_200");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 78);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int victor_visalis_handleBranch78 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Time is running out and I have too much to do to explain the intricacies of politics with you. If you decide to join my campaign, I will offer you a diskette that will further explain the process.
//-- [RESPONSE NOTE]
//-- PLAYER: I wish to join your campaign.
if (response == "s_190")
{
//-- [NOTE]
if (!victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_giveDiskAndJoinCampaign (player, npc);
//-- NPC: You are wise to agree with my views regarding Bestine and its state of defense. As I may have mentioned, I will give you a diskette to explain anything you may have missed. As for evidence, you will need to speak with several others. It is my understanding that my secretary receives letters from the people of Bestine, thanking me for my assistance. She may know the information you seek. I must return to my duties.
string_id message = new string_id (c_stringFile, "s_192");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_noInventorySpace (player, npc))
{
victor_visalis_action_NoRoom (player, npc);
//-- NPC: I'm glad you have agreed to join my campaign. However, in order to receive the diskette, you'll need more room. Please come back when you do.
string_id message = new string_id (c_stringFile, "s_194");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I don't want to join your campaign.
if (response == "s_196")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: That's unfortunate. I suppose you care more of museums, historians and new market places than the lives of others. Very well.
string_id message = new string_id (c_stringFile, "s_198");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have to go. Bye!
if (response == "s_200")
{
//-- [NOTE]
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Very well.
string_id message = new string_id (c_stringFile, "s_202");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.victor_visalis");
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.victor_visalis");
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] No room in inventory.
if (victor_visalis_condition_NoroomObj (player, npc))
{
//-- NPC: I see you have returned. Last we spoke, you didn't have room for the diskette. Would you like it now?
string_id message = new string_id (c_stringFile, "s_ca4e3819");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, please.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No thanks!
boolean hasResponse1 = false;
if (victor_visalis_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_c82e9a2f");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_ee26e33e");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 1);
npcStartConversation (player, npc, "victor_visalis", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] Victor asks about the positive evidence used for voting.
if (victor_visalis_condition_CampObj (player, npc))
{
//-- NPC: You have returned. Did you find the proper evidence the governor requires?
string_id message = new string_id (c_stringFile, "s_c2b746c2");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes and I voted for you.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I can't find any evidence.
boolean hasResponse1 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I decided not to vote for you.
boolean hasResponse2 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I have to go.
boolean hasResponse3 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_798f58f7");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_700330a5");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_8999ec9b");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_dea56128");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 5);
npcStartConversation (player, npc, "victor_visalis", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] Victor sees that the player joined his rival's campaign and offers him the option to join his instead.
if (victor_visalis_condition_OpponentObj (player, npc))
{
//-- NPC: I see that you have joined the campaign of my opponent. I am disappointed.
string_id message = new string_id (c_stringFile, "s_26e91e91");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I want to join your campaign.
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sorry, I have to go.
boolean hasResponse1 = false;
if (victor_visalis_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_b826b85a");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_67dbab18");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 11);
npcStartConversation (player, npc, "victor_visalis", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE] Victor needs negative evidence against Sean Trenwell in order to allow the player to join his campaign. The player is asked about the evidence here.
if (victor_visalis_condition_NegativeqsOBJ (player, npc))
{
//-- NPC: I see that you are eager to join my campaign. Do you have the proper evidence against Sean Trenwell? Without it, you'll not be able to join my campaign.
string_id message = new string_id (c_stringFile, "s_4e29a0ab");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I have it, yes.
boolean hasResponse0 = false;
if (victor_visalis_condition_hasEvidence (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: No, not yet.
boolean hasResponse1 = false;
if (victor_visalis_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_6ac98e49");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_da9a29e9");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 14);
npcStartConversation (player, npc, "victor_visalis", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_inOffice (player, npc))
{
//-- NPC: I am now in office, this much is true. However, I have matters on my mind to which I must attend. Is there something you need?
string_id message = new string_id (c_stringFile, "s_a19e3981");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How goes your work now that you're in office?
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I have destroyed the intended target.
boolean hasResponse1 = false;
if (victor_visalis_condition_CheckforTuskenHead (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I'm lost. What do I need to do?
boolean hasResponse2 = false;
if (victor_visalis_condition_ChkTuskenQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I'm still looking for our target.
boolean hasResponse3 = false;
if (victor_visalis_condition_ChkTuskenQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: I quit!
boolean hasResponse4 = false;
if (victor_visalis_condition_ChkTuskenQuest (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = true;
}
//-- PLAYER: I found these weird stones.
boolean hasResponse5 = false;
if (victor_visalis_condition_CheckforStones (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse5 = true;
}
//-- PLAYER: Hey wait! What about my reward for voting for you?
boolean hasResponse6 = false;
if (victor_visalis_condition_voted (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse6 = true;
}
//-- PLAYER: Now that another election has begun, are you planning to get re-elected?
boolean hasResponse7 = false;
if (victor_visalis_condition_newElectionStarted (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse7 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_edafb11b");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_6641e79e");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_42c394e0");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_cbb4f307");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_f70821a3");
if (hasResponse5)
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
if (hasResponse6)
responses [responseIndex++] = new string_id (c_stringFile, "s_82af0027");
if (hasResponse7)
responses [responseIndex++] = new string_id (c_stringFile, "s_de1eacb3");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 20);
npcStartConversation (player, npc, "victor_visalis", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (victor_visalis_condition_notInOffice_noElection (player, npc))
{
//-- NPC: I am much too occupied at the moment. You may return when the election begins again. Speak with Bestine's citizens. They usually speak of it.
string_id message = new string_id (c_stringFile, "s_57218e96");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Victor is not in office during an election. In that election, the player has already voted for him.
if (victor_visalis_condition_votedVictorCurrentElection (player, npc))
{
//-- NPC: Ah, thanks for voting for me in this election. I really appreciate it. If I win, come back and speak to me so that I can reward your loyalty.
string_id message = new string_id (c_stringFile, "s_82dcbdca");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Victor is not in office during an election. In that election, the player has already voted for Sean Trenwell.
if (victor_visalis_condition_votedSeanCurrentElection (player, npc))
{
//-- NPC: I'm surprised you voted for Sean Trenwell in this election. I don't see how anyone could justify doing that, but apparently you found his ideas palatable. I can't imagine what had to happen to make that possible, and frankly, I don't want to know.
string_id message = new string_id (c_stringFile, "s_66e44ee");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE] Introduction: Victor Visalis tries to convince the player to join his campaign. If the player agrees, he/she will be sent on missions in order to bring back positive evidence used for voting.
if (victor_visalis_condition__defaultCondition (player, npc))
{
//-- NPC: Can you feel that? The Sand People are getting restless. I can sense it from here. Bestine will not be safe unless we recruit more Imperial Troopers to defend the city. If my... opponent wins the election, I am afraid of what may happen to the people of Bestine. But enough of this. How may I help you?
string_id message = new string_id (c_stringFile, "s_aa1a9de6");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What are your proposed changes for Bestine?
boolean hasResponse0 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I'm here to vote for you.
boolean hasResponse1 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Tell me more about the Tuskens.
boolean hasResponse2 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I need to go. I'm sorry.
boolean hasResponse3 = false;
if (victor_visalis_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_144");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_170");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_208");
utils.setScriptVar (player, "conversation.victor_visalis.branchId", 46);
npcStartConversation (player, npc, "victor_visalis", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
// ----------------------------------------------------------------------
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
{
if (conversationId != "victor_visalis")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.victor_visalis.branchId");
if (branchId == 1 && victor_visalis_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && victor_visalis_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && victor_visalis_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && victor_visalis_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && victor_visalis_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && victor_visalis_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && victor_visalis_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && victor_visalis_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && victor_visalis_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 41 && victor_visalis_handleBranch41 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 46 && victor_visalis_handleBranch46 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 47 && victor_visalis_handleBranch47 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 48 && victor_visalis_handleBranch48 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 49 && victor_visalis_handleBranch49 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 50 && victor_visalis_handleBranch50 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 51 && victor_visalis_handleBranch51 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 56 && victor_visalis_handleBranch56 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 57 && victor_visalis_handleBranch57 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 58 && victor_visalis_handleBranch58 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 59 && victor_visalis_handleBranch59 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 60 && victor_visalis_handleBranch60 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 67 && victor_visalis_handleBranch67 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 68 && victor_visalis_handleBranch68 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 69 && victor_visalis_handleBranch69 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 74 && victor_visalis_handleBranch74 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 75 && victor_visalis_handleBranch75 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 76 && victor_visalis_handleBranch76 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 77 && victor_visalis_handleBranch77 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 78 && victor_visalis_handleBranch78 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.victor_visalis.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================