mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
774 lines
22 KiB
Plaintext
774 lines
22 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// romo_vax.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.36 - 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/romo_vax";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean romo_vax_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean romo_vax_condition_isOnBibsQuest (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive (player, "quest/jabba_bib_fortuna_v2", "speakToRomo"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean romo_vax_condition_completedRomosQuest (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive (player, "quest/jabba_bib_fortuna_v2", "returnToRomo"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean romo_vax_condition_gettingRomosDisks (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive (player, "quest/jabba_bib_fortuna_v2", "getRomosDisks"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean romo_vax_condition_doneWithRomo (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.hasCompletedTask (player, "quest/jabba_bib_fortuna_v2", "getRomosDisks"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean romo_vax_condition_doingRomosQuest (obj_id player, obj_id npc)
|
|
{
|
|
if (groundquests.isTaskActive (player, "quest/jabba_bib_fortuna_v2", "killingValariansForRomo"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void romo_vax_action_grantRomoQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal (player, "spokenToRomo");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void romo_vax_action_sendBiddingSignal (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
groundquests.sendSignal (player, "completedRomosQuest");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void romo_vax_action_sendDiskSignal (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
groundquests.sendSignal (player, "romosDisksReturned");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void romo_vax_action_facePlayer (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int romo_vax_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Okay, I'll be honest with you. I was hoping to sort this out when you were gone, but I couldn't solve it. My problem that is. So, I still can't give you the data.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Bib says...
|
|
if (response == "s_21")
|
|
{
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, I see, you're just Bib's little enforcer aren't you? You don't make the decisions, huh? You just do whatever that sharp-toothed freak wants?
|
|
string_id message = new string_id (c_stringFile, "s_24");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's see, would I rather make you happy, or Jabba?
|
|
boolean hasResponse0 = false;
|
|
if (romo_vax_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_25");
|
|
|
|
utils.setScriptVar (player, "conversation.romo_vax.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: We're done negotiating with you.
|
|
if (response == "s_23")
|
|
{
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Are you sure you have the power to negotiate that yourself? Maybe you should contact Bib and see if that's what he wants you to do.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I've talked to Bib. We're done negotiating.
|
|
boolean hasResponse0 = false;
|
|
if (romo_vax_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_45");
|
|
|
|
utils.setScriptVar (player, "conversation.romo_vax.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int romo_vax_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, I see, you're just Bib's little enforcer aren't you? You don't make the decisions, huh? You just do whatever that sharp-toothed freak wants?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Let's see, would I rather make you happy, or Jabba?
|
|
if (response == "s_25")
|
|
{
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Okay, that's a fair point. Fine. But this isn't a negotiation. I'm not trying to get more money. I have a serious problem!
|
|
string_id message = new string_id (c_stringFile, "s_27");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What problem?
|
|
boolean hasResponse0 = false;
|
|
if (romo_vax_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_29");
|
|
|
|
utils.setScriptVar (player, "conversation.romo_vax.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int romo_vax_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Okay, that's a fair point. Fine. But this isn't a negotiation. I'm not trying to get more money. I have a serious problem!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What problem?
|
|
if (response == "s_29")
|
|
{
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, it's just that they actually, um...robbed me. They broke in, hacked my system, downloaded everything, and left a virus behind that wiped out my entire mainframe. Lady Valarian was behind it. The hackers were working for her.
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay, okay. Settle down. I'll retrieve the data.
|
|
boolean hasResponse0 = false;
|
|
if (romo_vax_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_33");
|
|
|
|
utils.setScriptVar (player, "conversation.romo_vax.branchId", 6);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int romo_vax_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, it's just that they actually, um...robbed me. They broke in, hacked my system, downloaded everything, and left a virus behind that wiped out my entire mainframe. Lady Valarian was behind it. The hackers were working for her.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay, okay. Settle down. I'll retrieve the data.
|
|
if (response == "s_33")
|
|
{
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, thank you!
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
utils.removeScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int romo_vax_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you sure you have the power to negotiate that yourself? Maybe you should contact Bib and see if that's what he wants you to do.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I've talked to Bib. We're done negotiating.
|
|
if (response == "s_45")
|
|
{
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh, I see, you're just Bib's little enforcer aren't you? You don't make the decisions, huh? You just do whatever that sharp-toothed freak wants?
|
|
string_id message = new string_id (c_stringFile, "s_24");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Let's see, would I rather make you happy, or Jabba?
|
|
boolean hasResponse0 = false;
|
|
if (romo_vax_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_25");
|
|
|
|
utils.setScriptVar (player, "conversation.romo_vax.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int romo_vax_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You're Bib's contact? Oh. I expected someone bigger. No offense, I'm just kidding. But there's a problem. I can't give you the data
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why not?
|
|
if (response == "s_36")
|
|
{
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hey, it's not a thing between us, all right, it's just that there's too much competition with their eyes on me, you know what I'm saying? You probably don't. Someone's been watching me. I wasn't sure at first, but I've managed to find their camp outside of Wayfar. I'd feel a lot safer if their eyes were closed, you know what I mean?
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You want me to kill some of them?
|
|
boolean hasResponse0 = false;
|
|
if (romo_vax_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.romo_vax.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int romo_vax_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hey, it's not a thing between us, all right, it's just that there's too much competition with their eyes on me, you know what I'm saying? You probably don't. Someone's been watching me. I wasn't sure at first, but I've managed to find their camp outside of Wayfar. I'd feel a lot safer if their eyes were closed, you know what I mean?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You want me to kill some of them?
|
|
if (response == "s_40")
|
|
{
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
romo_vax_action_grantRomoQuest (player, npc);
|
|
|
|
//-- NPC: Hey, what do you know? You did know what I meant! That's incredible. Yeah, you should kill some of them. Come back when you're done with that.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
utils.removeScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.romo_vax");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
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.romo_vax");
|
|
|
|
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 (romo_vax_condition_doneWithRomo (player, npc))
|
|
{
|
|
romo_vax_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Hey, what do you need? You got the data you needed, right?
|
|
string_id message = new string_id (c_stringFile, "s_16");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (romo_vax_condition_gettingRomosDisks (player, npc))
|
|
{
|
|
romo_vax_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I really need that data so I can sort through it and find the stuff Jabba wants.
|
|
string_id message = new string_id (c_stringFile, "s_10");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (romo_vax_condition_completedRomosQuest (player, npc))
|
|
{
|
|
romo_vax_action_sendBiddingSignal (player, npc);
|
|
|
|
//-- NPC: Okay, I'll be honest with you. I was hoping to sort this out when you were gone, but I couldn't solve it. My problem that is. So, I still can't give you the data.
|
|
string_id message = new string_id (c_stringFile, "s_7");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Bib says...
|
|
boolean hasResponse0 = false;
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: We're done negotiating with you.
|
|
boolean hasResponse1 = false;
|
|
if (romo_vax_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_21");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_23");
|
|
|
|
utils.setScriptVar (player, "conversation.romo_vax.branchId", 3);
|
|
|
|
npcStartConversation (player, npc, "romo_vax", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (romo_vax_condition_doingRomosQuest (player, npc))
|
|
{
|
|
romo_vax_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Oh, have you not scared off those spies yet?
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (romo_vax_condition_isOnBibsQuest (player, npc))
|
|
{
|
|
romo_vax_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: You're Bib's contact? Oh. I expected someone bigger. No offense, I'm just kidding. But there's a problem. I can't give you the data
|
|
string_id message = new string_id (c_stringFile, "s_32");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why not?
|
|
boolean hasResponse0 = false;
|
|
if (romo_vax_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.romo_vax.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "romo_vax", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (romo_vax_condition__defaultCondition (player, npc))
|
|
{
|
|
romo_vax_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I, uh, really don't think I'm the guy you're looking for.
|
|
string_id message = new string_id (c_stringFile, "s_46");
|
|
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 != "romo_vax")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.romo_vax.branchId");
|
|
|
|
if (branchId == 3 && romo_vax_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && romo_vax_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && romo_vax_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && romo_vax_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && romo_vax_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && romo_vax_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && romo_vax_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.romo_vax.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|