Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Dispell(effect eEffect, object oTarget)
- {
- int nSpellID = GetEffectSpellId(eEffect);
- string sHostile = Get2DAString("spells", "HostileSetting", nSpellID);
- while(GetIsEffectValid(eEffect))
- {
- if(sHostile == "1")
- {
- if(GetEffectSubType(eEffect) == SUBTYPE_MAGICAL)
- {
- RemoveEffect(oTarget, eEffect);
- }
- }
- eEffect = GetNextEffect(oTarget);
- }
- }
- void main()
- {
- object oPlayer = OBJECT_SELF;
- if(GetHasAnySpellEffect(oPlayer))
- {
- effect eEffect = GetFirstEffect(oPlayer);
- Dispell(eEffect, oPlayer);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement