#include "nw_i0_plot"
#include "nw_i0_generic"
/*   Script generated by
Lilac Soul's NWN Script Generator, v. 1.6
#include "nw_i0_plot"
For download info, please visit:
http://www.lilacsoul.revility.com    */

//Put this OnEnter
void main()
{

object oPC = GetEnteringObject();

if (!GetIsPC(oPC)) return;

int nInt;
nInt=GetPLocalInt(oPC, "intJagCreated");

if (!(nInt == 0))
   return;

object oStuffed = GetObjectByTag("STATUEStuffed");
int nNoSpawn;
nNoSpawn = GetLocalInt(oStuffed, "WereJagDead");

if (nNoSpawn==TRUE) return;


object oTarget;
oTarget = GetObjectByTag("c30StatueCat");

DestroyObject(oTarget, 0.5);

object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("Loc_CreateJag");

lTarget = GetLocation(oTarget);

oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "werecat001", lTarget);

oTarget = oSpawn;

SetIsTemporaryEnemy(oPC, oTarget);

AssignCommand(oTarget, ActionAttack(oPC));

AssignCommand(oTarget, DetermineCombatRound(oPC));
SetPLocalInt(oPC, "intJagCreated", 1);
}
