Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //::///////////////////////////////////////////////////////////
- //:: EFUA Spell Wrappers
- //:: Added by: Johannes
- //:: Module Version: v1045
- //:: Updated On: Nov 5, 2010
- //:: Copyright(c) 2010 escapefromunderdark.com
- //::///////////////////////////////////////////////////////////
- //:: This script is confidential: it is not to be shared with
- //:: anyone, except for staff of escapefromunderdark.com.
- //::
- //:: Please try to avoid implementing widespread change to
- //:: spells by directly editing spell scripts. Whenever
- //:: possible, try effecting your changes by editing the EFU
- //:: spell function wrappers, which can be found principally
- //:: under the include script inc_spells.
- //::
- //:: Finally, we remind you that it is important to respect
- //:: EFU's coding conventions and standards. When in doubt,
- //:: please ask your fellow DMs!
- //::///////////////////////////////////////////////////////////
- #include "inc_spells"
- //::///////////////////////////////////////////////
- //:: Summon Creature Series
- //:: NW_S0_Summon
- //:: Copyright (c) 2001 Bioware Corp.
- //:://////////////////////////////////////////////
- /*
- Carries out the summoning of the appropriate
- creature for the Summon Monster Series of spells
- 1 to 9
- */
- //:://////////////////////////////////////////////
- //:: Created By: Preston Watamaniuk
- //:: Created On: Jan 8, 2002
- //:://////////////////////////////////////////////
- //
- // NOTE: This is the script that actually controls
- // summoning, ~not~ nw_s0_summon1,2,3,...
- //
- //:://////////////////////////////////////////////
- effect SetSummonEffect(int nSpellID);
- #include "inc_char_token"
- void main()
- {
- /*
- Spellcast Hook Code
- Added 2003-06-23 by GeorgZ
- 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
- //Polymorph ability uses
- if (GetIsPC(OBJECT_SELF) && GetHasEffect(EFFECT_TYPE_POLYMORPH))
- {
- int nUses = GetLocalInt(OBJECT_SELF, "nPolymorphAbility");
- if (nUses < 1)
- {
- FloatingTextStrRefOnCreature(83576, OBJECT_SELF);
- return;
- }
- SetLocalInt(OBJECT_SELF, "nPolymorphAbility", nUses-1);
- }
- // Remove custom systems summons
- RemoveMirrorImages(OBJECT_SELF);
- RemoveAnimatedWeapons(OBJECT_SELF);
- RemoveShadowConjuration(OBJECT_SELF);
- //Declare major variables
- int nSpellID = EFUGetSpellId();
- int nDuration = (4 + 2 * (GetWizardSpecialization(OBJECT_SELF) == SPELL_SCHOOL_CONJURATION) + 2 * (GetLocalInt(OBJECT_SELF, "bCultistDuration")) + GetHasFeat(FEAT_SPELL_FOCUS_CONJURATION) + GetHasFeat(FEAT_GREATER_SPELL_FOCUS_CONJURATION)) * EFUGetCasterLevel(OBJECT_SELF);
- //Make metamagic check for extend
- int nMetaMagic = EFU_GetMetaMagicFeat();
- if (nMetaMagic == METAMAGIC_EXTEND)
- nDuration *= 2; //Duration is +100%
- if(GetTokenInt(OBJECT_SELF,"bFeat_PlanarLock")) nDuration = FloatToInt(IntToFloat(nDuration)*1.2); //Duration + 20%.
- //Apply the VFX impact and summon effect
- SetLocalInt(OBJECT_SELF, "nSummon_Discount_Needs_Postprocessing", FALSE);
- int nPostprocessingInstruction = 0;
- effect eSummon = GetSummonEffect(OBJECT_SELF, nSpellID);
- if(GetLocalInt(OBJECT_SELF, "nSummon_Discount_Needs_Postprocessing")) {
- nPostprocessingInstruction = PROCESS_SUMMON_DISCOUNT;
- }
- int nSpellLevel = StringToInt(Get2DAString("spells.2da", "Innate", nSpellID));
- int bNoMultiSummon = FALSE;
- if(GetLocalInt(OBJECT_SELF, "bNoMultiSummon") || GetIsObjectValid(GetSpellCastItem()))
- bNoMultiSummon = TRUE;
- EFUSummon(eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration), OBJECT_SELF, SPELL_SCHOOL_CONJURATION, bNoMultiSummon, nPostprocessingInstruction, IntToFloat(nSpellLevel));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement