Lankhmar_PRC8/_module/nss/tar_spawn.nss

56 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2025-04-03 12:54:47 -04:00
#include "nw_i0_generic"
#include "nw_i0_tool"
#include "x0_i0_partywide"
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
object oSpawn;
location lTarget;
effect eEffect;
int nInt;
oTarget = GetWaypointByTag("WP_aspect");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "angarngitowera", lTarget);
oTarget = oSpawn;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), GetLocation(oTarget)));
oTarget = oPC;
eEffect = EffectParalyze();
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 6.0f);
// Give 10 experience (to party) to the PC.
GiveXPToAll(oPC, 10);
CreateItemOnObject("towerofangarngit", oPC);
AddJournalQuestEntry("The Secret of Urgaan of Angarngi", 6, oPC, TRUE, FALSE);
// Spawn "dkstne".
oTarget = GetWaypointByTag("WP_SPn_dkstne");
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "dkstne", GetLocation(oTarget));
oTarget = GetObjectByTag("keystone");
DestroyObject(oTarget, 0.1);
}