mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
1447 lines
44 KiB
Plaintext
1447 lines
44 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// jinkins.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.collection;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/jinkins";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean jinkins_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean jinkins_condition_hasCompletedPirate (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_vana_to_jinkins")
|
|
&& !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_interview_moore");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean jinkins_condition_hasReturnedFromMoore (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_interview_moore", "tellJinkinsMoore")
|
|
|| (groundquests.hasCompletedQuest(player, "u16_nym_themepark_interview_moore")
|
|
&& !groundquests.isQuestActiveOrComplete(player, "u16_nym_themepark_mine"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean jinkins_condition_hasMineQuestIncomplete (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "u16_nym_themepark_mine");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean jinkins_condition_hasMineFilter (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.isTaskActive(player, "u16_nym_themepark_mine", "returnMineComplete");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean jinkins_condition_isDoneMineQuest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_mine");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean jinkins_condition_allQuestsComplete (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_jinkins_kole");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean jinkins_condition_hasCompletedThemePark (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return groundquests.hasCompletedQuest(player, "u16_nym_themepark_shuttle_ambush");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean jinkins_condition_hasNotCompletedPirate (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
return !groundquests.hasCompletedQuest(player, "u16_nym_themepark_pirate_hideout")
|
|
|| !groundquests.hasCompletedQuest(player, "u16_nym_themepark_vana_to_jinkins");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void jinkins_action_giveMooreQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_interview_moore");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void jinkins_action_grantMineQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_mine");
|
|
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_enraged_miner_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_enraged_miner_activate", 1);
|
|
}
|
|
|
|
if(!hasCompletedCollectionSlot(player, "kill_nyms_themepark_mine_droideka_activate"))
|
|
{
|
|
modifyCollectionSlotValue(player, "kill_nyms_themepark_mine_droideka_activate", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void jinkins_action_completeMooreQuest (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
groundquests.sendSignal(player, "hasToldJinkinsMoore");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void jinkins_action_completeMineQuest (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
groundquests.sendSignal(player, "hasCompletedMine");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void jinkins_action_hasFoundJinkins (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "hasFoundJinkins");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void jinkins_action_gotoKole (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "u16_nym_themepark_jinkins_kole");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int jinkins_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You are back? Did you bring me the gas?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Here is the filter. Why so surprised?
|
|
if (response == "s_39")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
jinkins_action_completeMineQuest (player, npc);
|
|
|
|
//-- NPC: Great. You're pretty persistent...and resourceful, %TU. Good work. This gas should be extremely useful to Nym. Come see me again when you are ready for another mission.
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What was I supposed to do?
|
|
if (response == "s_147")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "backhand");
|
|
|
|
//-- NPC: Go to the Imperial mine and get the air filter.
|
|
string_id message = new string_id (c_stringFile, "s_148");
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I wasn't expecting you to come back. Figured you hopped a shuttle back to Naboo or whatever planet you come from. So you met with Sergeant Moore? What did he say about Imperial threats in the mine?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Possibly some Droidekas.
|
|
if (response == "s_136")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: So are you in?
|
|
string_id message = new string_id (c_stringFile, "s_137");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What about the poison gas?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_138");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So are you in?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What about the poison gas?
|
|
if (response == "s_138")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It looks like the mine has a cheap air filtration system. It barely meets Imperial code and didn't stop the gas from infecting the miners. But I think the filters trapped some of the gas. Just find the filtration system and look for some kinda sealed container. Oh, and now that the filters have had some time do their work, the air down there should be clean. If you're lucky, anyway.
|
|
string_id message = new string_id (c_stringFile, "s_139");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How dangerous is this gas?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_140");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It looks like the mine has a cheap air filtration system. It barely meets Imperial code and didn't stop the gas from infecting the miners. But I think the filters trapped some of the gas. Just find the filtration system and look for some kinda sealed container. Oh, and now that the filters have had some time do their work, the air down there should be clean. If you're lucky, anyway.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How dangerous is this gas?
|
|
if (response == "s_140")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You scared? I said don't worry about the gas. The filters should have scrubbed the air clean by now. The real danger is gonna be the miners. The gas has poisoned their brains. They've taken over the mine and will attack anyone who comes near the place. They're like wild dinkos...
|
|
string_id message = new string_id (c_stringFile, "s_141");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And the Droidekas.
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_142");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You scared? I said don't worry about the gas. The filters should have scrubbed the air clean by now. The real danger is gonna be the miners. The gas has poisoned their brains. They've taken over the mine and will attack anyone who comes near the place. They're like wild dinkos...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And the Droidekas.
|
|
if (response == "s_142")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Oh yeah. Them too.
|
|
string_id message = new string_id (c_stringFile, "s_143");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Well, I can take a shot at getting this gas...
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_144");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh yeah. Them too.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Well, I can take a shot at getting this gas...
|
|
if (response == "s_144")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good. I'll mark the location of the mine in your datapad. This will be a tough mission, though; if you have any friends, you might want to ask for their help. Or least tell them how you want your remains handled.
|
|
string_id message = new string_id (c_stringFile, "s_145");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll get started right away.
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 13);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good. I'll mark the location of the mine in your datapad. This will be a tough mission, though; if you have any friends, you might want to ask for their help. Or least tell them how you want your remains handled.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll get started right away.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
jinkins_action_grantMineQuest (player, npc);
|
|
|
|
//-- NPC: Excellent. Before you leave, you might try asking around to see if anyone else has tasks involving that mine.
|
|
string_id message = new string_id (c_stringFile, "s_47");
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Great job with the Sulfur Lake Pirates, %TU. I have a dangerous job that pays well if you are willing to accept it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are you?
|
|
if (response == "s_101")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I'm Jinkins, Nym's chief engineer. Nym asks for weapons, and I build them. I joined up with the Lok Revenants a few months before the Battle of Naboo, which makes me one of this crew's oldest members, along with Kole of course.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Alright, what is the job?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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.jinkins.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is the job?
|
|
if (response == "s_103")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I need you to check something out for us. I sliced some the data from the Imperial droid you found and discovered that it was on a ship trying to escape an Imperial mining installation here on Lok.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why was it trying to escape?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_107");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm Jinkins, Nym's chief engineer. Nym asks for weapons, and I build them. I joined up with the Lok Revenants a few months before the Battle of Naboo, which makes me one of this crew's oldest members, along with Kole of course.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Alright, what is the job?
|
|
if (response == "s_104")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: I need you to check something out for us. I sliced some the data from the Imperial droid you found and discovered that it was on a ship trying to escape an Imperial mining installation here on Lok.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why was it trying to escape?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_107");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I need you to check something out for us. I sliced some the data from the Imperial droid you found and discovered that it was on a ship trying to escape an Imperial mining installation here on Lok.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why was it trying to escape?
|
|
if (response == "s_107")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: It was an Imperial labor camp. Obviously not a place known for their safe working conditions... Anyway, the droid says the miners hit some sort of gas pocket. The entire work crew had their brains boiled. They survived, but they're crazy. And the droid thinks that some of the Imperial officers were infected too. Any gas that drives Imperials out of their minds is a good thing to have around, so we want some samples of it.
|
|
string_id message = new string_id (c_stringFile, "s_108");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Won't the facility be filled with poison?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_109");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It was an Imperial labor camp. Obviously not a place known for their safe working conditions... Anyway, the droid says the miners hit some sort of gas pocket. The entire work crew had their brains boiled. They survived, but they're crazy. And the droid thinks that some of the Imperial officers were infected too. Any gas that drives Imperials out of their minds is a good thing to have around, so we want some samples of it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Won't the facility be filled with poison?
|
|
if (response == "s_109")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We are looking into that. For now we need you to visit someone to find out what type of threats might exist in the mine.
|
|
string_id message = new string_id (c_stringFile, "s_110");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Threats?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_119");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We are looking into that. For now we need you to visit someone to find out what type of threats might exist in the mine.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Threats?
|
|
if (response == "s_119")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Since the Imperials aren't sure what's going on with the mine, they've sent some of their droids to monitor the situation. You may have to deal with them as well.
|
|
string_id message = new string_id (c_stringFile, "s_121");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kind of droids?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_123");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Since the Imperials aren't sure what's going on with the mine, they've sent some of their droids to monitor the situation. You may have to deal with them as well.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What kind of droids?
|
|
if (response == "s_123")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We don't know, exactly. But we do have an ex-Imperial in our pocket who might have some information for you. Sergeant Moore owes Nym several thousand credits. He'll probably tell you whatever you need to know, for a price. Since he left the Imperial army, he spends most of his time in the cantina.
|
|
string_id message = new string_id (c_stringFile, "s_125");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why did he leave the army?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Where is he?
|
|
boolean hasResponse1 = false;
|
|
if (jinkins_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_127");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_132");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We don't know, exactly. But we do have an ex-Imperial in our pocket who might have some information for you. Sergeant Moore owes Nym several thousand credits. He'll probably tell you whatever you need to know, for a price. Since he left the Imperial army, he spends most of his time in the cantina.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why did he leave the army?
|
|
if (response == "s_127")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The Empire found out that he was borrowing credits from Nym. He was going to be executed, but he has friends in the Tagge family. They put in a good word, and Moore was kicked out instead of killed. But, he still has good information about the Empire's droids.
|
|
string_id message = new string_id (c_stringFile, "s_129");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Maybe I should go talk to him.
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_133");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where is he?
|
|
if (response == "s_132")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
jinkins_action_giveMooreQuest (player, npc);
|
|
|
|
//-- NPC: You'll be happy to hear he is in the Stronghold Cantina. I know you've been there before, but just in case you've forgotten, I've given you a waypoint. Come back once you get the information about the droids in the mining facility.
|
|
string_id message = new string_id (c_stringFile, "s_134");
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int jinkins_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The Empire found out that he was borrowing credits from Nym. He was going to be executed, but he has friends in the Tagge family. They put in a good word, and Moore was kicked out instead of killed. But, he still has good information about the Empire's droids.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe I should go talk to him.
|
|
if (response == "s_133")
|
|
{
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
jinkins_action_giveMooreQuest (player, npc);
|
|
|
|
//-- NPC: You'll be happy to hear he is in the Stronghold Cantina. I know you've been there before, but just in case you've forgotten, I've given you a waypoint. Come back once you get the information about the droids in the mining facility.
|
|
string_id message = new string_id (c_stringFile, "s_134");
|
|
utils.removeScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.jinkins");
|
|
|
|
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.jinkins");
|
|
|
|
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 (jinkins_condition_hasCompletedThemePark (player, npc))
|
|
{
|
|
//-- NPC: You earned the title of Lok Revenant, %TU. Make sure to check with all the other pirates and see if they need your help. There is a special prize I'm reserving for you if you can get all the work done.
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (jinkins_condition_allQuestsComplete (player, npc))
|
|
{
|
|
//-- NPC: Great work on the Mine, %TU. I have a feeling you have a bright pirate future ahead of you.
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (jinkins_condition_isDoneMineQuest (player, npc))
|
|
{
|
|
jinkins_action_gotoKole (player, npc);
|
|
|
|
//-- NPC: Hi again, %TU. Speak with Kole. He has some special plans for you.
|
|
string_id message = new string_id (c_stringFile, "s_50");
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (jinkins_condition_hasMineFilter (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_multiple");
|
|
|
|
//-- NPC: You are back? Did you bring me the gas?
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Here is the filter. Why so surprised?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_39");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 4);
|
|
|
|
npcStartConversation (player, npc, "jinkins", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (jinkins_condition_hasMineQuestIncomplete (player, npc))
|
|
{
|
|
//-- NPC: Yes?
|
|
string_id message = new string_id (c_stringFile, "s_146");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What was I supposed to do?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_147");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 6);
|
|
|
|
npcStartConversation (player, npc, "jinkins", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (jinkins_condition_hasReturnedFromMoore (player, npc))
|
|
{
|
|
doAnimationAction (npc, "adjust");
|
|
|
|
jinkins_action_completeMooreQuest (player, npc);
|
|
|
|
//-- NPC: I wasn't expecting you to come back. Figured you hopped a shuttle back to Naboo or whatever planet you come from. So you met with Sergeant Moore? What did he say about Imperial threats in the mine?
|
|
string_id message = new string_id (c_stringFile, "s_135");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Possibly some Droidekas.
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_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_136");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 8);
|
|
|
|
npcStartConversation (player, npc, "jinkins", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (jinkins_condition_hasCompletedPirate (player, npc))
|
|
{
|
|
doAnimationAction (npc, "clap_rousing");
|
|
|
|
jinkins_action_hasFoundJinkins (player, npc);
|
|
|
|
//-- NPC: Great job with the Sulfur Lake Pirates, %TU. I have a dangerous job that pays well if you are willing to accept it.
|
|
string_id message = new string_id (c_stringFile, "s_99");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who are you?
|
|
boolean hasResponse0 = false;
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the job?
|
|
boolean hasResponse1 = false;
|
|
if (jinkins_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_101");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_103");
|
|
|
|
utils.setScriptVar (player, "conversation.jinkins.branchId", 15);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "jinkins", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (jinkins_condition_hasNotCompletedPirate (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shoo");
|
|
|
|
//-- NPC: You look a little lost. Maybe you should speak with Vana Sage to make sure you aren't in the wrong location at the wrong time.
|
|
string_id message = new string_id (c_stringFile, "s_105");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (jinkins_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "tap_foot");
|
|
|
|
//-- NPC: Sorry, we have work to do here. Not interested.
|
|
string_id message = new string_id (c_stringFile, "s_100");
|
|
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 != "jinkins")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.jinkins.branchId");
|
|
|
|
if (branchId == 4 && jinkins_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && jinkins_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && jinkins_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && jinkins_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && jinkins_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && jinkins_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && jinkins_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && jinkins_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && jinkins_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && jinkins_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && jinkins_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && jinkins_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && jinkins_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && jinkins_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && jinkins_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && jinkins_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.jinkins.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|