Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1.  
  2. void Dispell(effect eEffect, object oTarget)
  3. {
  4.     int nSpellID = GetEffectSpellId(eEffect);
  5.     string sHostile = Get2DAString("spells", "HostileSetting", nSpellID);
  6.     while(GetIsEffectValid(eEffect))
  7.     {
  8.         if(sHostile == "1")
  9.         {
  10.                 if(GetEffectSubType(eEffect) == SUBTYPE_MAGICAL)
  11.                 {
  12.                    RemoveEffect(oTarget, eEffect);
  13.                 }
  14.        
  15.         }
  16.         eEffect = GetNextEffect(oTarget);
  17.     }
  18. }
  19.  
  20. void main()
  21. {
  22.     object oPlayer = OBJECT_SELF;
  23.     if(GetHasAnySpellEffect(oPlayer))
  24.     {
  25.         effect eEffect = GetFirstEffect(oPlayer);
  26.         Dispell(eEffect, oPlayer);
  27.     }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement