mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-13 22:01:04 -04:00
809 lines
35 KiB
Java
Executable File
809 lines
35 KiB
Java
Executable File
package script.conversation;
|
|
|
|
import script.library.ai_lib;
|
|
import script.library.chat;
|
|
import script.library.utils;
|
|
import script.*;
|
|
|
|
public class rodian_master_hunter extends script.base_script
|
|
{
|
|
public rodian_master_hunter()
|
|
{
|
|
}
|
|
public static String c_stringFile = "conversation/rodian_master_hunter";
|
|
public boolean rodian_master_hunter_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return true;
|
|
}
|
|
public boolean rodian_master_hunter_condition_isGenderMale(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return (getGender(player) == GENDER_MALE);
|
|
}
|
|
public boolean rodian_master_hunter_condition_isSpeciesRodian(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
return (getSpecies(player) == SPECIES_RODIAN);
|
|
}
|
|
public void rodian_master_hunter_action_givequest_1(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunt_1");
|
|
questActivateQuest(questId, player, npc);
|
|
}
|
|
public void rodian_master_hunter_action_givequest_2(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunt_2");
|
|
questActivateQuest(questId, player, npc);
|
|
}
|
|
public void rodian_master_hunter_action_givequest_3(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
int questId = questGetQuestId("quest/ep3_rodian_hunt_3");
|
|
questActivateQuest(questId, player, npc);
|
|
}
|
|
public void rodian_master_hunter_action_clearQuests(obj_id player, obj_id npc) throws InterruptedException
|
|
{
|
|
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);
|
|
}
|
|
public int rodian_master_hunter_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_f76caf0d"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "greet");
|
|
string_id message = new string_id(c_stringFile, "s_4f44958");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
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;
|
|
}
|
|
}
|
|
if (response.equals("s_70b9c54e"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
string_id message = new string_id(c_stringFile, "s_22552de0");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
}
|
|
if (response.equals("s_7478d8f9"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "gesticulate_wildly");
|
|
string_id message = new string_id(c_stringFile, "s_209dd993");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
}
|
|
if (response.equals("s_bf442f2b"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "manipulate_medium");
|
|
rodian_master_hunter_action_clearQuests(player, npc);
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_1b60adb7"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "laugh");
|
|
string_id message = new string_id(c_stringFile, "s_778073b");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
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;
|
|
}
|
|
}
|
|
if (response.equals("s_b322d10c"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "goodbye");
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_24565fde"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "rub_chin_thoughtful");
|
|
string_id message = new string_id(c_stringFile, "s_25e64541");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
}
|
|
if (response.equals("s_8060e7e7"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "belly_laugh");
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_e58a69b3"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "shrug_hands");
|
|
string_id message = new string_id(c_stringFile, "s_1b0947c0");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_ebe2e111"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "goodbye");
|
|
rodian_master_hunter_action_givequest_1(player, npc);
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_a5029f4f"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "wave_finger_warning");
|
|
string_id message = new string_id(c_stringFile, "s_655743ba");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_77e48d5b"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "explain");
|
|
string_id message = new string_id(c_stringFile, "s_9a1effa7");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_83c6aeb5"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "dismiss");
|
|
string_id message = new string_id(c_stringFile, "s_aa59fb42");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_5e2a2bb1"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "goodbye");
|
|
rodian_master_hunter_action_givequest_2(player, npc);
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_26be40e4"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "weeping");
|
|
string_id message = new string_id(c_stringFile, "s_122e425b");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_d7099432"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "pound_fist_palm");
|
|
string_id message = new string_id(c_stringFile, "s_b7e30f7");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_a002e6b5"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "rub_chin_thoughtful");
|
|
string_id message = new string_id(c_stringFile, "s_87e9b381");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
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;
|
|
}
|
|
public int rodian_master_hunter_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
|
{
|
|
if (response.equals("s_dc649bb3"))
|
|
{
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "goodbye");
|
|
rodian_master_hunter_action_givequest_3(player, npc);
|
|
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;
|
|
}
|
|
public int OnInitialize(obj_id self) throws InterruptedException
|
|
{
|
|
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;
|
|
}
|
|
public int OnAttach(obj_id self) throws InterruptedException
|
|
{
|
|
setCondition(self, CONDITION_CONVERSABLE);
|
|
setCondition(self, CONDITION_SPACE_INTERESTING);
|
|
setInvulnerable(self, true);
|
|
setName(self, "Bazeedo (Master Hunter");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException
|
|
{
|
|
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;
|
|
}
|
|
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
|
|
{
|
|
clearCondition(self, CONDITION_CONVERSABLE);
|
|
detachScript(self, "conversation.rodian_master_hunter");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public boolean npcStartConversation(obj_id player, obj_id npc, String convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) throws InterruptedException
|
|
{
|
|
Object[] objects = new Object[responses.length];
|
|
System.arraycopy(responses, 0, objects, 0, responses.length);
|
|
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
|
|
}
|
|
public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException
|
|
{
|
|
obj_id npc = self;
|
|
if (ai_lib.isInCombat(npc) || ai_lib.isInCombat(player))
|
|
{
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
doAnimationAction(npc, "bow2");
|
|
string_id message = new string_id(c_stringFile, "s_7edbf98d");
|
|
int numberOfResponses = 0;
|
|
boolean hasResponse = false;
|
|
boolean hasResponse0 = false;
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
boolean hasResponse1 = false;
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
boolean hasResponse2 = false;
|
|
if (rodian_master_hunter_condition__defaultCondition(player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
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;
|
|
}
|
|
public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException
|
|
{
|
|
if (!conversationId.equals("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;
|
|
}
|
|
}
|