Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //:: Created On: Dec 12, 2001
- //:://////////////////////////////////////////////
- //:: Update Pass By: Preston W, On: July 31, 2001
- //:: Thain Pass By: Ankh_Phoenix, On: July 16, 2005
- #include "x2_inc_spellhook"
- void main() {
- /*
- Spellcast Hook Code
- Added 2003-06-20 by Georg
- If you want to make changes to all spells,
- check x2_inc_spellhook.nss to find out more
- */
- if (!X2PreSpellCastCode()) {
- // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
- return;
- }
- // End of Spell Cast Hook
- //Declare major variables including Area of Effect Object
- effect eAOE = EffectAreaOfEffect(AOE_PER_ENTANGLE);
- location lTarget = GetSpellTargetLocation();
- // AP20050716: Use custom GetCasterLevel function, adds Palemaster levels++
- int nDuration = 3 + GetCasterLevel(OBJECT_SELF) / 2;
- int nMetaMagic = GetMetaMagicFeat();
- //Make sure duration does no equal 0
- if (nDuration < 1) {
- nDuration = 1;
- }
- //Check Extend metamagic feat.
- if (nMetaMagic == METAMAGIC_EXTEND) {
- nDuration = nDuration * 2; //Duration is +100%
- }
- //Create an instance of the AOE Object using the Apply Effect function
- ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement