void main() { object oMe=OBJECT_SELF; if (GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oMe,1)!=OBJECT_INVALID) {// PC is near effect eShadowArmor=EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR); if (GetLocalInt(oMe,"nShadowArmor")!=TRUE) { // apply shadow armor ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShadowArmor,oMe,10000.0); SetLocalInt(oMe,"nShadowArmor",TRUE); } // apply shadow armor } // PC is near }