#include "x0_i0_petrify" #include "nw_i0_generic" void main() { object oTarget; object oTarget1; object oPC = GetPCSpeaker(); object oMod = GetModule(); object oP3 = GetObjectByTag("fountain1"); object oP4 = GetObjectByTag("fountain2"); int oState = GetLocalInt(oMod, "fountain_state"); effect eEffect = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY); if (oState!=1) { DelayCommand(0.0, PlaySound("sce_positive")); ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE); DelayCommand(1.0, FloatingTextStringOnCreature("Restoration Fountains now inaccessable", oPC)); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect, oP3); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect, oP4); SetLocalInt(oMod, "fountain_state", 1); } else { DelayCommand(0.0, PlaySound("sce_negative")); ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE); DelayCommand(1.0, FloatingTextStringOnCreature("Restoration Fountains now accessable", oPC)); RemoveEffectOfType(oP3, GetEffectType(eEffect)); RemoveEffectOfType(oP4, GetEffectType(eEffect)); SetLocalInt(oMod, "fountain_state", 0); } }