// Stirg Trap Chest
/*
Includes BioWares scripts for generating Treasure and
'Do-Once' code.
This script will spawn 4 stirges that will attack the
players upon opening the chest. Create a chest and place this code into your
'onOpen' script. You must create a stirg in your area, right click it and
'Add to Palette' first. Then, take the BluePrint ResRef string and enter it
into the CreateObject function below (currently where the value "stirg001"
is, replace if yours is different). Once you have this BluePrint ResRef
(under advanced), you can delete the instance of the stirg in your area
(your palette will remember it).
*/
// Created By: Kevin Pisz
// Created On: 06/23/02
//
// BioWare's info:
//
//:: Created By: Brent
//:: Created On: February 26 2001
//
#include "NW_O2_CONINCLUDE"
void main()
{
if (GetLocalInt (OBJECT_SELF, "NW_DO_ONCE") != 0)
{
return;
}
float respawntime = 1200.00;
object oLastOpener = GetLastOpener();
//Uncomment below if you want randomly generated treasure
GenerateMediumTreasure (oLastOpener, OBJECT_SELF);
SetLocalInt (OBJECT_SELF, "NW_DO_ONCE",1);
ShoutDisturbed();
location llocation = GetLocation(OBJECT_SELF);
object oStirg1 = CreateObject(OBJECT_TYPE_CREATURE, "mumcleric001", llocation, FALSE);
//object oStirg2 = CreateObject(OBJECT_TYPE_CREATURE, "stirge001", llocation, FALSE);
//object oStirg3 = CreateObject(OBJECT_TYPE_CREATURE, "stirge001", llocation, FALSE);
//object oStirg4 = CreateObject(OBJECT_TYPE_CREATURE, "stirge001", llocation, FALSE);
AssignCommand( OBJECT_SELF, DelayCommand (respawntime, SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0) ) );
}


