Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.34 KB | None | 0 0
  1. //:: Created On:  Dec 12, 2001
  2. //:://////////////////////////////////////////////
  3. //:: Update Pass By: Preston W, On: July 31, 2001
  4. //:: Thain Pass By: Ankh_Phoenix, On: July 16, 2005
  5.  
  6. #include "x2_inc_spellhook"
  7.  
  8. void main() {
  9.     /*
  10.       Spellcast Hook Code
  11.       Added 2003-06-20 by Georg
  12.       If you want to make changes to all spells,
  13.       check x2_inc_spellhook.nss to find out more
  14.  
  15.     */
  16.     if (!X2PreSpellCastCode()) {
  17.         // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
  18.         return;
  19.     }
  20.  
  21. // End of Spell Cast Hook
  22.     //Declare major variables including Area of Effect Object
  23.     effect eAOE = EffectAreaOfEffect(AOE_PER_ENTANGLE);
  24.     location lTarget = GetSpellTargetLocation();
  25.     // AP20050716: Use custom GetCasterLevel function, adds Palemaster levels++
  26.     int nDuration = 3 + GetCasterLevel(OBJECT_SELF) / 2;
  27.     int nMetaMagic = GetMetaMagicFeat();
  28.  
  29.     //Make sure duration does no equal 0
  30.     if (nDuration < 1) {
  31.         nDuration = 1;
  32.     }
  33.  
  34.     //Check Extend metamagic feat.
  35.     if (nMetaMagic == METAMAGIC_EXTEND) {
  36.         nDuration = nDuration * 2;   //Duration is +100%
  37.     }
  38.  
  39.     //Create an instance of the AOE Object using the Apply Effect function
  40.     ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration));
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement