mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-03 03:15:55 -04:00
1654 lines
51 KiB
Plaintext
1654 lines
51 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_etyyy_kerssoc.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.30 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.groundquests;
|
|
include library.money;
|
|
include library.space_quest;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/ep3_etyyy_kerssoc";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_etyyy_kerssoc_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_hasCompletedAllQuests (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE of these quests are complete
|
|
return (groundquests.isQuestActive(player, "ep3_hunt_kerssoc_enter_etyyy") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_hunt_kerssoc_enter_etyyy"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_hasCompletedDeliverQuest (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE of this quest is complete
|
|
return (space_quest.hasWonQuest(player, "deliver_no_pickup", "ep3_hunting_kerssoc_smuggle_goods"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_hasCompletedEscortQuest (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE of this quest is complete
|
|
return (space_quest.hasWonQuest(player, "escort", "ep3_hunting_kerssoc_supplies"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_isHuntingBantha (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE if the quest is active on the player
|
|
return (groundquests.isTaskActive(player, "ep3_hunt_kerssoc_bantha_pelts", "kerssoc_huntingBantha"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_isOnDeliverQuest (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE if the quest is active on the player
|
|
return (space_quest.hasQuest(player, "deliver_no_pickup", "ep3_hunting_kerssoc_smuggle_goods"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_fromChrilooc (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isTaskActive(player, "ep3_hunt_chrilooc_seek_rodians", "chrilooc_talkToKerssoc") );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_finishedHuntingBantha (obj_id player, obj_id npc)
|
|
{
|
|
return ( groundquests.isTaskActive(player, "ep3_hunt_kerssoc_bantha_pelts", "kerssoc_kashyyykBanthaPelts") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_hunt_kerssoc_bantha_pelts") );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_hasCompletedDestroyWeaponsQuest (obj_id player, obj_id npc)
|
|
{
|
|
return (space_quest.hasWonQuest(player, "assassinate", "ep3_hunting_kerssoc_destroy_chiss_weapons"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_attackingChissCamp (obj_id player, obj_id npc)
|
|
{
|
|
// Returns TRUE if the quest is active on the player
|
|
return ( groundquests.isTaskActive(player, "ep3_hunt_kerssoc_kill_chiss_poachers", "kerssoc_killingChissPoachers") );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_finishedAttackingChissCamp (obj_id player, obj_id npc)
|
|
{
|
|
return ( groundquests.isTaskActive(player, "ep3_hunt_kerssoc_kill_chiss_poachers", "kerssoc_attackChissPoachers") ||
|
|
groundquests.hasCompletedQuest(player, "ep3_hunt_kerssoc_kill_chiss_poachers") );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_hasManfredsDelivery (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "ep3_hunt_manfred_steal_chiss_goods", "manfred_deliverToKerssoc");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_kerssoc_condition_alreadyHasSpaceMission (obj_id player, obj_id npc)
|
|
{
|
|
return space_quest.hasQuest(player);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_etyyy_kerssoc_action_spokeToKerssoc (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "chrilooc_talkToKerssoc");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_finishedHuntBantha (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "kerssoc_kashyyykBanthaPelts");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_huntKashBantha (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "ep3_hunt_kerssoc_bantha_pelts");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_deliverBanthaHides (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "delivery_no_pickup", "ep3_hunting_kerssoc_smuggle_goods");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_destroyChissWeapons (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "assassinate", "ep3_hunting_kerssoc_destroy_chiss_weapons");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_escortSupplies (obj_id player, obj_id npc)
|
|
{
|
|
space_quest.grantQuest(player, "escort", "ep3_hunting_kerssoc_supplies");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_attackChissCamp (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "ep3_hunt_kerssoc_kill_chiss_poachers");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_finishedAttackChissCamp (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "kerssoc_attackChissPoachers");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_enterEtyyy (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "chrilooc_gainEtyyyEntry");
|
|
groundquests.grantQuest(player, "ep3_hunt_kerssoc_enter_etyyy");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_kerssoc_action_manfredsDeliverMade (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "manfred_deliverToKerssoc");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well done with your attack on the Chiss camp. You've done far better than I ever expected. I suppose I can grant you access to the hunting grounds, Etyyy. Ready to go?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, I'm definitely ready.
|
|
if (response == "s_1062")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_enterEtyyy (player, npc);
|
|
|
|
//-- NPC: Good. The gate is just to the west. You can enter there. Once you're inside, go to the main Rodian hunting camp. It's just past the gate. You can't miss it. You should speak with Sordaan Xris at the hunting camp. He's the self-proclaimed leader of the Rodian hunters. I'm not sure what kind of welcome you'll receive, but you'll have to speak with him before doing much else there.
|
|
string_id message = new string_id (c_stringFile, "s_1064");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No, I think I'll go later.
|
|
if (response == "s_1066")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Return to me when you're ready to enter Etyyy.
|
|
string_id message = new string_id (c_stringFile, "s_1068");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good work destroying that shipment of Chiss weapons. Though it has kind of riled up the Chiss poacher camp to the north. Maybe we should rile them up even more. Go attack their camp and reduce their numbers a bit. Take out 21 Chiss poachers. Yeah, that sounds like a good number. Return to me when you're done.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Those Chiss poachers won't know what hit them.
|
|
if (response == "s_1074")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_attackChissCamp (player, npc);
|
|
|
|
//-- NPC: Good. Off you go then.
|
|
string_id message = new string_id (c_stringFile, "s_1076");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe later.
|
|
if (response == "s_1078")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fine. But don't wait too long.
|
|
string_id message = new string_id (c_stringFile, "s_1080");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What happened to destroying the ship full of Chiss poacher weapons? Couldn't handle it? Or did you simply have a run of bad luck? I'm going to hope it was the luck thing. Otherwise I'm wasting my time. Ready to try your luck again?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I am. This time I'll succeed.
|
|
if (response == "s_1084")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_alreadyHasSpaceMission (player, npc))
|
|
{
|
|
//-- NPC: It looks like you already have a mission in space. Come back once you've completed that one.
|
|
string_id message = new string_id (c_stringFile, "s_1303");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_destroyChissWeapons (player, npc);
|
|
|
|
//-- NPC: Yeah. Let's hope so.
|
|
string_id message = new string_id (c_stringFile, "s_1086");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll try again later.
|
|
if (response == "s_1088")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Really. Don't hurry or anything.
|
|
string_id message = new string_id (c_stringFile, "s_1090");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You were supposed to escort a shipment of supplies. What happened? Ah, whatever. I'll give you another chance. There's always another shipment needing protection these days. Ready to try again?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes I am.
|
|
if (response == "s_1094")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_alreadyHasSpaceMission (player, npc))
|
|
{
|
|
//-- NPC: It looks like you already have a mission in space. Come back once you've completed that one.
|
|
string_id message = new string_id (c_stringFile, "s_1302");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_escortSupplies (player, npc);
|
|
|
|
//-- NPC: Good. Go to it. Make sure nothing happens to those supplies.
|
|
string_id message = new string_id (c_stringFile, "s_1096");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll try again later.
|
|
if (response == "s_1098")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hmm. I see.
|
|
string_id message = new string_id (c_stringFile, "s_1100");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, look at these flawless Kashyyyk bantha pelts. Well done. I'd say I'm impressed, but it's not like it was all that difficult a task. But it was appreciated all the same.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Can I get to the hunting grounds now?
|
|
if (response == "s_1106")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: No. Not yet. We've only just started. Next I need you to deliver these flawless Kashyyyk bantha pelts you've gathered as well as some others I've had stashed. Never mind where they came from. I need all of them delivered to a contact I have in the Corellia system.
|
|
string_id message = new string_id (c_stringFile, "s_1108");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay, I'll deliver them.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1110");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1114");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: No. Not yet. We've only just started. Next I need you to deliver these flawless Kashyyyk bantha pelts you've gathered as well as some others I've had stashed. Never mind where they came from. I need all of them delivered to a contact I have in the Corellia system.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay, I'll deliver them.
|
|
if (response == "s_1110")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_alreadyHasSpaceMission (player, npc))
|
|
{
|
|
//-- NPC: It looks like you already have a mission in space. Come back once you've completed that one.
|
|
string_id message = new string_id (c_stringFile, "s_1301");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_deliverBanthaHides (player, npc);
|
|
|
|
//-- NPC: Good. Away you go then. Fly to the Corellia system. Once there, you'll receive word on where to meet my contact. Be careful though. There are some Chiss poachers in the area, and they've tried to intercept my shipments in the past. They will track you all the way to the Corellia system if they are after you. So be careful.
|
|
string_id message = new string_id (c_stringFile, "s_1112");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe later.
|
|
if (response == "s_1114")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Okay. Come back when you're ready.
|
|
string_id message = new string_id (c_stringFile, "s_1116");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Go get those flawless Kashyyyk bantha pelts. I'm waiting.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm on it. Back soon.
|
|
if (response == "s_1120")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good.
|
|
string_id message = new string_id (c_stringFile, "s_1122");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You want to enter the hunting grounds? You think Etyyy is open to just anyone? Ha. Not even close. If you can prove you can handle yourself as a hunter, and maybe make yourself useful, well maybe. I'm not promising anything. And I'll likely just turn you down either way. But if you're willing to do some things for me, I might grant you access to the hunting grounds.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do you want me to do?
|
|
if (response == "s_1126")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Eager? That's a good sign. First I want to see what kind of hunter you are. And to be honest, I want you to hunt a prey that we are not allowed to hunt ourselves. For whatever reason, Sordaan, the lead Rodian hunter here on Kashyyyk, has declared Kashyyyk bantha off limits to Rodian hunters. Don't ask my why. Something to do with a childhood tragedy or something.
|
|
string_id message = new string_id (c_stringFile, "s_1128");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You want me to hunt Kashyyyk banthas?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_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_1130");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks. Doesn't seem like it would be worth it.
|
|
if (response == "s_1142")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Fine. Go away.
|
|
string_id message = new string_id (c_stringFile, "s_1144");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Eager? That's a good sign. First I want to see what kind of hunter you are. And to be honest, I want you to hunt a prey that we are not allowed to hunt ourselves. For whatever reason, Sordaan, the lead Rodian hunter here on Kashyyyk, has declared Kashyyyk bantha off limits to Rodian hunters. Don't ask my why. Something to do with a childhood tragedy or something.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You want me to hunt Kashyyyk banthas?
|
|
if (response == "s_1130")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yes, I do. You could get away with it. Probably. I'm mostly sure you could. At the very least, Sordaan would be unlikely to blame me. So, go hunt Kashyyyk banthas. You'll find them all over the place. I need 17 flawless Kashyyyk bantha pelts. Not every Kashyyyk bantha you hunt will have a pelt that's in good enough shape, but plenty of them will. When you've collected 17 of them, come back here and talk to me.
|
|
string_id message = new string_id (c_stringFile, "s_1132");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1134");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1138");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes, I do. You could get away with it. Probably. I'm mostly sure you could. At the very least, Sordaan would be unlikely to blame me. So, go hunt Kashyyyk banthas. You'll find them all over the place. I need 17 flawless Kashyyyk bantha pelts. Not every Kashyyyk bantha you hunt will have a pelt that's in good enough shape, but plenty of them will. When you've collected 17 of them, come back here and talk to me.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'll do it.
|
|
if (response == "s_1134")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_huntKashBantha (player, npc);
|
|
|
|
//-- NPC: Good. Go to it. 17 flawless Kashyyyk bantha pelts. I'll be waiting.
|
|
string_id message = new string_id (c_stringFile, "s_1136");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks.
|
|
if (response == "s_1138")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: If you can't stomach something simple like this, you have no hope of ever entering Etyyy.
|
|
string_id message = new string_id (c_stringFile, "s_1140");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Bah, you're no hunter. Leave now.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You're a hunter?
|
|
if (response == "s_1148")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Indeed I am. Not yet to the level of those in the actual hunting grounds, but I will be soon. Oh, so soon. Anyway.
|
|
string_id message = new string_id (c_stringFile, "s_1150");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Hunting grounds?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_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_1152");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 33);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm going.
|
|
if (response == "s_1164")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good.
|
|
string_id message = new string_id (c_stringFile, "s_1166");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Indeed I am. Not yet to the level of those in the actual hunting grounds, but I will be soon. Oh, so soon. Anyway.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hunting grounds?
|
|
if (response == "s_1152")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That's right. The hunting grounds to the south. The Wookiees call that area Etyyy. Which I guess is as good a name as any. You, um, interested in going there? I could help you out if you're willing to help me?
|
|
string_id message = new string_id (c_stringFile, "s_1154");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, how do I get there?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1156");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1160");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 34);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: That's right. The hunting grounds to the south. The Wookiees call that area Etyyy. Which I guess is as good a name as any. You, um, interested in going there? I could help you out if you're willing to help me?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, how do I get there?
|
|
if (response == "s_1156")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Whoa. Not so fast. You have to get my permission before you'll be able to enter Etyyy. First I want to see what kind of hunter you are. And to be honest, I want you to hunt a prey that we are not allowed to hunt ourselves. For whatever reason, Sordaan, the lead Rodian hunter here on Kashyyyk, has declared Kashyyyk bantha off limits to Rodian hunters. Don't ask me why. Something to do with a childhood tragedy or something.
|
|
string_id message = new string_id (c_stringFile, "s_1158");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You want me to hunt Kashyyyk banthas?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_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_1130");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No thanks.
|
|
if (response == "s_1160")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Didn't think you looked like the hunting type anyway. Not really sure why I bothered to offer.
|
|
string_id message = new string_id (c_stringFile, "s_1162");
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int ep3_etyyy_kerssoc_handleBranch35 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Whoa. Not so fast. You have to get my permission before you'll be able to enter Etyyy. First I want to see what kind of hunter you are. And to be honest, I want you to hunt a prey that we are not allowed to hunt ourselves. For whatever reason, Sordaan, the lead Rodian hunter here on Kashyyyk, has declared Kashyyyk bantha off limits to Rodian hunters. Don't ask me why. Something to do with a childhood tragedy or something.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: You want me to hunt Kashyyyk banthas?
|
|
if (response == "s_1130")
|
|
{
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yes, I do. You could get away with it. Probably. I'm mostly sure you could. At the very least, Sordaan would be unlikely to blame me. So, go hunt Kashyyyk banthas. You'll find them all over the place. I need 17 flawless Kashyyyk bantha pelts. Not every Kashyyyk bantha you hunt will have a pelt that's in good enough shape, but plenty of them will. When you've collected 17 of them, come back here and talk to me.
|
|
string_id message = new string_id (c_stringFile, "s_1132");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'll do it.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1134");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1138");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_etyyy_kerssoc");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
|
|
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);
|
|
faceTo(self, player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.ep3_etyyy_kerssoc");
|
|
|
|
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 (ep3_etyyy_kerssoc_condition_hasManfredsDelivery (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_manfredsDeliverMade (player, npc);
|
|
|
|
//-- NPC: Right. I was expecting you with these poached goods. Return to Manfred and let him know I'll ship these next chance I get.
|
|
string_id message = new string_id (c_stringFile, "s_1056");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_hasCompletedAllQuests (player, npc))
|
|
{
|
|
//-- NPC: I trust you're doing well in the hunting grounds.
|
|
string_id message = new string_id (c_stringFile, "s_1058");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_finishedAttackingChissCamp (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_finishedAttackChissCamp (player, npc);
|
|
|
|
//-- NPC: Well done with your attack on the Chiss camp. You've done far better than I ever expected. I suppose I can grant you access to the hunting grounds, Etyyy. Ready to go?
|
|
string_id message = new string_id (c_stringFile, "s_1060");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, I'm definitely ready.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No, I think I'll go later.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1062");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1066");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 3);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_kerssoc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_attackingChissCamp (player, npc))
|
|
{
|
|
//-- NPC: Go on. Get to it. Those Chiss poachers aren't going to kill themselves.
|
|
string_id message = new string_id (c_stringFile, "s_1070");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_hasCompletedDestroyWeaponsQuest (player, npc))
|
|
{
|
|
//-- NPC: Good work destroying that shipment of Chiss weapons. Though it has kind of riled up the Chiss poacher camp to the north. Maybe we should rile them up even more. Go attack their camp and reduce their numbers a bit. Take out 21 Chiss poachers. Yeah, that sounds like a good number. Return to me when you're done.
|
|
string_id message = new string_id (c_stringFile, "s_1072");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Those Chiss poachers won't know what hit them.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1074");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1078");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_kerssoc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_hasCompletedEscortQuest (player, npc))
|
|
{
|
|
//-- NPC: What happened to destroying the ship full of Chiss poacher weapons? Couldn't handle it? Or did you simply have a run of bad luck? I'm going to hope it was the luck thing. Otherwise I'm wasting my time. Ready to try your luck again?
|
|
string_id message = new string_id (c_stringFile, "s_1082");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I am. This time I'll succeed.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll try again later.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1084");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1088");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_kerssoc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_hasCompletedDeliverQuest (player, npc))
|
|
{
|
|
//-- NPC: You were supposed to escort a shipment of supplies. What happened? Ah, whatever. I'll give you another chance. There's always another shipment needing protection these days. Ready to try again?
|
|
string_id message = new string_id (c_stringFile, "s_1092");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes I am.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'll try again later.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1094");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1098");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 14);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_kerssoc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_isOnDeliverQuest (player, npc))
|
|
{
|
|
//-- NPC: Go deliver those pelts. Times a-wasting.
|
|
string_id message = new string_id (c_stringFile, "s_1102");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_finishedHuntingBantha (player, npc))
|
|
{
|
|
ep3_etyyy_kerssoc_action_finishedHuntBantha (player, npc);
|
|
|
|
//-- NPC: Well, look at these flawless Kashyyyk bantha pelts. Well done. I'd say I'm impressed, but it's not like it was all that difficult a task. But it was appreciated all the same.
|
|
string_id message = new string_id (c_stringFile, "s_1104");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Can I get to the hunting grounds now?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_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_1106");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 19);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_kerssoc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_isHuntingBantha (player, npc))
|
|
{
|
|
//-- NPC: Go get those flawless Kashyyyk bantha pelts. I'm waiting.
|
|
string_id message = new string_id (c_stringFile, "s_1118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm on it. Back soon.
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_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_1120");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 24);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_kerssoc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition_fromChrilooc (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
ep3_etyyy_kerssoc_action_spokeToKerssoc (player, npc);
|
|
|
|
//-- NPC: You want to enter the hunting grounds? You think Etyyy is open to just anyone? Ha. Not even close. If you can prove you can handle yourself as a hunter, and maybe make yourself useful, well maybe. I'm not promising anything. And I'll likely just turn you down either way. But if you're willing to do some things for me, I might grant you access to the hunting grounds.
|
|
string_id message = new string_id (c_stringFile, "s_1124");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do you want me to do?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No thanks. Doesn't seem like it would be worth it.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1126");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1142");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 26);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_kerssoc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Bah, you're no hunter. Leave now.
|
|
string_id message = new string_id (c_stringFile, "s_1146");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: You're a hunter?
|
|
boolean hasResponse0 = false;
|
|
if (ep3_etyyy_kerssoc_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm going.
|
|
boolean hasResponse1 = false;
|
|
if (ep3_etyyy_kerssoc_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_1148");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_1164");
|
|
|
|
utils.setScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId", 32);
|
|
|
|
npcStartConversation (player, npc, "ep3_etyyy_kerssoc", message, responses);
|
|
}
|
|
else
|
|
{
|
|
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 != "ep3_etyyy_kerssoc")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
if (branchId == 3 && ep3_etyyy_kerssoc_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && ep3_etyyy_kerssoc_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && ep3_etyyy_kerssoc_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && ep3_etyyy_kerssoc_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && ep3_etyyy_kerssoc_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && ep3_etyyy_kerssoc_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && ep3_etyyy_kerssoc_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && ep3_etyyy_kerssoc_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && ep3_etyyy_kerssoc_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && ep3_etyyy_kerssoc_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && ep3_etyyy_kerssoc_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && ep3_etyyy_kerssoc_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && ep3_etyyy_kerssoc_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 35 && ep3_etyyy_kerssoc_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_kerssoc.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|