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

1578 lines
44 KiB
Plaintext

// ======================================================================
//
// npe_station_inaldra.script
//
//
//
// 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/npe_station_inaldra";
// ======================================================================
// Script Conditions
// ======================================================================
boolean npe_station_inaldra_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_playerOnQuest (obj_id player, obj_id npc)
{
return (groundquests.isQuestActive(player, "npe_main_quest")&&
groundquests.hasCompletedTask(player, "npe_main_quest", "talktoinaldra1"));
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_playerOnSecondInaldraStep (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_main_quest", "talktoinaldra2");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_playerCompletedFirstQuest (obj_id player, obj_id npc)
{
return groundquests.hasCompletedTask(player, "npe_main_quest", "talktoinaldra2");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_playeronFirstInaldraStep (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_main_quest", "talktoinaldra1");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_playerOnHanStep (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_main_quest", "talktohan1");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_main2Inaldra1 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_main_quest_2", "inaldra1");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_main2Inaldra2 (obj_id player, obj_id npc)
{
return groundquests.isTaskActive(player, "npe_main_quest_2", "inaldra2");
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_playerOnMainQuest2 (obj_id player, obj_id npc)
{
return (groundquests.isQuestActive(player, "npe_main_quest_2")&&
groundquests.hasCompletedTask(player, "npe_main_quest_2", "inaldra1"));
}
// ----------------------------------------------------------------------
boolean npe_station_inaldra_condition_playerCompletedSecondQuest (obj_id player, obj_id npc)
{
return groundquests.hasCompletedQuest(player, "npe_main_quest_2");
}
// ======================================================================
// Script Actions
// ======================================================================
void npe_station_inaldra_action_signalInaldra1 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "npe_main_inaldra1");
}
// ----------------------------------------------------------------------
void npe_station_inaldra_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void npe_station_inaldra_action_signalInaldra2 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "npe_main_inaldra2");
}
// ----------------------------------------------------------------------
void npe_station_inaldra_action_signaMain2Inaldra1 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "npe_main2_inaldra_open");
}
// ----------------------------------------------------------------------
void npe_station_inaldra_action_signaMain2Inaldra2 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "npe_main2_inaldra_final");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int npe_station_inaldra_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Please leave me be, for now. I have a serious problem that I need to deal with.
//-- [RESPONSE NOTE]
//-- PLAYER: Is this about someone trying to undermine your authority.
if (response == "s_61")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: Perhaps. Do you know something?
string_id message = new string_id (c_stringFile, "s_62");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I have this recording of a deal with Tarand Crowe.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_63");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Perhaps. Do you know something?
//-- [RESPONSE NOTE]
//-- PLAYER: I have this recording of a deal with Tarand Crowe.
if (response == "s_63")
{
doAnimationAction (player, "feed_creature_medium");
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: Interesting. He certainly was trying to take my place here. Eventually, he might even have succeeded. Thank you very much.
string_id message = new string_id (c_stringFile, "s_64");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Han asked me to do it.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_65");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Interesting. He certainly was trying to take my place here. Eventually, he might even have succeeded. Thank you very much.
//-- [RESPONSE NOTE]
//-- PLAYER: Han asked me to do it.
if (response == "s_65")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "gesticulate_wildly");
//-- NPC: Again with Solo? I told you...I'm done with him. Look, you don't know what happened and this doesn't make up for what happened!
string_id message = new string_id (c_stringFile, "s_66");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm sorry you feel that way.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_67");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Again with Solo? I told you...I'm done with him. Look, you don't know what happened and this doesn't make up for what happened!
//-- [RESPONSE NOTE]
//-- PLAYER: I'm sorry you feel that way.
if (response == "s_67")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: Yes, I do. You, however, are a completely different story and I'd like to reward you for helping me out. When you are ready to leave, I have a very important job to do on Tatooine. I'll arrange for your trip down there if you help me out when you get there.
string_id message = new string_id (c_stringFile, "s_68");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can do that.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_69");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes, I do. You, however, are a completely different story and I'd like to reward you for helping me out. When you are ready to leave, I have a very important job to do on Tatooine. I'll arrange for your trip down there if you help me out when you get there.
//-- [RESPONSE NOTE]
//-- PLAYER: I can do that.
if (response == "s_69")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
npe_station_inaldra_action_signaMain2Inaldra2 (player, npc);
//-- NPC: Great! Once you are ready to go, meet me in the Docking Bay. The elevator will take you there.
string_id message = new string_id (c_stringFile, "s_70");
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes? Is there something that I can do for you?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm just wondering if you have anything that I can do.
if (response == "s_35")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: Not at the moment. I think I will soon, though.
string_id message = new string_id (c_stringFile, "s_39");
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I want to talk to on behalf of Han Solo.
if (response == "s_41")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "sigh_deeply");
//-- NPC: This again? Look, this deal went straight, which is your doing, not his. I'll tolerate his presence on this station, but no more.
string_id message = new string_id (c_stringFile, "s_43");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: He wants to make up for what he did to you.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_45");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: This again? Look, this deal went straight, which is your doing, not his. I'll tolerate his presence on this station, but no more.
//-- [RESPONSE NOTE]
//-- PLAYER: He wants to make up for what he did to you.
if (response == "s_45")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "laugh");
//-- NPC: Sure he does, until the next time it's convenient to leave me high and dry on a deal. I'm done with him.
string_id message = new string_id (c_stringFile, "s_56");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: That's your final word on it?
boolean hasResponse0 = false;
if (npe_station_inaldra_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_58");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Sure he does, until the next time it's convenient to leave me high and dry on a deal. I'm done with him.
//-- [RESPONSE NOTE]
//-- PLAYER: That's your final word on it?
if (response == "s_58")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
npe_station_inaldra_action_signaMain2Inaldra1 (player, npc);
//-- NPC: Yes.
string_id message = new string_id (c_stringFile, "s_59");
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Have you had any luck?
//-- [RESPONSE NOTE]
//-- PLAYER: Not yet. I still have people to see.
if (response == "s_32")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: Then please leave me be. I'm busy.
string_id message = new string_id (c_stringFile, "s_34");
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: We're good to go. Start unloading the goods!
if (response == "s_36")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "thank");
npe_station_inaldra_action_signalInaldra2 (player, npc);
//-- NPC: Well! I must say that I'm impressed, %TU. You are quite the persuasive one, aren't you?
string_id message = new string_id (c_stringFile, "s_38");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm just lucky that everyone had a price.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_46");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 15);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcSpeak (player, pp);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
chat.chat (npc, player, pp);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well! I must say that I'm impressed, %TU. You are quite the persuasive one, aren't you?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm just lucky that everyone had a price.
if (response == "s_46")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: Don't be surprised by that. Be surprised that you could pay it, perhaps. Anyway, tell that pirate that I'll get his money to him shortly.
string_id message = new string_id (c_stringFile, "s_47");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I will.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_48");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Don't be surprised by that. Be surprised that you could pay it, perhaps. Anyway, tell that pirate that I'll get his money to him shortly.
//-- [RESPONSE NOTE]
//-- PLAYER: I will.
if (response == "s_48")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
//-- NPC: You did a good job. I think it's time for you to make some decisions.
string_id message = new string_id (c_stringFile, "s_49");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What kind of decisions.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_50");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You did a good job. I think it's time for you to make some decisions.
//-- [RESPONSE NOTE]
//-- PLAYER: What kind of decisions.
if (response == "s_50")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: You need to choose a path in life. I can help you with that. I just need to know more about you.
string_id message = new string_id (c_stringFile, "s_52");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Why?
boolean hasResponse0 = false;
if (npe_station_inaldra_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_53");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You need to choose a path in life. I can help you with that. I just need to know more about you.
//-- [RESPONSE NOTE]
//-- PLAYER: Why?
if (response == "s_53")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "laugh");
npe_station_inaldra_action_signalInaldra2 (player, npc);
//-- NPC: You are more than Han Solo's lackey. Tell me about yourself. [UI pops up here so the player can choose a profession template]
string_id message = new string_id (c_stringFile, "s_55");
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You came here on the Falcon, didn't you?
//-- [RESPONSE NOTE]
//-- PLAYER: Yes. I'm here to talk to you about a shipment of goods.
if (response == "s_73")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_accusingly");
//-- NPC: No way. I worked with him before. That son of a Gamorrean left me high and dry on a deal that cost me thousands of credits! I may have him spaced on general principals. Why should I do anything do help either of you?
string_id message = new string_id (c_stringFile, "s_75");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: The shipment is sizable and worth a lot of credits.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_77");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: No way. I worked with him before. That son of a Gamorrean left me high and dry on a deal that cost me thousands of credits! I may have him spaced on general principals. Why should I do anything do help either of you?
//-- [RESPONSE NOTE]
//-- PLAYER: The shipment is sizable and worth a lot of credits.
if (response == "s_77")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: Profit on all sides, huh?
string_id message = new string_id (c_stringFile, "s_79");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Exactly.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_81");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Profit on all sides, huh?
//-- [RESPONSE NOTE]
//-- PLAYER: Exactly.
if (response == "s_81")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "sigh_deeply");
//-- NPC: Fine. The terms are, first I get my share as a broker, then I get the money that he owes me. After that, you and he have whatever deal you have.
string_id message = new string_id (c_stringFile, "s_83");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds fair.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_85");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 23);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Fine. The terms are, first I get my share as a broker, then I get the money that he owes me. After that, you and he have whatever deal you have.
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds fair.
if (response == "s_85")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "wave_finger_warning");
//-- NPC: And I'm not lifting a finger to get those goods moved. I'll give you contacts and you take care of it. I'm not going to waste my time on him.
string_id message = new string_id (c_stringFile, "s_87");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So how can you justify taking a broker's fee?
boolean hasResponse0 = false;
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_89");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 24);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch24 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: And I'm not lifting a finger to get those goods moved. I'll give you contacts and you take care of it. I'm not going to waste my time on him.
//-- [RESPONSE NOTE]
//-- PLAYER: So how can you justify taking a broker's fee?
if (response == "s_89")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_shoulders");
//-- NPC: Without me, you won't be able to move these goods at all. For Solo, it's a 'non-spacing fee'.
string_id message = new string_id (c_stringFile, "s_91");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I see. Very well. I accept.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_93");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 25);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_station_inaldra_handleBranch25 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Without me, you won't be able to move these goods at all. For Solo, it's a 'non-spacing fee'.
//-- [RESPONSE NOTE]
//-- PLAYER: I see. Very well. I accept.
if (response == "s_93")
{
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
npe_station_inaldra_action_signalInaldra1 (player, npc);
//-- NPC: Good. Check your journal and datapad for the contacts. Good luck. You will need it.
string_id message = new string_id (c_stringFile, "s_95");
utils.removeScriptVar (player, "conversation.npe_station_inaldra.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.npe_station_inaldra");
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
setName (self, "Inaldra");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
setName (self, "Inaldra");
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_inaldra");
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_inaldra_condition_playerCompletedSecondQuest (player, npc))
{
npe_station_inaldra_action_facePlayer (player, npc);
//-- NPC: Thank you for all your help. Please meet me in the Docking Bay.
string_id message = new string_id (c_stringFile, "s_97");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra_condition_playerOnMainQuest2 (player, npc))
{
npe_station_inaldra_action_facePlayer (player, npc);
//-- NPC: Please leave me be, for now. I have a serious problem that I need to deal with.
string_id message = new string_id (c_stringFile, "s_60");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Is this about someone trying to undermine your authority.
boolean hasResponse0 = false;
if (npe_station_inaldra_condition_main2Inaldra2 (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_61");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 2);
npcStartConversation (player, npc, "npe_station_inaldra", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra_condition_playerCompletedFirstQuest (player, npc))
{
npe_station_inaldra_action_facePlayer (player, npc);
//-- NPC: Yes? Is there something that I can do for you?
string_id message = new string_id (c_stringFile, "s_51");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm just wondering if you have anything that I can do.
boolean hasResponse0 = false;
if (!npe_station_inaldra_condition_main2Inaldra1 (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I want to talk to on behalf of Han Solo.
boolean hasResponse1 = false;
if (npe_station_inaldra_condition_main2Inaldra1 (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_35");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 8);
npcStartConversation (player, npc, "npe_station_inaldra", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra_condition_playerOnQuest (player, npc))
{
npe_station_inaldra_action_facePlayer (player, npc);
//-- NPC: Have you had any luck?
string_id message = new string_id (c_stringFile, "s_30");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Not yet. I still have people to see.
boolean hasResponse0 = false;
if (!npe_station_inaldra_condition_playerOnSecondInaldraStep (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: We're good to go. Start unloading the goods!
boolean hasResponse1 = false;
if (npe_station_inaldra_condition_playerOnSecondInaldraStep (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_32");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_36");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 13);
npcStartConversation (player, npc, "npe_station_inaldra", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra_condition_playeronFirstInaldraStep (player, npc))
{
npe_station_inaldra_action_facePlayer (player, npc);
//-- NPC: You came here on the Falcon, didn't you?
string_id message = new string_id (c_stringFile, "s_71");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Yes. I'm here to talk to you about a shipment of goods.
boolean hasResponse0 = false;
if (npe_station_inaldra_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_73");
utils.setScriptVar (player, "conversation.npe_station_inaldra.branchId", 20);
npcStartConversation (player, npc, "npe_station_inaldra", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_station_inaldra_condition__defaultCondition (player, npc))
{
//-- NPC: Welcome to my station! If you have any questions, please ask someone else.
string_id message = new string_id (c_stringFile, "s_98");
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_inaldra")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.npe_station_inaldra.branchId");
if (branchId == 2 && npe_station_inaldra_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && npe_station_inaldra_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && npe_station_inaldra_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && npe_station_inaldra_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && npe_station_inaldra_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && npe_station_inaldra_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && npe_station_inaldra_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && npe_station_inaldra_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && npe_station_inaldra_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && npe_station_inaldra_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && npe_station_inaldra_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && npe_station_inaldra_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && npe_station_inaldra_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && npe_station_inaldra_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && npe_station_inaldra_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && npe_station_inaldra_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 23 && npe_station_inaldra_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 24 && npe_station_inaldra_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 25 && npe_station_inaldra_handleBranch25 (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_inaldra.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================