mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
1342 lines
41 KiB
Plaintext
1342 lines
41 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// som_glyph_hunt.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/som_glyph_hunt";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean som_glyph_hunt_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean som_glyph_hunt_condition_onFirstTask (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "som_glyph_hunt", "glyph_hunt_four");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean som_glyph_hunt_condition_completedFirstTask (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "som_glyph_hunt", "glyph_hunt_five");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean som_glyph_hunt_condition_onSecondTask (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "som_glyph_hunt", "glyph_hunt_eight");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean som_glyph_hunt_condition_completedSecondTask (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "som_glyph_hunt", "glyph_hunt_nine");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean som_glyph_hunt_condition_completedMission (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "som_glyph_hunt");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void som_glyph_hunt_action_grantMission (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "som_glyph_hunt");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void som_glyph_hunt_action_sendFirstSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "glyph_hunt_found");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void som_glyph_hunt_action_sendLastSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "glyph_hunt_finish");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int som_glyph_hunt_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So did you manage to locate the missing sections?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, here you go.
|
|
if (response == "s_39")
|
|
{
|
|
doAnimationAction (player, "manipulate_medium");
|
|
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
//-- NPC: Ah, thank you. This is very interesting. These show what appear to be robed figures surrounding a large crystal in a ritual of sorts. In the background, you can make out shadowy figures...they appear to be very menacing. Light is coming out of the fingertips of the robed figures and entering the crystal. Hmmmm....
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is it?
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_41");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah, thank you. This is very interesting. These show what appear to be robed figures surrounding a large crystal in a ritual of sorts. In the background, you can make out shadowy figures...they appear to be very menacing. Light is coming out of the fingertips of the robed figures and entering the crystal. Hmmmm....
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is it?
|
|
if (response == "s_41")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: The next frame shows the crystal shattering in a ball of fire. The menacing figure in the background is fleeing but is caught in the fire, as are all of the robed figures. Very strange. I wonder if this is what actually happened or just some sort of ritual prayer of the ancients who used to live here.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I don't know.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_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_43");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The next frame shows the crystal shattering in a ball of fire. The menacing figure in the background is fleeing but is caught in the fire, as are all of the robed figures. Very strange. I wonder if this is what actually happened or just some sort of ritual prayer of the ancients who used to live here.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't know.
|
|
if (response == "s_43")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "thank");
|
|
|
|
som_glyph_hunt_action_sendLastSignal (player, npc);
|
|
|
|
//-- NPC: I will need to study this further. And as promised, here is your payment for services rendered. Thank you again for your help. This is an amazing find, although it will be some time before I am sure what it means.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Did you find the missing sections on the Coyn officers?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not so far. But I am still on the job.
|
|
if (response == "s_37")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Alright. I will just wait here for you to return again.
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It is good to see you again, %NU. Did you manage to find anything yet?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I managed to get copies of two of the ruins. Here.
|
|
if (response == "s_25")
|
|
{
|
|
doAnimationAction (player, "manipulate_medium");
|
|
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "taken_aback");
|
|
|
|
//-- NPC: Astounding. This shows the moon as a once-rich, lush world. And this obviously shows the aftermath of some sort of cataclysmic event. Where is the third glyph? The one that should show us what happened.
|
|
string_id message = new string_id (c_stringFile, "s_26");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It has been defaced. It is missing entire sections.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_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_27");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Astounding. This shows the moon as a once-rich, lush world. And this obviously shows the aftermath of some sort of cataclysmic event. Where is the third glyph? The one that should show us what happened.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It has been defaced. It is missing entire sections.
|
|
if (response == "s_27")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "pound_fist_palm");
|
|
|
|
//-- NPC: What! When I made my initial survey, I know all three were intact and in good condition. That means the Coyn must have removed those missing sections. I hate to ask you this, but...but this discovery is simply too important. I need you to recover the pieces from them. I can pay you.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay. Where should I start looking?
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Maybe later. I have other things to attend to right now.
|
|
boolean hasResponse1 = false;
|
|
if (som_glyph_hunt_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_29");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_35");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What! When I made my initial survey, I know all three were intact and in good condition. That means the Coyn must have removed those missing sections. I hate to ask you this, but...but this discovery is simply too important. I need you to recover the pieces from them. I can pay you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay. Where should I start looking?
|
|
if (response == "s_29")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: It is obvious that the mercenaries were targeting these on purpose. I would wager everything I own that their commanding officers have the missing pieces. You will have to defeat them and recover the pieces.
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Not a problem. Who are the officers?
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_33");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe later. I have other things to attend to right now.
|
|
if (response == "s_35")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Very well. Take care, traveler.
|
|
string_id message = new string_id (c_stringFile, "s_46");
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It is obvious that the mercenaries were targeting these on purpose. I would wager everything I own that their commanding officers have the missing pieces. You will have to defeat them and recover the pieces.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not a problem. Who are the officers?
|
|
if (response == "s_33")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "shakefist");
|
|
|
|
som_glyph_hunt_action_sendFirstSignal (player, npc);
|
|
|
|
//-- NPC: There are two of them. The younger is called Captain Starslay...no...Captain Starkill, that's it. The senior officer is Hal Razor. A pompous jay if I ever laid my eyes on one, but, from what I gather, a very capable soldier. If anyone has those pieces, it will be those two.
|
|
string_id message = new string_id (c_stringFile, "s_34");
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hello again, %NU. Have you managed to locate all three of the glyphs yet?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not so far. But I am still looking.
|
|
if (response == "s_50")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: That sounds good. I will just wait here for your return.
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hello, traveler. It's another glorious day here on Mustafar. What a wonderful world, wouldn't you agree?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I don't know if I would go that far.
|
|
if (response == "s_56")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "search");
|
|
|
|
//-- NPC: I certainly would. There are some amazing discoveries taking place all around us. I was on the trail of one of my own until those Coyn showed up and drove me out.
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Slow down, old timer. What are you talking about?
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I certainly would. There are some amazing discoveries taking place all around us. I was on the trail of one of my own until those Coyn showed up and drove me out.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Slow down, old timer. What are you talking about?
|
|
if (response == "s_60")
|
|
{
|
|
doAnimationAction (player, "slow_down");
|
|
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "laugh_titter");
|
|
|
|
//-- NPC: Sorry, I was getting ahead of myself. I am Pletus Croix of the Nabooian Historical Archives. When I heard of the discovery of all the ruins here on Mustafar, I just had to see them for myself. You see, there is no mention of them in any of the galactic records. I was studying the glyphs in the ruins north of here and was piecing together the story of Mustafar when the Coyn showed up.
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Who are these Coyn?
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Why would the Coyn care about you being there?
|
|
boolean hasResponse1 = false;
|
|
if (som_glyph_hunt_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_64");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Sorry, I was getting ahead of myself. I am Pletus Croix of the Nabooian Historical Archives. When I heard of the discovery of all the ruins here on Mustafar, I just had to see them for myself. You see, there is no mention of them in any of the galactic records. I was studying the glyphs in the ruins north of here and was piecing together the story of Mustafar when the Coyn showed up.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Who are these Coyn?
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: They are warriors for hire. Their entire people join their mercenary guilds and hire themselves out for various operations around the galaxy. The group who took over the ruins call themselves Razor Runners. Named after their leader, Hal Razor, no doubt.
|
|
string_id message = new string_id (c_stringFile, "s_66");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why would these Razor Runners care about you being there?
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_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_68");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why would the Coyn care about you being there?
|
|
if (response == "s_70")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Most likely, they were hired by someone to secure the ruins for financial gain. They didn't want anyone else sniffing around while they looted the place. I was on the verge of unlocking the mystery of this moon too. Such a shame that all that knowledge will be lost because of greedy men.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Maybe I can help you out.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_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_74");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: They are warriors for hire. Their entire people join their mercenary guilds and hire themselves out for various operations around the galaxy. The group who took over the ruins call themselves Razor Runners. Named after their leader, Hal Razor, no doubt.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why would these Razor Runners care about you being there?
|
|
if (response == "s_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "explain");
|
|
|
|
//-- NPC: Most likely, they were hired by someone to secure the ruins for financial gain. They didn't want anyone else sniffing around while they looted the place. I was on the verge of unlocking the mystery of this moon too. Such a shame that all that knowledge will be lost because of greedy men.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Maybe I can help you out.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_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_74");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Most likely, they were hired by someone to secure the ruins for financial gain. They didn't want anyone else sniffing around while they looted the place. I was on the verge of unlocking the mystery of this moon too. Such a shame that all that knowledge will be lost because of greedy men.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Maybe I can help you out.
|
|
if (response == "s_74")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod");
|
|
|
|
//-- NPC: Really? You do look like the sort who can handle himself against those mercenaries. Okay, listen up and I will fill you in on what needs to be done. There are three altars with glyphs all over them up there. I was just starting to study them when I was kicked out. I believe they tell the story of what happened on Mustafar. If you could study those glyphs for me, I am sure I could piece it all together.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sounds easy enough.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: On second thought, I am going to stay away from the Coyn.
|
|
boolean hasResponse1 = false;
|
|
if (som_glyph_hunt_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_78");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_82");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int som_glyph_hunt_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Really? You do look like the sort who can handle himself against those mercenaries. Okay, listen up and I will fill you in on what needs to be done. There are three altars with glyphs all over them up there. I was just starting to study them when I was kicked out. I believe they tell the story of what happened on Mustafar. If you could study those glyphs for me, I am sure I could piece it all together.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sounds easy enough.
|
|
if (response == "s_78")
|
|
{
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_multiple");
|
|
|
|
som_glyph_hunt_action_grantMission (player, npc);
|
|
|
|
//-- NPC: It should be. Just find all three of the glyphs, study them, and then come back to me. Don't try to be a hero or anything. If those Razor Runners start shooting, get out of there. I want to know the history of this moon, but I don't want anyone to die because of it.
|
|
string_id message = new string_id (c_stringFile, "s_80");
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: On second thought, I am going to stay away from the Coyn.
|
|
if (response == "s_82")
|
|
{
|
|
doAnimationAction (player, "stop");
|
|
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nod_head_multiple");
|
|
|
|
//-- NPC: That is probably for the best. I will just have to wait for them to leave and then see if I can find anything out from the scrapes they leave behind.
|
|
string_id message = new string_id (c_stringFile, "s_84");
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.som_glyph_hunt");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
setName (self, "Pletus Croix");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
setCondition( self, CONDITION_INTERESTING );
|
|
setName (self, "Pletus Croix");
|
|
|
|
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.som_glyph_hunt");
|
|
|
|
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 (som_glyph_hunt_condition_completedMission (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Hello again. I have just been studying these glyphs that you were kind enough to recover. I still am not sure what it means, but I am fairly certain that this is some sort of history written in the stone glyphs. Thank you again.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition_completedSecondTask (player, npc))
|
|
{
|
|
//-- NPC: So did you manage to locate the missing sections?
|
|
string_id message = new string_id (c_stringFile, "s_5");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, here you go.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_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.som_glyph_hunt.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "som_glyph_hunt", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition_onSecondTask (player, npc))
|
|
{
|
|
//-- NPC: Did you find the missing sections on the Coyn officers?
|
|
string_id message = new string_id (c_stringFile, "s_13");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Not so far. But I am still on the job.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_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_37");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 6);
|
|
|
|
npcStartConversation (player, npc, "som_glyph_hunt", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (som_glyph_hunt_condition_completedFirstTask (player, npc))
|
|
{
|
|
//-- NPC: It is good to see you again, %NU. Did you manage to find anything yet?
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I managed to get copies of two of the ruins. Here.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 8);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "som_glyph_hunt", 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 (som_glyph_hunt_condition_onFirstTask (player, npc))
|
|
{
|
|
//-- NPC: Hello again, %NU. Have you managed to locate all three of the glyphs yet?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Not so far. But I am still looking.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_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_50");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 14);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "som_glyph_hunt", 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 (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "greet");
|
|
|
|
//-- NPC: Hello, traveler. It's another glorious day here on Mustafar. What a wonderful world, wouldn't you agree?
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I don't know if I would go that far.
|
|
boolean hasResponse0 = false;
|
|
if (som_glyph_hunt_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
|
|
|
|
utils.setScriptVar (player, "conversation.som_glyph_hunt.branchId", 16);
|
|
|
|
npcStartConversation (player, npc, "som_glyph_hunt", 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 != "som_glyph_hunt")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
if (branchId == 2 && som_glyph_hunt_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && som_glyph_hunt_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && som_glyph_hunt_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && som_glyph_hunt_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && som_glyph_hunt_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && som_glyph_hunt_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && som_glyph_hunt_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && som_glyph_hunt_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && som_glyph_hunt_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && som_glyph_hunt_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && som_glyph_hunt_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && som_glyph_hunt_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && som_glyph_hunt_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && som_glyph_hunt_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && som_glyph_hunt_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.som_glyph_hunt.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|