Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/npe_station_inaldra2.script
T
2013-09-10 23:17:15 -07:00

1265 lines
37 KiB
Plaintext

// ======================================================================
//
// npe_station_inaldra2.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.npe;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/npe_station_inaldra2";
// ======================================================================
// Script Conditions
// ======================================================================
boolean npe_station_inaldra2_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra2_condition_finishedInaldraQuest (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "npe_inaldra_quest")||
( groundquests.hasCompletedQuest(player, "npe_pointer_inaldra")&&
!groundquests.isQuestActive(player, "npe_inaldra_quest") );
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra2_condition_finishedMainQuest (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "npe_new_main_quest");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra2_condition_onRewardStep (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_inaldra_quest", "inaldrasignal");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra2_condition_onInaldraQuest (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "npe_inaldra_quest");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra2_condition_getOffStationNow (obj_id player, obj_id npc)
{
return ( groundquests.isQuestActive(player, "npe_pointer_inaldra")&&
!groundquests.hasCompletedQuest(player, "npe_new_main_quest") );
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra2_condition_isBH (obj_id player, obj_id npc)
{
string pTemplate = getSkillTemplate(player);
if(pTemplate.indexOf("bounty_hunter") > -1 )
return true;
else
return false;
}
// ======================================================================
// Script Actions
// ======================================================================
void npe_station_inaldra2_action_forwardInaldraQuest (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "npe_inaldra_quest_reward");
groundquests.grantQuest(player, "npe_pointer_secretary");
}
// ----------------------------------------------------------------------
void npe_station_inaldra2_action_giveInaldraQuest (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "npe_new_main_inaldra");
groundquests.requestGrantQuest(player, "npe_inaldra_quest");
}
// ----------------------------------------------------------------------
void npe_station_inaldra2_action_completePointerQuest (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "npe_new_main_inaldra");
}
// ----------------------------------------------------------------------
void npe_station_inaldra2_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int npe_station_inaldra2_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What do you have to report?
//-- [RESPONSE NOTE]
//-- PLAYER: The pirate has been dealt with.
if (response == "s_26")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: Wonderful! Now I can start dealing with the rest of the problems here.
string_id message = new string_id (c_stringFile, "s_29");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Is there anything that I can help with?
boolean hasResponse0 = false;
if (npe_station_inaldra2_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_30");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Nothing, I need directions.
if (response == "s_27")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: Ah, all right. What are you looking for?
string_id message = new string_id (c_stringFile, "s_28");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm thirsty. Where is the Cantina?
boolean hasResponse0 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where is the Hangar Bay?
boolean hasResponse1 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Where are the Training Rooms?
boolean hasResponse2 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I'm looking for the Medical Center.
boolean hasResponse3 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: How can I leave the station?
boolean hasResponse4 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_64");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra2_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Wonderful! Now I can start dealing with the rest of the problems here.
//-- [RESPONSE NOTE]
//-- PLAYER: Is there anything that I can help with?
if (response == "s_30")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
npe_station_inaldra2_action_forwardInaldraQuest (player, npc);
//-- NPC: Not for me, but see my lieutenant. She knows everyone on the station that needs help.
string_id message = new string_id (c_stringFile, "s_118");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra2_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Ah, all right. What are you looking for?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm thirsty. Where is the Cantina?
if (response == "s_56")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: The Cantina is right in the middle of the station on this level. There is a great band in there now. Just listen for the music.
string_id message = new string_id (c_stringFile, "s_58");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where is the Hangar Bay?
if (response == "s_60")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: There are two hangar bays. If you look on your map, they form the upper branches of the 'Y'. The two bays on this level are functional, but the lower bays are occupied and dangerous right now.
string_id message = new string_id (c_stringFile, "s_62");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where are the Training Rooms?
if (response == "s_64")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: We have two training rooms: a ranged and a melee room. Both are on this level on either side of the medical center, directly across from the elevator.
string_id message = new string_id (c_stringFile, "s_66");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm looking for the Medical Center.
if (response == "s_68")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: The Medical Center is next to the training rooms, almost directly across the station from the large hangar bays.
string_id message = new string_id (c_stringFile, "s_70");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How can I leave the station?
if (response == "s_74")
{
//-- [NOTE]
if (!npe_station_inaldra2_condition_isBH (player, npc))
{
//-- NPC: Ask that scoundrel Solo to take you far, far away from me. And tell him that I haven't forgiven him.
string_id message = new string_id (c_stringFile, "s_75");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra2_condition_isBH (player, npc))
{
//-- NPC: You're a Bounty Hunter, right? You should talk to Boba Fett. He might help you. Just don't mention Han, ok? While I'm upset at him, I don't want him dead. I shudder to think what Fett will do if he catches him.
string_id message = new string_id (c_stringFile, "s_72");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra2_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You're new here, aren't you? Is there something I can help you with?
//-- [RESPONSE NOTE]
//-- PLAYER: Han Solo said that you might need help.
if (response == "s_16")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: That slimy son-of-a-Gamorrean thinks that I need help from him?!
string_id message = new string_id (c_stringFile, "s_18");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Umm...yes. I take it that he was incorrect?
boolean hasResponse0 = false;
if (npe_station_inaldra2_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_20");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I need directions.
if (response == "s_50")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: Very well. What are you looking for?
string_id message = new string_id (c_stringFile, "s_52");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm thirsty. Where is the Cantina?
boolean hasResponse0 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where is the Hangar Bay?
boolean hasResponse1 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Where are the Training Rooms?
boolean hasResponse2 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I'm looking for the Medical Center.
boolean hasResponse3 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: How can I leave the station?
boolean hasResponse4 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_64");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra2_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: That slimy son-of-a-Gamorrean thinks that I need help from him?!
//-- [RESPONSE NOTE]
//-- PLAYER: Umm...yes. I take it that he was incorrect?
if (response == "s_20")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: He bailed out of a deal that cost me thousands of credits, and wrecked my reputation with...well, never mind that. But, sadly, he's correct. I do have a problem that I need help with.
string_id message = new string_id (c_stringFile, "s_22");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What can I do?
boolean hasResponse0 = false;
if (npe_station_inaldra2_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_24");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra2_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: He bailed out of a deal that cost me thousands of credits, and wrecked my reputation with...well, never mind that. But, sadly, he's correct. I do have a problem that I need help with.
//-- [RESPONSE NOTE]
//-- PLAYER: What can I do?
if (response == "s_24")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: The cargo bay on the lower level has been captured by pirates. They're all mere thugs, but their boss is very resilient. He has thwarted all my recent efforts to stop him. Cut off the head and the body will die.
string_id message = new string_id (c_stringFile, "s_104");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'll head down there now.
boolean hasResponse0 = false;
if (npe_station_inaldra2_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_106");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra2_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The cargo bay on the lower level has been captured by pirates. They're all mere thugs, but their boss is very resilient. He has thwarted all my recent efforts to stop him. Cut off the head and the body will die.
//-- [RESPONSE NOTE]
//-- PLAYER: I'll head down there now.
if (response == "s_106")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
npe_station_inaldra2_action_giveInaldraQuest (player, npc);
//-- NPC: I'll be here going through reports when you are done.
string_id message = new string_id (c_stringFile, "s_108");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra2_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Very well. What are you looking for?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm thirsty. Where is the Cantina?
if (response == "s_56")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: The Cantina is right in the middle of the station on this level. There is a great band in there now. Just listen for the music.
string_id message = new string_id (c_stringFile, "s_58");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where is the Hangar Bay?
if (response == "s_60")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: There are two hangar bays. If you look on your map, they form the upper branches of the 'Y'. The two bays on this level are functional, but the lower bays are occupied and dangerous right now.
string_id message = new string_id (c_stringFile, "s_62");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where are the Training Rooms?
if (response == "s_64")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: We have two training rooms: a ranged and a melee room. Both are on this level on either side of the medical center, directly across from the elevator.
string_id message = new string_id (c_stringFile, "s_66");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm looking for the Medical Center.
if (response == "s_68")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: The Medical Center is next to the training rooms, almost directly across the station from the large hangar bays.
string_id message = new string_id (c_stringFile, "s_70");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How can I leave the station?
if (response == "s_74")
{
//-- [NOTE]
if (!npe_station_inaldra2_condition_isBH (player, npc))
{
//-- NPC: Ask that scoundrel Solo to take you far, far away from me. And tell him that I haven't forgiven him.
string_id message = new string_id (c_stringFile, "s_75");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra2_condition_isBH (player, npc))
{
//-- NPC: You're a Bounty Hunter, right? You should talk to Boba Fett. He might help you. Just don't mention Han, ok? While I'm upset at him, I don't want him dead. I shudder to think what Fett will do if he catches him.
string_id message = new string_id (c_stringFile, "s_72");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra2_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Welcome to Tansarii Point Station!
//-- [RESPONSE NOTE]
//-- PLAYER: I'm thirsty. Where is the Cantina?
if (response == "s_56")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: The Cantina is right in the middle of the station on this level. There is a great band in there now. Just listen for the music.
string_id message = new string_id (c_stringFile, "s_58");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where is the Hangar Bay?
if (response == "s_60")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: There are two hangar bays. If you look on your map, they form the upper branches of the 'Y'. The two bays on this level are functional, but the lower bays are occupied and dangerous right now.
string_id message = new string_id (c_stringFile, "s_62");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where are the Training Rooms?
if (response == "s_64")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: We have two training rooms: a ranged and a melee room. Both are on this level on either side of the medical center, directly across from the elevator.
string_id message = new string_id (c_stringFile, "s_66");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I'm looking for the Medical Center.
if (response == "s_68")
{
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: The Medical Center is next to the training rooms, almost directly across the station from the large hangar bays.
string_id message = new string_id (c_stringFile, "s_70");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How can I leave the station?
if (response == "s_74")
{
//-- [NOTE]
if (!npe_station_inaldra2_condition_isBH (player, npc))
{
//-- NPC: Ask that scoundrel Solo to take you far, far away from me. And tell him that I haven't forgiven him.
string_id message = new string_id (c_stringFile, "s_75");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra2_condition_isBH (player, npc))
{
//-- NPC: You're a Bounty Hunter, right? You should talk to Boba Fett. He might help you. Just don't mention Han, ok? While I'm upset at him, I don't want him dead. I shudder to think what Fett will do if he catches him.
string_id message = new string_id (c_stringFile, "s_72");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.npe_station_inaldra2");
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable (self, true);
setName (self, "Inaldra");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
setAnimationMood(self, "npc_sitting_chair");
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable (self, true);
setName (self, "Inaldra");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
setAnimationMood(self, "npc_sitting_chair");
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.npe_station_inaldra2");
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 (npe_station_inaldra2_condition_finishedInaldraQuest (player, npc))
{
//-- NPC: I hope you are doing well here.
string_id message = new string_id (c_stringFile, "s_34");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra2_condition_onInaldraQuest (player, npc))
{
//-- NPC: What do you have to report?
string_id message = new string_id (c_stringFile, "s_25");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The pirate has been dealt with.
boolean hasResponse0 = false;
if (npe_station_inaldra2_condition_onRewardStep (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Nothing, I need directions.
boolean hasResponse1 = false;
if (npe_station_inaldra2_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_26");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_27");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 2);
npcStartConversation (player, npc, "npe_station_inaldra2", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra2_condition_finishedMainQuest (player, npc))
{
//-- NPC: You're new here, aren't you? Is there something I can help you with?
string_id message = new string_id (c_stringFile, "s_14");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Han Solo said that you might need help.
boolean hasResponse0 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I need directions.
boolean hasResponse1 = false;
if (npe_station_inaldra2_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_16");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 6);
npcStartConversation (player, npc, "npe_station_inaldra2", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
//-- NPC: Welcome to Tansarii Point Station!
string_id message = new string_id (c_stringFile, "s_54");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm thirsty. Where is the Cantina?
boolean hasResponse0 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where is the Hangar Bay?
boolean hasResponse1 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Where are the Training Rooms?
boolean hasResponse2 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: I'm looking for the Medical Center.
boolean hasResponse3 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: How can I leave the station?
boolean hasResponse4 = false;
if (npe_station_inaldra2_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse4 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_64");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
utils.setScriptVar (player, "conversation.npe_station_inaldra2.branchId", 12);
npcStartConversation (player, npc, "npe_station_inaldra2", 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 != "npe_station_inaldra2")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.npe_station_inaldra2.branchId");
if (branchId == 2 && npe_station_inaldra2_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && npe_station_inaldra2_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && npe_station_inaldra2_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && npe_station_inaldra2_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && npe_station_inaldra2_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && npe_station_inaldra2_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && npe_station_inaldra2_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && npe_station_inaldra2_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && npe_station_inaldra2_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.npe_station_inaldra2.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================