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

//Put this OnEnter
void main()
{

object oPC = GetEnteringObject();

if (!GetIsPC(oPC)) return;

int nInt;
nInt=GetPLocalInt(oPC, "01DeepWater");

if (!(nInt <= 1))

   return;

//if (!ReflexSave(oPC, 10, SAVING_THROW_TYPE_TRAP  ))
//    FloatingTextStringOnCreature("The portion of the room you have entered is much deeper.  You step off the edge and the weight of your gear nearly drags you down to the bottom. You regain your footing and remain on the edge of the ledge.  You should be able to avoid the pit now that you know it's there.", oPC);
//    SetLocalInt(oPC, "01DeepWater", 2);
//
//   return;

FloatingTextStringOnCreature("The portion of the room you have entered is much deeper.  You step off the edge and the weight of your gear drags you down to the bottom.", oPC);

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

ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);

object oTarget;
oTarget = oPC;

eEffect = EffectKnockdown();

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5.0f);

DelayCommand(6.0, FloatingTextStringOnCreature("Slowly you struggle out of the water and back to safety. It will be easy to avoid the deep water in the future.", oPC));

}

