79 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| //::///////////////////////////////////////////////
 | |
| //:: Summon Monster IV
 | |
| //:: NW_S0_Summon4
 | |
| //:: Copyright (c) 2001 Bioware Corp.
 | |
| //:://////////////////////////////////////////////
 | |
| /*
 | |
|     Summons a Sword Spider to fight for the character
 | |
| */
 | |
| //:://////////////////////////////////////////////
 | |
| //:: Created By: Preston Watamaniuk
 | |
| //:: Created On: April 12, 2001
 | |
| //:://////////////////////////////////////////////
 | |
| //:: VFX Pass By: Preston W, On: June 25, 2001
 | |
| 
 | |
| 
 | |
| #include "x2_inc_spellhook"
 | |
| 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
 | |
| 
 | |
|     //Declare major variables
 | |
|     int nMetaMagic = GetMetaMagicFeat();
 | |
|     int nDuration = GetCasterLevel(OBJECT_SELF);
 | |
|     effect eSummon = EffectSummonCreature("NW_S_BEARDIRE");
 | |
|     if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER))
 | |
|     {
 | |
|         eSummon = EffectSummonCreature("NW_S_BEARDIRE");
 | |
|     }
 | |
| 
 | |
|     if ( GetLevelByClass(CLASS_TYPE_RANGER, (OBJECT_SELF)) >= 12 )
 | |
|      {
 | |
|         eSummon = EffectSummonCreature("NW_S_DIRETIGER");
 | |
|      }
 | |
| 
 | |
|     if ( GetLevelByClass(CLASS_TYPE_RANGER, (OBJECT_SELF)) >= 14 )
 | |
|      {
 | |
|         eSummon = EffectSummonCreature("NW_S_EARTHHUGE");
 | |
|      }
 | |
| 
 | |
|     if ( GetLevelByClass(CLASS_TYPE_RANGER, (OBJECT_SELF)) >= 16 )
 | |
|      {
 | |
|         eSummon = EffectSummonCreature("NW_S_EARTHGREAT");
 | |
|      }
 | |
| 
 | |
|     if ( GetLevelByClass(CLASS_TYPE_RANGER, (OBJECT_SELF)) >= 18 )
 | |
|      {
 | |
|         eSummon = EffectSummonCreature("NW_S_EARTHELDER");
 | |
|      }
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|     effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
 | |
|     //Make metamagic check for extend
 | |
|     if (nMetaMagic == METAMAGIC_EXTEND)
 | |
|     {
 | |
|         nDuration = nDuration *2;   //Duration is +100%
 | |
|     }
 | |
|     //Apply the VFX impact and summon effect
 | |
|     ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation());
 | |
|     ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration));
 | |
| }
 | |
| 
 |