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

1205 lines
35 KiB
Plaintext

// ======================================================================
//
// destroyed_camp_radio.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.groundquests;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/destroyed_camp_radio";
// ======================================================================
// Script Conditions
// ======================================================================
boolean destroyed_camp_radio_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean destroyed_camp_radio_condition_isOnTask01 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "ep3_kachirho_destroyed_camp", "reportLisum");
}
// ----------------------------------------------------------------------
boolean destroyed_camp_radio_condition_isOnTask02 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "ep3_kachirho_destroyed_camp", "foundItems");
}
// ----------------------------------------------------------------------
boolean destroyed_camp_radio_condition_isOnTask03 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "ep3_kachirho_destroyed_camp", "canopyDead");
}
// ----------------------------------------------------------------------
boolean destroyed_camp_radio_condition_isOnMission (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "ep3_kachirho_destroyed_camp");
}
// ----------------------------------------------------------------------
boolean destroyed_camp_radio_condition_hasCompletedSeries (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "ep3_kachirho_destroyed_camp") || groundquests.isTaskActive(player, "ep3_kachirho_destroyed_camp", "unlockContainer");
}
// ======================================================================
// Script Actions
// ======================================================================
void destroyed_camp_radio_action_doSignal01 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "huntResearchers");
}
// ----------------------------------------------------------------------
void destroyed_camp_radio_action_doSignal02 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "huntCanopy");
}
// ----------------------------------------------------------------------
void destroyed_camp_radio_action_doSignal03 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "codeReceived");
}
// ----------------------------------------------------------------------
void destroyed_camp_radio_action_grantMission (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "ep3_kachirho_destroyed_camp");
}
// ----------------------------------------------------------------------
void destroyed_camp_radio_action_sendStatic (obj_id player, obj_id npc)
{
playClientEffectLoc(player, "clienteffect/ep3_radio_static.cef.cef", getLocation (npc), 0.0f);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int destroyed_camp_radio_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So, is it done?
//-- [RESPONSE NOTE]
//-- PLAYER: I did what you asked.
if (response == "s_411")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
destroyed_camp_radio_action_doSignal03 (player, npc);
//-- NPC: Good. The code on the case is 2 5 8 5 4. Now please excuse me...I...I don't know what I am going to do now.
string_id message = new string_id (c_stringFile, "s_413");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Come in...I am having trouble hearing you. Are you there?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes, I am back from the camp.
if (response == "s_417")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: So, did you find my friends? They are alright...aren't they?
string_id message = new string_id (c_stringFile, "s_419");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I am sorry. I found their bodies in the Canopy camp.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_421");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So, did you find my friends? They are alright...aren't they?
//-- [RESPONSE NOTE]
//-- PLAYER: I am sorry. I found their bodies in the Canopy camp.
if (response == "s_421")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: So...they are dead...oh Jillian, I told you not to go. ...I know it is a lot to ask but could you perhaps do one more thing for me? I want you to make those Canopy bandits pay. Pay for what they have done to my friends...to Jillian.
string_id message = new string_id (c_stringFile, "s_68");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I don't know about that.
boolean hasResponse0 = false;
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So...they are dead...oh Jillian, I told you not to go. ...I know it is a lot to ask but could you perhaps do one more thing for me? I want you to make those Canopy bandits pay. Pay for what they have done to my friends...to Jillian.
//-- [RESPONSE NOTE]
//-- PLAYER: I don't know about that.
if (response == "s_70")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: Listen...there is a case in the camp. The bandits probably didn't take it because it looks worthless. If you kill those bandits for me I will give you the code to open that case. You can keep the items inside. I just want them to pay for my friends and for Jillian.
string_id message = new string_id (c_stringFile, "s_72");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Alright. I will take care of them with pleasure.
boolean hasResponse0 = false;
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I am not an assassin.
boolean hasResponse1 = false;
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_78");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Listen...there is a case in the camp. The bandits probably didn't take it because it looks worthless. If you kill those bandits for me I will give you the code to open that case. You can keep the items inside. I just want them to pay for my friends and for Jillian.
//-- [RESPONSE NOTE]
//-- PLAYER: Alright. I will take care of them with pleasure.
if (response == "s_74")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
destroyed_camp_radio_action_doSignal02 (player, npc);
//-- NPC: Good. Contact me again when it is done.
string_id message = new string_id (c_stringFile, "s_76");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I am not an assassin.
if (response == "s_78")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: Fine. I will just find someone else.
string_id message = new string_id (c_stringFile, "s_80");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hello...hello...are you reading me?
//-- [RESPONSE NOTE]
//-- PLAYER: Loud and clear.
if (response == "s_443")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: Did you find anything? I have been waiting here hoping for good news. What did you find out?
string_id message = new string_id (c_stringFile, "s_445");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I found the word Canopy scratched onto a drum.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_447");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Did you find anything? I have been waiting here hoping for good news. What did you find out?
//-- [RESPONSE NOTE]
//-- PLAYER: I found the word Canopy scratched onto a drum.
if (response == "s_447")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: Canopy! Oh, this is worse then I thought. There is a group of bandits that work in that area who call themselves the Canopy bandits. They have a reputation for being absolutely vicious. I know it is a lot to ask but could you please do something else for me?
string_id message = new string_id (c_stringFile, "s_449");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What is it?
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_451");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Canopy! Oh, this is worse then I thought. There is a group of bandits that work in that area who call themselves the Canopy bandits. They have a reputation for being absolutely vicious. I know it is a lot to ask but could you please do something else for me?
//-- [RESPONSE NOTE]
//-- PLAYER: What is it?
if (response == "s_451")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: I need you to find the Canopy bandit's camp and see if you can find my friends there. They are probably just being held captive for ransom. You know...that is what bandits do.
string_id message = new string_id (c_stringFile, "s_453");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I don't know. This camp looks like it was hit pretty hard.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_455");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 13);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I need you to find the Canopy bandit's camp and see if you can find my friends there. They are probably just being held captive for ransom. You know...that is what bandits do.
//-- [RESPONSE NOTE]
//-- PLAYER: I don't know. This camp looks like it was hit pretty hard.
if (response == "s_455")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: Please...please just go to their camp and see if you can find any signs of my friends. They are good people. They were just studying the plant life on Kashyyyk and never hurt anyone. Please.
string_id message = new string_id (c_stringFile, "s_457");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Ok, I will find this camp and look for signs of your friends.
boolean hasResponse0 = false;
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I have better things to do. Sorry.
boolean hasResponse1 = false;
if (destroyed_camp_radio_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_459");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_463");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Please...please just go to their camp and see if you can find any signs of my friends. They are good people. They were just studying the plant life on Kashyyyk and never hurt anyone. Please.
//-- [RESPONSE NOTE]
//-- PLAYER: Ok, I will find this camp and look for signs of your friends.
if (response == "s_459")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
destroyed_camp_radio_action_doSignal01 (player, npc);
//-- NPC: Thank you. Thank you. I will wait by the radio again until I hear back from you. And please be careful. I hear those bandits are a dangerous bunch.
string_id message = new string_id (c_stringFile, "s_461");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I have better things to do. Sorry.
if (response == "s_463")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
destroyed_camp_radio_action_sendStatic (player, npc);
//-- NPC: *static*
string_id message = new string_id (c_stringFile, "s_465");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Have you had any luck yet?
//-- [RESPONSE NOTE]
//-- PLAYER: No, sorry. I am still looking though.
if (response == "s_105")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: Ok, thank you for all your help. Please report back to me if you find anything out.
string_id message = new string_id (c_stringFile, "s_106");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch19 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hello? Who is this? I am looking for the people who are working in the camp. Can you please put one of them on?
//-- [RESPONSE NOTE]
//-- PLAYER: Sorry, but there isn't anyone else here.
if (response == "s_469")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: What do you mean? Of course they are around there. They are the researchers in charge of the camp.
string_id message = new string_id (c_stringFile, "s_471");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: This camp is destroyed. There isn't anyone here.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_473");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 20);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What do you mean? Of course they are around there. They are the researchers in charge of the camp.
//-- [RESPONSE NOTE]
//-- PLAYER: This camp is destroyed. There isn't anyone here.
if (response == "s_473")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: Oh, no! I told them that Kashyyyk was too dangerous for them to be studying the flora on. Are there any signs of them around? Can you please look around and see you can find any signs of them.
string_id message = new string_id (c_stringFile, "s_475");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sure, I will see what I can find out.
boolean hasResponse0 = false;
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sorry, but I don't have time for this.
boolean hasResponse1 = false;
if (destroyed_camp_radio_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_477");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_481");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int destroyed_camp_radio_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh, no! I told them that Kashyyyk was too dangerous for them to be studying the flora on. Are there any signs of them around? Can you please look around and see you can find any signs of them.
//-- [RESPONSE NOTE]
//-- PLAYER: Sure, I will see what I can find out.
if (response == "s_477")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
destroyed_camp_radio_action_grantMission (player, npc);
//-- NPC: Thank you. I will wait by the radio so you can just contact me if you find anything. I told them not to go there...
string_id message = new string_id (c_stringFile, "s_479");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Sorry, but I don't have time for this.
if (response == "s_481")
{
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: But what about my friends? Something terrible must have happened to them. Why won't you help ...*static*.
string_id message = new string_id (c_stringFile, "s_483");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.destroyed_camp_radio");
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.destroyed_camp_radio");
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 (destroyed_camp_radio_condition_hasCompletedSeries (player, npc))
{
destroyed_camp_radio_action_sendStatic (player, npc);
//-- NPC: *static*
string_id message = new string_id (c_stringFile, "s_407");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (destroyed_camp_radio_condition_isOnTask03 (player, npc))
{
//-- NPC: So, is it done?
string_id message = new string_id (c_stringFile, "s_409");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I did what you asked.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_411");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 2);
npcStartConversation (player, npc, "destroyed_camp_radio", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (destroyed_camp_radio_condition_isOnTask02 (player, npc))
{
//-- NPC: Come in...I am having trouble hearing you. Are you there?
string_id message = new string_id (c_stringFile, "s_415");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes, I am back from the camp.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_417");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 4);
npcStartConversation (player, npc, "destroyed_camp_radio", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (destroyed_camp_radio_condition_isOnTask01 (player, npc))
{
//-- NPC: Hello...hello...are you reading me?
string_id message = new string_id (c_stringFile, "s_441");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Loud and clear.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_443");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 10);
npcStartConversation (player, npc, "destroyed_camp_radio", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (destroyed_camp_radio_condition_isOnMission (player, npc))
{
//-- NPC: Have you had any luck yet?
string_id message = new string_id (c_stringFile, "s_104");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No, sorry. I am still looking though.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_105");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 17);
npcStartConversation (player, npc, "destroyed_camp_radio", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (destroyed_camp_radio_condition__defaultCondition (player, npc))
{
//-- NPC: Hello? Who is this? I am looking for the people who are working in the camp. Can you please put one of them on?
string_id message = new string_id (c_stringFile, "s_467");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sorry, but there isn't anyone else here.
boolean hasResponse0 = false;
if (destroyed_camp_radio_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_469");
utils.setScriptVar (player, "conversation.destroyed_camp_radio.branchId", 19);
npcStartConversation (player, npc, "destroyed_camp_radio", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
// ----------------------------------------------------------------------
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
{
if (conversationId != "destroyed_camp_radio")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.destroyed_camp_radio.branchId");
if (branchId == 2 && destroyed_camp_radio_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && destroyed_camp_radio_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && destroyed_camp_radio_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && destroyed_camp_radio_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && destroyed_camp_radio_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && destroyed_camp_radio_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && destroyed_camp_radio_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && destroyed_camp_radio_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && destroyed_camp_radio_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && destroyed_camp_radio_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && destroyed_camp_radio_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 19 && destroyed_camp_radio_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && destroyed_camp_radio_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && destroyed_camp_radio_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.destroyed_camp_radio.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================