/*   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;

int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));

if (DoOnce==TRUE) return;

SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);

FloatingTextStringOnCreature("You manage to bash spikes and other items in around the edge of the door.  Using extreme force the door opens, falling on top of you.", oPC);

effect eEffect;
eEffect = EffectDamage(8, DAMAGE_TYPE_BLUDGEONING, DAMAGE_POWER_NORMAL);

ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);

object oTarget;
oTarget = GetObjectByTag("01SunDoor");

DestroyObject(oTarget, 0.0);

}
