#include "nw_i0_plot"
void main()
{

object oPC = GetEnteringObject();

if (!GetIsPC(oPC)) return;

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

if ((nInt <1 ))
   {

    SetPLocalInt(oPC, "intTrap26Fired", 1);

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

    DestroyObject(oTarget, 0.0);

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

    lTarget = GetLocation(oTarget);

    oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "zep_wall002", lTarget);

    oTarget = GetWaypointByTag("Loc_26_2");

    lTarget = GetLocation(oTarget);

    oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "zep_wall002", lTarget);

    oTarget = GetWaypointByTag("Loc_26_3");

    lTarget = GetLocation(oTarget);

    oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "zep_wall002", lTarget);

    oTarget = GetWaypointByTag("Loc_26_4");

    lTarget = GetLocation(oTarget);

    oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "zep_wall002", lTarget);
    FloatingTextStringOnCreature("The stones shift beneath your feat.  The stone ahead slides down the stairs.", oPC);




    if (ReflexSave(oPC, 14, SAVING_THROW_TYPE_TRAP  ))
       {
       FloatingTextStringOnCreature("You leap out of the way at the last second as the stone races by.", oPC);

       }
    else
       {
       effect eEffect;
       int nDamage;
       nDamage = d4(2);
    eEffect = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING, DAMAGE_POWER_NORMAL);

    ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);
        FloatingTextStringOnCreature("You are struck by the stone.", oPC);

       }

    }



}



