mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
406 lines
15 KiB
Plaintext
406 lines
15 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// indigo_siyan.script
|
|
//
|
|
//
|
|
//
|
|
// DO NOT EDIT THIS AUTO-GENERATED FILE. PLEASE USE THE CONVERATION EDITOR!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/indigo_siyan";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean indigo_siyan_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean indigo_siyan_condition_Campaign (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionStarted") )
|
|
{
|
|
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
|
|
if ( hasObjVar(player, "bestine.campaign") )
|
|
{
|
|
int electionPlayerIsIn = getIntObjVar(player, "bestine.campaign");
|
|
if ( electionPlayerIsIn >= electionNum)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean indigo_siyan_condition_Negative (obj_id player, obj_id npc)
|
|
{
|
|
if ( hasObjVar(npc, "bestine.electionStarted") )
|
|
{
|
|
int electionNum = getIntObjVar(npc, "bestine.electionStarted");
|
|
if ( hasObjVar(player, "bestine.negativeq") )
|
|
{
|
|
int electionPlayerIsIn = getIntObjVar(player, "bestine.negativeq");
|
|
if ( electionPlayerIsIn >= electionNum)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean indigo_siyan_condition_nonoffice (obj_id player, obj_id npc)
|
|
{
|
|
return hasObjVar(npc, "bestine.electionEnded");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void indigo_siyan_action__defaultAction (obj_id player, obj_id npc)
|
|
{
|
|
}
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "npc.conversation.indigo_siyan");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
|
|
{
|
|
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
|
|
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
|
|
menuInfoData.setServerNotify (false);
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "npc.conversation.indigo_siyan");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnStartNpcConversation (obj_id player)
|
|
{
|
|
if (ai_lib.isInCombat (self) || ai_lib.isInCombat (player))
|
|
return SCRIPT_OVERRIDE;
|
|
|
|
//-- [NOTE]
|
|
if (indigo_siyan_condition_Campaign (player, self))
|
|
{
|
|
//-- NPC: Don't mind him. He can be a little pushy when it comes to these things. What he may not have told you is that you can go to Victor if you decide this campaign isn't for you. He'll probably have some task for you to do in order to join, but that's okay. Nothing too difficult, I'd hope. Anyway, let me see what sort of contacts I have for you.
|
|
string_id message = new string_id (c_stringFile, "s_bdba42ab");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Continue.
|
|
boolean hasResponse0 = false;
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
++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_540ac7e9");
|
|
|
|
setObjVar (player, "conversation.indigo_siyan.branchId", 1);
|
|
|
|
npcStartConversation (player, self, "indigo_siyan", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (self, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (indigo_siyan_condition_Negative (player, self))
|
|
{
|
|
//-- NPC: Poor Victor. He's such a nice man, but don't tell Sean I said that. Mind you, I'm reluctantly giving you this information. Don't share it with anyone. Let's see what I may have for you. Okay. There's a Hutt in one of the cantinas you can talk to. I know that one of his troopers isn't necessarily loyal either. He's around the capitol. And you may be able to rummage around Victor's office for nasty tidbits as well. That's all I know.
|
|
string_id message = new string_id (c_stringFile, "s_e095f053");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
++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_b9b27823");
|
|
|
|
setObjVar (player, "conversation.indigo_siyan.branchId", 4);
|
|
|
|
npcStartConversation (player, self, "indigo_siyan", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (self, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (indigo_siyan_condition_nonoffice (player, self))
|
|
{
|
|
//-- NPC: I'm getting ready for the next election. Sean is running for the position. I have so much to do! Be sure to listen to the townsfolk. By rumor, they'll let you know when the voting is about to begin. I have to get back to work...
|
|
string_id message = new string_id (c_stringFile, "s_88b121e8");
|
|
chat.chat (self, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Welcome! Please, help yourself to tea or pastries! Isn't the election exciting? Are you here to vote for Sean? Oh, pardon me! I'm so rude. I shouldn't ask that. I'm Sean's secretary. I'm so glad to be working for him. He has so many great ideas. Please speak with him as soon as possible. He'll tell you all the things he has in store for Bestine.
|
|
string_id message = new string_id (c_stringFile, "s_f10cc45e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
++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_b9b27823");
|
|
|
|
setObjVar (player, "conversation.indigo_siyan.branchId", 7);
|
|
|
|
npcStartConversation (player, self, "indigo_siyan", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (self, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnStartNpcConversation were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
|
|
{
|
|
if (conversationId != "indigo_siyan")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
int branchId = getIntObjVar (player, "conversation.indigo_siyan.branchId");
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Don't mind him. He can be a little pushy when it comes to these things. What he may not have told you is that you can go to Victor if you decide this campaign isn't for you. He'll probably have some task for you to do in order to join, but that's okay. Nothing too difficult, I'd hope. Anyway, let me see what sort of contacts I have for you.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Continue.
|
|
if (branchId == 1 && response == "s_540ac7e9")
|
|
{
|
|
//-- [NOTE]
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: Let's see... There are several citizens that I can think of who have been affected by Sean's generosity. The Curator of the museum, for one. Sean's housemaid can tell you a story or two, and you can check over at the new market place. You only need one piece of evidence, so you can choose which suits you. Unfortunately, I don't have direct locations of them. You'll have to find them on your own. I hope this will help you in the long run.
|
|
string_id message = new string_id (c_stringFile, "s_7fe92f9e");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you!
|
|
boolean hasResponse0 = false;
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
++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_81fdc59e");
|
|
|
|
setObjVar (player, "conversation.indigo_siyan.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.indigo_siyan.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Don't mind him. He can be a little pushy when it comes to these things. What he may not have told you is that you can go to Victor if you decide this campaign isn't for you. He'll probably have some task for you to do in order to join, but that's okay. Nothing too difficult, I'd hope. Anyway, let me see what sort of contacts I have for you.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Let's see... There are several citizens that I can think of who have been affected by Sean's generosity. The Curator of the museum, for one. Sean's housemaid can tell you a story or two, and you can check over at the new market place. You only need one piece of evidence, so you can choose which suits you. Unfortunately, I don't have direct locations of them. You'll have to find them on your own. I hope this will help you in the long run.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you!
|
|
if (branchId == 2 && response == "s_81fdc59e")
|
|
{
|
|
//-- [NOTE]
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: My pleasure. See you later!
|
|
string_id message = new string_id (c_stringFile, "s_83beea8a");
|
|
removeObjVar (player, "conversation.indigo_siyan.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Let's see... There are several citizens that I can think of who have been affected by Sean's generosity. The Curator of the museum, for one. Sean's housemaid can tell you a story or two, and you can check over at the new market place. You only need one piece of evidence, so you can choose which suits you. Unfortunately, I don't have direct locations of them. You'll have to find them on your own. I hope this will help you in the long run.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Poor Victor. He's such a nice man, but don't tell Sean I said that. Mind you, I'm reluctantly giving you this information. Don't share it with anyone. Let's see what I may have for you. Okay. There's a Hutt in one of the cantinas you can talk to. I know that one of his troopers isn't necessarily loyal either. He's around the capitol. And you may be able to rummage around Victor's office for nasty tidbits as well. That's all I know.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (branchId == 4 && response == "s_b9b27823")
|
|
{
|
|
//-- [NOTE]
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: I guess. I feel bad now. Bye.
|
|
string_id message = new string_id (c_stringFile, "s_fd9f62f9");
|
|
removeObjVar (player, "conversation.indigo_siyan.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Poor Victor. He's such a nice man, but don't tell Sean I said that. Mind you, I'm reluctantly giving you this information. Don't share it with anyone. Let's see what I may have for you. Okay. There's a Hutt in one of the cantinas you can talk to. I know that one of his troopers isn't necessarily loyal either. He's around the capitol. And you may be able to rummage around Victor's office for nasty tidbits as well. That's all I know.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome! Please, help yourself to tea or pastries! Isn't the election exciting? Are you here to vote for Sean? Oh, pardon me! I'm so rude. I shouldn't ask that. I'm Sean's secretary. I'm so glad to be working for him. He has so many great ideas. Please speak with him as soon as possible. He'll tell you all the things he has in store for Bestine.
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (branchId == 7 && response == "s_b9b27823")
|
|
{
|
|
//-- [NOTE]
|
|
if (indigo_siyan_condition__defaultCondition (player, self))
|
|
{
|
|
//-- NPC: My pleasure!
|
|
string_id message = new string_id (c_stringFile, "s_abf4a6a9");
|
|
removeObjVar (player, "conversation.indigo_siyan.branchId");
|
|
|
|
npcSpeak (player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: All conditions for OnNpcConversationResponse for branch 'Welcome! Please, help yourself to tea or pastries! Isn't the election exciting? Are you here to vote for Sean? Oh, pardon me! I'm so rude. I shouldn't ask that. I'm Sean's secretary. I'm so glad to be working for him. He has so many great ideas. Please speak with him as soon as possible. He'll tell you all the things he has in store for Bestine.' were false.");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
chat.chat (self, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
removeObjVar (player, "conversation.indigo_siyan.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|