#include "nw_i0_plot"
/*   Script generated by
Lilac Soul's NWN Script Generator, v. 1.6

For download info, please visit:
http://www.lilacsoul.revility.com    */

//Can go OnDamaged, OnDisturbed, OnSpellCastAt, creature heartbeats, etc.
void main()
{

object oPC = GetLastHostileActor();

if (!GetIsPC(oPC)) return;

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

DestroyObject(oTarget, 0.0);




object oSpawn;
location lTarget;
int nInt;
    nInt=GetPLocalInt(oPC, "intWillowSpawned");
if (!(nInt == 1))
        {
        oTarget = GetWaypointByTag("LOC_C24willow");

        lTarget = GetLocation(oTarget);

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

        oTarget = oSpawn;

        SetIsTemporaryEnemy(oPC, oTarget);
        SetPLocalInt(oPC, "intWillowSpawned", 1);
     }

}

