Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/tatooine_eisley_kashi.java
T
2018-06-07 00:32:29 +01:00

1273 lines
54 KiB
Java
Executable File

package script.conversation;
import script.library.ai_lib;
import script.library.chat;
import script.library.groundquests;
import script.library.utils;
import script.*;
public class tatooine_eisley_kashi extends script.base_script
{
public tatooine_eisley_kashi()
{
}
public static String c_stringFile = "conversation/tatooine_eisley_kashi";
public boolean tatooine_eisley_kashi_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public boolean tatooine_eisley_kashi_condition_drenOnTask(obj_id player, obj_id npc) throws InterruptedException
{
int questId1 = questGetQuestId("quest/tatooine_eisley_drensjustice");
int tat_eisley_drensjustice_e1 = groundquests.getTaskId(questId1, "tat_eisley_drensjustice_e1");
boolean onTask = questIsTaskActive(questId1, tat_eisley_drensjustice_e1, player);
return onTask;
}
public boolean tatooine_eisley_kashi_condition_heirQuestComplete(obj_id player, obj_id npc) throws InterruptedException
{
int questId1 = questGetQuestId("quest/tatooine_eisley_heirloom");
boolean OnTask = (questIsQuestComplete(questId1, player));
return OnTask;
}
public boolean tatooine_eisley_kashi_condition_sodQuestComplete(obj_id player, obj_id npc) throws InterruptedException
{
int questId1 = questGetQuestId("quest/tatooine_eisley_spice_of_death");
boolean OnTask = (questIsQuestComplete(questId1, player));
return OnTask;
}
public boolean tatooine_eisley_kashi_condition_haQuestComplete(obj_id player, obj_id npc) throws InterruptedException
{
int questId1 = questGetQuestId("quest/tatooine_eisley_hidden_agenda");
boolean OnTask = (questIsQuestComplete(questId1, player));
return OnTask;
}
public boolean tatooine_eisley_kashi_condition_heirTaskComplete(obj_id player, obj_id npc) throws InterruptedException
{
int questId1 = questGetQuestId("quest/tatooine_eisley_heirloom");
int tat_eisley_heirloom_e2 = groundquests.getTaskId(questId1, "tat_eisley_heirloom_e2");
boolean onTask = questIsTaskActive(questId1, tat_eisley_heirloom_e2, player);
return onTask;
}
public boolean tatooine_eisley_kashi_condition_drenQuestComplete(obj_id player, obj_id npc) throws InterruptedException
{
int questId1 = questGetQuestId("quest/tatooine_eisley_drensjustice");
boolean OnTask = (questIsQuestComplete(questId1, player));
return OnTask;
}
public boolean tatooine_eisley_kashi_condition_blocker(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestDisabled("tatooine_eisley_heirloom");
}
public void tatooine_eisley_kashi_action_grantMEDQuest(obj_id player, obj_id npc) throws InterruptedException
{
int questId = questGetQuestId("quest/tatooine_eisley_heirloom");
groundquests.grantQuest(questId, player, npc, true);
}
public void tatooine_eisley_kashi_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException
{
faceTo(npc, player);
}
public void tatooine_eisley_kashi_action_signalMEDReward(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "tat_eisley_heirloom_e2");
}
public void tatooine_eisley_kashi_action_grantDRENQuest(obj_id player, obj_id npc) throws InterruptedException
{
int questId = questGetQuestId("quest/tatooine_eisley_drensjustice");
groundquests.grantQuest(questId, player, npc, true);
}
public int tatooine_eisley_kashi_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_87"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_89");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 3);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_89"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_90");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_84"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_85");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_79"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "weeping");
tatooine_eisley_kashi_action_grantDRENQuest(player, npc);
string_id message = new string_id(c_stringFile, "s_80");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_108");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 8);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_108"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_109");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_110");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 9);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_110"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_111");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_112");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 10);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_112"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
tatooine_eisley_kashi_action_grantDRENQuest(player, npc);
string_id message = new string_id(c_stringFile, "s_113");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_23"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_25");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (tatooine_eisley_kashi_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_27");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_68");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_27"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_29");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (tatooine_eisley_kashi_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_42");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_64");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_68"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_70");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (tatooine_eisley_kashi_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_72");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_74");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 21);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_42"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_44");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_46");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_64"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_66");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_46"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_48");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (tatooine_eisley_kashi_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_50");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_52");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_50"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_58");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_52"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_54");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (tatooine_eisley_kashi_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_56");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_60");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 17);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_56"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_58");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_60"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_62");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_72"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_44");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_46");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_74"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_66");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_59"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_63");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_67");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 23);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_67"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_71");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (tatooine_eisley_kashi_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_75");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_96");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 24);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_75"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_77");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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.tatooine_eisley_kashi.branchId", 25);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_96"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_100");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 27);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_82"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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.tatooine_eisley_kashi.branchId", 26);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_94"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_100");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 27);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_100"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
tatooine_eisley_kashi_action_grantMEDQuest(player, npc);
string_id message = new string_id(c_stringFile, "s_102");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
chat.chat(npc, player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int tatooine_eisley_kashi_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_106"))
{
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_114");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.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.tatooine_eisley_kashi");
}
setCondition(self, CONDITION_CONVERSABLE);
setCondition(self, CONDITION_INTERESTING);
setInvulnerable(self, true);
setName(self, "Kashi VanDeef");
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
setCondition(self, CONDITION_INTERESTING);
setInvulnerable(self, true);
setName(self, "Kashi VanDeef");
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
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.tatooine_eisley_kashi");
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 (tatooine_eisley_kashi_condition_blocker(player, npc))
{
string_id message = new string_id(c_stringFile, "s_115");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (tatooine_eisley_kashi_condition_drenQuestComplete(player, npc))
{
tatooine_eisley_kashi_action_facePlayer(player, npc);
string_id message = new string_id(c_stringFile, "s_86");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_87");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 2);
npcStartConversation(player, npc, "tatooine_eisley_kashi", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (tatooine_eisley_kashi_condition_drenOnTask(player, npc))
{
tatooine_eisley_kashi_action_facePlayer(player, npc);
string_id message = new string_id(c_stringFile, "s_83");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_84");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 5);
npcStartConversation(player, npc, "tatooine_eisley_kashi", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (tatooine_eisley_kashi_condition_heirQuestComplete(player, npc))
{
tatooine_eisley_kashi_action_facePlayer(player, npc);
string_id message = new string_id(c_stringFile, "s_78");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_79");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 7);
npcStartConversation(player, npc, "tatooine_eisley_kashi", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (tatooine_eisley_kashi_condition_haQuestComplete(player, npc))
{
tatooine_eisley_kashi_action_facePlayer(player, npc);
string_id message = new string_id(c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_23");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 12);
npcStartConversation(player, npc, "tatooine_eisley_kashi", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (tatooine_eisley_kashi_condition_sodQuestComplete(player, npc))
{
tatooine_eisley_kashi_action_facePlayer(player, npc);
string_id message = new string_id(c_stringFile, "s_55");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_59");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 22);
npcStartConversation(player, npc, "tatooine_eisley_kashi", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (tatooine_eisley_kashi_condition__defaultCondition(player, npc))
{
tatooine_eisley_kashi_action_facePlayer(player, npc);
string_id message = new string_id(c_stringFile, "s_104");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (tatooine_eisley_kashi_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_106");
}
utils.setScriptVar(player, "conversation.tatooine_eisley_kashi.branchId", 29);
npcStartConversation(player, npc, "tatooine_eisley_kashi", 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("tatooine_eisley_kashi"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
if (branchId == 2 && tatooine_eisley_kashi_handleBranch2(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 3 && tatooine_eisley_kashi_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 5 && tatooine_eisley_kashi_handleBranch5(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 7 && tatooine_eisley_kashi_handleBranch7(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 8 && tatooine_eisley_kashi_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 9 && tatooine_eisley_kashi_handleBranch9(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 10 && tatooine_eisley_kashi_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 12 && tatooine_eisley_kashi_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 13 && tatooine_eisley_kashi_handleBranch13(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 14 && tatooine_eisley_kashi_handleBranch14(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 15 && tatooine_eisley_kashi_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 16 && tatooine_eisley_kashi_handleBranch16(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 17 && tatooine_eisley_kashi_handleBranch17(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 21 && tatooine_eisley_kashi_handleBranch21(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 22 && tatooine_eisley_kashi_handleBranch22(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 23 && tatooine_eisley_kashi_handleBranch23(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 24 && tatooine_eisley_kashi_handleBranch24(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 25 && tatooine_eisley_kashi_handleBranch25(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 26 && tatooine_eisley_kashi_handleBranch26(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 27 && tatooine_eisley_kashi_handleBranch27(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 29 && tatooine_eisley_kashi_handleBranch29(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.tatooine_eisley_kashi.branchId");
return SCRIPT_CONTINUE;
}
}