mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-02 02:15:48 -04:00
794 lines
22 KiB
Plaintext
794 lines
22 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// loveday_romance_seeker.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.buff;
|
|
include library.callable;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.holiday;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/loveday_romance_seeker";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean loveday_romance_seeker_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean loveday_romance_seeker_condition_matchIncomplete (obj_id player, obj_id npc)
|
|
{
|
|
if ( getMaster(npc) != player )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return groundquests.isTaskActive(player, "loveday_playing_cupid", "loveday_playing_cupid_01");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean loveday_romance_seeker_condition_matchComplete (obj_id player, obj_id npc)
|
|
{
|
|
if ( getMaster(npc) != player )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return groundquests.isTaskActive(player, "loveday_playing_cupid", "loveday_playing_cupid_02");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean loveday_romance_seeker_condition_doesntHaveQuest (obj_id player, obj_id npc)
|
|
{
|
|
if ( getMaster(npc) != player )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return !groundquests.isQuestActiveOrComplete(player, "loveday_playing_cupid");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean loveday_romance_seeker_condition_wasRejected (obj_id player, obj_id npc)
|
|
{
|
|
return buff.hasBuff(player, "loveday_rejected");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void loveday_romance_seeker_action_grantLovedayQuest (obj_id player, obj_id npc)
|
|
{
|
|
if ( holiday.hasLovedayRomanceSeekerCompanion(player) )
|
|
{
|
|
obj_id romanceSeekerCompanionControlDevice = holiday.getLovedayRomanceSeekerCompanionControlDevice(player);
|
|
if ( isIdValid(romanceSeekerCompanionControlDevice) )
|
|
{
|
|
destroyObject(romanceSeekerCompanionControlDevice);
|
|
}
|
|
}
|
|
|
|
groundquests.clearQuest(player, "loveday_playing_cupid");
|
|
groundquests.grantQuest(player, "loveday_playing_cupid");
|
|
|
|
holiday.grantLovedayRomanceSeekerCompanion(player);
|
|
|
|
if ( hasObjVar(player, "loveday.eligiblePlayingCupid") )
|
|
{
|
|
removeObjVar(player, "loveday.eligiblePlayingCupid");
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void loveday_romance_seeker_action_sendCompletionSignal (obj_id player, obj_id npc)
|
|
{
|
|
obj_id romanceSeekerCompanionControlDevice = holiday.getLovedayRomanceSeekerCompanionControlDevice(player);
|
|
if ( isIdValid(romanceSeekerCompanionControlDevice) )
|
|
{
|
|
destroyObject(romanceSeekerCompanionControlDevice);
|
|
}
|
|
|
|
groundquests.sendSignal(player, "loveday_playing_cupid_02");
|
|
|
|
int now = getCalendarTime();
|
|
int secondsUntil = secondsUntilNextDailyTime(4, 0, 0);
|
|
int then = now + secondsUntil;
|
|
|
|
setObjVar(player, "loveday.eligiblePlayingCupid", then);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
string loveday_romance_seeker_tokenTO_trait_01 (obj_id player, obj_id npc)
|
|
{
|
|
string file = "event/love_day";
|
|
obj_id controlDevice = callable.getCallableCD(npc);
|
|
|
|
string message = getString(new string_id(file, "trait_" + getStringObjVar(controlDevice, "playingCupid.trait_01")));
|
|
return message;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
string loveday_romance_seeker_tokenTO_trait_05 (obj_id player, obj_id npc)
|
|
{
|
|
string file = "event/love_day";
|
|
obj_id controlDevice = callable.getCallableCD(npc);
|
|
|
|
string message = getString(new string_id(file, "trait_" + getStringObjVar(controlDevice, "playingCupid.trait_05")));
|
|
return message;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
string loveday_romance_seeker_tokenTO_trait_04 (obj_id player, obj_id npc)
|
|
{
|
|
string file = "event/love_day";
|
|
obj_id controlDevice = callable.getCallableCD(npc);
|
|
|
|
string message = getString(new string_id(file, "trait_" + getStringObjVar(controlDevice, "playingCupid.trait_04")));
|
|
return message;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
string loveday_romance_seeker_tokenTO_trait_03 (obj_id player, obj_id npc)
|
|
{
|
|
string file = "event/love_day";
|
|
obj_id controlDevice = callable.getCallableCD(npc);
|
|
|
|
string message = getString(new string_id(file, "trait_" + getStringObjVar(controlDevice, "playingCupid.trait_03")));
|
|
return message;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
string loveday_romance_seeker_tokenTO_trait_02 (obj_id player, obj_id npc)
|
|
{
|
|
string file = "event/love_day";
|
|
obj_id controlDevice = callable.getCallableCD(npc);
|
|
|
|
string message = getString(new string_id(file, "trait_" + getStringObjVar(controlDevice, "playingCupid.trait_02")));
|
|
return message;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int loveday_romance_seeker_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: \#FF33C2\#.I'm so grateful for your help! Do you have any questions?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What kinds of things are important to you?
|
|
if (response == "s_30")
|
|
{
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: \#FF33C2 \#.Well, one thing is: %TO.
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What else?
|
|
boolean hasResponse0 = false;
|
|
if (loveday_romance_seeker_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_34");
|
|
|
|
utils.setScriptVar (player, "conversation.loveday_romance_seeker.branchId", 4);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_01 (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_01 (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Not right now.
|
|
if (response == "s_32")
|
|
{
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Okay, let's get started!
|
|
string_id message = new string_id (c_stringFile, "s_33");
|
|
utils.removeScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int loveday_romance_seeker_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: \#FF33C2 \#.Well, one thing is: %TO.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What else?
|
|
if (response == "s_34")
|
|
{
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: \#FF33C2 \#.Also %TO.
|
|
string_id message = new string_id (c_stringFile, "s_35");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Keep going...
|
|
boolean hasResponse0 = false;
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_36");
|
|
|
|
utils.setScriptVar (player, "conversation.loveday_romance_seeker.branchId", 5);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_02 (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_02 (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int loveday_romance_seeker_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: \#FF33C2 \#.Also %TO.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Keep going...
|
|
if (response == "s_36")
|
|
{
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: \#FF33C2 \#.%TO.
|
|
string_id message = new string_id (c_stringFile, "s_37");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: And?
|
|
boolean hasResponse0 = false;
|
|
if (loveday_romance_seeker_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_38");
|
|
|
|
utils.setScriptVar (player, "conversation.loveday_romance_seeker.branchId", 6);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_03 (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_03 (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int loveday_romance_seeker_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: \#FF33C2 \#.%TO.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: And?
|
|
if (response == "s_38")
|
|
{
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: \#FF33C2 \#.And %TO.
|
|
string_id message = new string_id (c_stringFile, "s_39");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Anything more?
|
|
boolean hasResponse0 = false;
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_40");
|
|
|
|
utils.setScriptVar (player, "conversation.loveday_romance_seeker.branchId", 7);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_04 (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_04 (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int loveday_romance_seeker_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: \#FF33C2 \#.And %TO.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Anything more?
|
|
if (response == "s_40")
|
|
{
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: \#FF33C2 \#.Finally: %TO.
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (loveday_romance_seeker_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_24");
|
|
|
|
utils.setScriptVar (player, "conversation.loveday_romance_seeker.branchId", 8);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_05 (player, npc));
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
pp.other.set (loveday_romance_seeker_tokenTO_trait_05 (player, npc));
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int loveday_romance_seeker_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: \#FF33C2 \#.Finally: %TO.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_24")
|
|
{
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "clap_rousing");
|
|
|
|
//-- NPC: You're welcome.
|
|
string_id message = new string_id (c_stringFile, "s_25");
|
|
utils.removeScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.loveday_romance_seeker");
|
|
|
|
setCondition(self, CONDITION_CONVERSABLE);
|
|
setCondition(self, CONDITION_HOLIDAY_INTERESTING);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setCondition(self, CONDITION_HOLIDAY_INTERESTING);
|
|
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.loveday_romance_seeker");
|
|
|
|
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 (loveday_romance_seeker_condition_wasRejected (player, npc))
|
|
{
|
|
doAnimationAction (npc, "embarrassed");
|
|
|
|
//-- NPC: Oh...that was horrible. I don't know if I can go on after being rejected like that...
|
|
string_id message = new string_id (c_stringFile, "s_22");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition_matchComplete (player, npc))
|
|
{
|
|
doAnimationAction (npc, "celebrate");
|
|
|
|
//-- NPC: I'm so excited! I can't believe I may have found someone with whom I can share my life!!
|
|
string_id message = new string_id (c_stringFile, "s_8");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition_matchIncomplete (player, npc))
|
|
{
|
|
//-- NPC: \#FF33C2\#.I'm so grateful for your help! Do you have any questions?
|
|
string_id message = new string_id (c_stringFile, "s_10");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What kinds of things are important to you?
|
|
boolean hasResponse0 = false;
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Not right now.
|
|
boolean hasResponse1 = false;
|
|
if (loveday_romance_seeker_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_30");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_32");
|
|
|
|
utils.setScriptVar (player, "conversation.loveday_romance_seeker.branchId", 3);
|
|
|
|
npcStartConversation (player, npc, "loveday_romance_seeker", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition_doesntHaveQuest (player, npc))
|
|
{
|
|
doAnimationAction (npc, "weeping");
|
|
|
|
//-- NPC: Did you give up? I'm so sad now.
|
|
string_id message = new string_id (c_stringFile, "s_29");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (loveday_romance_seeker_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "implore");
|
|
|
|
//-- NPC: Happy Festival of Love!
|
|
string_id message = new string_id (c_stringFile, "s_27");
|
|
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 != "loveday_romance_seeker")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
if (branchId == 3 && loveday_romance_seeker_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && loveday_romance_seeker_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && loveday_romance_seeker_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && loveday_romance_seeker_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && loveday_romance_seeker_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && loveday_romance_seeker_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.loveday_romance_seeker.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|