#include "x0_i0_petrify" #include "prc_inc_util" void DeathCheck (object oPC) { if (GetIsDead(oPC)==TRUE) { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPC); } } void main() { object oPC = GetLastUsedBy(); object oMod = GetModule(); object oCaster; oCaster = OBJECT_SELF; object oTarget; oTarget = oPC; int nInt = GetObjectType(oTarget); int oState = GetLocalInt(oMod, "pool_state"); int iCurrent = GetCurrentHitPoints(oPC); int iMax = GetMaxHitPoints(oPC); int iHeal = iMax - iCurrent; if (oState !=1) { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_DUR_PIXIEDUST), oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_NATURES_BALANCE), oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(iMax), oTarget); //AssignCommand(oCaster, ActionCastSpellAtObject(SPELL_GREATER_RESTORATION, oTarget, METAMAGIC_ANY, TRUE, 20, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)); DelayCommand(0.2, PRCForceRest(oPC)); //DelayCommand(2.0, DeathCheck(oPC)); DelayCommand(1.0, FloatingTextStringOnCreature("You feel rested", oPC)); } else { PlaySound("sim_cntresist"); //FloatingTextStringOnCreature("You can't reach the pool", oPC); } }