WoR_PRC8/_module/nss/quest_gath_vfx.nss

60 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

2025-04-03 11:49:34 -04:00
void CreateItemOnObjectVoid(string sItemTemplate, object oTarget=OBJECT_SELF, int nStackSize=1)
{
CreateItemOnObject(sItemTemplate, oTarget, nStackSize);
}
object oPC = GetPCSpeaker();
object oDatabase = GetItemPossessedBy(oPC,"Database");
object oChild1;
object oChild2;
object oChildWP = GetWaypointByTag("CHILD_SPAWN");
object oSpawn;
location lTarget;
object oSelf = OBJECT_SELF;
void main()
{
lTarget = GetLocation(oChildWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "quest_child_01", lTarget);
lTarget = GetLocation(oChildWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "quest_child_02", lTarget);
oChild1 = GetObjectByTag("QUEST_CHILD_01");
AssignCommand(oChild1, ClearAllActions());
AssignCommand(oChild1, ActionMoveToObject(oSelf));
oChild2 = GetObjectByTag("QUEST_CHILD_02");
AssignCommand(oChild2, ClearAllActions());
AssignCommand(oChild2, ActionMoveToObject(oSelf));
AssignCommand(oSelf, ClearAllActions());
DelayCommand(20.5, AssignCommand(GetObjectByTag("ETUM_GATHIEN"), ActionSpeakString("Goodbye my children, you will be safe with your relatives in the desert.")));
DelayCommand(22.0, AssignCommand(GetObjectByTag("QUEST_CHILD_01"), ActionSpeakString("Goodbye father, we will miss you.")));
DelayCommand(24.5, AssignCommand(GetObjectByTag("QUEST_CHILD_02"), ActionSpeakString("Goodbye father.")));
DelayCommand(26.0, ActionCastFakeSpellAtObject(SPELL_GREATER_DISPELLING, oChild1, PROJECTILE_PATH_TYPE_DEFAULT));
DelayCommand(28.0, DestroyObject(oChild1, 0.0));
oChild1 = GetObjectByTag("QUEST_CHILD_01");
DelayCommand(30.6, DestroyObject(oChild2, 0.0));
oChild2 = GetObjectByTag("QUEST_CHILD_02");
DelayCommand(32.6, CreateItemOnObjectVoid("transport_item", oPC));
SetLocalInt(oDatabase, "GATH_NOBLE_QUEST", 200);
}