effect eEffect;
object oTarget;
/*   Script generated by
Lilac Soul's NWN Script Generator, v. 1.6

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

//Put this OnUsed
void main()
{

object oPC = GetLastUsedBy();

if (!GetIsPC(oPC)) return;

int nInt;
nInt=GetLocalInt(oPC, "intc44Spins");

if ((nInt == 0))
    {
    return;
    }
if ((nInt == 2))
    {
    return;
    }


if ((nInt == 1))
    {
    int nDamage;
    oTarget = oPC;
    if (FortitudeSave(oPC, 15, SAVING_THROW_TYPE_TRAP  ))
       {
       nDamage = (d4(1))+1;
       eEffect = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING, DAMAGE_POWER_NORMAL);
       ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);

       FloatingTextStringOnCreature("You tear yourself free from the statue.  Your hands and limbs are badly hurt from the effort.", oPC);

       SetLocalInt(oPC, "intc44Spins", 0);
       return;

       }

    eEffect = EffectParalyze();

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

    FloatingTextStringOnCreature("You are stuck to the statue.  It whirls around dragging you on the floor and smashing you into the walls.", oPC);

    nDamage = (d4(1))+1;

    eEffect = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING, DAMAGE_POWER_NORMAL);

    ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);

    }

}



