90 lines
2.5 KiB
Plaintext
90 lines
2.5 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Gate
|
|
//:: NW_S0_Gate.nss
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
//:: Summons a Balor to fight for the caster.
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Preston Watamaniuk
|
|
//:: Created On: April 12, 2001
|
|
//:://////////////////////////////////////////////
|
|
|
|
// Variant - protection spells er ikke laengere kraevet.
|
|
// Summons er altid allies.l
|
|
|
|
#include "x2_inc_spellhook"
|
|
|
|
const string EVIL_SUMMON = "nw_s_balor";
|
|
const string GOOD_SUMMON = "s_balor001";
|
|
const string NEUTRAL_SUMMON = "s_balor002";
|
|
|
|
/*
|
|
const string EVIL_FAIL_SUMMON = "NW_S_BALOR_EVIL";
|
|
const string GOOD_FAIL_SUMMON = "NW_S_BALOR_EVIL";
|
|
const string NEUTRAL_FAIL_SUMMON = "NW_S_BALOR_EVIL";
|
|
*/
|
|
|
|
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
|
|
int nMetaMagic = GetMetaMagicFeat();
|
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
|
effect eSummon;
|
|
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
|
|
//Make metamagic extend check
|
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
|
{
|
|
nDuration = nDuration *2; //Duration is +100%
|
|
}
|
|
//Summon the Balor and apply the VFX impact
|
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
|
location lSpellTargetLOC = GetSpellTargetLocation();
|
|
|
|
string summonster = "";
|
|
int alignment = GetAlignmentGoodEvil( OBJECT_SELF );
|
|
switch ( alignment )
|
|
{
|
|
case ALIGNMENT_EVIL:
|
|
summonster = EVIL_SUMMON;
|
|
break;
|
|
|
|
case ALIGNMENT_GOOD:
|
|
summonster = GOOD_SUMMON;
|
|
break;
|
|
|
|
case ALIGNMENT_NEUTRAL:
|
|
summonster = NEUTRAL_SUMMON;
|
|
break;
|
|
|
|
default:
|
|
summonster = EVIL_SUMMON;
|
|
FloatingTextStringOnCreature( "An error has occured in the Gate-spellscript - please report to a DM or on the forum", OBJECT_SELF, FALSE);
|
|
break;
|
|
}
|
|
eSummon = EffectSummonCreature(summonster,VFX_FNF_SUMMON_GATE,3.0);
|
|
float fSeconds = HoursToSeconds(nDuration);
|
|
DelayCommand(3.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds));
|
|
|
|
|
|
}
|
|
|