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

1770 lines
77 KiB
Java
Executable File

package script.conversation;
import script.library.*;
import script.*;
public class c_newbie_secondchance extends script.base_script
{
public c_newbie_secondchance()
{
}
public static String c_stringFile = "conversation/c_newbie_secondchance";
public boolean c_newbie_secondchance_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public boolean c_newbie_secondchance_condition_combatHigh(obj_id player, obj_id npc) throws InterruptedException
{
if ((combat.getLevel(player)) > 9)
{
return true;
}
return false;
}
public boolean c_newbie_secondchance_condition_combatLow(obj_id player, obj_id npc) throws InterruptedException
{
if ((combat.getLevel(player)) < 10)
{
return true;
}
return false;
}
public boolean c_newbie_secondchance_condition_safety(obj_id player, obj_id npc) throws InterruptedException
{
return false;
}
public boolean c_newbie_secondchance_condition_impOnQuest(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "tatooine_eisley_gotoimp");
}
public boolean c_newbie_secondchance_condition_smugOnQuest(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "tatooine_eisley_gotosmug");
}
public boolean c_newbie_secondchance_condition_rebOnQuest(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "tatooine_eisley_gotoreb");
}
public boolean c_newbie_secondchance_condition_pilotOnQuest(obj_id player, obj_id npc) throws InterruptedException
{
boolean imp = groundquests.isQuestActive(player, "quest/tatooine_eisley_gotoimp");
boolean reb = groundquests.isQuestActive(player, "tatooine_eisley_gotoreb");
boolean smug = groundquests.isQuestActive(player, "tatooine_eisley_gotosmug");
if (imp || reb || smug)
{
return false;
}
return true;
}
public boolean c_newbie_secondchance_condition_trehlaOnQuest(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActiveOrComplete(player, "tatooine_eisley_gototrehla_v2");
}
public boolean c_newbie_secondchance_condition_newbieStart(obj_id player, obj_id npc) throws InterruptedException
{
boolean niko = groundquests.isQuestActiveOrComplete(player, "tatooine_eisley_gotoniko");
boolean mayor = groundquests.isQuestActiveOrComplete(player, "tatooine_eisley_gotomayor");
if (niko || mayor)
{
return false;
}
return true;
}
public boolean c_newbie_secondchance_condition_mayorAndTen(obj_id player, obj_id npc) throws InterruptedException
{
return ((groundquests.hasCompletedQuest(player, "newbie_scout_pt6") || groundquests.hasCompletedQuest(player, "purvis_kill_warriors") || groundquests.hasCompletedQuest(player, "newbie_mayor_vaigon_shinn")) && (c_newbie_secondchance_condition_combatHigh(player, npc)));
}
public boolean c_newbie_secondchance_condition_bibOnQuest(obj_id player, obj_id npc) throws InterruptedException
{
boolean niko = groundquests.isQuestActive(player, "tatooine_eisley_gotoniko");
boolean mayor = groundquests.isQuestActive(player, "tatooine_eisley_gotomayor");
if (niko || mayor)
{
return true;
}
return false;
}
public boolean c_newbie_secondchance_condition_isAcquiringVehicle(obj_id player, obj_id npc) throws InterruptedException
{
if (groundquests.isQuestActive(player, "quest/steal_speeder") || groundquests.isQuestActive(player, "quest/build_speeder"))
{
return true;
}
return false;
}
public boolean c_newbie_secondchance_condition_needsVehicle(obj_id player, obj_id npc) throws InterruptedException
{
if (groundquests.hasCompletedQuest(player, "quest/build_speeder") || groundquests.hasCompletedQuest(player, "quest/steal_speeder"))
{
return false;
}
return true;
}
public boolean c_newbie_secondchance_condition_alreadyOnNiko(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActiveOrComplete(player, "tatooine_eisley_nikos_coins");
}
public boolean c_newbie_secondchance_condition_allComplete(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "tatooine_eisley_faceevil");
}
public boolean c_newbie_secondchance_condition_onTrehla(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.isQuestActive(player, "quest/c_newbie_quest1") || groundquests.isQuestActive(player, "quest/c_newbie_quest1a") || groundquests.isQuestActive(player, "quest/c_newbie_quest4") || groundquests.isQuestActive(player, "quest/c_newbie_quest5") || groundquests.isQuestActive(player, "quest/c_newbie_quest6") || groundquests.isQuestActive(player, "quest/tatooine_eisley_gototrehla_v2"));
}
public boolean c_newbie_secondchance_condition_FinishedAllMayor(obj_id player, obj_id npc) throws InterruptedException
{
return (groundquests.hasCompletedQuest(player, "newbie_scout_pt6") && groundquests.hasCompletedQuest(player, "purvis_kill_warriors") && groundquests.hasCompletedQuest(player, "newbie_mayor_vaigon_shinn"));
}
public boolean c_newbie_secondchance_condition_fromMayor(obj_id player, obj_id npc) throws InterruptedException
{
return (c_newbie_secondchance_condition_mayorAndTen(player, npc) || c_newbie_secondchance_condition_FinishedAllMayor(player, npc));
}
public void c_newbie_secondchance_action_signalOffer(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "tat_eisley_legacy_e2");
}
public void c_newbie_secondchance_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException
{
faceTo(npc, player);
}
public void c_newbie_secondchance_action_sendToMajolnir(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "tat_eisley_legacy_e2");
groundquests.requestGrantQuest(player, "quest/find_majolnir");
}
public void c_newbie_secondchance_action_signalGotoVourk(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "newbie_goto_vourk");
}
public void c_newbie_secondchance_action_facePlayerAndSignalVourk(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "newbie_goto_vourk");
faceTo(npc, player);
}
public void c_newbie_secondchance_action_grantImp(obj_id player, obj_id npc) throws InterruptedException
{
int questId = questGetQuestId("quest/tatooine_eisley_gotoimp");
groundquests.grantQuest(questId, player, npc, true);
}
public void c_newbie_secondchance_action_grantReb(obj_id player, obj_id npc) throws InterruptedException
{
int questId = questGetQuestId("quest/tatooine_eisley_gotoreb");
groundquests.grantQuest(questId, player, npc, true);
}
public void c_newbie_secondchance_action_grantSmug(obj_id player, obj_id npc) throws InterruptedException
{
int questId = questGetQuestId("quest/tatooine_eisley_gotosmug");
groundquests.grantQuest(questId, player, npc, true);
}
public void c_newbie_secondchance_action_grantTrehla(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "tatooine_eisley_gototrehla_v2");
}
public void c_newbie_secondchance_action_grantStart(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "tat_eisley_legacy_e2");
if ((combat.getLevel(player)) > 9)
{
int questId = questGetQuestId("quest/tatooine_eisley_gotoniko");
groundquests.grantQuest(questId, player, npc, true);
}
else
{
int questId1 = questGetQuestId("quest/tatooine_eisley_gotomayor");
groundquests.grantQuest(questId1, player, npc, true);
}
}
public void c_newbie_secondchance_action_grantTalkNiko(obj_id player, obj_id npc) throws InterruptedException
{
int questId = questGetQuestId("quest/tatooine_eisley_talkniko");
groundquests.grantQuest(questId, player, npc, true);
}
public int c_newbie_secondchance_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_86"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_newbie_secondchance.branchId", 4);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_90"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_newbie_secondchance.branchId", 5);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_94"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_forward");
c_newbie_secondchance_action_grantTalkNiko(player, npc);
string_id message = new string_id(c_stringFile, "s_96");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_100"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "nervous");
string_id message = new string_id(c_stringFile, "s_102");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_104");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 8);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_108"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_110");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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.c_newbie_secondchance.branchId", 10);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_104"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_106");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_112"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_114");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_62"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "wave_finger_warning");
string_id message = new string_id(c_stringFile, "s_63");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_118"))
{
c_newbie_secondchance_action_signalGotoVourk(player, npc);
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_120");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_newbie_secondchance_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_122");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_170");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_122"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_124");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_126");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_170"))
{
doAnimationAction(player, "shake_head_no");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "poke");
string_id message = new string_id(c_stringFile, "s_172");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_64");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 28);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_126"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_128");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_130");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 17);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch17(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_130"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_132");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest(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_134");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_138");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_142");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_134"))
{
doAnimationAction(player, "nod");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shoo");
c_newbie_secondchance_action_grantStart(player, npc);
string_id message = new string_id(c_stringFile, "s_136");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_138"))
{
doAnimationAction(player, "shrug_shoulders");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
c_newbie_secondchance_action_grantTrehla(player, npc);
string_id message = new string_id(c_stringFile, "s_140");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_142"))
{
doAnimationAction(player, "shrug_hands");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_144");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_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_146");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_154");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_162");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 21);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_146"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_148");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_150");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 22);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_154"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_156");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_158");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 24);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_162"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_164");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_166");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 26);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_150"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
c_newbie_secondchance_action_grantImp(player, npc);
string_id message = new string_id(c_stringFile, "s_152");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest(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_134");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_138");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_142");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch23(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_134"))
{
doAnimationAction(player, "nod");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shoo");
c_newbie_secondchance_action_grantStart(player, npc);
string_id message = new string_id(c_stringFile, "s_136");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_138"))
{
doAnimationAction(player, "shrug_shoulders");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
c_newbie_secondchance_action_grantTrehla(player, npc);
string_id message = new string_id(c_stringFile, "s_140");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_142"))
{
doAnimationAction(player, "shrug_hands");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_144");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_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_146");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_154");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_162");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 21);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch24(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_158"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
c_newbie_secondchance_action_grantSmug(player, npc);
string_id message = new string_id(c_stringFile, "s_160");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest(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_134");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_138");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_142");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch25(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_134"))
{
doAnimationAction(player, "nod");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shoo");
c_newbie_secondchance_action_grantStart(player, npc);
string_id message = new string_id(c_stringFile, "s_136");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_138"))
{
doAnimationAction(player, "shrug_shoulders");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
c_newbie_secondchance_action_grantTrehla(player, npc);
string_id message = new string_id(c_stringFile, "s_140");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_142"))
{
doAnimationAction(player, "shrug_hands");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_144");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_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_146");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_154");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_162");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 21);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch26(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_166"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
c_newbie_secondchance_action_grantReb(player, npc);
string_id message = new string_id(c_stringFile, "s_168");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest(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_134");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_138");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_142");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch27(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_134"))
{
doAnimationAction(player, "nod");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shoo");
c_newbie_secondchance_action_grantStart(player, npc);
string_id message = new string_id(c_stringFile, "s_136");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_138"))
{
doAnimationAction(player, "shrug_shoulders");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
c_newbie_secondchance_action_grantTrehla(player, npc);
string_id message = new string_id(c_stringFile, "s_140");
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_142"))
{
doAnimationAction(player, "shrug_hands");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_144");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_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_146");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_154");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_162");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 21);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch28(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_64"))
{
doAnimationAction(player, "shrug_hands");
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "rub_chin_thoughtful");
string_id message = new string_id(c_stringFile, "s_66");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_68");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 29);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch29(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_68"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_70");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_72");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 30);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch30(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_72"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_74");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_76");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 31);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch31(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_76"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_79");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_83");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 32);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int c_newbie_secondchance_handleBranch32(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_83"))
{
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_132");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (!c_newbie_secondchance_condition_trehlaOnQuest(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
boolean hasResponse2 = false;
if (c_newbie_secondchance_condition_pilotOnQuest(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_134");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_138");
}
if (hasResponse2)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_142");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.c_newbie_secondchance.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_newbie_secondchance");
}
setCondition(self, CONDITION_CONVERSABLE);
setCondition(self, CONDITION_INTERESTING);
setInvulnerable(self, true);
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);
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.c_newbie_secondchance");
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_newbie_secondchance_condition_allComplete(player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk(player, npc);
string_id message = new string_id(c_stringFile, "s_60");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (c_newbie_secondchance_condition_alreadyOnNiko(player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk(player, npc);
string_id message = new string_id(c_stringFile, "s_59");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (c_newbie_secondchance_condition_fromMayor(player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk(player, npc);
string_id message = new string_id(c_stringFile, "s_84");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_86");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 3);
npcStartConversation(player, npc, "c_newbie_secondchance", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (c_newbie_secondchance_condition_bibOnQuest(player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk(player, npc);
string_id message = new string_id(c_stringFile, "s_98");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (c_newbie_secondchance_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_100");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_108");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 7);
npcStartConversation(player, npc, "c_newbie_secondchance", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (c_newbie_secondchance_condition_onTrehla(player, npc))
{
string_id message = new string_id(c_stringFile, "s_61");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_62");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 12);
npcStartConversation(player, npc, "c_newbie_secondchance", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (c_newbie_secondchance_condition_newbieStart(player, npc))
{
c_newbie_secondchance_action_facePlayerAndSignalVourk(player, npc);
string_id message = new string_id(c_stringFile, "s_116");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (c_newbie_secondchance_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_118");
}
utils.setScriptVar(player, "conversation.c_newbie_secondchance.branchId", 14);
npcStartConversation(player, npc, "c_newbie_secondchance", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (c_newbie_secondchance_condition__defaultCondition(player, npc))
{
c_newbie_secondchance_action_signalGotoVourk(player, npc);
string_id message = new string_id(c_stringFile, "s_200");
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_newbie_secondchance"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.c_newbie_secondchance.branchId");
if (branchId == 3 && c_newbie_secondchance_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 4 && c_newbie_secondchance_handleBranch4(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 5 && c_newbie_secondchance_handleBranch5(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 7 && c_newbie_secondchance_handleBranch7(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 8 && c_newbie_secondchance_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 10 && c_newbie_secondchance_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 12 && c_newbie_secondchance_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 14 && c_newbie_secondchance_handleBranch14(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 15 && c_newbie_secondchance_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 16 && c_newbie_secondchance_handleBranch16(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 17 && c_newbie_secondchance_handleBranch17(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 18 && c_newbie_secondchance_handleBranch18(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 21 && c_newbie_secondchance_handleBranch21(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 22 && c_newbie_secondchance_handleBranch22(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 23 && c_newbie_secondchance_handleBranch23(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 24 && c_newbie_secondchance_handleBranch24(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 25 && c_newbie_secondchance_handleBranch25(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 26 && c_newbie_secondchance_handleBranch26(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 27 && c_newbie_secondchance_handleBranch27(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 28 && c_newbie_secondchance_handleBranch28(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 29 && c_newbie_secondchance_handleBranch29(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 30 && c_newbie_secondchance_handleBranch30(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 31 && c_newbie_secondchance_handleBranch31(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 32 && c_newbie_secondchance_handleBranch32(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_newbie_secondchance.branchId");
return SCRIPT_CONTINUE;
}
}