#include "nw_i0_2q4luskan"

void main()
{
//Spawn all four creatures to attack the PC
object oPC = GetPCSpeaker();
//Carnivorous Ape
object oTarget1;
location lTarget1;
oTarget1 = GetWaypointByTag("WP_IXAM");
lTarget1 = GetLocation(oTarget1);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), GetLocation(oTarget1));

//Ice Toad
object oTarget2;
location lTarget2;
oTarget2 = GetWaypointByTag("WP_ALRASTIL");
lTarget2 = GetLocation(oTarget2);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), GetLocation(oTarget2));
//Minotaur
object oTarget3;
location lTarget3;
oTarget3 = GetWaypointByTag("WP_PENTUKO");
lTarget3 = GetLocation(oTarget3);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), GetLocation(oTarget3));
//Owlbear
object oTarget4;
location lTarget4;
oTarget4 = GetWaypointByTag("WP_MYRG");
lTarget4 = GetLocation(oTarget4);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2), GetLocation(oTarget4));

DelayCommand(1.5, CreateObjectVoid(OBJECT_TYPE_CREATURE, "carnivorousape", lTarget1));
DelayCommand(1.5, CreateObjectVoid(OBJECT_TYPE_CREATURE, "icetoad", lTarget2));
DelayCommand(1.5, CreateObjectVoid(OBJECT_TYPE_CREATURE, "minotaurnew", lTarget3));
DelayCommand(1.5, CreateObjectVoid(OBJECT_TYPE_CREATURE, "owlbear", lTarget4));

//Destroy orb and replace with crystal ball;
//Unlock exit door

   SetPlotFlag(GetObjectByTag("OrbWhite"), FALSE);
   DestroyObject(GetObjectByTag("OrbWhite"), 3.5);
   object oTarget = GetWaypointByTag("WP_CrystalBall");
   location lTarget = GetLocation(oTarget);
   DelayCommand(3.0, CreateObjectVoid(OBJECT_TYPE_PLACEABLE, "crystalballplc", lTarget));
   object oDoor = GetObjectByTag("DoorOrbRoom");
   SetLocked(oDoor, FALSE);

}
