#include "nw_i0_generic"
#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 = GetEnteringObject();

if (!GetIsPC(oPC)) return;

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

if ((nInt == 1))
   return;
SetPLocalInt(oPC, "intCrabAttacked", 1);
object oTarget;
oTarget = GetObjectByTag("BCrab");

AdjustReputation(oPC, oTarget, -50);

oTarget = GetObjectByTag("HermitCrabBoulder");

DestroyObject(oTarget, 0.0);

object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("03CrabSpawn");

lTarget = GetLocation(oTarget);

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

oTarget = oSpawn;

SetIsTemporaryEnemy(oPC, oTarget);

AssignCommand(oTarget, ActionAttack(oPC));

AssignCommand(oTarget, DetermineCombatRound(oPC));

}
