Advertisement
Xetrill

Skyrim - [REQ] Script help with GetBaseObject

Feb 16th, 2012
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; RemoveSpellMagicEffect.psc
  2. scriptname RemoveSpellMagicEffect extends ActiveMagicEffect
  3. {Removes a specific spell from the player}
  4.  
  5. ;/////////////////////////////////////////////////////////////////////////////
  6.  / Properties
  7.  /////////////////////////////////////////////////////////////////////////////;
  8.  
  9. Spell property BoundSpell = none auto
  10. {REQUIRED -- bind via CK to MGEF}
  11.  
  12.  
  13. ;/////////////////////////////////////////////////////////////////////////////
  14.  / Events
  15.  /////////////////////////////////////////////////////////////////////////////;
  16.  
  17. event OnEffectStart(Actor unusedTarget, Actor unusedCaster)
  18.     Actor p = Game.GetPlayer()
  19.     if (BoundSpell != none && p.HasSpell(BoundSpell))
  20.         p.RemoveSpell(BoundSpell)
  21.     endif
  22. endevent
  23.  
  24.  
  25. ; PerkTome.psc
  26. scriptname PerkTome extends ObjectReference
  27. {NOTE: The book this script is bound to must be a "learn spell" type book!!!}
  28.  
  29. ;/////////////////////////////////////////////////////////////////////////////
  30.  / Properties
  31.  /////////////////////////////////////////////////////////////////////////////;
  32.  
  33. Perk property BoundPerk auto
  34. {REQUIRED -- has to be bound via the CK}
  35.  
  36.  
  37. ;/////////////////////////////////////////////////////////////////////////////
  38.  / Events
  39.  /////////////////////////////////////////////////////////////////////////////;
  40.  
  41. event OnEquipped(Actor unusedSource)
  42.     Actor p = Game.GetPlayer()
  43.     if (BoundPerk != none && p.HasPerk(BoundPerk) == false)
  44.         p.AddPerk(BoundPerk)
  45.     endif
  46. endevent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement