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

3940 lines
115 KiB
Plaintext

// ======================================================================
//
// faction_recruiter_rebel.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_rebel";
// ======================================================================
// Script Conditions
// ======================================================================
boolean faction_recruiter_rebel_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_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_rebel_condition_isEnemyFaction (obj_id player, obj_id npc)
{
faceTo(npc,player);
return (factions.isInEnemyFaction(player, npc)&&(!factions.isPVPStatusChanging(player)));
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_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_rebel_condition_playerQualifiesForPromotion (obj_id player, obj_id npc)
{
faceTo(npc,player);
return (factions.qualifiesForPromotion(player, pvpGetAlignedFaction(npc))&&(!factions.isPVPStatusChanging(player)));
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_isChangingFaction (obj_id player, obj_id npc)
{
faceTo(npc,player);
return factions.isPVPStatusChanging(player);
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_onLeaveFromFriendlyFaction (obj_id player, obj_id npc)
{
faceTo(npc,player);
return (factions.isOnLeaveFromFriendlyFaction(player, npc)&&(!factions.isPVPStatusChanging(player)));
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_onLeaveFromEnemyFaction (obj_id player, obj_id npc)
{
faceTo(npc,player);
return (factions.isOnLeaveFromEnemyFaction(player, npc)&&(!factions.isPVPStatusChanging(player)));
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_isCovert (obj_id player, obj_id npc)
{
faceTo(npc,player);
return(pvpGetType(player)==PVPTYPE_COVERT)&&(!factions.isPVPStatusChanging(player));
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_isOvert (obj_id player, obj_id npc)
{
faceTo(npc,player);
return ((pvpGetType(player)==PVPTYPE_DECLARED)&&(!factions.isPVPStatusChanging(player)));
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_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_rebel_condition_isAllowedToJoinFaction (obj_id player, obj_id npc)
{
faceTo(npc,player);
return factions.canJoinFaction(player, pvpGetAlignedFaction(npc));
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_isRebelMercForGcw (obj_id player, obj_id npc)
{
faceTo(npc,player);
return factions.isRebelHelper(player);
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_canChangeStatus (obj_id player, obj_id npc)
{
faceTo(npc,player);
return factions.canGoOnLeave(player);
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_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_rebel_condition_isRebOrImpMerc (obj_id player, obj_id npc)
{
faceTo(npc,player);
return faction_recruiter_rebel_condition_isRebelMercForGcw(player, npc) || faction_recruiter_rebel_condition_isImpMercForGcw(player, npc);
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_isImpMercForGcw (obj_id player, obj_id npc)
{
faceTo(npc,player);
return factions.isImperialHelper(player);
}
// ----------------------------------------------------------------------
boolean faction_recruiter_rebel_condition_isInvulnerableRecruiter (obj_id player, obj_id npc)
{
faceTo(npc,player);
return isInvulnerable(npc);
}
// ======================================================================
// Script Actions
// ======================================================================
void faction_recruiter_rebel_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_rebel_action_enablePVPTimer (obj_id player, obj_id npc)
{
factions.goOvertWithDelay(player,30);
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_playerJoinFaction (obj_id player, obj_id npc)
{
factions.joinFaction(player,pvpGetAlignedFaction(npc));
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_playerGoOnLeaveTimer (obj_id player, obj_id npc)
{
factions.goOnLeaveWithDelay(player,300);
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_makeRebMercSF (obj_id player, obj_id npc)
{
factions.setNeturalMercenaryOvert(player, factions.FACTION_FLAG_REBEL);
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_makeRebMercCombatant (obj_id player, obj_id npc)
{
factions.setNeturalMercenaryCovert(player, factions.FACTION_FLAG_REBEL);
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_playerGoCovertTimer (obj_id player, obj_id npc)
{
factions.goCovertWithDelay(player,300);
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_grantPromotion (obj_id player, obj_id npc)
{
factions.applyPromotion(player, pvpGetAlignedFaction(npc));
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_buy1250FactionPoints (obj_id player, obj_id npc)
{
factions.buyFaction(player, npc, 100000);
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_buy250FactionPoints (obj_id player, obj_id npc)
{
factions.buyFaction(player, npc, 20000);
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_completelyResign (obj_id player, obj_id npc)
{
factions.leaveFaction(player, pvpGetAlignedFaction(npc));
//factions.leaveFaction(player, pvpGetAlignedFaction(npc));
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_action_goCovertShortTimer (obj_id player, obj_id npc)
{
factions.goCovertWithDelay(player,30);
}
// ----------------------------------------------------------------------
void faction_recruiter_rebel_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_rebel_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;
current_rank = current_rank+1;
return "@faction_recruiter:" + factions.getRankName(current_rank, faction);
}
// ----------------------------------------------------------------------
string faction_recruiter_rebel_tokenTO_getRebelScoreString (obj_id player, obj_id npc)
{
return ""+getIntObjVar(npc, "Rebel.controlScore");
}
// ======================================================================
// Script %DI Tokens
// ======================================================================
int faction_recruiter_rebel_tokenDI_getImperialScore (obj_id player, obj_id npc)
{
return getIntObjVar(npc, "Imperial.controlScore");
}
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int faction_recruiter_rebel_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hello friend. Ready to get back to some real work?
//-- [RESPONSE NOTE]
//-- PLAYER: I am ready to get back to my duties.
if (response == "s_218")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Good to hear! I just want to make sure that you are serious about returning. You really want to come off leave? Remember that most of the Imperials will attack you on sight.
string_id message = new string_id (c_stringFile, "s_220");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Absolutely.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Actually, I think I like being on leave.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_222");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_226");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 2);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Good to hear! I just want to make sure that you are serious about returning. You really want to come off leave? Remember that most of the Imperials will attack you on sight.
//-- [RESPONSE NOTE]
//-- PLAYER: Absolutely.
if (response == "s_222")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_goCovertShortTimer (player, npc);
//-- NPC: Let me send your paperwork through. It should only take me about 30 seconds to get it done.
string_id message = new string_id (c_stringFile, "s_224");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Actually, I think I like being on leave.
if (response == "s_226")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: All right. We need you, but I think I can give you a few more days of leave.
string_id message = new string_id (c_stringFile, "s_228");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hello friend. Is there something that I may do to help you?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
if (response == "s_73")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInvulnerableRecruiter (player, npc))
{
faction_recruiter_rebel_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_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_120");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need supplies. Do you have anything available?
if (response == "s_248")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_showGcwRewardsList (player, npc);
//-- NPC: As you wish. I will show you what is available.
string_id message = new string_id (c_stringFile, "s_250");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.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_rebel_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_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need to go on leave for a time.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: This is all too much for me. I would like to resign completely.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: On second thought, I don't think I'll make a change.
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_86");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
if (response == "s_330")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Our spies have reported that the possession of the planet stands at Rebel: %TO and Imperial: %DI.
string_id message = new string_id (c_stringFile, "s_332");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch11 (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_rebel_condition_isOvert (player, npc))
{
//-- NPC: You are currently in Special Forces. Do you need to step back from it for now?
string_id message = new string_id (c_stringFile, "s_54");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes please. I would like to return to combatant status and not fight the Imperial Special Forces.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Actually, I want to stay in Special Forces.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_isCovert (player, npc))
{
//-- NPC: We can use good people in Special Forces. As a member of the Special Forces, you will be able to attack and be attacked by Imperial Special Forces members. Does this interest you?
string_id message = new string_id (c_stringFile, "s_64");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. I want to hunt Imperial Special Forces. Sign me up!
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Actually, maybe it isn't for me after all. Never mind.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need to go on leave for a time.
if (response == "s_86")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: We really need your skills. Are you sure that you want to go on leave now? You will be overlooked by most Imperials, unless you get stopped by a tenacious agent that finds something linking you to us.
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. I really need to take some leave time.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Maybe not. I will stay active.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_90");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_94");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: This is all too much for me. I would like to resign completely.
if (response == "s_74")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: How could you turn your back on people trying to win freedom from tyranny? We need everyone we can get! Won't you reconsider?
string_id message = new string_id (c_stringFile, "s_76");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm sure. I have had enough war. I want out.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: You are right. It was a momentary lapse. I will stay with the Rebellion.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_78");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_82");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: On second thought, I don't think I'll make a change.
if (response == "s_55")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Sure, sure. 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 Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You are currently in Special Forces. Do you need to step back from it for now?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes please. I would like to return to combatant status and not fight the Imperial Special Forces.
if (response == "s_56")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_playerGoCovertTimer (player, npc);
//-- NPC: That's a shame. It will take some time to push the paperwork through for approval. Your status will change in about 5 minutes.
string_id message = new string_id (c_stringFile, "s_58");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Actually, I want to stay in Special Forces.
if (response == "s_60")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Good show! Show those Imperials what for. May I help you with something else instead?
string_id message = new string_id (c_stringFile, "s_62");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Good show! Show those Imperials what for. May I help you with something else instead?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
if (response == "s_73")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInvulnerableRecruiter (player, npc))
{
faction_recruiter_rebel_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_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_120");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need supplies. Do you have anything available?
if (response == "s_248")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_showGcwRewardsList (player, npc);
//-- NPC: As you wish. I will show you what is available.
string_id message = new string_id (c_stringFile, "s_250");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.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_rebel_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_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need to go on leave for a time.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: This is all too much for me. I would like to resign completely.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: On second thought, I don't think I'll make a change.
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_86");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
if (response == "s_330")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Our spies have reported that the possession of the planet stands at Rebel: %TO and Imperial: %DI.
string_id message = new string_id (c_stringFile, "s_332");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We can use good people in Special Forces. As a member of the Special Forces, you will be able to attack and be attacked by Imperial Special Forces members. Does this interest you?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I want to hunt Imperial Special Forces. Sign me up!
if (response == "s_66")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_enablePVPTimer (player, npc);
//-- NPC: Good for you! I'll update your status and you will be a member of the Special Forces in 30 seconds.
string_id message = new string_id (c_stringFile, "s_68");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Actually, maybe it isn't for me after all. Never mind.
if (response == "s_70")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: If you are in doubt, then Special Forces isn't for you. If you change your mind, let me know. Is there anything else you need?
string_id message = new string_id (c_stringFile, "s_72");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: If you are in doubt, then Special Forces isn't for you. If you change your mind, let me know. Is there anything else you need?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
if (response == "s_73")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInvulnerableRecruiter (player, npc))
{
faction_recruiter_rebel_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_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_120");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need supplies. Do you have anything available?
if (response == "s_248")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_showGcwRewardsList (player, npc);
//-- NPC: As you wish. I will show you what is available.
string_id message = new string_id (c_stringFile, "s_250");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.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_rebel_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_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need to go on leave for a time.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: This is all too much for me. I would like to resign completely.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: On second thought, I don't think I'll make a change.
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_86");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
if (response == "s_330")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Our spies have reported that the possession of the planet stands at Rebel: %TO and Imperial: %DI.
string_id message = new string_id (c_stringFile, "s_332");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We really need your skills. Are you sure that you want to go on leave now? You will be overlooked by most Imperials, unless you get stopped by a tenacious agent that finds something linking you to us.
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I really need to take some leave time.
if (response == "s_90")
{
faction_recruiter_rebel_action_playerGoOnLeaveTimer (player, npc);
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_playerGoOnLeaveTimer (player, npc);
//-- NPC: It will take me some time to process, but you will be on leave beginning in 5 minutes.
string_id message = new string_id (c_stringFile, "s_92");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Maybe not. I will stay active.
if (response == "s_94")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: I wish all of our soldiers had your dedication. I salute you!
string_id message = new string_id (c_stringFile, "s_96");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I wish all of our soldiers had your dedication. I salute you!
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
if (response == "s_73")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInvulnerableRecruiter (player, npc))
{
faction_recruiter_rebel_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_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_120");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need supplies. Do you have anything available?
if (response == "s_248")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_showGcwRewardsList (player, npc);
//-- NPC: As you wish. I will show you what is available.
string_id message = new string_id (c_stringFile, "s_250");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.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_rebel_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_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need to go on leave for a time.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: This is all too much for me. I would like to resign completely.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: On second thought, I don't think I'll make a change.
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_86");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
if (response == "s_330")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Our spies have reported that the possession of the planet stands at Rebel: %TO and Imperial: %DI.
string_id message = new string_id (c_stringFile, "s_332");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: How could you turn your back on people trying to win freedom from tyranny? We need everyone we can get! Won't you reconsider?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm sure. I have had enough war. I want out.
if (response == "s_78")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shake_head_disgust");
faction_recruiter_rebel_action_completelyResign (player, npc);
//-- NPC: So be it. If you decide that you want to come back, let me know. But for now, you are no longer a member of the Rebellion.
string_id message = new string_id (c_stringFile, "s_80");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: You are right. It was a momentary lapse. I will stay with the Rebellion.
if (response == "s_82")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Doubt is understandable, but have faith. We are on the right side. No one wants to cater to a tyrant. Down with the Empire!
string_id message = new string_id (c_stringFile, "s_84");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch24 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Sure, sure. Is there anything else I can help you with?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
if (response == "s_73")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInvulnerableRecruiter (player, npc))
{
faction_recruiter_rebel_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_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_120");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need supplies. Do you have anything available?
if (response == "s_248")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_showGcwRewardsList (player, npc);
//-- NPC: As you wish. I will show you what is available.
string_id message = new string_id (c_stringFile, "s_250");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.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_rebel_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_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need to go on leave for a time.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: This is all too much for me. I would like to resign completely.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: On second thought, I don't think I'll make a change.
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_86");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
if (response == "s_330")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Our spies have reported that the possession of the planet stands at Rebel: %TO and Imperial: %DI.
string_id message = new string_id (c_stringFile, "s_332");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Our spies have reported that the possession of the planet stands at Rebel: %TO and Imperial: %DI.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
if (response == "s_73")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInvulnerableRecruiter (player, npc))
{
faction_recruiter_rebel_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_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_120");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need supplies. Do you have anything available?
if (response == "s_248")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_showGcwRewardsList (player, npc);
//-- NPC: As you wish. I will show you what is available.
string_id message = new string_id (c_stringFile, "s_250");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.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_rebel_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_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need to go on leave for a time.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canChangeStatus (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: This is all too much for me. I would like to resign completely.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: On second thought, I don't think I'll make a change.
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_86");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_55");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
if (response == "s_330")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Our spies have reported that the possession of the planet stands at Rebel: %TO and Imperial: %DI.
string_id message = new string_id (c_stringFile, "s_332");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
pp.other.set (faction_recruiter_rebel_tokenTO_getRebelScoreString (player, npc));
pp.digitInteger = faction_recruiter_rebel_tokenDI_getImperialScore (player, npc);
npcEndConversationWithMessage (player, pp);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch26 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hello friend. Is there something that I can do for you? Are you interested in helping free the peoples of the galaxy?
//-- [RESPONSE NOTE]
//-- PLAYER: I've been doing mercenary work for the Alliance. I'm here to requisition supplies.
if (response == "s_69")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInvulnerableRecruiter (player, npc))
{
faction_recruiter_rebel_action_showFactionGcwRewardUi (player, npc);
//-- NPC: Everything looks in order. This is what I have.
string_id message = new string_id (c_stringFile, "s_71");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_121");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I would like to be a Rebel Mercenary.
if (response == "s_83")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: I see. Well you wont receive Alliance Rank if you decide to take this route. You will also be the target of Imperial Stormtroopers. 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_85");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_87");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 29);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I would like to join you in your fight against the Empire.
if (response == "s_348")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_isAllowedToJoinFaction (player, npc))
{
//-- NPC: This is not a decision to be taken lightly. Rebels are hunted across the galaxy. If you join us, while you are an active combatant, Imperials will attack you on sight but Imperial Special Forces will leave you alone. Are you ready for that?
string_id message = new string_id (c_stringFile, "s_352");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: That doesn't scare me. Down with the Emperor!
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Now that you put it that way, perhaps I was a bit hasty.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_354");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_360");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 36);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_isBlockedByJoinTimer (player, npc))
{
//-- NPC: Our intelligence indicates that you were recently associated with the Empire and as such cannot be trusted! You better get out of here.
string_id message = new string_id (c_stringFile, "s_119");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Your enthusiasm warms my heart. I'm afraid that right now, you are not eligible to join the Rebellion. But seriously, thanks.
string_id message = new string_id (c_stringFile, "s_350");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch29 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I see. Well you wont receive Alliance Rank if you decide to take this route. You will also be the target of Imperial Stormtroopers. 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_87")
{
//-- [NOTE]
if (faction_recruiter_rebel_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_89");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Special Forces
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Combatant
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_95");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 30);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_102");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch30 (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_rebel_condition_canBeMerc (player, npc))
{
doAnimationAction (npc, "handshake_tandem");
doAnimationAction (player, "handshake_tandem");
faction_recruiter_rebel_action_makeRebMercSF (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_97");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_98");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Combatant
if (response == "s_95")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_canBeMerc (player, npc))
{
doAnimationAction (npc, "handshake_tandem");
doAnimationAction (player, "handshake_tandem");
faction_recruiter_rebel_action_makeRebMercCombatant (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_99");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_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_100");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch36 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: This is not a decision to be taken lightly. Rebels are hunted across the galaxy. If you join us, while you are an active combatant, Imperials will attack you on sight but Imperial Special Forces will leave you alone. Are you ready for that?
//-- [RESPONSE NOTE]
//-- PLAYER: That doesn't scare me. Down with the Emperor!
if (response == "s_354")
{
//-- [NOTE]
if (faction_recruiter_rebel_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_113");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. I want to be a part of the Alliance!
boolean hasResponse0 = false;
if (faction_recruiter_rebel_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_114");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 37);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_playerJoinFaction (player, npc);
//-- NPC: Superb! Welcome to the Rebellion!
string_id message = new string_id (c_stringFile, "s_356");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you very much.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_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_358");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 39);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Now that you put it that way, perhaps I was a bit hasty.
if (response == "s_360")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: We only want serious, committed candidates. If you change your mind, talk to me then.
string_id message = new string_id (c_stringFile, "s_362");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch37 (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 Alliance!
if (response == "s_114")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
faction_recruiter_rebel_action_playerJoinFaction (player, npc);
//-- NPC: Superb! Welcome to the Rebellion!
string_id message = new string_id (c_stringFile, "s_115");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Thank you very much.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_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_116");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 38);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch38 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Superb! Welcome to the Rebellion!
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you very much.
if (response == "s_116")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_onLeaveFromFriendlyFaction (player, npc))
{
//-- NPC: Hello friend. Ready to get back to some real work?
string_id message = new string_id (c_stringFile, "s_216");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am ready to get back to my duties.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_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_218");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 1);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_onLeaveFromEnemyFaction (player, npc))
{
//-- NPC: I'm sorry, but I do not know you and do not wish to.
string_id message = new string_id (c_stringFile, "s_230");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_isEnemyFaction (player, npc))
{
//-- NPC: What are you doing talking to me? People like you are destroying the galaxy.
string_id message = new string_id (c_stringFile, "s_232");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInFaction (player, npc))
{
//-- NPC: Hello friend. Is there something that I may do to help you?
string_id message = new string_id (c_stringFile, "s_234");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!faction_recruiter_rebel_condition_isChangingFaction (player, npc))
{
//-- NPC: Hello friend. Is there something that I can do for you? Are you interested in helping free the peoples of the galaxy?
string_id message = new string_id (c_stringFile, "s_334");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I've been doing mercenary work for the Alliance. I'm here to requisition supplies.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition_isRebelMercForGcw (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I would like to be a Rebel Mercenary.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canBeMerc (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I would like to join you in your fight against the Empire.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_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_69");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_348");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Greetings. I see that your status is currently being processed. I won't be able to help you until that is complete. It should not take much longer.
string_id message = new string_id (c_stringFile, "s_364");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int faction_recruiter_rebel_handleBranch39 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Superb! Welcome to the Rebellion!
//-- [RESPONSE NOTE]
//-- PLAYER: Thank you very much.
if (response == "s_358")
{
//-- [NOTE]
if (faction_recruiter_rebel_condition_onLeaveFromFriendlyFaction (player, npc))
{
//-- NPC: Hello friend. Ready to get back to some real work?
string_id message = new string_id (c_stringFile, "s_216");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am ready to get back to my duties.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_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_218");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 1);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_onLeaveFromEnemyFaction (player, npc))
{
//-- NPC: I'm sorry, but I do not know you and do not wish to.
string_id message = new string_id (c_stringFile, "s_230");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_isEnemyFaction (player, npc))
{
//-- NPC: What are you doing talking to me? People like you are destroying the galaxy.
string_id message = new string_id (c_stringFile, "s_232");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInFaction (player, npc))
{
//-- NPC: Hello friend. Is there something that I may do to help you?
string_id message = new string_id (c_stringFile, "s_234");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!faction_recruiter_rebel_condition_isChangingFaction (player, npc))
{
//-- NPC: Hello friend. Is there something that I can do for you? Are you interested in helping free the peoples of the galaxy?
string_id message = new string_id (c_stringFile, "s_334");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I've been doing mercenary work for the Alliance. I'm here to requisition supplies.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition_isRebelMercForGcw (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I would like to be a Rebel Mercenary.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canBeMerc (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I would like to join you in your fight against the Empire.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_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_69");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_348");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 26);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Greetings. I see that your status is currently being processed. I won't be able to help you until that is complete. It should not take much longer.
string_id message = new string_id (c_stringFile, "s_364");
utils.removeScriptVar (player, "conversation.faction_recruiter_rebel.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_rebel");
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_rebel");
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_rebel_condition_onLeaveFromFriendlyFaction (player, npc))
{
//-- NPC: Hello friend. Ready to get back to some real work?
string_id message = new string_id (c_stringFile, "s_216");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am ready to get back to my duties.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_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_218");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 1);
npcStartConversation (player, npc, "faction_recruiter_rebel", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_onLeaveFromEnemyFaction (player, npc))
{
//-- NPC: I'm sorry, but I do not know you and do not wish to.
string_id message = new string_id (c_stringFile, "s_230");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_isEnemyFaction (player, npc))
{
//-- NPC: What are you doing talking to me? People like you are destroying the galaxy.
string_id message = new string_id (c_stringFile, "s_232");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition_isInFaction (player, npc))
{
//-- NPC: Hello friend. Is there something that I may do to help you?
string_id message = new string_id (c_stringFile, "s_234");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm here to requisition supplies using Rebel Tokens.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need supplies. Do you have anything available?
boolean hasResponse1 = false;
if (faction_recruiter_rebel_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_rebel_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: How are we doing in the war against the Imperial tyrants?
boolean hasResponse3 = false;
if (faction_recruiter_rebel_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_73");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_248");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_49");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_330");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 7);
npcStartConversation (player, npc, "faction_recruiter_rebel", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!faction_recruiter_rebel_condition_isChangingFaction (player, npc))
{
//-- NPC: Hello friend. Is there something that I can do for you? Are you interested in helping free the peoples of the galaxy?
string_id message = new string_id (c_stringFile, "s_334");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I've been doing mercenary work for the Alliance. I'm here to requisition supplies.
boolean hasResponse0 = false;
if (faction_recruiter_rebel_condition_isRebelMercForGcw (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I would like to be a Rebel Mercenary.
boolean hasResponse1 = false;
if (faction_recruiter_rebel_condition_canBeMerc (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I would like to join you in your fight against the Empire.
boolean hasResponse2 = false;
if (faction_recruiter_rebel_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_69");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_83");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_348");
utils.setScriptVar (player, "conversation.faction_recruiter_rebel.branchId", 26);
npcStartConversation (player, npc, "faction_recruiter_rebel", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (faction_recruiter_rebel_condition__defaultCondition (player, npc))
{
//-- NPC: Greetings. I see that your status is currently being processed. I won't be able to help you until that is complete. It should not take much longer.
string_id message = new string_id (c_stringFile, "s_364");
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_rebel")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.faction_recruiter_rebel.branchId");
if (branchId == 1 && faction_recruiter_rebel_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 2 && faction_recruiter_rebel_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && faction_recruiter_rebel_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && faction_recruiter_rebel_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && faction_recruiter_rebel_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && faction_recruiter_rebel_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && faction_recruiter_rebel_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && faction_recruiter_rebel_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && faction_recruiter_rebel_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && faction_recruiter_rebel_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && faction_recruiter_rebel_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 24 && faction_recruiter_rebel_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && faction_recruiter_rebel_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 26 && faction_recruiter_rebel_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 29 && faction_recruiter_rebel_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 30 && faction_recruiter_rebel_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 36 && faction_recruiter_rebel_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 37 && faction_recruiter_rebel_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 38 && faction_recruiter_rebel_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 39 && faction_recruiter_rebel_handleBranch39 (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_rebel.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================