mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-03 03:15:55 -04:00
749 lines
22 KiB
Plaintext
749 lines
22 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// striking_miners_nurfa.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/striking_miners_nurfa";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean striking_miners_nurfa_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean striking_miners_nurfa_condition_isOnTask (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "som_striking_miners", "mustafar_striking_miners_one");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean striking_miners_nurfa_condition_isOnTaskTwo (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "som_striking_miners", "mustafar_striking_miners_two");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean striking_miners_nurfa_condition_taskCompleted (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "som_striking_miners", "mustafar_striking_miners_three");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean striking_miners_nurfa_condition_hasCompletedMission (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "som_striking_miners");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void striking_miners_nurfa_action_sendFirstSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "mustafar_striking_miners_nurfa");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void striking_miners_nurfa_action_rewardTime (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "mustafar_striking_miners_win");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int striking_miners_nurfa_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, look who is back. Decide to give up yet?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Nope, here are your eggs.
|
|
if (response == "s_18")
|
|
{
|
|
doAnimationAction (player, "manipulate_medium");
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wtf");
|
|
|
|
//-- NPC: Whoa! You actually did it? I was kidding. No one is foolish enough to go out there and try to steal eggs from the tulrus. What is the matter with you?
|
|
string_id message = new string_id (c_stringFile, "s_19");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Hey, you said if I got the eggs, you would go back to the talks.
|
|
boolean hasResponse0 = false;
|
|
if (striking_miners_nurfa_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_20");
|
|
|
|
utils.setScriptVar (player, "conversation.striking_miners_nurfa.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int striking_miners_nurfa_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Whoa! You actually did it? I was kidding. No one is foolish enough to go out there and try to steal eggs from the tulrus. What is the matter with you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hey, you said if I got the eggs, you would go back to the talks.
|
|
if (response == "s_20")
|
|
{
|
|
doAnimationAction (player, "point_accusingly");
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "smack_self");
|
|
|
|
striking_miners_nurfa_action_rewardTime (player, npc);
|
|
|
|
//-- NPC: I did say that and a deal is a deal. This really didn't turn out the way I expected. Fine. You can tell Urup we will come back to the negotiations, but I am not promising anything beyond that. You have guts; I will give you that much.
|
|
string_id message = new string_id (c_stringFile, "s_21");
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int striking_miners_nurfa_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So did you give up already?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Just taking a breather.
|
|
if (response == "s_15")
|
|
{
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "mock");
|
|
|
|
//-- NPC: Yeah, you are going to need it.
|
|
string_id message = new string_id (c_stringFile, "s_16");
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int striking_miners_nurfa_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sorry, I can't talk to you right now. I have too much planning to do.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Urup sent me to talk with you.
|
|
if (response == "s_24")
|
|
{
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "threaten_combat");
|
|
|
|
//-- NPC: Urup! So you're just some company messenger boy. You can go tell Urup that I am not interested in anything more the company has to say. We are going to start our own company. That will show them.
|
|
string_id message = new string_id (c_stringFile, "s_26");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Listen, I am not a company messenger. I just want to help.
|
|
boolean hasResponse0 = false;
|
|
if (striking_miners_nurfa_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.striking_miners_nurfa.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int striking_miners_nurfa_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Urup! So you're just some company messenger boy. You can go tell Urup that I am not interested in anything more the company has to say. We are going to start our own company. That will show them.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Listen, I am not a company messenger. I just want to help.
|
|
if (response == "s_28")
|
|
{
|
|
doAnimationAction (player, "standing_placate");
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "wave_on_dismissing");
|
|
|
|
//-- NPC: Yeah, right. Like I haven't heard that one before. Now run along. I think I hear your master calling.
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I don't work for the company. I am trying to help.
|
|
boolean hasResponse0 = false;
|
|
if (striking_miners_nurfa_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.striking_miners_nurfa.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int striking_miners_nurfa_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yeah, right. Like I haven't heard that one before. Now run along. I think I hear your master calling.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't work for the company. I am trying to help.
|
|
if (response == "s_32")
|
|
{
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "gesticulate_wildly");
|
|
|
|
//-- NPC: Okay, mister helpful guy...prove it. There is a place called Tulrus Isle out in the lava flows. The tulrus are known to nest there. You go collect me ten tulrus eggs, and that will show me you are more than just talk. If you can bring me those eggs, we will at least start talking with the company again.
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tulrus lay eggs?
|
|
boolean hasResponse0 = false;
|
|
if (striking_miners_nurfa_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_41");
|
|
|
|
utils.setScriptVar (player, "conversation.striking_miners_nurfa.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int striking_miners_nurfa_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Okay, mister helpful guy...prove it. There is a place called Tulrus Isle out in the lava flows. The tulrus are known to nest there. You go collect me ten tulrus eggs, and that will show me you are more than just talk. If you can bring me those eggs, we will at least start talking with the company again.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tulrus lay eggs?
|
|
if (response == "s_41")
|
|
{
|
|
doAnimationAction (player, "wtf");
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_belly");
|
|
|
|
//-- NPC: Sure they do. The steady heat on this rock makes incubation a snap. All you need to do is to travel out there, find their nesting sites, reach on into the nest, and pull out the eggs. Be careful. You wouldn't want to get trampled by an angry mama while stealing her eggs.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It's a deal.
|
|
boolean hasResponse0 = false;
|
|
if (striking_miners_nurfa_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.striking_miners_nurfa.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int striking_miners_nurfa_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sure they do. The steady heat on this rock makes incubation a snap. All you need to do is to travel out there, find their nesting sites, reach on into the nest, and pull out the eggs. Be careful. You wouldn't want to get trampled by an angry mama while stealing her eggs.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It's a deal.
|
|
if (response == "s_44")
|
|
{
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "mock");
|
|
|
|
striking_miners_nurfa_action_sendFirstSignal (player, npc);
|
|
|
|
//-- NPC: Yeah. Good luck with that, buddy.
|
|
string_id message = new string_id (c_stringFile, "s_46");
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.striking_miners_nurfa");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
setName (self, "Foreman Nurfa Laz'op");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
setName (self, "Foreman Nurfa Laz'op");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
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;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.striking_miners_nurfa");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Triggers
|
|
// ======================================================================
|
|
|
|
//-- This function should move to base_class.java
|
|
boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses)
|
|
{
|
|
Object[] objects = new Object[responses.length];
|
|
System.arraycopy(responses, 0, objects, 0, responses.length);
|
|
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnStartNpcConversation (obj_id player)
|
|
{
|
|
obj_id npc = self;
|
|
|
|
if (ai_lib.isInCombat (npc) || ai_lib.isInCombat (player))
|
|
return SCRIPT_OVERRIDE;
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition_hasCompletedMission (player, npc))
|
|
{
|
|
doAnimationAction (npc, "standing_placate");
|
|
|
|
//-- NPC: Look, I said I would return to the negotiations and I will. We made a deal and I do not break my deals.
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition_taskCompleted (player, npc))
|
|
{
|
|
doAnimationAction (npc, "laugh");
|
|
|
|
//-- NPC: Well, look who is back. Decide to give up yet?
|
|
string_id message = new string_id (c_stringFile, "s_5");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Nope, here are your eggs.
|
|
boolean hasResponse0 = false;
|
|
if (striking_miners_nurfa_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_18");
|
|
|
|
utils.setScriptVar (player, "conversation.striking_miners_nurfa.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "striking_miners_nurfa", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition_isOnTaskTwo (player, npc))
|
|
{
|
|
//-- NPC: So did you give up already?
|
|
string_id message = new string_id (c_stringFile, "s_11");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Just taking a breather.
|
|
boolean hasResponse0 = false;
|
|
if (striking_miners_nurfa_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_15");
|
|
|
|
utils.setScriptVar (player, "conversation.striking_miners_nurfa.branchId", 5);
|
|
|
|
npcStartConversation (player, npc, "striking_miners_nurfa", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition_isOnTask (player, npc))
|
|
{
|
|
doAnimationAction (npc, "check_wrist_device");
|
|
|
|
//-- NPC: Sorry, I can't talk to you right now. I have too much planning to do.
|
|
string_id message = new string_id (c_stringFile, "s_22");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Urup sent me to talk with you.
|
|
boolean hasResponse0 = false;
|
|
if (striking_miners_nurfa_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.striking_miners_nurfa.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "striking_miners_nurfa", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (striking_miners_nurfa_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: I am afraid that I cannot talk to you right now. I have a lot of planning to do with this strike and all. Hey, watch out for lava beetles. They have a nasty tendency to explode when you kill them.
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "striking_miners_nurfa")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
if (branchId == 2 && striking_miners_nurfa_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && striking_miners_nurfa_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && striking_miners_nurfa_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && striking_miners_nurfa_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && striking_miners_nurfa_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && striking_miners_nurfa_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && striking_miners_nurfa_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && striking_miners_nurfa_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.striking_miners_nurfa.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|