mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
1471 lines
41 KiB
Plaintext
1471 lines
41 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_rodian_hunter.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.28 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/ep3_rodian_hunter";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_rodian_hunter_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_rodian_hunter_condition_hasFinishedQuest1 (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_1");
|
|
return questIsQuestComplete(questId, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_rodian_hunter_condition_hasFinishedQuest2 (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_2");
|
|
return questIsQuestComplete(questId, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_rodian_hunter_condition_hasFinishedQuest3 (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_3");
|
|
return questIsQuestComplete(questId, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_rodian_hunter_condition_isOnQuest1 (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_1");
|
|
return questIsQuestActive(questId, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_rodian_hunter_condition_isOnQuest2 (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_2");
|
|
return questIsQuestActive(questId, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_rodian_hunter_condition_hasFinished_WookieQuest1 (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_wookiee_benefactor_2");
|
|
return questIsQuestComplete(questId, player);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_rodian_hunter_action_giveQuestOne (obj_id player, obj_id npc)
|
|
{
|
|
// Apply the first quest to the player here
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_1");
|
|
questActivateQuest(questId, player, npc);
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_short.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_rodian_hunter_action_giveQuestTwo (obj_id player, obj_id npc)
|
|
{
|
|
// Apply the second quest to the player here.
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_2");
|
|
questActivateQuest(questId, player, npc);
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_medium.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_rodian_hunter_action_clearQuests (obj_id player, obj_id npc)
|
|
{
|
|
// REMOVE QUEST using the questClearQuest command
|
|
int questId1 = questGetQuestId("quest/ep3_rodian_hunter_1");
|
|
int questId2 = questGetQuestId("quest/ep3_rodian_hunter_2");
|
|
int questId3 = questGetQuestId("quest/ep3_rodian_hunter_3");
|
|
questClearQuest(questId1, player);
|
|
questClearQuest(questId2, player);
|
|
questClearQuest(questId3, player);
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_short.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_rodian_hunter_action_speak_SHORT (obj_id player, obj_id npc)
|
|
{
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_short.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_rodian_hunter_action_speak_MEDIUM (obj_id player, obj_id npc)
|
|
{
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_medium.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_rodian_hunter_action_speak_LONG (obj_id player, obj_id npc)
|
|
{
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_long.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_rodian_hunter_action_giveQuestThree (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_3");
|
|
questActivateQuest(questId, player, npc);
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_short.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_rodian_hunter_action_giveQuestFour (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_4");
|
|
questActivateQuest(questId, player, npc);
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_short.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_rodian_hunter_action_giveQuestFive (obj_id player, obj_id npc)
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunter_5");
|
|
questActivateQuest(questId, player, npc);
|
|
playClientEffectLoc(player, "clienteffect/voc_npc_cnv_rodian_short.cef", getLocation(npc), 0f);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_rodian_hunter_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hello! I'm Bazeedo - chief hunter of this clan. Word of your coming has preceeded you. I am glad to see you've made it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to hunt in this forest.
|
|
if (response == "s_2f1410df")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_no");
|
|
|
|
ep3_rodian_hunter_action_speak_LONG (player, npc);
|
|
|
|
//-- NPC: At the moment, this is impossible. Our benefactor has shut down the hunt. He is preoccupied by a clan of Trandoshans that have recently moved in. Apparently, they have kidnapped some members of his family.
|
|
string_id message = new string_id (c_stringFile, "s_fa986495");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Can he allow me to hunt?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_2fac86c");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: At the moment, this is impossible. Our benefactor has shut down the hunt. He is preoccupied by a clan of Trandoshans that have recently moved in. Apparently, they have kidnapped some members of his family.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Can he allow me to hunt?
|
|
if (response == "s_2fac86c")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
ep3_rodian_hunter_action_speak_SHORT (player, npc);
|
|
|
|
//-- NPC: Yes. You can ask him if you'd like. He's in a guard tower just outside of this camp.
|
|
string_id message = new string_id (c_stringFile, "s_1a09ac5e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will ask him.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_cba7ab48");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes. You can ask him if you'd like. He's in a guard tower just outside of this camp.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will ask him.
|
|
if (response == "s_cba7ab48")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
ep3_rodian_hunter_action_giveQuestOne (player, npc);
|
|
|
|
//-- NPC: Good luck!
|
|
string_id message = new string_id (c_stringFile, "s_a80d9308");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What are you waiting for?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can't find your benefactor.
|
|
if (response == "s_ac3b13f5")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "point_forward");
|
|
|
|
ep3_rodian_hunter_action_speak_MEDIUM (player, npc);
|
|
|
|
//-- NPC: It's easy. Just go outside this hut - walk straight for about a minute. You'll see a giant tree. Go up the tree ramp. You'll find him on the first landing.
|
|
string_id message = new string_id (c_stringFile, "s_50c166a3");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay. Thanks.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_4d5b8557");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It's easy. Just go outside this hut - walk straight for about a minute. You'll see a giant tree. Go up the tree ramp. You'll find him on the first landing.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay. Thanks.
|
|
if (response == "s_4d5b8557")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
ep3_rodian_hunter_action_speak_SHORT (player, npc);
|
|
|
|
//-- NPC: Good bye!
|
|
string_id message = new string_id (c_stringFile, "s_d28436cd");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What are you doing here?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to hunt here.
|
|
if (response == "s_ff3c855b")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "apologize");
|
|
|
|
ep3_rodian_hunter_action_speak_MEDIUM (player, npc);
|
|
|
|
//-- NPC: I know, but you can't until you have been given permission by our Wookiee benefactor. See him, talk to him, and do what he asks.
|
|
string_id message = new string_id (c_stringFile, "s_4e4fe804");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_9301eff1");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I know, but you can't until you have been given permission by our Wookiee benefactor. See him, talk to him, and do what he asks.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will.
|
|
if (response == "s_9301eff1")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
ep3_rodian_hunter_action_speak_SHORT (player, npc);
|
|
|
|
//-- NPC: Once he is your friend, he will let you hunt here.
|
|
string_id message = new string_id (c_stringFile, "s_34824b35");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It's good to see you again! Look - we've got trouble! Would you do a favor for me?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure.
|
|
if (response == "s_8be640b8")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
ep3_rodian_hunter_action_speak_LONG (player, npc);
|
|
|
|
//-- NPC: My nephew brought a family of rill to this planet. His pets, you see. This was a bad idea. Turns out that the native flora is poison to the rill. They are dying a slow death!
|
|
string_id message = new string_id (c_stringFile, "s_e3bd19bc");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Should I put them out of their misery?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_1d144f53");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: My nephew brought a family of rill to this planet. His pets, you see. This was a bad idea. Turns out that the native flora is poison to the rill. They are dying a slow death!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Should I put them out of their misery?
|
|
if (response == "s_1d144f53")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "slump_head");
|
|
|
|
ep3_rodian_hunter_action_speak_MEDIUM (player, npc);
|
|
|
|
//-- NPC: Sad to say, but yes. Not much of a challenge for a hunter such as yourself - but it would be a great favor to me.
|
|
string_id message = new string_id (c_stringFile, "s_fe77e31e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Will do.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_d24a2285");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sad to say, but yes. Not much of a challenge for a hunter such as yourself - but it would be a great favor to me.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Will do.
|
|
if (response == "s_d24a2285")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
ep3_rodian_hunter_action_giveQuestTwo (player, npc);
|
|
|
|
//-- NPC: Thank you!
|
|
string_id message = new string_id (c_stringFile, "s_81fdc59e");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What's the problem?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No problem. I'm on my way.
|
|
if (response == "s_b1bd5fe2")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
ep3_rodian_hunter_action_speak_SHORT (player, npc);
|
|
|
|
//-- NPC: Goodbye!
|
|
string_id message = new string_id (c_stringFile, "s_de3892ae");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I need my quests cleared.
|
|
if (response == "s_a4e70cc0")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "manipulate_medium");
|
|
|
|
ep3_rodian_hunter_action_clearQuests (player, npc);
|
|
|
|
//-- NPC: No problem!
|
|
string_id message = new string_id (c_stringFile, "s_fa2e7213");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I am very worried that the Trandoshans are plotting to kidnap Rodians on their way to this hunting ground.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How can I help?
|
|
if (response == "s_b84b366c")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
ep3_rodian_hunter_action_speak_LONG (player, npc);
|
|
|
|
//-- NPC: Some of these slavers will be carrying orders from the Slavemaster. Not all of them - but many of them. Would you be willing to confiscate those orders for me and disrupt their criminal activity?
|
|
string_id message = new string_id (c_stringFile, "s_e9a0750f");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I would.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_34f24948");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Some of these slavers will be carrying orders from the Slavemaster. Not all of them - but many of them. Would you be willing to confiscate those orders for me and disrupt their criminal activity?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I would.
|
|
if (response == "s_34f24948")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "pound_fist_palm");
|
|
|
|
ep3_rodian_hunter_action_speak_MEDIUM (player, npc);
|
|
|
|
//-- NPC: Excellent! Collect at least five of the Trandoshan slavers' kidnap orders. That should teach them!
|
|
string_id message = new string_id (c_stringFile, "s_88467f34");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm on my way.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_e42b260e");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Excellent! Collect at least five of the Trandoshan slavers' kidnap orders. That should teach them!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm on my way.
|
|
if (response == "s_e42b260e")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "belly_laugh");
|
|
|
|
ep3_rodian_hunter_action_giveQuestThree (player, npc);
|
|
|
|
//-- NPC: Good luck, my friend!
|
|
string_id message = new string_id (c_stringFile, "s_fe631380");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I hope you are well, my friend. How can I help you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I would like to hunt the walluga.
|
|
if (response == "s_7e4fd412")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Would you take down one or two of them for me? One pays 500 but two pays 1500... for the difficulty.
|
|
string_id message = new string_id (c_stringFile, "s_f20fccbf");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will bring you the skin of one walluga.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I will bring two walluga skins.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_rodian_hunter_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_583053f2");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_78fecb0e");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_rodian_hunter_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Would you take down one or two of them for me? One pays 500 but two pays 1500... for the difficulty.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will bring you the skin of one walluga.
|
|
if (response == "s_583053f2")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
ep3_rodian_hunter_action_giveQuestFour (player, npc);
|
|
|
|
//-- NPC: One it shall be. See you soon!
|
|
string_id message = new string_id (c_stringFile, "s_f53e4c0c");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will bring two walluga skins.
|
|
if (response == "s_78fecb0e")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
ep3_rodian_hunter_action_giveQuestFive (player, npc);
|
|
|
|
//-- NPC: Superb! Good luck.
|
|
string_id message = new string_id (c_stringFile, "s_7d09a75e");
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.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.ep3_rodian_hunter");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_SPACE_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
setName (self, "Bazeedo");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition (self, CONDITION_SPACE_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
setName (self, "Bazeedo");
|
|
|
|
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);
|
|
faceTo(self, player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.ep3_rodian_hunter");
|
|
|
|
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 (!ep3_rodian_hunter_condition_hasFinishedQuest1 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
ep3_rodian_hunter_action_speak_MEDIUM (player, npc);
|
|
|
|
//-- NPC: Hello! I'm Bazeedo - chief hunter of this clan. Word of your coming has preceeded you. I am glad to see you've made it.
|
|
string_id message = new string_id (c_stringFile, "s_31d7e474");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to hunt in this forest.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_2f1410df");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "ep3_rodian_hunter", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition_isOnQuest1 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shrug_hands");
|
|
|
|
ep3_rodian_hunter_action_speak_SHORT (player, npc);
|
|
|
|
//-- NPC: What are you waiting for?
|
|
string_id message = new string_id (c_stringFile, "s_225d3518");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I can't find your benefactor.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_ac3b13f5");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "ep3_rodian_hunter", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!ep3_rodian_hunter_condition_hasFinished_WookieQuest1 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
ep3_rodian_hunter_action_speak_SHORT (player, npc);
|
|
|
|
//-- NPC: What are you doing here?
|
|
string_id message = new string_id (c_stringFile, "s_b26194cb");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to hunt here.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_ff3c855b");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "ep3_rodian_hunter", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!ep3_rodian_hunter_condition_hasFinishedQuest2 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "implore");
|
|
|
|
ep3_rodian_hunter_action_speak_MEDIUM (player, npc);
|
|
|
|
//-- NPC: It's good to see you again! Look - we've got trouble! Would you do a favor for me?
|
|
string_id message = new string_id (c_stringFile, "s_cf298387");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_8be640b8");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 11);
|
|
|
|
npcStartConversation (player, npc, "ep3_rodian_hunter", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition_isOnQuest2 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
ep3_rodian_hunter_action_speak_SHORT (player, npc);
|
|
|
|
//-- NPC: What's the problem?
|
|
string_id message = new string_id (c_stringFile, "s_d2849e62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: No problem. I'm on my way.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I need my quests cleared.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_rodian_hunter_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_b1bd5fe2");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_a4e70cc0");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 15);
|
|
|
|
npcStartConversation (player, npc, "ep3_rodian_hunter", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!ep3_rodian_hunter_condition_hasFinishedQuest3 (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shake_head_disgust");
|
|
|
|
ep3_rodian_hunter_action_speak_LONG (player, npc);
|
|
|
|
//-- NPC: I am very worried that the Trandoshans are plotting to kidnap Rodians on their way to this hunting ground.
|
|
string_id message = new string_id (c_stringFile, "s_b21a191");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How can I help?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_b84b366c");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 18);
|
|
|
|
npcStartConversation (player, npc, "ep3_rodian_hunter", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_rodian_hunter_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
ep3_rodian_hunter_action_speak_SHORT (player, npc);
|
|
|
|
//-- NPC: I hope you are well, my friend. How can I help you?
|
|
string_id message = new string_id (c_stringFile, "s_d0306922");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I would like to hunt the walluga.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_rodian_hunter_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_7e4fd412");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_rodian_hunter.branchId", 22);
|
|
|
|
npcStartConversation (player, npc, "ep3_rodian_hunter", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "ep3_rodian_hunter")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
if (branchId == 1 && ep3_rodian_hunter_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && ep3_rodian_hunter_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && ep3_rodian_hunter_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && ep3_rodian_hunter_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && ep3_rodian_hunter_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && ep3_rodian_hunter_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && ep3_rodian_hunter_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && ep3_rodian_hunter_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && ep3_rodian_hunter_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && ep3_rodian_hunter_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && ep3_rodian_hunter_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && ep3_rodian_hunter_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && ep3_rodian_hunter_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && ep3_rodian_hunter_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && ep3_rodian_hunter_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && ep3_rodian_hunter_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.ep3_rodian_hunter.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|