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

1199 lines
34 KiB
Plaintext

// ======================================================================
//
// rodian_master_hunter.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// 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/rodian_master_hunter";
// ======================================================================
// Script Conditions
// ======================================================================
boolean rodian_master_hunter_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean rodian_master_hunter_condition_isGenderMale (obj_id player, obj_id npc)
{
return ( getGender( player ) == GENDER_MALE );
}
// ----------------------------------------------------------------------
boolean rodian_master_hunter_condition_isSpeciesRodian (obj_id player, obj_id npc)
{
return ( getSpecies(player) == SPECIES_RODIAN );
}
// ======================================================================
// Script Actions
// ======================================================================
void rodian_master_hunter_action_givequest_1 (obj_id player, obj_id npc)
{
// Test quest ONE (1) : quest/ep3_rodian_hunt_1.qst
int questId = questGetQuestId("quest/ep3_rodian_hunt_1");
questActivateQuest(questId, player, npc);
}
// ----------------------------------------------------------------------
void rodian_master_hunter_action_givequest_2 (obj_id player, obj_id npc)
{
// Test quest TWO (2) : quest/ep3_rodian_hunt_2.qst
int questId = questGetQuestId("quest/ep3_rodian_hunt_2");
questActivateQuest(questId, player, npc);
}
// ----------------------------------------------------------------------
void rodian_master_hunter_action_givequest_3 (obj_id player, obj_id npc)
{
// Test quest THREE (3) : quest/ep3_rodian_hunt_3.qst
int questId = questGetQuestId("quest/ep3_rodian_hunt_3");
questActivateQuest(questId, player, npc);
}
// ----------------------------------------------------------------------
void rodian_master_hunter_action_clearQuests (obj_id player, obj_id npc)
{
// REMOVE QUEST using the questClearQuest command
// Test quest: quest/kill_3_valarian_assassins.qst
int questId1 = questGetQuestId("quest/ep3_rodian_hunt_1");
int questId2 = questGetQuestId("quest/ep3_rodian_hunt_2");
int questId3 = questGetQuestId("quest/ep3_rodian_hunt_3");
questClearQuest(questId1, player);
questClearQuest(questId2, player);
questClearQuest(questId3, player);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int rodian_master_hunter_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: (Debug mode: Choose what quest leg to start with.)
//-- [RESPONSE NOTE]
//-- PLAYER: Begin Rodian Hunter Quest
if (response == "s_f76caf0d")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "greet");
//-- NPC: I am Bazeedo, the master hunter of this camp. How can I assist you?
string_id message = new string_id (c_stringFile, "s_4f44958");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm looking to hunt minkbats.
boolean hasResponse0 = false;
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Nevermind. Sorry to bother you.
boolean hasResponse1 = false;
if (rodian_master_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_1b60adb7");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_b322d10c");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 2);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Rodian Hunter Quest 2
if (response == "s_70b9c54e")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
//-- NPC: So, I may have underestimated you. Very impressive.
string_id message = new string_id (c_stringFile, "s_22552de0");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Let's talk business, Master Hunter.
boolean hasResponse0 = false;
if (rodian_master_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_a5029f4f");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Rodian Hunter Quest 3
if (response == "s_7478d8f9")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "gesticulate_wildly");
//-- NPC: You! Oh you've got to help me! You've just got to! They took my wife! Seething sithspawn! They kidnapped her and killed the guards I hired to protect her!
string_id message = new string_id (c_stringFile, "s_209dd993");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Who took her?
boolean hasResponse0 = false;
if (rodian_master_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_26be40e4");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Clear All Quests
if (response == "s_bf442f2b")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "manipulate_medium");
rodian_master_hunter_action_clearQuests (player, npc);
//-- NPC: All quests cleared.
string_id message = new string_id (c_stringFile, "s_a4a87d2e");
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I am Bazeedo, the master hunter of this camp. How can I assist you?
//-- [RESPONSE NOTE]
//-- PLAYER: I'm looking to hunt minkbats.
if (response == "s_1b60adb7")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "laugh");
//-- NPC: Ha! Ha! You don't hunt minkbats, my friend! WE hunt the minkbats... and you stay out of our way. How does that sound?
string_id message = new string_id (c_stringFile, "s_778073b");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds like you need a lesson in humility.
boolean hasResponse0 = false;
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I see. Sorry for disturbing you, sir.
boolean hasResponse1 = false;
if (rodian_master_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_24565fde");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_8060e7e7");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Nevermind. Sorry to bother you.
if (response == "s_b322d10c")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "goodbye");
//-- NPC: Farewell.
string_id message = new string_id (c_stringFile, "s_c8f2f3db");
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Ha! Ha! You don't hunt minkbats, my friend! WE hunt the minkbats... and you stay out of our way. How does that sound?
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds like you need a lesson in humility.
if (response == "s_24565fde")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "rub_chin_thoughtful");
//-- NPC: That so? How about a challenge? You destroy six of the pesky rill creatures that keep eating our supplies and I'll give you something very, very rare!
string_id message = new string_id (c_stringFile, "s_25e64541");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What will you give me?
boolean hasResponse0 = false;
if (rodian_master_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_e58a69b3");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I see. Sorry for disturbing you, sir.
if (response == "s_8060e7e7")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "belly_laugh");
//-- NPC: Ha! Ha! Ha! Get out of here!
string_id message = new string_id (c_stringFile, "s_33643147");
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: That so? How about a challenge? You destroy six of the pesky rill creatures that keep eating our supplies and I'll give you something very, very rare!
//-- [RESPONSE NOTE]
//-- PLAYER: What will you give me?
if (response == "s_e58a69b3")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "shrug_hands");
//-- NPC: Respect! What do you say?
string_id message = new string_id (c_stringFile, "s_1b0947c0");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: It's a deal.
boolean hasResponse0 = false;
if (rodian_master_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_ebe2e111");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Respect! What do you say?
//-- [RESPONSE NOTE]
//-- PLAYER: It's a deal.
if (response == "s_ebe2e111")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "goodbye");
rodian_master_hunter_action_givequest_1 (player, npc);
//-- NPC: Take out half a dozen of those stinking rills and come back here... if you survive!
string_id message = new string_id (c_stringFile, "s_7aa23112");
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: So, I may have underestimated you. Very impressive.
//-- [RESPONSE NOTE]
//-- PLAYER: Let's talk business, Master Hunter.
if (response == "s_a5029f4f")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "wave_finger_warning");
//-- NPC: You think you're going to make fat cred off minkbats on Kashyyyk, eh? Things are more complicated than that.
string_id message = new string_id (c_stringFile, "s_655743ba");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What do you mean?
boolean hasResponse0 = false;
if (rodian_master_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_77e48d5b");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You think you're going to make fat cred off minkbats on Kashyyyk, eh? Things are more complicated than that.
//-- [RESPONSE NOTE]
//-- PLAYER: What do you mean?
if (response == "s_77e48d5b")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "explain");
//-- NPC: We have enemies here, my friend. The Trandoshan slavers don't have enough work for everyone they drag down here. Many of them go searching for fortune on their own. Many become poachers! You want the fat cred, you first have to get rid of the poachers. Understand?
string_id message = new string_id (c_stringFile, "s_9a1effa7");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You want me to destroy some Trandoshan Slavers?
boolean hasResponse0 = false;
if (rodian_master_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_83c6aeb5");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: We have enemies here, my friend. The Trandoshan slavers don't have enough work for everyone they drag down here. Many of them go searching for fortune on their own. Many become poachers! You want the fat cred, you first have to get rid of the poachers. Understand?
//-- [RESPONSE NOTE]
//-- PLAYER: You want me to destroy some Trandoshan Slavers?
if (response == "s_83c6aeb5")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "dismiss");
//-- NPC: Precisely! Just a few of them. Let them know there's a new hunter in the forest, eh?
string_id message = new string_id (c_stringFile, "s_aa59fb42");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds good.
boolean hasResponse0 = false;
if (rodian_master_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_5e2a2bb1");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Precisely! Just a few of them. Let them know there's a new hunter in the forest, eh?
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds good.
if (response == "s_5e2a2bb1")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "goodbye");
rodian_master_hunter_action_givequest_2 (player, npc);
//-- NPC: Then off you go! Come back to me when you are done and we can talk about the minkbats...
string_id message = new string_id (c_stringFile, "s_821ae5c1");
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You! Oh you've got to help me! You've just got to! They took my wife! Seething sithspawn! They kidnapped her and killed the guards I hired to protect her!
//-- [RESPONSE NOTE]
//-- PLAYER: Who took her?
if (response == "s_26be40e4")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "weeping");
//-- NPC: It could only be those rotting Trandoshan slavers! No doubt planning to ransom her back to me for all the minkbat pelts I've collected in the last cycle. What am I going to do?
string_id message = new string_id (c_stringFile, "s_122e425b");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Steal her back!
boolean hasResponse0 = false;
if (rodian_master_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_d7099432");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: It could only be those rotting Trandoshan slavers! No doubt planning to ransom her back to me for all the minkbat pelts I've collected in the last cycle. What am I going to do?
//-- [RESPONSE NOTE]
//-- PLAYER: Steal her back!
if (response == "s_d7099432")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "pound_fist_palm");
//-- NPC: You've got courage, eh? Good! You stomp out there, split open a few Trandoshan Slaver heads and see if you can find out where they are holding my lovely wife!
string_id message = new string_id (c_stringFile, "s_b7e30f7");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: You think they'll have information on them?
boolean hasResponse0 = false;
if (rodian_master_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_a002e6b5");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You've got courage, eh? Good! You stomp out there, split open a few Trandoshan Slaver heads and see if you can find out where they are holding my lovely wife!
//-- [RESPONSE NOTE]
//-- PLAYER: You think they'll have information on them?
if (response == "s_a002e6b5")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "rub_chin_thoughtful");
//-- NPC: Of course! Trandoshans can't remember their own names! Every plan is written out and distributed to every follower. The master slaver is undoubtedly behind this!
string_id message = new string_id (c_stringFile, "s_87e9b381");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm on my way!
boolean hasResponse0 = false;
if (rodian_master_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_dc649bb3");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.rodian_master_hunter.branchId");
chat.chat (npc, player, message);
npcEndConversation (player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int rodian_master_hunter_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Of course! Trandoshans can't remember their own names! Every plan is written out and distributed to every follower. The master slaver is undoubtedly behind this!
//-- [RESPONSE NOTE]
//-- PLAYER: I'm on my way!
if (response == "s_dc649bb3")
{
//-- [NOTE]
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "goodbye");
rodian_master_hunter_action_givequest_3 (player, npc);
//-- NPC: Thank you! Be safe!
string_id message = new string_id (c_stringFile, "s_28ac27d1");
utils.removeScriptVar (player, "conversation.rodian_master_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.rodian_master_hunter");
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_SPACE_INTERESTING);
setInvulnerable (self, true);
setName (self, "Bazeedo (Master Hunter");
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setCondition (self, CONDITION_SPACE_INTERESTING);
setInvulnerable (self, true);
setName (self, "Bazeedo (Master Hunter");
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.rodian_master_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 (rodian_master_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "bow2");
//-- NPC: (Debug mode: Choose what quest leg to start with.)
string_id message = new string_id (c_stringFile, "s_7edbf98d");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Begin Rodian Hunter Quest
boolean hasResponse0 = false;
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Rodian Hunter Quest 2
boolean hasResponse1 = false;
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Rodian Hunter Quest 3
boolean hasResponse2 = false;
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
//-- PLAYER: Clear All Quests
boolean hasResponse3 = false;
if (rodian_master_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse3 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_f76caf0d");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_70b9c54e");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_7478d8f9");
if (hasResponse3)
responses [responseIndex++] = new string_id (c_stringFile, "s_bf442f2b");
utils.setScriptVar (player, "conversation.rodian_master_hunter.branchId", 1);
npcStartConversation (player, npc, "rodian_master_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 != "rodian_master_hunter")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.rodian_master_hunter.branchId");
if (branchId == 1 && rodian_master_hunter_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 2 && rodian_master_hunter_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && rodian_master_hunter_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && rodian_master_hunter_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && rodian_master_hunter_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && rodian_master_hunter_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && rodian_master_hunter_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && rodian_master_hunter_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && rodian_master_hunter_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && rodian_master_hunter_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && rodian_master_hunter_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && rodian_master_hunter_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && rodian_master_hunter_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.rodian_master_hunter.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================