Files
2018-06-07 00:32:29 +01:00

1568 lines
66 KiB
Java
Executable File

package script.conversation;
import script.library.ai_lib;
import script.library.chat;
import script.library.utils;
import script.*;
public class c_kashyyyk_hunter extends script.base_script
{
public c_kashyyyk_hunter()
{
}
public static String c_stringFile = "conversation/c_kashyyyk_hunter";
public boolean c_kashyyyk_hunter_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public void c_kashyyyk_hunter_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException
{
faceTo(npc, player);
}
public int c_kashyyyk_hunter_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_6"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "pose_proudly");
string_id message = new string_id(c_stringFile, "s_8");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_10");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_50");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_51");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 2);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_35"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "pose_proudly");
string_id message = new string_id(c_stringFile, "s_37");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_39");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_70");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_72");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 8);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_74"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "waft");
string_id message = new string_id(c_stringFile, "s_76");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_78");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_102");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_104");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_10"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "nod_head_multiple");
string_id message = new string_id(c_stringFile, "s_12");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_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_14");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_56");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 3);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_50"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_to_self");
string_id message = new string_id(c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_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_43");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_68");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 9);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_51"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "pose_proudly");
string_id message = new string_id(c_stringFile, "s_80");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_82");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_14"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "waft");
string_id message = new string_id(c_stringFile, "s_16");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_18");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_59");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_60");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 4);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_56"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "waft");
string_id message = new string_id(c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_47");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_64");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_66");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 10);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_18"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_right");
string_id message = new string_id(c_stringFile, "s_20");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_22");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 5);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_59"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_right");
string_id message = new string_id(c_stringFile, "s_49");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_53");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 11);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_60"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_right");
string_id message = new string_id(c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_90");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 17);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_22"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "slow_down");
string_id message = new string_id(c_stringFile, "s_24");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_26");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 6);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_26"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "goodbye");
string_id message = new string_id(c_stringFile, "s_28");
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_39"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_to_self");
string_id message = new string_id(c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_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_43");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_68");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 9);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_70"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "nod_head_multiple");
string_id message = new string_id(c_stringFile, "s_12");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_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_14");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_56");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 3);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_72"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "pose_proudly");
string_id message = new string_id(c_stringFile, "s_80");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_82");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_43"))
{
doAnimationAction(player, "point_away");
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "waft");
string_id message = new string_id(c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_47");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_64");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_66");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 10);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_68"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "waft");
string_id message = new string_id(c_stringFile, "s_16");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_18");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_59");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_60");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 4);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_47"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_right");
string_id message = new string_id(c_stringFile, "s_49");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_53");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 11);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_64"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_right");
string_id message = new string_id(c_stringFile, "s_20");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_22");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 5);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_66"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_right");
string_id message = new string_id(c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_90");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 17);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_53"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "slow_down");
string_id message = new string_id(c_stringFile, "s_55");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_58");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 12);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_58"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "goodbye");
string_id message = new string_id(c_stringFile, "s_62");
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_78"))
{
doAnimationAction(player, "point_away");
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "pose_proudly");
string_id message = new string_id(c_stringFile, "s_80");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_82");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_102"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "nod_head_multiple");
string_id message = new string_id(c_stringFile, "s_12");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_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_14");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_56");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 3);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_104"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_to_self");
string_id message = new string_id(c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_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_43");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_68");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 9);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_82"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "dream");
string_id message = new string_id(c_stringFile, "s_84");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_86");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_98");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_100");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_86"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_right");
string_id message = new string_id(c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_90");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 17);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_98"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_right");
string_id message = new string_id(c_stringFile, "s_20");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_22");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 5);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_100"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_to_self");
string_id message = new string_id(c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_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_43");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_68");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 9);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_90"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "slow_down");
string_id message = new string_id(c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_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_94");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_kashyyyk_hunter_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_94"))
{
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "goodbye");
string_id message = new string_id(c_stringFile, "s_96");
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if ((!isMob(self)) || (isPlayer(self)))
{
detachScript(self, "conversation.c_kashyyyk_hunter");
}
setCondition(self, CONDITION_CONVERSABLE);
setInvulnerable(self, true);
setName(self, "Hunter Javeezo");
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
setInvulnerable(self, true);
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
setName(self, "Hunter Javeezo");
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.c_kashyyyk_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 (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "greet");
c_kashyyyk_hunter_action_facePlayer(player, npc);
string_id message = new string_id(c_stringFile, "s_4");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses[] = new string_id[numberOfResponses];
if (hasResponse0)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_6");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_35");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_74");
}
utils.setScriptVar(player, "conversation.c_kashyyyk_hunter.branchId", 1);
npcStartConversation(player, npc, "c_kashyyyk_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("c_kashyyyk_hunter"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
if (branchId == 1 && c_kashyyyk_hunter_handleBranch1(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 2 && c_kashyyyk_hunter_handleBranch2(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 3 && c_kashyyyk_hunter_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 4 && c_kashyyyk_hunter_handleBranch4(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 5 && c_kashyyyk_hunter_handleBranch5(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 6 && c_kashyyyk_hunter_handleBranch6(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 8 && c_kashyyyk_hunter_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 9 && c_kashyyyk_hunter_handleBranch9(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 10 && c_kashyyyk_hunter_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 11 && c_kashyyyk_hunter_handleBranch11(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 12 && c_kashyyyk_hunter_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 14 && c_kashyyyk_hunter_handleBranch14(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 15 && c_kashyyyk_hunter_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 16 && c_kashyyyk_hunter_handleBranch16(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 17 && c_kashyyyk_hunter_handleBranch17(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 18 && c_kashyyyk_hunter_handleBranch18(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.c_kashyyyk_hunter.branchId");
return SCRIPT_CONTINUE;
}
}