74 lines
2.6 KiB
Plaintext
74 lines
2.6 KiB
Plaintext
|
|
#include "nw_i0_generic"
|
|
|
|
void main()
|
|
|
|
{
|
|
object oTarget;
|
|
object oSpawn;
|
|
effect eVFX;
|
|
effect eEffect;
|
|
int nInt;
|
|
object oActor;
|
|
|
|
// Get the creature who triggered this event.
|
|
object oPC = GetEnteringObject();
|
|
|
|
// Only fire for (real) PCs.
|
|
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
|
return;
|
|
|
|
// Abort if the PC does not have the item "fangsofmog".
|
|
if ( GetItemPossessedBy(oPC, "fangsofmog") == OBJECT_INVALID )
|
|
return;
|
|
|
|
// Only fire once.
|
|
if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) )
|
|
return;
|
|
SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
|
|
|
|
FadeToBlack(oPC);
|
|
|
|
FadeFromBlack(oPC);
|
|
|
|
// Spawn some critters.
|
|
eVFX = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
|
oTarget = GetWaypointByTag("wp_spn_kilama");
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "kimala", GetLocation(oTarget));
|
|
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSpawn));
|
|
|
|
oTarget = GetWaypointByTag("wp_spn_mogs");
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "saltspider1", GetLocation(oTarget));
|
|
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSpawn));
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "saltspider2", GetLocation(oTarget));
|
|
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSpawn));
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "saltspider3", GetLocation(oTarget));
|
|
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSpawn));
|
|
|
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
|
//the VFX will be applied to the WP's location instead
|
|
nInt = GetObjectType(oTarget);
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), oTarget));
|
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), GetLocation(oTarget)));
|
|
|
|
oTarget = GetWaypointByTag("WP_SPn_webmogxx");
|
|
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "webmogxx", GetLocation(oTarget));
|
|
oTarget = GetWaypointByTag("WP_SPn_webmogxy");
|
|
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "webmogxy", GetLocation(oTarget));
|
|
|
|
oTarget = oPC;
|
|
eEffect = EffectCurse(2, 2, 2, 2, 2, 2);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
|
|
// Have "Kimala" strike up a conversation with the PC.
|
|
oActor = GetNearestObjectByTag("Kimala", oPC);
|
|
DelayCommand(2.0, AssignCommand(oActor, ActionStartConversation(oPC)));
|
|
|
|
DelayCommand(3.0, DestroyObject(OBJECT_SELF));
|
|
|
|
}
|
|
|