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

2151 lines
58 KiB
Plaintext

// ======================================================================
//
// legacy_head_malakili.script
//
//
//
// Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.groundquests;
include library.space_quest;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/legacy_head_malakili";
// ======================================================================
// Script Conditions
// ======================================================================
boolean legacy_head_malakili_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean legacy_head_malakili_condition_onRod (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/legacy_head_rod");
boolean OnTask = (questIsQuestActive(questId1, player));
return OnTask;
}
// ----------------------------------------------------------------------
boolean legacy_head_malakili_condition_onThreeTasks (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/legacy_head_rod");
int ground = groundquests.getTaskId(questId1, "legacy_head_rod_e2");
boolean onTask = (questIsTaskActive(questId1, ground, player));
return onTask;
}
// ----------------------------------------------------------------------
boolean legacy_head_malakili_condition_abandoned (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/legacy_head_start");
int questId2 = questGetQuestId("quest/legacy_head_rod");
boolean OnTask = (questIsQuestComplete (questId1, player))
&& ( !(questIsQuestActive(questId2, player)))
&& ( !(questIsQuestComplete (questId2, player)));
return OnTask;
}
// ----------------------------------------------------------------------
boolean legacy_head_malakili_condition_rodCompleted (obj_id player, obj_id npc)
{
int questId1 = questGetQuestId("quest/legacy_head_rod");
boolean OnTask = (questIsQuestComplete (questId1, player));
return OnTask;
}
// ======================================================================
// Script Actions
// ======================================================================
void legacy_head_malakili_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void legacy_head_malakili_action_grantRod (obj_id player, obj_id npc)
{
// grant the quest to get things started. 1 quests will now be active.
groundquests.grantQuest(player, "legacy_head_rod");
}
// ----------------------------------------------------------------------
void legacy_head_malakili_action_signalQuest (obj_id player, obj_id npc)
{
// Send the signal for the wait for signal task following task 1.
// This will activate task 2.
groundquests.sendSignal(player, "legacy_head_rod_launch_e2");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int legacy_head_malakili_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Forget something?
//-- [RESPONSE NOTE]
//-- PLAYER: Datapad malfunction. Can you give me the information again?
if (response == "s_45")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
legacy_head_malakili_action_grantRod (player, npc);
//-- NPC: Here it is.
string_id message = new string_id (c_stringFile, "s_46");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: What do you want?
//-- [RESPONSE NOTE]
//-- PLAYER: EV-9D9 says you won't give her those shock rods.
if (response == "s_11")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: That sadistic bucket of bolts sent you here to muscle me?
string_id message = new string_id (c_stringFile, "s_13");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: She needs those shock rods now.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Not muscle ... reason.
boolean hasResponse1 = false;
if (legacy_head_malakili_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_15");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_32");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Nothing right now.
if (response == "s_86")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Suit yourself.
string_id message = new string_id (c_stringFile, "s_30");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: That sadistic bucket of bolts sent you here to muscle me?
//-- [RESPONSE NOTE]
//-- PLAYER: She needs those shock rods now.
if (response == "s_15")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: I don't care what she needs now. I don't have time to deal with that wacko's requests.
string_id message = new string_id (c_stringFile, "s_17");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can help you get the time.
boolean hasResponse0 = false;
if (legacy_head_malakili_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_19");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 7);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Not muscle ... reason.
if (response == "s_32")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Great, you going to make me an offer?
string_id message = new string_id (c_stringFile, "s_34");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Dump what you need on my datapad.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sure, what do you need?
boolean hasResponse1 = false;
if (legacy_head_malakili_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_36");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch7 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I don't care what she needs now. I don't have time to deal with that wacko's requests.
//-- [RESPONSE NOTE]
//-- PLAYER: I can help you get the time.
if (response == "s_19")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Oh really? Ok here is a list of tasks I need done. Get them done and she gets the shock rods, ok?
string_id message = new string_id (c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Its as good as done.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What tasks?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: On second thought never mind.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_23");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_28");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh really? Ok here is a list of tasks I need done. Get them done and she gets the shock rods, ok?
//-- [RESPONSE NOTE]
//-- PLAYER: Its as good as done.
if (response == "s_23")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
legacy_head_malakili_action_signalQuest (player, npc);
//-- NPC: Good to hear that.
string_id message = new string_id (c_stringFile, "s_25");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What tasks?
if (response == "s_41")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: First the Sarlacc must be cured. Then I have a problem with the Tuskens. Finally Jabba wants some DNA retrieved.
string_id message = new string_id (c_stringFile, "s_90");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can do this.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sarlacc?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: DNA?
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Tuskens?
boolean hasResponse3 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: I am not ready yet.
boolean hasResponse4 = false;
if (legacy_head_malakili_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_121");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_102");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_112");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_123");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: On second thought never mind.
if (response == "s_28")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Suit yourself.
string_id message = new string_id (c_stringFile, "s_30");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Great, you going to make me an offer?
//-- [RESPONSE NOTE]
//-- PLAYER: Dump what you need on my datapad.
if (response == "s_36")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Oh really? Ok here is a list of tasks I need done. Get them done and she gets the shock rods, ok?
string_id message = new string_id (c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Its as good as done.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What tasks?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: On second thought never mind.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_23");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_28");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Sure, what do you need?
if (response == "s_38")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: I got some responsibilities that I can't handle right now. Jabba has presented me with a great present...
string_id message = new string_id (c_stringFile, "s_40");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Present?
boolean hasResponse0 = false;
if (legacy_head_malakili_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_47");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I got some responsibilities that I can't handle right now. Jabba has presented me with a great present...
//-- [RESPONSE NOTE]
//-- PLAYER: Present?
if (response == "s_47")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Jabba has given me a Rancor. It is sickly from its journey so I have to tend it night and day. But I have other duties as well. If you want the rods then help me with these duties.
string_id message = new string_id (c_stringFile, "s_50");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can do these jobs.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What duties?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I am not ready to do this.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_52");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_89");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 13);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch13 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Jabba has given me a Rancor. It is sickly from its journey so I have to tend it night and day. But I have other duties as well. If you want the rods then help me with these duties.
//-- [RESPONSE NOTE]
//-- PLAYER: I can do these jobs.
if (response == "s_52")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Oh really? Ok here is a list of tasks I need done. Get them done and she gets the shock rods, ok?
string_id message = new string_id (c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Its as good as done.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What tasks?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: On second thought never mind.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_23");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_28");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What duties?
if (response == "s_89")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: First the Sarlacc must be cured. Then I have a problem with the Tuskens. Finally Jabba wants some DNA retrieved.
string_id message = new string_id (c_stringFile, "s_90");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can do this.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sarlacc?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: DNA?
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Tuskens?
boolean hasResponse3 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: I am not ready yet.
boolean hasResponse4 = false;
if (legacy_head_malakili_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_121");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_102");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_112");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_123");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I am not ready to do this.
if (response == "s_84")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Suit yourself.
string_id message = new string_id (c_stringFile, "s_30");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: First the Sarlacc must be cured. Then I have a problem with the Tuskens. Finally Jabba wants some DNA retrieved.
//-- [RESPONSE NOTE]
//-- PLAYER: I can do this.
if (response == "s_121")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Oh really? Ok here is a list of tasks I need done. Get them done and she gets the shock rods, ok?
string_id message = new string_id (c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Its as good as done.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What tasks?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: On second thought never mind.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_23");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_28");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Sarlacc?
if (response == "s_92")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Jabba takes his sail barge to the Great Pit of Carkoon to feed his enemies to the Sarlacc, but the sail barge's constant presence has scared off the Sarlacc's natural prey, the Jundland Eopie. Now the Sarlacc is not getting the right food and is falling ill. Feed it the intact livers from the Jundland Eopies to keep it healthy. The key is intact livers; broken livers will not work.
string_id message = new string_id (c_stringFile, "s_94");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can help you.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Tell me more about these jobs.
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I am not interested anymore.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_98");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: DNA?
if (response == "s_102")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: There is a krayt dragon skeleton out in the dunes. I have been asked by Jabba to get a sample of its DNA. The skeleton is supposed to be an ancient krayt dragon more powerful than any dragon before or since. Jabba wants to use the DNA in experiments.
string_id message = new string_id (c_stringFile, "s_104");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can help you.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Tell me more about these jobs.
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I am not interested any more.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_106");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tuskens?
if (response == "s_112")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: I normally use the Tuskens for these tasks, but something has spooked them. They say they hear the spirit of a great and ancient krayt dragon haunting the desert to the northeast. I think it's just that old hermit stirring up trouble. You need to go to the hermit's home and get me proof.
string_id message = new string_id (c_stringFile, "s_114");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can help you.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Tell me more about these jobs.
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: I am not interested any more.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_116");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_118");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_120");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I am not ready yet.
if (response == "s_123")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Suit yourself.
string_id message = new string_id (c_stringFile, "s_30");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Jabba takes his sail barge to the Great Pit of Carkoon to feed his enemies to the Sarlacc, but the sail barge's constant presence has scared off the Sarlacc's natural prey, the Jundland Eopie. Now the Sarlacc is not getting the right food and is falling ill. Feed it the intact livers from the Jundland Eopies to keep it healthy. The key is intact livers; broken livers will not work.
//-- [RESPONSE NOTE]
//-- PLAYER: I can help you.
if (response == "s_96")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Oh really? Ok here is a list of tasks I need done. Get them done and she gets the shock rods, ok?
string_id message = new string_id (c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Its as good as done.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What tasks?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: On second thought never mind.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_23");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_28");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me more about these jobs.
if (response == "s_98")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: First the Sarlacc must be cured. Then I have a problem with the Tuskens. Finally Jabba wants some DNA retrieved.
string_id message = new string_id (c_stringFile, "s_90");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can do this.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sarlacc?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: DNA?
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Tuskens?
boolean hasResponse3 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: I am not ready yet.
boolean hasResponse4 = false;
if (legacy_head_malakili_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_121");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_102");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_112");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_123");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I am not interested anymore.
if (response == "s_100")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Suit yourself.
string_id message = new string_id (c_stringFile, "s_30");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: There is a krayt dragon skeleton out in the dunes. I have been asked by Jabba to get a sample of its DNA. The skeleton is supposed to be an ancient krayt dragon more powerful than any dragon before or since. Jabba wants to use the DNA in experiments.
//-- [RESPONSE NOTE]
//-- PLAYER: I can help you.
if (response == "s_106")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Oh really? Ok here is a list of tasks I need done. Get them done and she gets the shock rods, ok?
string_id message = new string_id (c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Its as good as done.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What tasks?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: On second thought never mind.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_23");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_28");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me more about these jobs.
if (response == "s_108")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: First the Sarlacc must be cured. Then I have a problem with the Tuskens. Finally Jabba wants some DNA retrieved.
string_id message = new string_id (c_stringFile, "s_90");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can do this.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sarlacc?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: DNA?
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Tuskens?
boolean hasResponse3 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: I am not ready yet.
boolean hasResponse4 = false;
if (legacy_head_malakili_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_121");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_102");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_112");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_123");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I am not interested any more.
if (response == "s_110")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Suit yourself.
string_id message = new string_id (c_stringFile, "s_30");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int legacy_head_malakili_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I normally use the Tuskens for these tasks, but something has spooked them. They say they hear the spirit of a great and ancient krayt dragon haunting the desert to the northeast. I think it's just that old hermit stirring up trouble. You need to go to the hermit's home and get me proof.
//-- [RESPONSE NOTE]
//-- PLAYER: I can help you.
if (response == "s_116")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Oh really? Ok here is a list of tasks I need done. Get them done and she gets the shock rods, ok?
string_id message = new string_id (c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Its as good as done.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: What tasks?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: On second thought never mind.
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_23");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_28");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Tell me more about these jobs.
if (response == "s_118")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: First the Sarlacc must be cured. Then I have a problem with the Tuskens. Finally Jabba wants some DNA retrieved.
string_id message = new string_id (c_stringFile, "s_90");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can do this.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Sarlacc?
boolean hasResponse1 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: DNA?
boolean hasResponse2 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Tuskens?
boolean hasResponse3 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
//-- PLAYER: I am not ready yet.
boolean hasResponse4 = false;
if (legacy_head_malakili_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_121");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_102");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_112");
if (hasResponse4)
responses [responseIndex++] = new string_id (c_stringFile, "s_123");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I am not interested any more.
if (response == "s_120")
{
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
//-- NPC: Suit yourself.
string_id message = new string_id (c_stringFile, "s_30");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.legacy_head_malakili");
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
setName (self, "Malakili");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_INTERESTING);
setInvulnerable (self, true);
setName (self, "Malakili");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
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.legacy_head_malakili");
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 (legacy_head_malakili_condition_abandoned (player, npc))
{
legacy_head_malakili_action_facePlayer (player, npc);
//-- NPC: Forget something?
string_id message = new string_id (c_stringFile, "s_44");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Datapad malfunction. Can you give me the information again?
boolean hasResponse0 = false;
if (legacy_head_malakili_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.legacy_head_malakili.branchId", 1);
npcStartConversation (player, npc, "legacy_head_malakili", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (legacy_head_malakili_condition_rodCompleted (player, npc))
{
legacy_head_malakili_action_facePlayer (player, npc);
//-- NPC: I appreciate your help. That droid has gotten her shock rods.
string_id message = new string_id (c_stringFile, "s_49");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (legacy_head_malakili_condition_onThreeTasks (player, npc))
{
legacy_head_malakili_action_facePlayer (player, npc);
//-- NPC: What are you doing back here?
string_id message = new string_id (c_stringFile, "s_42");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (legacy_head_malakili_condition_onRod (player, npc))
{
legacy_head_malakili_action_facePlayer (player, npc);
//-- NPC: What do you want?
string_id message = new string_id (c_stringFile, "s_9");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: EV-9D9 says you won't give her those shock rods.
boolean hasResponse0 = false;
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Nothing right now.
boolean hasResponse1 = false;
if (legacy_head_malakili_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_11");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
utils.setScriptVar (player, "conversation.legacy_head_malakili.branchId", 5);
npcStartConversation (player, npc, "legacy_head_malakili", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (legacy_head_malakili_condition__defaultCondition (player, npc))
{
legacy_head_malakili_action_facePlayer (player, npc);
//-- NPC: Don't know what you are looking for down here, but you will not like what you find.
string_id message = new string_id (c_stringFile, "s_88");
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 != "legacy_head_malakili")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.legacy_head_malakili.branchId");
if (branchId == 1 && legacy_head_malakili_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && legacy_head_malakili_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && legacy_head_malakili_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 7 && legacy_head_malakili_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && legacy_head_malakili_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && legacy_head_malakili_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && legacy_head_malakili_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 13 && legacy_head_malakili_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && legacy_head_malakili_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && legacy_head_malakili_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && legacy_head_malakili_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && legacy_head_malakili_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.legacy_head_malakili.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================