mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
4052 lines
120 KiB
Plaintext
4052 lines
120 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// faction_recruiter_imperial.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.faction_perk;
|
|
include library.factions;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/faction_recruiter_imperial";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean faction_recruiter_imperial_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isInFaction (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return (factions.isInFriendlyFaction(player, npc)&&(!factions.isOnLeaveFromFriendlyFaction(player,npc)))&&(!factions.isPVPStatusChanging(player));
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isEnemyFaction (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return (factions.isInEnemyFaction(player, npc)&&(!factions.isPVPStatusChanging(player)));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isBlockedByJoinTimer (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
int factionId = pvpGetAlignedFaction(npc);
|
|
string faction = factions.getFactionNameByHashCode(factionId);
|
|
|
|
return factions.isGatedByJoinTimer(player, faction);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_playerQualifiesForPromotion (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return (factions.qualifiesForPromotion(player, pvpGetAlignedFaction(npc))&&(!factions.isPVPStatusChanging(player)));
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isChangingFaction (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return factions.isPVPStatusChanging(player);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_onLeaveFromFriendlyFaction (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return (factions.isOnLeaveFromFriendlyFaction(player, npc)&&(!factions.isPVPStatusChanging(player)));
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_onLeaveFromEnemyFaction (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return (factions.isOnLeaveFromEnemyFaction(player, npc)&&(!factions.isPVPStatusChanging(player)));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isCovert (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return(pvpGetType(player)==PVPTYPE_COVERT)&&(!factions.isPVPStatusChanging(player));
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isOvert (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return ((pvpGetType(player)==PVPTYPE_DECLARED)&&(!factions.isPVPStatusChanging(player)));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_playerCanBuyFaction (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return (factions.isSmuggler(player)&&(factions.canBuyFaction(player, npc))&&(!factions.isPVPStatusChanging(player)));
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isAllowedToJoinFaction (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return factions.canJoinFaction(player, pvpGetAlignedFaction(npc));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isImperialMercForGcw (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return factions.isImperialHelper(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_canChangeStatus (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return factions.canGoOnLeave(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_canBeMerc (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
int faction_id = pvpGetAlignedFaction(npc);
|
|
string recruiterFaction = factions.getFactionNameByHashCode(faction_id);
|
|
|
|
return factions.canChangeNeutralMercenaryStatus(player, recruiterFaction);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isRebMercForGcw (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return factions.isRebelHelper(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isRebOrImpMerc (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return faction_recruiter_imperial_condition_isRebMercForGcw(player, npc) || faction_recruiter_imperial_condition_isImperialMercForGcw(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isInvulnerableRecuiter (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return isInvulnerable(npc) && hasScript(npc, "npc.vendor.vendor");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean faction_recruiter_imperial_condition_isInvulnerableNoScript (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc,player);
|
|
return isInvulnerable(npc) && !hasScript(npc, "npc.vendor.vendor");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void faction_recruiter_imperial_action_showFactionGcwRewardUi (obj_id player, obj_id npc)
|
|
{
|
|
dictionary d = new dictionary();
|
|
d.put("player", player);
|
|
messageTo(npc, "showInventorySUI", d, 0, false);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_enablePVPTimer (obj_id player, obj_id npc)
|
|
{
|
|
factions.goOvertWithDelay(player,30);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_playerJoinFaction (obj_id player, obj_id npc)
|
|
{
|
|
factions.joinFaction(player,pvpGetAlignedFaction(npc));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_playerGoOnLeaveTimer (obj_id player, obj_id npc)
|
|
{
|
|
factions.goOnLeaveWithDelay(player,300);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_makeImpMercCombatant (obj_id player, obj_id npc)
|
|
{
|
|
factions.setNeturalMercenaryCovert(player, factions.FACTION_FLAG_IMPERIAL);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_maekImpMercSF (obj_id player, obj_id npc)
|
|
{
|
|
factions.setNeturalMercenaryOvert(player, factions.FACTION_FLAG_IMPERIAL);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_playerGoCovertTimer (obj_id player, obj_id npc)
|
|
{
|
|
factions.goCovertWithDelay(player,300);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_grantPromotion (obj_id player, obj_id npc)
|
|
{
|
|
factions.applyPromotion(player, pvpGetAlignedFaction(npc));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_buy1250FactionPoints (obj_id player, obj_id npc)
|
|
{
|
|
factions.buyFaction(player, npc, 100000);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_buy250FactionPoints (obj_id player, obj_id npc)
|
|
{
|
|
factions.buyFaction(player, npc, 20000);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_completelyResign (obj_id player, obj_id npc)
|
|
{
|
|
|
|
factions.leaveFaction(player, pvpGetAlignedFaction(npc));
|
|
//factions.leaveFaction(player, pvpGetAlignedFaction(npc));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_goCovertShortTimer (obj_id player, obj_id npc)
|
|
{
|
|
factions.goCovertWithDelay(player,30);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void faction_recruiter_imperial_action_showGcwRewardsList (obj_id player, obj_id npc)
|
|
{
|
|
int playerGcwRank = pvpGetCurrentGcwRank(player);
|
|
int faction_id = pvpGetAlignedFaction(player);
|
|
string playerGcwFaction = factions.getFactionNameByHashCode(faction_id);
|
|
|
|
faction_perk.displayAvailableFactionItemRanks(player, npc, playerGcwRank, playerGcwFaction);
|
|
|
|
return;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string faction_recruiter_imperial_tokenTO_getFactionRankName (obj_id player, obj_id npc)
|
|
{
|
|
int current_rank = pvpGetCurrentGcwRank(player);
|
|
string faction = factions.getFaction(player);
|
|
if (current_rank > factions.MAXIMUM_RANK)
|
|
current_rank = 1;
|
|
|
|
return "@faction_recruiter:" + factions.getRankName(current_rank, faction);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
string faction_recruiter_imperial_tokenTO_getFactionNextRankName (obj_id player, obj_id npc)
|
|
{
|
|
int current_rank = pvpGetCurrentGcwRank(player);
|
|
string faction = factions.getFaction(player);
|
|
if (current_rank > factions.MAXIMUM_RANK)
|
|
current_rank = 1;
|
|
|
|
current_rank = current_rank+1;
|
|
return "@faction_recruiter:" + factions.getRankName(current_rank, faction);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
string faction_recruiter_imperial_tokenTO_getRebelScoreString (obj_id player, obj_id npc)
|
|
{
|
|
int intTest = getIntObjVar(npc, "Rebel.controlScore");
|
|
return ""+intTest;
|
|
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
int faction_recruiter_imperial_tokenDI_getImperialScore (obj_id player, obj_id npc)
|
|
{
|
|
return getIntObjVar(npc, "Imperial.controlScore");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int faction_recruiter_imperial_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hello, soldier. Are you ready to resume active duty?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, sir, I am ready to resume my duties.
|
|
if (response == "s_294")
|
|
{
|
|
doAnimationAction (player, "salute1");
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
//-- NPC: Good for you! Before I start the paperwork, though, I want to make sure that you are serious about returning to active duty. If you run into most rebels, they will attack you on sight. Are you returning to active duty?
|
|
string_id message = new string_id (c_stringFile, "s_296");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, sir!
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Excuse me, sir, I misspoke. I need a few more days of leave.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_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_298");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_302");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good for you! Before I start the paperwork, though, I want to make sure that you are serious about returning to active duty. If you run into most rebels, they will attack you on sight. Are you returning to active duty?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, sir!
|
|
if (response == "s_298")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_goCovertShortTimer (player, npc);
|
|
|
|
//-- NPC: It will take the system about 30 seconds to process your status. After that, you are good to go.
|
|
string_id message = new string_id (c_stringFile, "s_300");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Excuse me, sir, I misspoke. I need a few more days of leave.
|
|
if (response == "s_302")
|
|
{
|
|
doAnimationAction (player, "shake_head_no");
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Don't waste my time. Come back to duty when you are serious about your responsibilities.
|
|
string_id message = new string_id (c_stringFile, "s_304");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Greetings, soldier. What may I do for you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableRecuiter (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showFactionGcwRewardUi (player, npc);
|
|
|
|
//-- NPC: Understood. This is what I have.
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableNoScript (player, npc))
|
|
{
|
|
//-- NPC: I dont have access to the supplies. Perhaps another recruiter can assist you.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have those kind of supplies. You'll need to find a recruiter in a city.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
if (response == "s_324")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showGcwRewardsList (player, npc);
|
|
|
|
//-- NPC: Very well. I will show you what is available.
|
|
string_id message = new string_id (c_stringFile, "s_326");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What kind of change were you considering?
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to request a new role within the military.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to use my personal leave time.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I believe it is time to end my tour of duty. I would like to resign.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I think I'll stay as I am.
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_52");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_88");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
if (response == "s_410")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Our satellite readings have the planetary occupation at Imperial: %DI and Rebel: %TO.
|
|
string_id message = new string_id (c_stringFile, "s_412");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What kind of change were you considering?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to request a new role within the military.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isOvert (player, npc))
|
|
{
|
|
//-- NPC: You are currently enrolled in Special Forces. I can change your status to combatant, which means that the rebel 'special forces' riffraff will not concern themselves with you. Is that what you are requesting?
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Unfortunately yes, sir. I am no longer interested in Special Forces.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I have reconsidered, for the glory of the Empire!
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_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_56");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isCovert (player, npc))
|
|
{
|
|
//-- NPC: Special Forces is recruiting. Would you like to submit your application? This means that you will be authorized to hunt the Rebel 'special forces', as they like to call themselves.
|
|
string_id message = new string_id (c_stringFile, "s_64");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I want to join Special Forces, sir!
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe not, sir.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to use my personal leave time.
|
|
if (response == "s_74")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Are you certain that this is what you want to do? You may be missing out on some important battles. Going on leave means that you will not be recognized as a member of the Imperial military and will be ignored by the Rebel Alliance.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am certain.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I will stay active. I know that the war effort needs me.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_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_79");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I believe it is time to end my tour of duty. I would like to resign.
|
|
if (response == "s_88")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I beg your pardon? You would leave the greatest opportunity of your life? You must be mad...or a traitor.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am no traitor. I would just like to leave the military.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No no, I was only kidding. I'm a loyal member of the military.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_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_92");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: On second thought, I think I'll stay as I am.
|
|
if (response == "s_55")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Changed your mind, eh? Very well. Is there anything else I can help you with?
|
|
string_id message = new string_id (c_stringFile, "s_57");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are currently enrolled in Special Forces. I can change your status to combatant, which means that the rebel 'special forces' riffraff will not concern themselves with you. Is that what you are requesting?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Unfortunately yes, sir. I am no longer interested in Special Forces.
|
|
if (response == "s_56")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_playerGoCovertTimer (player, npc);
|
|
|
|
//-- NPC: Give me a moment to change your status and alert your superior. This process will take approximately 5 minutes.
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I have reconsidered, for the glory of the Empire!
|
|
if (response == "s_60")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I find your dedication admirable. You will go far in the Empire. Is there something else you need?
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I find your dedication admirable. You will go far in the Empire. Is there something else you need?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableRecuiter (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showFactionGcwRewardUi (player, npc);
|
|
|
|
//-- NPC: Understood. This is what I have.
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableNoScript (player, npc))
|
|
{
|
|
//-- NPC: I dont have access to the supplies. Perhaps another recruiter can assist you.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have those kind of supplies. You'll need to find a recruiter in a city.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
if (response == "s_324")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showGcwRewardsList (player, npc);
|
|
|
|
//-- NPC: Very well. I will show you what is available.
|
|
string_id message = new string_id (c_stringFile, "s_326");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What kind of change were you considering?
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to request a new role within the military.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to use my personal leave time.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I believe it is time to end my tour of duty. I would like to resign.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I think I'll stay as I am.
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_52");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_88");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
if (response == "s_410")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Our satellite readings have the planetary occupation at Imperial: %DI and Rebel: %TO.
|
|
string_id message = new string_id (c_stringFile, "s_412");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Special Forces is recruiting. Would you like to submit your application? This means that you will be authorized to hunt the Rebel 'special forces', as they like to call themselves.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I want to join Special Forces, sir!
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_enablePVPTimer (player, npc);
|
|
|
|
//-- NPC: Very good. I'll fast-track this application and you will be active in 30 seconds.
|
|
string_id message = new string_id (c_stringFile, "s_68");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe not, sir.
|
|
if (response == "s_70")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Special Forces isn't for everyone. If you change your mind, let me know. Is there anything else I can do for you?
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Special Forces isn't for everyone. If you change your mind, let me know. Is there anything else I can do for you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableRecuiter (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showFactionGcwRewardUi (player, npc);
|
|
|
|
//-- NPC: Understood. This is what I have.
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableNoScript (player, npc))
|
|
{
|
|
//-- NPC: I dont have access to the supplies. Perhaps another recruiter can assist you.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have those kind of supplies. You'll need to find a recruiter in a city.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
if (response == "s_324")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showGcwRewardsList (player, npc);
|
|
|
|
//-- NPC: Very well. I will show you what is available.
|
|
string_id message = new string_id (c_stringFile, "s_326");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What kind of change were you considering?
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to request a new role within the military.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to use my personal leave time.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I believe it is time to end my tour of duty. I would like to resign.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I think I'll stay as I am.
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_52");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_88");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
if (response == "s_410")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Our satellite readings have the planetary occupation at Imperial: %DI and Rebel: %TO.
|
|
string_id message = new string_id (c_stringFile, "s_412");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you certain that this is what you want to do? You may be missing out on some important battles. Going on leave means that you will not be recognized as a member of the Imperial military and will be ignored by the Rebel Alliance.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am certain.
|
|
if (response == "s_79")
|
|
{
|
|
faction_recruiter_imperial_action_playerGoOnLeaveTimer (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_playerGoOnLeaveTimer (player, npc);
|
|
|
|
//-- NPC: I need to process your paperwork. You will officially be on leave in 5 minutes.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will stay active. I know that the war effort needs me.
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Your sense of duty is admirable. Long live the Emperor!
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Your sense of duty is admirable. Long live the Emperor!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableRecuiter (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showFactionGcwRewardUi (player, npc);
|
|
|
|
//-- NPC: Understood. This is what I have.
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableNoScript (player, npc))
|
|
{
|
|
//-- NPC: I dont have access to the supplies. Perhaps another recruiter can assist you.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have those kind of supplies. You'll need to find a recruiter in a city.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
if (response == "s_324")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showGcwRewardsList (player, npc);
|
|
|
|
//-- NPC: Very well. I will show you what is available.
|
|
string_id message = new string_id (c_stringFile, "s_326");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What kind of change were you considering?
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to request a new role within the military.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to use my personal leave time.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I believe it is time to end my tour of duty. I would like to resign.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I think I'll stay as I am.
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_52");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_88");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
if (response == "s_410")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Our satellite readings have the planetary occupation at Imperial: %DI and Rebel: %TO.
|
|
string_id message = new string_id (c_stringFile, "s_412");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I beg your pardon? You would leave the greatest opportunity of your life? You must be mad...or a traitor.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am no traitor. I would just like to leave the military.
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_completelyResign (player, npc);
|
|
|
|
//-- NPC: So be it. I'll put the paperwork through. We will watch you closely to make sure that you don't cross any lines, citizen.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No no, I was only kidding. I'm a loyal member of the military.
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That type of humor is unbecoming of an officer. I'll thank you to not engage in it again. You will remain in the military.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Changed your mind, eh? Very well. Is there anything else I can help you with?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableRecuiter (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showFactionGcwRewardUi (player, npc);
|
|
|
|
//-- NPC: Understood. This is what I have.
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableNoScript (player, npc))
|
|
{
|
|
//-- NPC: I dont have access to the supplies. Perhaps another recruiter can assist you.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have those kind of supplies. You'll need to find a recruiter in a city.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
if (response == "s_324")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showGcwRewardsList (player, npc);
|
|
|
|
//-- NPC: Very well. I will show you what is available.
|
|
string_id message = new string_id (c_stringFile, "s_326");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What kind of change were you considering?
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to request a new role within the military.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to use my personal leave time.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I believe it is time to end my tour of duty. I would like to resign.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I think I'll stay as I am.
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_52");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_88");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
if (response == "s_410")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Our satellite readings have the planetary occupation at Imperial: %DI and Rebel: %TO.
|
|
string_id message = new string_id (c_stringFile, "s_412");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Our satellite readings have the planetary occupation at Imperial: %DI and Rebel: %TO.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
if (response == "s_71")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableRecuiter (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showFactionGcwRewardUi (player, npc);
|
|
|
|
//-- NPC: Understood. This is what I have.
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableNoScript (player, npc))
|
|
{
|
|
//-- NPC: I dont have access to the supplies. Perhaps another recruiter can assist you.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have those kind of supplies. You'll need to find a recruiter in a city.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
if (response == "s_324")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showGcwRewardsList (player, npc);
|
|
|
|
//-- NPC: Very well. I will show you what is available.
|
|
string_id message = new string_id (c_stringFile, "s_326");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
if (response == "s_49")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What kind of change were you considering?
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to request a new role within the military.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to use my personal leave time.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canChangeStatus (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I believe it is time to end my tour of duty. I would like to resign.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I think I'll stay as I am.
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_52");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_88");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
if (response == "s_410")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Our satellite readings have the planetary occupation at Imperial: %DI and Rebel: %TO.
|
|
string_id message = new string_id (c_stringFile, "s_412");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (faction_recruiter_imperial_tokenTO_getRebelScoreString (player, npc));
|
|
pp.digitInteger = faction_recruiter_imperial_tokenDI_getImperialScore (player, npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Greetings, civilian. Would you be interested in joining the military?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've been doing mercenary work for the Empire. I'm here to requisition supplies.
|
|
if (response == "s_67")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInvulnerableRecuiter (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_showFactionGcwRewardUi (player, npc);
|
|
|
|
//-- NPC: Everything looks in order. This is what I have.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I don't have those kind of supplies. You'll need to find a recruiter in a city.
|
|
string_id message = new string_id (c_stringFile, "s_123");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to be an Imperial Mercenary.
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I see. Well you wont receive Imperial Rank if you decide to take this route. You will also be the target of Rebel thugs. If you choose, you may participate in city conflicts and even special forces duty. Are you still interested?
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_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_89");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 30);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to join the military.
|
|
if (response == "s_428")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isAllowedToJoinFaction (player, npc))
|
|
{
|
|
//-- NPC: Joining the military is a big commitment. Are you sure that you are ready? You realize that those upstart rebels will attack you on sight? Not the so-called 'special forces' but their main troops.
|
|
string_id message = new string_id (c_stringFile, "s_432");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Absolutely. It would be a great honor to serve the Empire.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Perhaps I should think about it a bit longer.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_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_434");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_440");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 37);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isBlockedByJoinTimer (player, npc))
|
|
{
|
|
//-- NPC: Surely you don't expect the Empire to welcome you with open arms after having aided the Rebel insurgency so recently??? Get out of here, you terrorist!
|
|
string_id message = new string_id (c_stringFile, "s_124");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Empire appreciates your enthusiasm, but cannot accept you into the military at this time. Thank you. Move along.
|
|
string_id message = new string_id (c_stringFile, "s_430");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I see. Well you wont receive Imperial Rank if you decide to take this route. You will also be the target of Rebel thugs. If you choose, you may participate in city conflicts and even special forces duty. Are you still interested?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_89")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_canBeMerc (player, npc))
|
|
{
|
|
//-- NPC: Would you like to sign on as Special Forces or Combatant?
|
|
string_id message = new string_id (c_stringFile, "s_91");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Special Forces
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Combatant
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_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_93");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_97");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 31);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I show that you are already in the process of changing your status.
|
|
string_id message = new string_id (c_stringFile, "s_105");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Would you like to sign on as Special Forces or Combatant?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Special Forces
|
|
if (response == "s_93")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_canBeMerc (player, npc))
|
|
{
|
|
doAnimationAction (npc, "handshake_tandem");
|
|
|
|
doAnimationAction (player, "handshake_tandem");
|
|
|
|
faction_recruiter_imperial_action_maekImpMercSF (player, npc);
|
|
|
|
//-- NPC: Great! Watch your back! If you need to change your status, use the icon in your command browser named Change Neutral Status.
|
|
string_id message = new string_id (c_stringFile, "s_95");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I show that you are already in the process of changing your status.
|
|
string_id message = new string_id (c_stringFile, "s_101");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Combatant
|
|
if (response == "s_97")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_canBeMerc (player, npc))
|
|
{
|
|
doAnimationAction (npc, "handshake_tandem");
|
|
|
|
doAnimationAction (player, "handshake_tandem");
|
|
|
|
faction_recruiter_imperial_action_makeImpMercCombatant (player, npc);
|
|
|
|
//-- NPC: Welcome aboard. If you need to change your status, use the icon in your command browser named Change Neutral Status.
|
|
string_id message = new string_id (c_stringFile, "s_100");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I show that you are already in the process of changing your status.
|
|
string_id message = new string_id (c_stringFile, "s_103");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch37 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Joining the military is a big commitment. Are you sure that you are ready? You realize that those upstart rebels will attack you on sight? Not the so-called 'special forces' but their main troops.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Absolutely. It would be a great honor to serve the Empire.
|
|
if (response == "s_434")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isRebOrImpMerc (player, npc))
|
|
{
|
|
//-- NPC: I see you are already working as a mercenary. The mercenary status will be removed if we continue.
|
|
string_id message = new string_id (c_stringFile, "s_114");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes. I want to be a part of the Empire!
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_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.faction_recruiter_imperial.branchId", 38);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_playerJoinFaction (player, npc);
|
|
|
|
//-- NPC: Welcome to the Imperial Military. I expect good things from you, recruit!
|
|
string_id message = new string_id (c_stringFile, "s_436");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you, sir.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_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_438");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 40);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Perhaps I should think about it a bit longer.
|
|
if (response == "s_440")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Stop wasting my time. If you are serious, come back and talk to me.
|
|
string_id message = new string_id (c_stringFile, "s_442");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I see you are already working as a mercenary. The mercenary status will be removed if we continue.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes. I want to be a part of the Empire!
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
faction_recruiter_imperial_action_playerJoinFaction (player, npc);
|
|
|
|
//-- NPC: Welcome to the Imperial Military. I expect good things from you, recruit!
|
|
string_id message = new string_id (c_stringFile, "s_116");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you, sir.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_117");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 39);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch39 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the Imperial Military. I expect good things from you, recruit!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you, sir.
|
|
if (response == "s_117")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_onLeaveFromFriendlyFaction (player, npc))
|
|
{
|
|
//-- NPC: Hello, soldier. Are you ready to resume active duty?
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, sir, I am ready to resume my duties.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_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_294");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 1);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_onLeaveFromEnemyFaction (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: I do not talk to terrorists and insurgents.
|
|
string_id message = new string_id (c_stringFile, "s_306");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isEnemyFaction (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
//-- NPC: Leave my sight, scum. Insurrectionists like you should be punished.
|
|
string_id message = new string_id (c_stringFile, "s_308");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInFaction (player, npc))
|
|
{
|
|
//-- NPC: Greetings, soldier. What may I do for you?
|
|
string_id message = new string_id (c_stringFile, "s_310");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!faction_recruiter_imperial_condition_isChangingFaction (player, npc))
|
|
{
|
|
//-- NPC: Greetings, civilian. Would you be interested in joining the military?
|
|
string_id message = new string_id (c_stringFile, "s_414");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I've been doing mercenary work for the Empire. I'm here to requisition supplies.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_isImperialMercForGcw (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to be an Imperial Mercenary.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canBeMerc (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to join the military.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_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_67");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_428");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Your paperwork is currently going through the channels. Come back when it goes through. I can't do much to help you right now.
|
|
string_id message = new string_id (c_stringFile, "s_444");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int faction_recruiter_imperial_handleBranch40 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the Imperial Military. I expect good things from you, recruit!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you, sir.
|
|
if (response == "s_438")
|
|
{
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_onLeaveFromFriendlyFaction (player, npc))
|
|
{
|
|
//-- NPC: Hello, soldier. Are you ready to resume active duty?
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, sir, I am ready to resume my duties.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_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_294");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 1);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_onLeaveFromEnemyFaction (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: I do not talk to terrorists and insurgents.
|
|
string_id message = new string_id (c_stringFile, "s_306");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isEnemyFaction (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
//-- NPC: Leave my sight, scum. Insurrectionists like you should be punished.
|
|
string_id message = new string_id (c_stringFile, "s_308");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInFaction (player, npc))
|
|
{
|
|
//-- NPC: Greetings, soldier. What may I do for you?
|
|
string_id message = new string_id (c_stringFile, "s_310");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!faction_recruiter_imperial_condition_isChangingFaction (player, npc))
|
|
{
|
|
//-- NPC: Greetings, civilian. Would you be interested in joining the military?
|
|
string_id message = new string_id (c_stringFile, "s_414");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I've been doing mercenary work for the Empire. I'm here to requisition supplies.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_isImperialMercForGcw (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to be an Imperial Mercenary.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canBeMerc (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to join the military.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_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_67");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_428");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Your paperwork is currently going through the channels. Come back when it goes through. I can't do much to help you right now.
|
|
string_id message = new string_id (c_stringFile, "s_444");
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.faction_recruiter_imperial");
|
|
|
|
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.faction_recruiter_imperial");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Triggers
|
|
// ======================================================================
|
|
|
|
//-- This function should move to base_class.java
|
|
boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses)
|
|
{
|
|
Object[] objects = new Object[responses.length];
|
|
System.arraycopy(responses, 0, objects, 0, responses.length);
|
|
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnStartNpcConversation (obj_id player)
|
|
{
|
|
obj_id npc = self;
|
|
|
|
if (ai_lib.isInCombat (npc) || ai_lib.isInCombat (player))
|
|
return SCRIPT_OVERRIDE;
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_onLeaveFromFriendlyFaction (player, npc))
|
|
{
|
|
//-- NPC: Hello, soldier. Are you ready to resume active duty?
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, sir, I am ready to resume my duties.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_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_294");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "faction_recruiter_imperial", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_onLeaveFromEnemyFaction (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
//-- NPC: I do not talk to terrorists and insurgents.
|
|
string_id message = new string_id (c_stringFile, "s_306");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isEnemyFaction (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_accusingly");
|
|
|
|
//-- NPC: Leave my sight, scum. Insurrectionists like you should be punished.
|
|
string_id message = new string_id (c_stringFile, "s_308");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition_isInFaction (player, npc))
|
|
{
|
|
//-- NPC: Greetings, soldier. What may I do for you?
|
|
string_id message = new string_id (c_stringFile, "s_310");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm here to requisition supplies using Imperial Tokens.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I am looking to requisition some supplies.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to make a change to my military status.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: How are we doing in the war effort against the Rebel scum?
|
|
boolean hasResponse3 = false;
|
|
if (faction_recruiter_imperial_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_71");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_324");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_410");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "faction_recruiter_imperial", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!faction_recruiter_imperial_condition_isChangingFaction (player, npc))
|
|
{
|
|
//-- NPC: Greetings, civilian. Would you be interested in joining the military?
|
|
string_id message = new string_id (c_stringFile, "s_414");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I've been doing mercenary work for the Empire. I'm here to requisition supplies.
|
|
boolean hasResponse0 = false;
|
|
if (faction_recruiter_imperial_condition_isImperialMercForGcw (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to be an Imperial Mercenary.
|
|
boolean hasResponse1 = false;
|
|
if (faction_recruiter_imperial_condition_canBeMerc (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I would like to join the military.
|
|
boolean hasResponse2 = false;
|
|
if (faction_recruiter_imperial_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_67");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_428");
|
|
|
|
utils.setScriptVar (player, "conversation.faction_recruiter_imperial.branchId", 27);
|
|
|
|
npcStartConversation (player, npc, "faction_recruiter_imperial", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (faction_recruiter_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Your paperwork is currently going through the channels. Come back when it goes through. I can't do much to help you right now.
|
|
string_id message = new string_id (c_stringFile, "s_444");
|
|
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 != "faction_recruiter_imperial")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
if (branchId == 1 && faction_recruiter_imperial_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && faction_recruiter_imperial_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && faction_recruiter_imperial_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && faction_recruiter_imperial_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && faction_recruiter_imperial_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && faction_recruiter_imperial_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && faction_recruiter_imperial_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && faction_recruiter_imperial_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && faction_recruiter_imperial_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && faction_recruiter_imperial_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && faction_recruiter_imperial_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && faction_recruiter_imperial_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && faction_recruiter_imperial_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && faction_recruiter_imperial_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && faction_recruiter_imperial_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && faction_recruiter_imperial_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 37 && faction_recruiter_imperial_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && faction_recruiter_imperial_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 39 && faction_recruiter_imperial_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && faction_recruiter_imperial_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.faction_recruiter_imperial.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|