#include "x0_i0_petrify" #include "nw_i0_generic" void main() { object oTarget; object oTarget1; object oPC = GetPCSpeaker(); object oMod = GetModule(); object oP1 = GetObjectByTag("pool1"); object oP2 = GetObjectByTag("pool2"); int oState = GetLocalInt(oMod, "pool_state"); effect eEffect = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY); effect eEffect2 = EffectVisualEffect(VFX_NONE); if (oState!=1) { SetLocalInt(oMod, "pool_state", 1); DelayCommand(0.0, PlaySound("sce_positive")); ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE); DelayCommand(1.0, FloatingTextStringOnCreature("Rejeuvination pools now inaccessable", oPC)); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect, oP1); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect, oP2); } else { SetLocalInt(oMod, "pool_state", 0); DelayCommand(0.0, PlaySound("sce_negative")); ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE); DelayCommand(1.0, FloatingTextStringOnCreature("Rejeuvination pools now accessable", oPC)); RemoveEffectOfType(oP1, GetEffectType(eEffect)); RemoveEffectOfType(oP2, GetEffectType(eEffect)); } }