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

1066 lines
45 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 talus_dearic_jana extends script.base_script
{
public talus_dearic_jana()
{
}
public static String c_stringFile = "conversation/talus_dearic_jana";
public boolean talus_dearic_jana_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException
{
return true;
}
public boolean talus_dearic_jana_condition_onBetterGenetics(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "talus_nashal_better_genetics");
}
public boolean talus_dearic_jana_condition_notOnBetterGenetics(obj_id player, obj_id npc) throws InterruptedException
{
return !groundquests.isQuestActive(player, "talus_nashal_better_genetics");
}
public boolean talus_dearic_jana_condition_completeAdaptiveBiology(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.hasCompletedQuest(player, "talus_dearic_adaptive_biology");
}
public boolean talus_dearic_jana_condition_onAdaptiveBiology(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isQuestActive(player, "talus_dearic_adaptive_biology");
}
public boolean talus_dearic_jana_condition_returnAdaptiveBiology(obj_id player, obj_id npc) throws InterruptedException
{
return groundquests.isTaskActive(player, "talus_dearic_adaptive_biology", "adaptive_biology_signal_01_02");
}
public void talus_dearic_jana_action_grantAdaptiveBiology(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.grantQuest(player, "talus_dearic_adaptive_biology");
}
public void talus_dearic_jana_action_signalAdaptiveBiology(obj_id player, obj_id npc) throws InterruptedException
{
groundquests.sendSignal(player, "adaptive_biology_signal_01_02");
}
public int talus_dearic_jana_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_28"))
{
doAnimationAction(player, "thumb_up");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
talus_dearic_jana_action_signalAdaptiveBiology(player, npc);
string_id message = new string_id(c_stringFile, "s_29");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_30");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 3);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_30"))
{
doAnimationAction(player, "wtf");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "explain");
string_id message = new string_id(c_stringFile, "s_31");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_32");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 4);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_32"))
{
doAnimationAction(player, "nod");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "wave1");
string_id message = new string_id(c_stringFile, "s_33");
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_24"))
{
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_accusingly");
string_id message = new string_id(c_stringFile, "s_25");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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.talus_dearic_jana.branchId", 7);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch7(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_26"))
{
doAnimationAction(player, "beckon");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "sigh_deeply");
string_id message = new string_id(c_stringFile, "s_27");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_52");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch8(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_52"))
{
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shake_head_disgust");
string_id message = new string_id(c_stringFile, "s_54");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_56");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch9(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_19"))
{
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "rub_chin_thoughtful");
string_id message = new string_id(c_stringFile, "s_34");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_36");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 10);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_64"))
{
doAnimationAction(player, "explain");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "explain");
string_id message = new string_id(c_stringFile, "s_66");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (talus_dearic_jana_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_68");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_84");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 18);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_36"))
{
doAnimationAction(player, "point_away");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "squirm");
string_id message = new string_id(c_stringFile, "s_38");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_40");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 11);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_40"))
{
doAnimationAction(player, "shake_head_no");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "sigh_deeply");
string_id message = new string_id(c_stringFile, "s_42");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_44");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 12);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch12(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_44"))
{
doAnimationAction(player, "explain");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "dismiss");
string_id message = new string_id(c_stringFile, "s_46");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_48");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 13);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch13(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_48"))
{
doAnimationAction(player, "shrug_shoulders");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "explain");
string_id message = new string_id(c_stringFile, "s_50");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_52");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch14(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_52"))
{
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shake_head_disgust");
string_id message = new string_id(c_stringFile, "s_54");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_56");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch15(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_56"))
{
doAnimationAction(player, "cough_polite");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_accusingly");
string_id message = new string_id(c_stringFile, "s_58");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_60");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 16);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch16(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_60"))
{
doAnimationAction(player, "nod");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "nod_head_once");
talus_dearic_jana_action_grantAdaptiveBiology(player, npc);
string_id message = new string_id(c_stringFile, "s_62");
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch18(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_68"))
{
doAnimationAction(player, "nod");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shake_head_no");
string_id message = new string_id(c_stringFile, "s_70");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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.talus_dearic_jana.branchId", 19);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
if (response.equals("s_84"))
{
doAnimationAction(player, "dismiss");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shrug_hands");
string_id message = new string_id(c_stringFile, "s_86");
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch19(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_72"))
{
doAnimationAction(player, "nod");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "explain");
string_id message = new string_id(c_stringFile, "s_74");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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.talus_dearic_jana.branchId", 20);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch20(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_76"))
{
doAnimationAction(player, "nod");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "point_down");
string_id message = new string_id(c_stringFile, "s_78");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_80");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 21);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch21(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_80"))
{
doAnimationAction(player, "shrug_shoulders");
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "explain");
string_id message = new string_id(c_stringFile, "s_82");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_52");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 14);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int talus_dearic_jana_handleBranch22(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
if (response.equals("s_52"))
{
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shake_head_disgust");
string_id message = new string_id(c_stringFile, "s_54");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_56");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 15);
npcSpeak(player, message);
npcSetConversationResponses(player, responses);
}
else
{
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
npcEndConversationWithMessage(player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if ((!isTangible(self)) || (isPlayer(self)))
{
detachScript(self, "conversation.talus_dearic_jana");
}
setCondition(self, CONDITION_CONVERSABLE);
setCondition(self, CONDITION_INTERESTING);
setInvulnerable(self, true);
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
setCondition(self, CONDITION_CONVERSABLE);
setCondition(self, CONDITION_INTERESTING);
setInvulnerable(self, true);
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);
faceTo(self, player);
return SCRIPT_CONTINUE;
}
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
{
clearCondition(self, CONDITION_CONVERSABLE);
detachScript(self, "conversation.talus_dearic_jana");
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 (talus_dearic_jana_condition_completeAdaptiveBiology(player, npc))
{
doAnimationAction(npc, "celebrate");
string_id message = new string_id(c_stringFile, "s_23");
chat.chat(npc, player, message);
return SCRIPT_CONTINUE;
}
if (talus_dearic_jana_condition_returnAdaptiveBiology(player, npc))
{
doAnimationAction(npc, "clap_rousing");
string_id message = new string_id(c_stringFile, "s_22");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_28");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 2);
npcStartConversation(player, npc, "talus_dearic_jana", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_dearic_jana_condition_onAdaptiveBiology(player, npc))
{
doAnimationAction(npc, "shrug_hands");
string_id message = new string_id(c_stringFile, "s_21");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_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_24");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 6);
npcStartConversation(player, npc, "talus_dearic_jana", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
doAnimationAction(npc, "shrug_hands");
string_id message = new string_id(c_stringFile, "s_17");
int numberOfResponses = 0;
boolean hasResponse = false;
boolean hasResponse0 = false;
if (talus_dearic_jana_condition_onBetterGenetics(player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
boolean hasResponse1 = false;
if (talus_dearic_jana_condition_notOnBetterGenetics(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_19");
}
if (hasResponse1)
{
responses[responseIndex++] = new string_id(c_stringFile, "s_64");
}
utils.setScriptVar(player, "conversation.talus_dearic_jana.branchId", 9);
npcStartConversation(player, npc, "talus_dearic_jana", message, responses);
}
else
{
chat.chat(npc, player, message);
}
return SCRIPT_CONTINUE;
}
if (talus_dearic_jana_condition__defaultCondition(player, npc))
{
string_id message = new string_id(c_stringFile, "s_88");
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("talus_dearic_jana"))
{
return SCRIPT_CONTINUE;
}
obj_id npc = self;
int branchId = utils.getIntScriptVar(player, "conversation.talus_dearic_jana.branchId");
if (branchId == 2 && talus_dearic_jana_handleBranch2(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 3 && talus_dearic_jana_handleBranch3(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 4 && talus_dearic_jana_handleBranch4(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 6 && talus_dearic_jana_handleBranch6(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 7 && talus_dearic_jana_handleBranch7(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 8 && talus_dearic_jana_handleBranch8(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 9 && talus_dearic_jana_handleBranch9(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 10 && talus_dearic_jana_handleBranch10(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 11 && talus_dearic_jana_handleBranch11(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 12 && talus_dearic_jana_handleBranch12(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 13 && talus_dearic_jana_handleBranch13(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 14 && talus_dearic_jana_handleBranch14(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 15 && talus_dearic_jana_handleBranch15(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 16 && talus_dearic_jana_handleBranch16(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 18 && talus_dearic_jana_handleBranch18(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 19 && talus_dearic_jana_handleBranch19(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 20 && talus_dearic_jana_handleBranch20(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 21 && talus_dearic_jana_handleBranch21(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
if (branchId == 22 && talus_dearic_jana_handleBranch22(player, npc, response) == SCRIPT_CONTINUE)
{
return SCRIPT_CONTINUE;
}
chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar(player, "conversation.talus_dearic_jana.branchId");
return SCRIPT_CONTINUE;
}
}