#include "nw_i0_generic" void main() { object oTarget; object oSpawn; location lTarget; int nInt; object oPC = GetEnteringObject(); if (!GetIsPC(oPC)) return; int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF)); if (DoOnce==TRUE) return; SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE); oTarget = GetWaypointByTag("WP_SPn_Inrik"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "inrik", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); //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_SUMMON_MONSTER_2), oTarget)); else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), GetLocation(oTarget))); oTarget = GetWaypointByTag("WP_SPn_Nerka"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "nerka", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); oTarget = GetObjectByTag("krumdoor"); AssignCommand(oTarget, ActionOpenDoor(oTarget)); oTarget = GetObjectByTag("xumdoor"); AssignCommand(oTarget, ActionOpenDoor(oTarget)); oTarget = GetWaypointByTag("WP_SPn_Kruma"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "kruma", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); oTarget = GetWaypointByTag("WP_SPn_Xuma"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "xuma", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); }