Added "removed" folder
This commit is contained in:
parent
8a83a1b51a
commit
b7139401ed
BIN
_removed/70_spellhook.ncs
Normal file
BIN
_removed/70_spellhook.ncs
Normal file
Binary file not shown.
257
_removed/70_spellhook.nss
Normal file
257
_removed/70_spellhook.nss
Normal file
@ -0,0 +1,257 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Community Patch 1.71: Improve Spell Hook Include File
|
||||
//:: 70_spellhook
|
||||
//:: Copyright (c) 2003 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
This file acts as a hub for all code that
|
||||
is hooked into the nwn spellscripts'
|
||||
|
||||
If you want to implement material components
|
||||
into spells or add restrictions to certain
|
||||
spells, this is the place to do it.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Shadooow
|
||||
//:: Created On: 2012-01-17
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
int MusicalInstrumentsCheck(object oItem)
|
||||
{
|
||||
int bRulesApply = GetGameDifficulty() >= GAME_DIFFICULTY_CORE_RULES;
|
||||
if(bRulesApply)
|
||||
{
|
||||
switch(GetLocalInt(GetModule(),"71_RESTRICT_MUSICAL_INSTRUMENTS"))
|
||||
{
|
||||
case 1://perform based
|
||||
if(GetSkillRank(SKILL_PERFORM) > -1)
|
||||
{
|
||||
int nDC = GetLocalInt(oItem,"MUSICAL_INSTRUMENT_DC");
|
||||
if(!nDC)
|
||||
{
|
||||
nDC = 7+3*StringToInt(Get2DAString("des_crft_spells","Level",GetSpellId()));
|
||||
}
|
||||
if(!GetIsSkillSuccessful(OBJECT_SELF, SKILL_PERFORM, nDC))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), OBJECT_SELF);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStrRefOnCreature(8288,OBJECT_SELF,FALSE);//you cannot use this skill
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
case 2://song feat based
|
||||
if(GetHasFeat(FEAT_BARD_SONGS))
|
||||
{
|
||||
DecrementRemainingFeatUses(OBJECT_SELF,FEAT_BARD_SONGS);
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStrRefOnCreature(40063,OBJECT_SELF,FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
int bDeaf;
|
||||
effect e1 = GetNextEffect(OBJECT_SELF);//part1 check for silence effect
|
||||
while(GetIsEffectValid(e1))
|
||||
{
|
||||
switch(GetEffectType(e1))
|
||||
{
|
||||
case EFFECT_TYPE_SILENCE:
|
||||
FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced
|
||||
return FALSE;
|
||||
case EFFECT_TYPE_DEAF:
|
||||
bDeaf = TRUE;
|
||||
break;
|
||||
}
|
||||
e1 = GetNextEffect(OBJECT_SELF);
|
||||
}
|
||||
if(bDeaf && bRulesApply && d100() < 21)// 20% chance to fail under deafness
|
||||
{
|
||||
FloatingTextStrRefOnCreature(83576,OBJECT_SELF); //* You can not concentrate on using this ability effectively *
|
||||
return FALSE;
|
||||
}
|
||||
string music = GetLocalString(oItem,"MUSICAL_INSTRUMENT_SOUND");
|
||||
if(music == "")
|
||||
{
|
||||
music = "sdr_bardsong";
|
||||
}
|
||||
PlaySound(music);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// if X2_EXECUTE_SCRIPT_END is set by this script, the original spell will not be cast
|
||||
// the order in which the functions are called here DOES MATTER, changing it
|
||||
// WILL break the crafting subsystems
|
||||
//------------------------------------------------------------------------------
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetSpellTargetObject();
|
||||
object oItem = GetSpellCastItem();
|
||||
|
||||
if(oItem != OBJECT_INVALID)
|
||||
{
|
||||
int spellOverride = GetLocalInt(oItem,"ITEM_SPELL_OVERRIDE");
|
||||
if(spellOverride != 0 && !GetLocalInt(GetModule(),"SPELL_OVERRIDE_FINISHED"))
|
||||
{
|
||||
SetLocalInt(GetModule(),"SPELL_OVERRIDE_FINISHED",TRUE);
|
||||
ExecuteScript(Get2DAString("spells","ImpactScript",spellOverride < 0 ? 0 : spellOverride),OBJECT_SELF);
|
||||
SetLocalInt(GetModule(),"SPELL_OVERRIDE_FINISHED",FALSE);
|
||||
SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else//metamagic exploit handling
|
||||
{
|
||||
int nMeta = GetMetaMagicFeat();
|
||||
if((nMeta == METAMAGIC_EMPOWER && !GetHasFeat(FEAT_EMPOWER_SPELL)) || (nMeta == METAMAGIC_MAXIMIZE && !GetHasFeat(FEAT_MAXIMIZE_SPELL)))
|
||||
{
|
||||
effect e = GetFirstEffect(OBJECT_SELF);
|
||||
nMeta = -1;
|
||||
while(GetIsEffectValid(e))
|
||||
{
|
||||
if(GetEffectType(e) == EFFECT_TYPE_POLYMORPH)//if used in polymorph nothing happens, CP fixes this exploit in engine
|
||||
{
|
||||
nMeta = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if((nMeta == METAMAGIC_EXTEND && !GetHasFeat(FEAT_EXTEND_SPELL)) || (nMeta == METAMAGIC_QUICKEN && !GetHasFeat(FEAT_QUICKEN_SPELL)) ||
|
||||
(nMeta == METAMAGIC_SILENT && !GetHasFeat(FEAT_SILENCE_SPELL)) || (nMeta == METAMAGIC_STILL && !GetHasFeat(FEAT_STILL_SPELL)))
|
||||
{
|
||||
nMeta = -1;
|
||||
}
|
||||
if(nMeta < 0)
|
||||
{
|
||||
//block the spell for exploit abuse
|
||||
FloatingTextStrRefOnCreature(3734,OBJECT_SELF,FALSE);//prints "Spell failed!"
|
||||
SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END);
|
||||
return;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// This small addition will check to see if the target is mounted and the
|
||||
// spell is therefor one that should not be permitted.
|
||||
//---------------------------------------------------------------------------
|
||||
if(!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // do check for abort due to being mounted check
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(X3ShapeShiftSpell(oTarget))
|
||||
{
|
||||
SetLocalInt(oTarget, "Polymorphed", TRUE);
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END);
|
||||
return;
|
||||
}// shape shifting not allowed while mounted
|
||||
break;
|
||||
}
|
||||
} // do check for abort due to being mounted check
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// This stuff is only interesting for player characters we assume that use
|
||||
// magic device always works and NPCs don't use the crafting feats or
|
||||
// sequencers anyway. Thus, any NON PC spellcaster always exits this script
|
||||
// with TRUE (unless they are DM possessed or in the Wild Magic Area in
|
||||
// Chapter 2 of Hordes of the Underdark.
|
||||
//---------------------------------------------------------------------------
|
||||
/*if (!GetIsPC(OBJECT_SELF))
|
||||
{
|
||||
if( !GetIsDMPossessed(OBJECT_SELF) && !GetLocalInt(GetArea(OBJECT_SELF), "X2_L_WILD_MAGIC"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Break any spell require maintaining concentration (only black blade of
|
||||
// disaster)
|
||||
// /*REM*/ X2BreakConcentrationSpells();
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Run use magic device skill check
|
||||
//---------------------------------------------------------------------------
|
||||
int nContinue = X2UseMagicDeviceCheck();
|
||||
|
||||
if (nContinue)
|
||||
{
|
||||
//-----------------------------------------------------------------------
|
||||
// run any user defined spellscript here
|
||||
//-----------------------------------------------------------------------
|
||||
nContinue = X2RunUserDefinedSpellScript();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// The following code is only of interest if an item was targeted
|
||||
//---------------------------------------------------------------------------
|
||||
if (GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_ITEM)
|
||||
{
|
||||
//-----------------------------------------------------------------------
|
||||
// Check if spell was used to trigger item creation feat
|
||||
//-----------------------------------------------------------------------
|
||||
if (nContinue)
|
||||
{
|
||||
nContinue = !ExecuteScriptAndReturnInt("x2_pc_craft",OBJECT_SELF);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Check if spell was used for on a sequencer item
|
||||
//-----------------------------------------------------------------------
|
||||
if (nContinue)
|
||||
{
|
||||
nContinue = !X2GetSpellCastOnSequencerItem(oTarget);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// * Execute item OnSpellCast At routing script if activated
|
||||
//-----------------------------------------------------------------------
|
||||
if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS))
|
||||
{
|
||||
SetUserDefinedItemEventNumber(X2_ITEM_EVENT_SPELLCAST_AT);
|
||||
int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oTarget),OBJECT_SELF);
|
||||
if (nRet == X2_EXECUTE_SCRIPT_END)
|
||||
{
|
||||
SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Prevent any spell that has no special coding to handle targetting of items
|
||||
// from being cast on items. We do this because we can not predict how
|
||||
// all the hundreds spells in NWN will react when cast on items
|
||||
//-----------------------------------------------------------------------
|
||||
if (nContinue)
|
||||
{
|
||||
nContinue = X2CastOnItemWasAllowed(oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
if(GetLocalInt(oItem,"MUSICAL_INSTRUMENT"))//variable indicating musical instrument
|
||||
{
|
||||
nContinue = MusicalInstrumentsCheck(oItem);
|
||||
}
|
||||
|
||||
|
||||
SetExecutedScriptReturnValue(!nContinue);
|
||||
}
|
BIN
_removed/druid_air.ncs
Normal file
BIN
_removed/druid_air.ncs
Normal file
Binary file not shown.
162
_removed/druid_air.nss
Normal file
162
_removed/druid_air.nss
Normal file
@ -0,0 +1,162 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shape
|
||||
//:: NW_S2_ElemShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into elemental forms.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
/* #include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop" */
|
||||
#include "prc_x2_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID); //GetCasterLevel(OBJECT_SELF);
|
||||
int bElder = FALSE;
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
if(GetLevelByClass(CLASS_TYPE_DRUID) >= 20)
|
||||
{
|
||||
bElder = TRUE;
|
||||
}
|
||||
//Determine Polymorph subradial type
|
||||
if(bElder == FALSE)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_HUGE_AIR_ELEMENTAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ELDER_AIR_ELEMENTAL;
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_ELEMENTAL_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
_removed/druid_badger.ncs
Normal file
BIN
_removed/druid_badger.ncs
Normal file
Binary file not shown.
164
_removed/druid_badger.nss
Normal file
164
_removed/druid_badger.nss
Normal file
@ -0,0 +1,164 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wild Shape
|
||||
//:: NW_S2_WildShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into animal forms.
|
||||
|
||||
Updated: Sept 30 2003, Georg Z.
|
||||
* Made Armor merge with druid to make forms
|
||||
more useful.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID);
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
nPoly = POLYMORPH_TYPE_BADGER;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BADGER;
|
||||
}
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
}
|
BIN
_removed/druid_bear.ncs
Normal file
BIN
_removed/druid_bear.ncs
Normal file
Binary file not shown.
164
_removed/druid_bear.nss
Normal file
164
_removed/druid_bear.nss
Normal file
@ -0,0 +1,164 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wild Shape
|
||||
//:: NW_S2_WildShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into animal forms.
|
||||
|
||||
Updated: Sept 30 2003, Georg Z.
|
||||
* Made Armor merge with druid to make forms
|
||||
more useful.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID);
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
nPoly = POLYMORPH_TYPE_BROWN_BEAR;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
|
||||
}
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
}
|
BIN
_removed/druid_blued.ncs
Normal file
BIN
_removed/druid_blued.ncs
Normal file
Binary file not shown.
161
_removed/druid_blued.nss
Normal file
161
_removed/druid_blued.nss
Normal file
@ -0,0 +1,161 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shape
|
||||
//:: NW_S2_ElemShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into elemental forms.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID); //GetCasterLevel(OBJECT_SELF);
|
||||
int bElder = FALSE;
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
if(GetLevelByClass(CLASS_TYPE_DRUID) >= 20)
|
||||
{
|
||||
bElder = TRUE;
|
||||
}
|
||||
//Determine Polymorph subradial type
|
||||
if(bElder == FALSE)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ANCIENT_BLUE_DRAGON;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ANCIENT_BLUE_DRAGON;
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_ELEMENTAL_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
_removed/druid_boar.ncs
Normal file
BIN
_removed/druid_boar.ncs
Normal file
Binary file not shown.
164
_removed/druid_boar.nss
Normal file
164
_removed/druid_boar.nss
Normal file
@ -0,0 +1,164 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wild Shape
|
||||
//:: NW_S2_WildShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into animal forms.
|
||||
|
||||
Updated: Sept 30 2003, Georg Z.
|
||||
* Made Armor merge with druid to make forms
|
||||
more useful.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID);
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
nPoly = POLYMORPH_TYPE_BOAR;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BOAR;
|
||||
}
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
}
|
BIN
_removed/druid_earth.ncs
Normal file
BIN
_removed/druid_earth.ncs
Normal file
Binary file not shown.
161
_removed/druid_earth.nss
Normal file
161
_removed/druid_earth.nss
Normal file
@ -0,0 +1,161 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shape
|
||||
//:: NW_S2_ElemShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into elemental forms.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID); //GetCasterLevel(OBJECT_SELF);
|
||||
int bElder = FALSE;
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
if(GetLevelByClass(CLASS_TYPE_DRUID) >= 20)
|
||||
{
|
||||
bElder = TRUE;
|
||||
}
|
||||
//Determine Polymorph subradial type
|
||||
if(bElder == FALSE)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_HUGE_EARTH_ELEMENTAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ELDER_EARTH_ELEMENTAL;
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_ELEMENTAL_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
_removed/druid_fire.ncs
Normal file
BIN
_removed/druid_fire.ncs
Normal file
Binary file not shown.
161
_removed/druid_fire.nss
Normal file
161
_removed/druid_fire.nss
Normal file
@ -0,0 +1,161 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shape
|
||||
//:: NW_S2_ElemShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into elemental forms.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID); //GetCasterLevel(OBJECT_SELF);
|
||||
int bElder = FALSE;
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
if(GetLevelByClass(CLASS_TYPE_DRUID) >= 20)
|
||||
{
|
||||
bElder = TRUE;
|
||||
}
|
||||
//Determine Polymorph subradial type
|
||||
if(bElder == FALSE)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_HUGE_FIRE_ELEMENTAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ELDER_FIRE_ELEMENTAL;
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_ELEMENTAL_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
_removed/druid_greend.ncs
Normal file
BIN
_removed/druid_greend.ncs
Normal file
Binary file not shown.
161
_removed/druid_greend.nss
Normal file
161
_removed/druid_greend.nss
Normal file
@ -0,0 +1,161 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shape
|
||||
//:: NW_S2_ElemShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into elemental forms.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID); //GetCasterLevel(OBJECT_SELF);
|
||||
int bElder = FALSE;
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
if(GetLevelByClass(CLASS_TYPE_DRUID) >= 20)
|
||||
{
|
||||
bElder = TRUE;
|
||||
}
|
||||
//Determine Polymorph subradial type
|
||||
if(bElder == FALSE)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ANCIENT_GREEN_DRAGON;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ANCIENT_GREEN_DRAGON;
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_ELEMENTAL_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
_removed/druid_panther.ncs
Normal file
BIN
_removed/druid_panther.ncs
Normal file
Binary file not shown.
164
_removed/druid_panther.nss
Normal file
164
_removed/druid_panther.nss
Normal file
@ -0,0 +1,164 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wild Shape
|
||||
//:: NW_S2_WildShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into animal forms.
|
||||
|
||||
Updated: Sept 30 2003, Georg Z.
|
||||
* Made Armor merge with druid to make forms
|
||||
more useful.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID);
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
nPoly = POLYMORPH_TYPE_PANTHER;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_PANTHER;
|
||||
}
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
}
|
BIN
_removed/druid_redd.ncs
Normal file
BIN
_removed/druid_redd.ncs
Normal file
Binary file not shown.
161
_removed/druid_redd.nss
Normal file
161
_removed/druid_redd.nss
Normal file
@ -0,0 +1,161 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shape
|
||||
//:: NW_S2_ElemShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into elemental forms.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID); //GetCasterLevel(OBJECT_SELF);
|
||||
int bElder = FALSE;
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
if(GetLevelByClass(CLASS_TYPE_DRUID) >= 20)
|
||||
{
|
||||
bElder = TRUE;
|
||||
}
|
||||
//Determine Polymorph subradial type
|
||||
if(bElder == FALSE)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ANCIENT_RED_DRAGON;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ANCIENT_RED_DRAGON;
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_ELEMENTAL_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
_removed/druid_water.ncs
Normal file
BIN
_removed/druid_water.ncs
Normal file
Binary file not shown.
161
_removed/druid_water.nss
Normal file
161
_removed/druid_water.nss
Normal file
@ -0,0 +1,161 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shape
|
||||
//:: NW_S2_ElemShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into elemental forms.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID); //GetCasterLevel(OBJECT_SELF);
|
||||
int bElder = FALSE;
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
if(GetLevelByClass(CLASS_TYPE_DRUID) >= 20)
|
||||
{
|
||||
bElder = TRUE;
|
||||
}
|
||||
//Determine Polymorph subradial type
|
||||
if(bElder == FALSE)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_HUGE_WATER_ELEMENTAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_ELDER_WATER_ELEMENTAL;
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_ELEMENTAL_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
_removed/druid_wolf.ncs
Normal file
BIN
_removed/druid_wolf.ncs
Normal file
Binary file not shown.
164
_removed/druid_wolf.nss
Normal file
164
_removed/druid_wolf.nss
Normal file
@ -0,0 +1,164 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wild Shape
|
||||
//:: NW_S2_WildShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into animal forms.
|
||||
|
||||
Updated: Sept 30 2003, Georg Z.
|
||||
* Made Armor merge with druid to make forms
|
||||
more useful.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- cured from horse include while retaining the shapeshifting horse check
|
||||
- fixed dying when unpolymorphed as an result of sudden constitution bonus drop
|
||||
which also could result to the server crash
|
||||
*/
|
||||
|
||||
#include "x2_inc_itemprop"
|
||||
#include "70_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID);
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
switch(GetPhenoType(oTarget))
|
||||
{// shape shifting not allowed while mounted
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 8:
|
||||
if(GetIsPC(oTarget))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
}
|
||||
// shape shifting not allowed while mounted
|
||||
return;
|
||||
}
|
||||
} // check to see if abort due to being mounted
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
nPoly = POLYMORPH_TYPE_WOLF;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_WOLF;
|
||||
}
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
int nConBonus;
|
||||
if (bWeapon)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oWeaponOld);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oArmorOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oHelmetOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oShield);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing1Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oRing2Old);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oAmuletOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oCloakOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBeltOld);
|
||||
nConBonus = IPGetBestConBonus(nConBonus,oBootsOld);
|
||||
}
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
if(nConBonus > 0)
|
||||
{//1.70 patch fix by Shadooow: this fixes dying when unpolymorphed issue as well as server crash related to this
|
||||
ePoly = EffectLinkEffects(ePoly,EffectAbilityIncrease(ABILITY_CONSTITUTION,nConBonus));
|
||||
}
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
|
||||
ClearAllActions(); // prevents an exploit
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF);
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING", 10);
|
||||
SetLocalInt(OBJECT_SELF, "POLYMORPHED", 1);
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
}
|
BIN
_removed/nw_s0_animdead.ncs
Normal file
BIN
_removed/nw_s0_animdead.ncs
Normal file
Binary file not shown.
89
_removed/nw_s0_animdead.nss
Normal file
89
_removed/nw_s0_animdead.nss
Normal file
@ -0,0 +1,89 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Animate Dead
|
||||
//:: NW_S0_AnimDead.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a powerful skeleton or zombie depending
|
||||
on caster level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 11, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "70_inc_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDuration = 24;
|
||||
//effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||
effect eSummon;
|
||||
//Metamagic extension if needed
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration * 2; //Duration is +100%
|
||||
}
|
||||
//Summon the appropriate creature based on the summoner level
|
||||
if (spell.Level <= 5)
|
||||
{
|
||||
//Tyrant Fog Zombie
|
||||
eSummon = EffectSummonCreature("NW_S_ZOMBTYRANT",VFX_FNF_SUMMON_UNDEAD);
|
||||
}
|
||||
else if ((spell.Level >= 6) && (spell.Level <= 9))
|
||||
{
|
||||
//Skeleton Warrior
|
||||
eSummon = EffectSummonCreature("NW_S_SKELWARR",VFX_FNF_SUMMON_UNDEAD);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Skeleton Chieftain
|
||||
eSummon = EffectSummonCreature("NW_S_SKELCHIEF",VFX_FNF_SUMMON_UNDEAD);
|
||||
}
|
||||
//Apply the summon visual and summon the two undead.
|
||||
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||
|
||||
//Apply better summons instead if a caster is a level 11 or better Pale Master and the spell is not cast from an item.
|
||||
if ( GetLevelByClass(CLASS_TYPE_PALE_MASTER, OBJECT_SELF) > 29 )
|
||||
{
|
||||
switch(d3())
|
||||
{
|
||||
case 1: eSummon = EffectSummonCreature("s_skelhero2",VFX_FNF_SUMMON_UNDEAD);break;
|
||||
case 2: eSummon = EffectSummonCreature("S_SKELMAGE",VFX_FNF_SUMMON_UNDEAD);break;
|
||||
case 3: eSummon = EffectSummonCreature("S_SKELPRIEST",VFX_FNF_SUMMON_UNDEAD);break;
|
||||
}
|
||||
}
|
||||
else if ( GetLevelByClass(CLASS_TYPE_PALE_MASTER, OBJECT_SELF) > 10 )
|
||||
{
|
||||
switch(d3())
|
||||
{
|
||||
case 1: eSummon = EffectSummonCreature("S_SKELHERO",VFX_FNF_SUMMON_UNDEAD);break;
|
||||
case 2: eSummon = EffectSummonCreature("S_SKELMAGE",VFX_FNF_SUMMON_UNDEAD);break;
|
||||
case 3: eSummon = EffectSummonCreature("S_SKELPRIEST",VFX_FNF_SUMMON_UNDEAD);break;
|
||||
}
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, spell.Loc, HoursToSeconds(nDuration));
|
||||
}
|
||||
|
||||
|
BIN
_removed/nw_s0_circdeath.ncs
Normal file
BIN
_removed/nw_s0_circdeath.ncs
Normal file
Binary file not shown.
128
_removed/nw_s0_circdeath.nss
Normal file
128
_removed/nw_s0_circdeath.nss
Normal file
@ -0,0 +1,128 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Circle of Death
|
||||
//:: NW_S0_CircDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The caster slays a number of HD worth of creatures
|
||||
equal to 1d4 times level. The creature gets a
|
||||
Fort Save or dies.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: June 1, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Aidan Scanlan
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: July 25, 2001
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
object oTarget;
|
||||
object oLowest;
|
||||
effect eDeath = EffectDeath();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_20);
|
||||
int bContinueLoop = FALSE; //Used to determine if we have a next valid target
|
||||
int nHD = MaximizeOrEmpower(4,spell.Level,spell.Meta);
|
||||
int nDC;
|
||||
|
||||
int nCurrentHD;
|
||||
int bAlreadyAffected;
|
||||
int nMax = 40;// maximun hd creature affected, set this to 9 so that a lower HD creature is chosen automatically
|
||||
//Also 9 is the maximum HD a creature can have and still be affected by the spell
|
||||
float fDelay;
|
||||
string sIdentifier = GetTag(spell.Caster);
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, spell.Loc);
|
||||
//Check for at least one valid object to start the main loop
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, spell.Loc);
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
bContinueLoop = TRUE;
|
||||
}
|
||||
// The above checks to see if there is at least one valid target. If no value target exists we do not enter
|
||||
// the loop.
|
||||
|
||||
while ((nHD > 0) && (bContinueLoop))
|
||||
{
|
||||
int nLow = nMax; //Set nLow to the lowest HD creature in the last pass through the loop
|
||||
bContinueLoop = FALSE; //Set this to false so that the loop only continues in the case of new low HD creature
|
||||
//Get first target creature in loop
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, spell.Loc);
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Make sure the currect target is not an enemy
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, spell.Caster) && oTarget != spell.Caster)
|
||||
{
|
||||
//Get a local set on the creature that checks if the spell has already allowed them to save
|
||||
bAlreadyAffected = GetLocalInt(oTarget, "bDEATH" + sIdentifier);
|
||||
if (!bAlreadyAffected)
|
||||
{
|
||||
nCurrentHD = GetHitDice(oTarget);
|
||||
//If the selected creature is of lower HD then the current nLow value and
|
||||
//the HD of the creature is of less HD than the number of HD available for
|
||||
//the spell to affect then set the creature as the currect primary target
|
||||
if(nCurrentHD < nLow && nCurrentHD <= nHD)
|
||||
{
|
||||
nLow = nCurrentHD;
|
||||
oLowest = oTarget;
|
||||
bContinueLoop = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in shape to test for a new
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, spell.Loc);
|
||||
}
|
||||
//Check to make sure that oLowest has changed
|
||||
if(bContinueLoop == TRUE)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oLowest, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
fDelay = GetRandomDelay();
|
||||
if(!MyResistSpell(spell.Caster, oLowest, fDelay))
|
||||
{
|
||||
if (GetHitDice(oLowest) > 10) nDC = spell.DC - 5;
|
||||
else nDC = spell.DC;
|
||||
//Make a Fort Save versus death effects
|
||||
if(!MySavingThrow(SAVING_THROW_FORT, oLowest, nDC, SAVING_THROW_TYPE_DEATH, spell.Caster, fDelay))
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oLowest));
|
||||
//DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oLowest));
|
||||
}
|
||||
}
|
||||
//Even if the target made their save mark them as having been affected by the spell
|
||||
SetLocalInt(oLowest, "bDEATH" + sIdentifier, TRUE);
|
||||
//Destroy the local after 1/4 of a second in case other Circles of Death are cast on
|
||||
//the creature laster
|
||||
DelayCommand(fDelay + 0.25, DeleteLocalInt(oLowest, "bDEATH" + sIdentifier));
|
||||
//Adjust the number of HD that have been affected by the spell
|
||||
nHD = nHD - GetHitDice(oLowest);
|
||||
oLowest = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_circevil.ncs
Normal file
BIN
_removed/nw_s0_circevil.ncs
Normal file
Binary file not shown.
72
_removed/nw_s0_circevil.nss
Normal file
72
_removed/nw_s0_circevil.nss
Normal file
@ -0,0 +1,72 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Magic Circle Against Evil
|
||||
//:: NW_S0_CircEvil.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: [Description of File]
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: March 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
/*
|
||||
Patch 1.71, fix by Shadoow
|
||||
|
||||
- disabled aura stacking
|
||||
- moving bug fixed, now caster gains benefit of aura all the time, (cannot guarantee the others,
|
||||
thats module-related)
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "nw_i0_spells"
|
||||
|
||||
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 including Area of Effect Object
|
||||
spellsDeclareMajorVariables();
|
||||
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_CIRCGOOD);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_AURA_HOLY);
|
||||
effect eLink = CreateProtectionFromAlignmentLink(ALIGNMENT_EVIL);
|
||||
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eAOE);
|
||||
|
||||
|
||||
int nDuration = spell.Level;
|
||||
//Check Extend metamagic feat.
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//prevent stacking
|
||||
RemoveEffectsFromSpell(spell.Target, spell.Id);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, HoursToSeconds(nDuration));
|
||||
spellsSetupNewAOE("VFX_MOB_CIRCGOOD");
|
||||
}
|
BIN
_removed/nw_s0_circgood.ncs
Normal file
BIN
_removed/nw_s0_circgood.ncs
Normal file
Binary file not shown.
70
_removed/nw_s0_circgood.nss
Normal file
70
_removed/nw_s0_circgood.nss
Normal file
@ -0,0 +1,70 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Magic Circle Against Good
|
||||
//:: NW_S0_CircGood.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.71, fix by Shadoow
|
||||
|
||||
- disabled aura stacking
|
||||
- moving bug fixed, now caster gains benefit of aura all the time, (cannot guarantee the others,
|
||||
thats module-related)
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "nw_i0_spells"
|
||||
|
||||
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 including Area of Effect Object
|
||||
spellsDeclareMajorVariables();
|
||||
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_CIRCEVIL);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_ODD);
|
||||
effect eLink = CreateProtectionFromAlignmentLink(ALIGNMENT_GOOD);
|
||||
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eAOE);
|
||||
|
||||
int nDuration = spell.Level;
|
||||
|
||||
//Check Extend metamagic feat.
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//prevent stacking
|
||||
RemoveEffectsFromSpell(spell.Target, spell.Id);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
eVis = EffectVisualEffect(VFX_IMP_EVIL_HELP);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, HoursToSeconds(nDuration));
|
||||
spellsSetupNewAOE("VFX_MOB_CIRCEVIL");
|
||||
}
|
BIN
_removed/nw_s0_contagion.ncs
Normal file
BIN
_removed/nw_s0_contagion.ncs
Normal file
Binary file not shown.
92
_removed/nw_s0_contagion.nss
Normal file
92
_removed/nw_s0_contagion.nss
Normal file
@ -0,0 +1,92 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Contagion
|
||||
//:: NW_S0_Contagion.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target must save or be struck down with
|
||||
Blidning Sickness, Cackle Fever, Filth Fever
|
||||
Mind Fire, Red Ache, the Shakes or Slimy Doom.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: June 6, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.71
|
||||
|
||||
- disease made extraordinary
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nRand = Random(7)+1;
|
||||
int nDisease;
|
||||
//Use a random seed to determine the disease that will be delivered.
|
||||
switch (nRand)
|
||||
{
|
||||
case 1:
|
||||
nDisease = DISEASE_BLINDING_SICKNESS;
|
||||
break;
|
||||
case 2:
|
||||
nDisease = DISEASE_CACKLE_FEVER;
|
||||
break;
|
||||
case 3:
|
||||
nDisease = DISEASE_FILTH_FEVER;
|
||||
break;
|
||||
case 4:
|
||||
nDisease = DISEASE_MINDFIRE;
|
||||
break;
|
||||
case 5:
|
||||
nDisease = DISEASE_RED_ACHE;
|
||||
break;
|
||||
case 6:
|
||||
nDisease = DISEASE_SHAKES;
|
||||
break;
|
||||
case 7:
|
||||
nDisease = DISEASE_SLIMY_DOOM;
|
||||
break;
|
||||
}
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
effect eDisease = EffectDisease(nDisease);
|
||||
effect ePenalty = EffectAbilityDecrease(ABILITY_STRENGTH, 4);
|
||||
ePenalty = EffectLinkEffects(EffectAbilityDecrease(ABILITY_CONSTITUTION, 2), ePenalty);
|
||||
eDisease = ExtraordinaryEffect(eDisease);
|
||||
//Make SR check
|
||||
if (!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
//The effect is permament because the disease subsystem has its own internal resolution
|
||||
//system in place.
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDisease, spell.Target);
|
||||
if ( !FortitudeSave(spell.Target, GetCasterLevel(OBJECT_SELF), SAVING_THROW_TYPE_DISEASE) ) ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePenalty, spell.Target, 60.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
_removed/nw_s0_daze.ncs
Normal file
BIN
_removed/nw_s0_daze.ncs
Normal file
Binary file not shown.
77
_removed/nw_s0_daze.nss
Normal file
77
_removed/nw_s0_daze.nss
Normal file
@ -0,0 +1,77 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Daze]
|
||||
//:: [NW_S0_Daze.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Will save or the target is dazed for 1 round
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 15, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: July 27, 2001
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDaze = EffectDazed();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eMind, eDaze);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S);
|
||||
int nDuration = 2;
|
||||
//check meta magic for extend
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = 4;
|
||||
}
|
||||
|
||||
//Make sure the target is a humaniod
|
||||
if (AmIAHumanoid(spell.Target) == TRUE)
|
||||
{
|
||||
if(GetHitDice(spell.Target) <= 40)
|
||||
{
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Make SR check
|
||||
if (!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
//Make Will Save to negate effect
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, spell.Target, spell.DC, SAVING_THROW_TYPE_MIND_SPELLS, spell.Caster))
|
||||
{
|
||||
//Apply VFX Impact and daze effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_dismagic.ncs
Normal file
BIN
_removed/nw_s0_dismagic.ncs
Normal file
Binary file not shown.
88
_removed/nw_s0_dismagic.nss
Normal file
88
_removed/nw_s0_dismagic.nss
Normal file
@ -0,0 +1,88 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dispel Magic
|
||||
//:: NW_S0_DisMagic.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Attempts to dispel all magic on a targeted
|
||||
//:: object, or simply the most powerful that it
|
||||
//:: can on every object in an area if no target
|
||||
//:: specified.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:: Updated On: Oct 20, 2003, Georg Zoeller
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
spellsDeclareMajorVariables();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_BREACH);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_DISPEL);
|
||||
int nCasterLevel = spell.Level;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Dispel Magic is capped at caster level 10
|
||||
//--------------------------------------------------------------------------
|
||||
if(nCasterLevel > 10)
|
||||
{
|
||||
//High-level shifter version - caster level artificially set to shifter levels + 3
|
||||
if(GetLevelByClass(CLASS_TYPE_SHIFTER) > 10 && GetRacialType(OBJECT_SELF) == RACIAL_TYPE_OUTSIDER)
|
||||
nCasterLevel = GetLevelByClass(CLASS_TYPE_SHIFTER)+3;
|
||||
else nCasterLevel = 10;
|
||||
}
|
||||
|
||||
if (GetIsObjectValid(spell.Target))
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Targeted Dispel - Dispel all
|
||||
//----------------------------------------------------------------------
|
||||
spellsDispelMagic(spell.Target, nCasterLevel, eVis, eImpact);
|
||||
}
|
||||
else
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Area of Effect - Only dispel best effect
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, spell.Loc);
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, spell.Loc, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE );
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetObjectType(oTarget) == OBJECT_TYPE_AREA_OF_EFFECT)
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
// Handle Area of Effects
|
||||
//--------------------------------------------------------------
|
||||
spellsDispelAoE(oTarget, spell.Caster, nCasterLevel);
|
||||
}
|
||||
else if (GetObjectType(oTarget) == OBJECT_TYPE_PLACEABLE)
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
}
|
||||
else
|
||||
{
|
||||
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact, FALSE);
|
||||
}
|
||||
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE,spell.Loc, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_dismissal.ncs
Normal file
BIN
_removed/nw_s0_dismissal.ncs
Normal file
Binary file not shown.
81
_removed/nw_s0_dismissal.nss
Normal file
81
_removed/nw_s0_dismissal.nss
Normal file
@ -0,0 +1,81 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dismissal
|
||||
//:: NW_S0_Dismissal.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All summoned creatures within 30ft of caster
|
||||
make a save and SR check or be banished
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
|
||||
#include "X0_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "hench_i0_generic"
|
||||
|
||||
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
|
||||
object oMaster;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||
int nSpellDC;
|
||||
//Get the first object in the are of effect
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
//does the creature have a master.
|
||||
oMaster = GetMaster(oTarget);
|
||||
//Is that master valid and is he an enemy
|
||||
if(GetIsObjectValid(oMaster) && spellsIsTarget(oMaster,SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF ))
|
||||
{
|
||||
//Is the creature a summoned associate
|
||||
if(GetAssociate(ASSOCIATE_TYPE_SUMMONED, oMaster) == oTarget ||
|
||||
GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oMaster) == oTarget ||
|
||||
GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oMaster) == oTarget ||
|
||||
GetLocalInt(oTarget, sHenchPseudoSummon))
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DISMISSAL));
|
||||
//Determine correct save
|
||||
nSpellDC = GetSpellSaveDC() + 6;
|
||||
//Make SR and will save checks
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget) && !MySavingThrow(SAVING_THROW_WILL, oTarget, nSpellDC))
|
||||
{
|
||||
//OnDeath script... so lets kill it.
|
||||
effect eKill = EffectDamage(GetCurrentHitPoints(oTarget));
|
||||
//just to be extra-sure... :)
|
||||
effect eDeath = EffectDeath(FALSE, FALSE);
|
||||
DelayCommand(0.25, ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget));
|
||||
DelayCommand(0.25, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget));
|
||||
|
||||
DestroyObject(oTarget, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next creature in the shape.
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_divpower.ncs
Normal file
BIN
_removed/nw_s0_divpower.ncs
Normal file
Binary file not shown.
127
_removed/nw_s0_divpower.nss
Normal file
127
_removed/nw_s0_divpower.nss
Normal file
@ -0,0 +1,127 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Divine Power
|
||||
//:: NW_S0_DivPower.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Improves the Clerics attack to be the
|
||||
equivalent of a Fighter's BAB of the same level,
|
||||
+1 HP per level and raises their strength to
|
||||
18 if is not already there.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 21, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
bugfix by Kovi 2002.07.22
|
||||
- temporary hp was stacked
|
||||
- loosing temporary hp resulted in loosing the other bonuses
|
||||
- number of attacks was not increased (should have been a BAB increase)
|
||||
still problem:
|
||||
~ attacks are better still approximation (the additional attack is at full BAB)
|
||||
~ attack/ability bonuses count against the limits
|
||||
|
||||
Patch 1.71
|
||||
|
||||
- was removing temporary hitpoits even from other sources
|
||||
- the strength increase will always be calculated from base strength
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "nw_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
|
||||
RemoveEffectsFromSpell(spell.Target, spell.Id);
|
||||
|
||||
int nCasterLevel = GetCasterLevel(spell.Caster);
|
||||
int nTotalCharacterLevel = nCasterLevel; //Modification - we want this spell to use caster level, not character level
|
||||
|
||||
//int nTotalCharacterLevel = GetHitDice(spell.Caster);
|
||||
int nBAB = GetBaseAttackBonus(spell.Caster);
|
||||
int nEpicPortionOfBAB = (nTotalCharacterLevel - 19)/2;
|
||||
|
||||
if (nEpicPortionOfBAB < 0)
|
||||
{
|
||||
nEpicPortionOfBAB = 0;
|
||||
}
|
||||
|
||||
int nExtraAttacks = 0;
|
||||
int nAttackIncrease = 0;
|
||||
|
||||
if (nTotalCharacterLevel > 20 )
|
||||
{
|
||||
nAttackIncrease = 20 + nEpicPortionOfBAB;
|
||||
if(nBAB - nEpicPortionOfBAB < 11)
|
||||
{
|
||||
nExtraAttacks = 2;
|
||||
}
|
||||
else if(nBAB - nEpicPortionOfBAB > 10 && nBAB - nEpicPortionOfBAB < 16)
|
||||
{
|
||||
nExtraAttacks = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nAttackIncrease = nTotalCharacterLevel;
|
||||
nExtraAttacks = ((nTotalCharacterLevel - 1)/5) - ((nBAB - 1)/5);
|
||||
}
|
||||
nAttackIncrease -= nBAB;
|
||||
|
||||
if (nAttackIncrease < 0)
|
||||
{
|
||||
nAttackIncrease = 0;
|
||||
}
|
||||
|
||||
int nStrengthIncrease = 18-GetAbilityScore(spell.Target, ABILITY_STRENGTH, TRUE);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM);
|
||||
effect eStrength = EffectAbilityIncrease(ABILITY_STRENGTH, nStrengthIncrease);
|
||||
effect eHP = EffectTemporaryHitpoints(nCasterLevel);
|
||||
effect eAttack = EffectAttackIncrease(nAttackIncrease);
|
||||
effect eAttackMod = EffectModifyAttacks(nExtraAttacks);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eAttack, eAttackMod);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
//Make sure that the strength modifier is a bonus
|
||||
if(nStrengthIncrease > 0)
|
||||
{
|
||||
eLink = EffectLinkEffects(eLink, eStrength);
|
||||
}
|
||||
|
||||
//Meta-Magic
|
||||
if(spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nCasterLevel *= 2;
|
||||
}
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
|
||||
//Apply Link and VFX effects to the target
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nCasterLevel));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, spell.Target, RoundsToSeconds(nCasterLevel));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
}
|
BIN
_removed/nw_s0_doom.ncs
Normal file
BIN
_removed/nw_s0_doom.ncs
Normal file
Binary file not shown.
98
_removed/nw_s0_doom.nss
Normal file
98
_removed/nw_s0_doom.nss
Normal file
@ -0,0 +1,98 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Doom
|
||||
//:: NW_S0_Doom.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
If the target fails a save they recieve a -2
|
||||
penalty to all saves, attack rolls, damage and
|
||||
skill checks for the duration of the spell.
|
||||
|
||||
July 22 2002 (BK): Made it mind affecting.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.70
|
||||
|
||||
- missing saving throw VFX added
|
||||
- immunity feedback corrected
|
||||
- SR check moved before saving throw check
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
effect CreateDoomEffectsLink3()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eSaves = EffectSavingThrowDecrease(SAVING_THROW_ALL,3);
|
||||
effect eAttack = EffectAttackDecrease(3);
|
||||
effect eDamage = EffectDamageDecrease(3,DAMAGE_TYPE_SLASHING);
|
||||
effect eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS,3);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eAttack,eDamage);
|
||||
eLink = EffectLinkEffects(eLink,eSaves);
|
||||
eLink = EffectLinkEffects(eLink,eSkill);
|
||||
return EffectLinkEffects(eLink,eDur);
|
||||
}
|
||||
|
||||
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
|
||||
spellsDeclareMajorVariables();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DOOM);
|
||||
effect eLink = CreateDoomEffectsLink3();
|
||||
|
||||
float fDuration = TurnsToSeconds(spell.Level);
|
||||
//Meta-Magic checks
|
||||
if(spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
fDuration *= 2;
|
||||
}
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Spell Resistance check
|
||||
if(!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
//will saving throw
|
||||
if(!MySavingThrow(SAVING_THROW_WILL, spell.Target, spell.DC, SAVING_THROW_TYPE_MIND_SPELLS, spell.Caster))
|
||||
{
|
||||
//* Engine workaround for mind affecting spell without mind effect
|
||||
if(GetIsImmune(spell.Target, IMMUNITY_TYPE_MIND_SPELLS, spell.Caster))
|
||||
{
|
||||
eLink = EffectDazed();//force target to overcome the spell effect and print immunity feedback instead
|
||||
fDuration = 1.0;//for safety
|
||||
}
|
||||
else
|
||||
{
|
||||
//apply doom VFX only if not immune
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, fDuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_fireshld.ncs
Normal file
BIN
_removed/nw_s0_fireshld.ncs
Normal file
Binary file not shown.
72
_removed/nw_s0_fireshld.nss
Normal file
72
_removed/nw_s0_fireshld.nss
Normal file
@ -0,0 +1,72 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shield
|
||||
//:: NW_S0_FireShld.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Caster gains 50% cold and fire immunity. Also anyone
|
||||
who strikes the caster with melee attacks takes
|
||||
1d6 + 1 per caster level in damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created On: Aug 28, 2003, GZ: Fixed stacking issue
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD);
|
||||
int nDuration = spell.Level;
|
||||
int nDamage = spell.Level/2;
|
||||
effect eShield = EffectDamageShield(nDamage, DAMAGE_BONUS_1d6, DAMAGE_TYPE_FIRE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eCold = EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD, 50);
|
||||
effect eFire = EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 50);
|
||||
|
||||
//Link effects
|
||||
effect eLink = EffectLinkEffects(eShield, eCold);
|
||||
eLink = EffectLinkEffects(eLink, eFire);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
|
||||
// *GZ: No longer stack this spell
|
||||
if (GetHasSpellEffect(spell.Id,spell.Target))
|
||||
{
|
||||
RemoveSpellEffects(spell.Id, spell.Caster, spell.Target);
|
||||
}
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
}
|
BIN
_removed/nw_s0_flmlash.ncs
Normal file
BIN
_removed/nw_s0_flmlash.ncs
Normal file
Binary file not shown.
72
_removed/nw_s0_flmlash.nss
Normal file
72
_removed/nw_s0_flmlash.nss
Normal file
@ -0,0 +1,72 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Flame Lash
|
||||
//:: NW_S0_FlmLash.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creates a whip of fire that targets a single
|
||||
individual
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 21, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nCasterLevel = spell.Level;
|
||||
|
||||
if(nCasterLevel > 3)
|
||||
{
|
||||
nCasterLevel = (nCasterLevel-3)/3;
|
||||
}
|
||||
else
|
||||
{
|
||||
nCasterLevel = 0;
|
||||
}
|
||||
int nDamage = MaximizeOrEmpower(8,2 + nCasterLevel,spell.Meta);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
effect eRay = EffectBeam(VFX_BEAM_FIRE_LASH, spell.Caster, BODY_NODE_HAND);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, spell.Target, 1.7);
|
||||
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
if (!MyResistSpell(spell.Caster, spell.Target, 1.0))
|
||||
{
|
||||
nDamage = GetReflexAdjustedDamage(nDamage, spell.Target, spell.DC, SAVING_THROW_TYPE_FIRE, spell.Caster);
|
||||
effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target));
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, spell.Target));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_gate.ncs
Normal file
BIN
_removed/nw_s0_gate.ncs
Normal file
Binary file not shown.
76
_removed/nw_s0_gate.nss
Normal file
76
_removed/nw_s0_gate.nss
Normal file
@ -0,0 +1,76 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: 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
|
||||
//:://////////////////////////////////////////////
|
||||
void CreateBalor(location lLoc);
|
||||
|
||||
#include "70_inc_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDuration = spell.Level;
|
||||
effect eSummon;
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
|
||||
//Make metamagic extend check
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Summon the Balor and apply the VFX impact
|
||||
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||
|
||||
if(GetHasSpellEffect(SPELL_PROTECTION_FROM_EVIL) ||
|
||||
GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL) ||
|
||||
GetHasSpellEffect(SPELL_HOLY_AURA) ||
|
||||
GetLocalInt(OBJECT_SELF, "cleric_henchman") == 1 ||
|
||||
GetLocalInt(OBJECT_SELF, "X4_CASTER_CLERIC") == 1)
|
||||
{
|
||||
if (GetCasterLevel(OBJECT_SELF) >= 35 )
|
||||
eSummon = EffectSummonCreature("NW_S_BALOR2",VFX_FNF_SUMMON_GATE,3.0);
|
||||
else
|
||||
{ eSummon = EffectSummonCreature("NW_S_BALOR",VFX_FNF_SUMMON_GATE,3.0); }
|
||||
float fSeconds = RoundsToSeconds(nDuration);
|
||||
DelayCommand(3.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, spell.Loc, fSeconds));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, spell.Loc);
|
||||
DelayCommand(3.0, CreateBalor(spell.Loc));
|
||||
}
|
||||
}
|
||||
|
||||
void CreateBalor(location lLoc)
|
||||
{
|
||||
if (GetCasterLevel(OBJECT_SELF) >= 35 )
|
||||
CreateObject(OBJECT_TYPE_CREATURE, "NW_S_BALOR2_EVIL", lLoc);
|
||||
else
|
||||
CreateObject(OBJECT_TYPE_CREATURE, "NW_S_BALOR_EVIL", lLoc);
|
||||
}
|
BIN
_removed/nw_s0_grplanar.ncs
Normal file
BIN
_removed/nw_s0_grplanar.ncs
Normal file
Binary file not shown.
114
_removed/nw_s0_grplanar.nss
Normal file
114
_removed/nw_s0_grplanar.nss
Normal file
@ -0,0 +1,114 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Greater Planar Binding
|
||||
//:: NW_S0_GrPlanar.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons an outsider dependant on alignment, or
|
||||
holds an outsider if the creature fails a save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- added saving throw subtype (paralyse)
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDuration = spell.Level;
|
||||
effect eSummon;
|
||||
effect eGate;
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||
|
||||
effect eLink = EffectLinkEffects(eDur, EffectParalyze());
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
eLink = EffectLinkEffects(eLink, eDur3);
|
||||
|
||||
int nRacial = GetRacialType(spell.Target);
|
||||
//Check for metamagic extend
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Check to see if a valid target has been chosen
|
||||
if (GetIsObjectValid(spell.Target))
|
||||
{
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Check for racial type
|
||||
if(nRacial == RACIAL_TYPE_OUTSIDER)
|
||||
{
|
||||
//Allow will save to negate hold effect
|
||||
if(!MySavingThrow(SAVING_THROW_WILL, spell.Target, spell.DC+5,SAVING_THROW_TYPE_PARALYSE, spell.Caster))
|
||||
{
|
||||
//Apply the hold effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration/2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//If the ground was clicked on summon an outsider based on alignment
|
||||
int nAlign = GetAlignmentGoodEvil(spell.Caster);
|
||||
float fDelay = 3.0;
|
||||
switch (nAlign)
|
||||
{
|
||||
case ALIGNMENT_EVIL:
|
||||
if (GetCasterLevel(OBJECT_SELF) >= 28)
|
||||
eSummon = EffectSummonCreature("NW_S_VROCK2", VFX_FNF_SUMMON_GATE, 3.0);
|
||||
else
|
||||
eSummon = EffectSummonCreature("NW_S_VROCK", VFX_FNF_SUMMON_GATE, 3.0);
|
||||
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
|
||||
break;
|
||||
case ALIGNMENT_GOOD:
|
||||
if (GetCasterLevel(OBJECT_SELF) >= 28)
|
||||
eSummon = EffectSummonCreature("NW_S_CTRUMPET2", VFX_FNF_SUMMON_CELESTIAL, 3.0);
|
||||
else
|
||||
eSummon = EffectSummonCreature("NW_S_CTRUMPET", VFX_FNF_SUMMON_CELESTIAL, 3.0);
|
||||
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL);
|
||||
break;
|
||||
case ALIGNMENT_NEUTRAL:
|
||||
if (GetCasterLevel(OBJECT_SELF) >= 28)
|
||||
eSummon = EffectSummonCreature("NW_S_SLAADDETH2", VFX_FNF_SUMMON_MONSTER_3, 1.0);
|
||||
else
|
||||
eSummon = EffectSummonCreature("NW_S_SLAADDETH", VFX_FNF_SUMMON_MONSTER_3, 1.0);
|
||||
//eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||
fDelay = 1.0;
|
||||
break;
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, spell.Loc, RoundsToSeconds(nDuration));
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_hammgods.ncs
Normal file
BIN
_removed/nw_s0_hammgods.ncs
Normal file
Binary file not shown.
99
_removed/nw_s0_hammgods.nss
Normal file
99
_removed/nw_s0_hammgods.nss
Normal file
@ -0,0 +1,99 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Hammer of the Gods
|
||||
//:: [NW_S0_HammGods.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Does 1d8 damage to all enemies within the
|
||||
//:: spells 20m radius and dazes them if a
|
||||
//:: Will save is failed.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 21, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
effect eDam;
|
||||
effect eDaze = EffectDazed();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eMind, eDaze);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_HOLY);
|
||||
effect eStrike = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
||||
float fDelay;
|
||||
int nDamageDice = spell.Level/2;
|
||||
if(nDamageDice < 1)
|
||||
{
|
||||
nDamageDice = 1;
|
||||
}
|
||||
//Limit caster level
|
||||
if (nDamageDice > 10)
|
||||
{
|
||||
nDamageDice = 10;
|
||||
}
|
||||
int nDamage;
|
||||
//Apply the holy strike VFX
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, spell.Loc);
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, spell.Loc);
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Make faction checks
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Make SR Check
|
||||
if (!MyResistSpell(spell.Caster, oTarget))
|
||||
{
|
||||
fDelay = GetRandomDelay(0.6, 1.3);
|
||||
//Roll damage
|
||||
nDamage = MaximizeOrEmpower(8,nDamageDice,spell.Meta);
|
||||
//Make a will save for half damage and negation of daze effect
|
||||
if (MySavingThrow(SAVING_THROW_WILL, oTarget, spell.DC, SAVING_THROW_TYPE_DIVINE, spell.Caster, 0.5))
|
||||
{
|
||||
nDamage = nDamage / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Apply daze effect
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(d6())));
|
||||
}
|
||||
//Set damage effect
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE );
|
||||
//Apply the VFX impact and damage effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in shape
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, spell.Loc);
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_harm.ncs
Normal file
BIN
_removed/nw_s0_harm.ncs
Normal file
Binary file not shown.
84
_removed/nw_s0_harm.nss
Normal file
84
_removed/nw_s0_harm.nss
Normal file
@ -0,0 +1,84 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Harm]
|
||||
//:: [NW_S0_Harm.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Reduces target to 1d4 HP on successful touch
|
||||
//:: attack. If the target is undead it is healed.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Soleski
|
||||
//:: Created On: Jan 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
//:: Last Update: Georg Zoeller On: Oct 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
> touch attack removed if cast on undead (roll wasn't used in this case anyway)
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDamage, nHeal;
|
||||
effect eVis = EffectVisualEffect(246);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_G);
|
||||
effect eHeal, eDam;
|
||||
//Check that the target is undead
|
||||
if (GetRacialType(spell.Target) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Figure out the amount of damage to heal
|
||||
nHeal = GetMaxHitPoints(spell.Target) - GetCurrentHitPoints(spell.Target);
|
||||
//Set the heal effect
|
||||
eHeal = EffectHeal(nHeal);
|
||||
//Apply heal effect and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, spell.Target);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, spell.Target);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
} //if cast from onhit, feedback won't show
|
||||
else if (TouchAttackMelee(spell.Target,spell.Item == OBJECT_INVALID) != FALSE) //GZ: Fixed boolean check to work in NWScript. 1 or 2 are valid return numbers from TouchAttackMelee
|
||||
{
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, SPELL_HARM));
|
||||
if (!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
//nDamage = GetCurrentHitPoints(spell.Target) - d4(1);
|
||||
int nCasterLevel = GetCasterLevel(spell.Caster);
|
||||
if (nCasterLevel > 20) nCasterLevel = 20;
|
||||
nDamage = MaximizeOrEmpower(6, nCasterLevel, spell.Meta);
|
||||
|
||||
eDam = EffectDamage(nDamage,DAMAGE_TYPE_NEGATIVE);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, spell.Target));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_heal.ncs
Normal file
BIN
_removed/nw_s0_heal.ncs
Normal file
Binary file not shown.
74
_removed/nw_s0_heal.nss
Normal file
74
_removed/nw_s0_heal.nss
Normal file
@ -0,0 +1,74 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Heal
|
||||
//:: [NW_S0_Heal.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Heals the target to full unless they are undead.
|
||||
//:: If undead they reduced to 1d4 HP.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 12, 2001
|
||||
//:: Modified 69MEH69 JUL2003
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
#include "69_hench_lib"
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eKill, eHeal;
|
||||
int nDamage, nHeal, nModify, nMetaMagic, nTouch;
|
||||
effect eSun = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_X);
|
||||
string sTag = GetTag(oTarget);
|
||||
object oArea = GetArea(oTarget);
|
||||
//Check to see if the target is an undead
|
||||
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL));
|
||||
//Make a touch attack
|
||||
if (TouchAttackMelee(oTarget))
|
||||
{
|
||||
//Make SR check
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
//Roll damage
|
||||
nModify = d4();
|
||||
nMetaMagic = GetMetaMagicFeat();
|
||||
//Make metamagic check
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nModify = 1;
|
||||
}
|
||||
//Figure out the amount of damage to inflict
|
||||
nDamage = GetCurrentHitPoints(oTarget) - nModify;
|
||||
//Set damage
|
||||
eKill = EffectDamage(nDamage, DAMAGE_TYPE_POSITIVE);
|
||||
//Apply damage effect and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSun, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL, FALSE));
|
||||
//Figure out how much to heal
|
||||
nHeal = GetMaxHitPoints(oTarget);
|
||||
//Set the heal effect
|
||||
eHeal = EffectHeal(nHeal);
|
||||
//Apply the heal effect and the VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHealVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
if(GetIsHenchmanDying(oTarget))
|
||||
{
|
||||
SetLocalInt(oArea, "nCHP" +sTag, 21);
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_healcirc.ncs
Normal file
BIN
_removed/nw_s0_healcirc.ncs
Normal file
Binary file not shown.
115
_removed/nw_s0_healcirc.nss
Normal file
115
_removed/nw_s0_healcirc.nss
Normal file
@ -0,0 +1,115 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Healing Circle
|
||||
//:: NW_S0_HealCirc
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// Positive energy spreads out in all directions
|
||||
// from the point of origin, curing 1d8 points of
|
||||
// damage plus 1 point per caster level (maximum +20)
|
||||
// to nearby living allies.
|
||||
//
|
||||
// Like cure spells, healing circle damages undead in
|
||||
// its area rather than curing them.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 18,2000
|
||||
//:: Modified 69MEH69 JUL2003
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
#include "69_hench_lib"
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int nDamagen, nModify, nHurt, nHP;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eKill;
|
||||
effect eHeal;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_M);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_20);
|
||||
float fDelay;
|
||||
string sTag = GetTag(oTarget);
|
||||
object oArea = GetArea(oTarget);
|
||||
int nCHP = GetLocalInt(oArea, "nCHP" +sTag);
|
||||
//Limit caster level
|
||||
if (nCasterLvl > 20)
|
||||
{
|
||||
nCasterLvl = 20;
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||
//Get first target in shape
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
fDelay = GetRandomDelay();
|
||||
//Check if racial type is undead
|
||||
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD )
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEALING_CIRCLE));
|
||||
//Make SR check
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay))
|
||||
{
|
||||
nModify = d8() + nCasterLvl;
|
||||
//Make metamagic check
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nModify = 8 + nCasterLvl;
|
||||
}
|
||||
//Make Fort save
|
||||
if (MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
nModify /= 2;
|
||||
}
|
||||
//Calculate damage
|
||||
nHurt = nModify;
|
||||
//Set damage effect
|
||||
eKill = EffectDamage(nHurt, DAMAGE_TYPE_POSITIVE);
|
||||
//Apply damage effect and VFX impact
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// * May 2003: Heal Neutrals as well
|
||||
if(!GetIsReactionTypeHostile(oTarget) || GetFactionEqual(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEALING_CIRCLE, FALSE));
|
||||
nHP = d8();
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nHP =8;//Damage is at max
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nHP = nHP + (nHP/2); //Damage/Healing is +50%
|
||||
}
|
||||
//Set healing effect
|
||||
nHP = nHP + nCasterLvl;
|
||||
eHeal = EffectHeal(nHP);
|
||||
//Apply heal effect and VFX impact
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||
if(GetIsHenchmanDying(oTarget))
|
||||
{
|
||||
SetLocalInt(oArea, "nCHP" +sTag, nCHP + nHP);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//Get next target in the shape
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation());
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_holdanim.ncs
Normal file
BIN
_removed/nw_s0_holdanim.ncs
Normal file
Binary file not shown.
83
_removed/nw_s0_holdanim.nss
Normal file
83
_removed/nw_s0_holdanim.nss
Normal file
@ -0,0 +1,83 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Hold Animal
|
||||
//:: S_HoldAnim
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
//:: Description: As hold person, except the spell
|
||||
//:: affects an animal instead. Hold animal does not
|
||||
//:: work on beasts, magical beasts, or vermin.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Soleski
|
||||
//:: Created On: Jan 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 10, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
/*
|
||||
Patch 1.71
|
||||
|
||||
- added missing saving throw subtype as per spell's descriptor
|
||||
- added duration scaling per game difficulty
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDuration = spell.Level;
|
||||
nDuration = 5; //GetScaledDuration(nDuration, spell.Target);
|
||||
effect eParal = EffectParalyze();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||
|
||||
effect eLink = EffectLinkEffects(eDur2, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eParal);
|
||||
eLink = EffectLinkEffects(eLink, eDur3);
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Check racial type
|
||||
if (GetRacialType(spell.Target) == RACIAL_TYPE_ANIMAL)
|
||||
{
|
||||
//Make SR check
|
||||
if (!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
//Make Will Save
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, spell.Target, spell.DC+4, SAVING_THROW_TYPE_MIND_SPELLS, spell.Caster))
|
||||
{
|
||||
//Check metamagic extend
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration * 2;
|
||||
}
|
||||
//Apply paralyze and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_holdmon.ncs
Normal file
BIN
_removed/nw_s0_holdmon.ncs
Normal file
Binary file not shown.
77
_removed/nw_s0_holdmon.nss
Normal file
77
_removed/nw_s0_holdmon.nss
Normal file
@ -0,0 +1,77 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Hold Monster
|
||||
//:: NW_S0_HoldMon
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Will hold any monster in place for 1
|
||||
round per caster level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Soleski
|
||||
//:: Created On: Jan 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
/*
|
||||
Patch 1.71
|
||||
|
||||
- added missing saving throw subtype as per spell's descriptor
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDuration = spell.Level;
|
||||
nDuration = 5; //GetScaledDuration(nDuration, spell.Target);
|
||||
effect eParal = EffectParalyze();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||
|
||||
effect eLink = EffectLinkEffects(eDur2, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eParal);
|
||||
eLink = EffectLinkEffects(eLink, eDur3);
|
||||
|
||||
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Make SR check
|
||||
if (!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
//Make Will save
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, spell.Target, spell.DC, SAVING_THROW_TYPE_MIND_SPELLS, spell.Caster))
|
||||
{
|
||||
//Check for metamagic extend
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration * 2;
|
||||
}
|
||||
//Apply the paralyze effect and the VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_holdpers.ncs
Normal file
BIN
_removed/nw_s0_holdpers.ncs
Normal file
Binary file not shown.
86
_removed/nw_s0_holdpers.nss
Normal file
86
_removed/nw_s0_holdpers.nss
Normal file
@ -0,0 +1,86 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Hold Person
|
||||
//:: NW_S0_HoldPers
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
//:: The target freezes in place, standing helpless.
|
||||
//:: He is aware and breathes normally but cannot take any physical
|
||||
//:: actions, even speech. He can, however, execute purely mental actions.
|
||||
//:: winged creature that is held cannot flap its wings and falls.
|
||||
//:: A swimmer can't swim and may drown.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Soleski
|
||||
//:: Created On: Jan 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 10, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
/*
|
||||
Patch 1.71
|
||||
|
||||
- added missing saving throw subtype as per spell's descriptor
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDuration = spell.Level;
|
||||
nDuration = 5; //GetScaledDuration(nDuration, spell.Target);
|
||||
effect eParal = EffectParalyze();
|
||||
effect eVis = EffectVisualEffect(82);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||
|
||||
effect eLink = EffectLinkEffects(eDur2, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eParal);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eDur3);
|
||||
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Make sure the target is a humanoid
|
||||
if(AmIAHumanoid(spell.Target))
|
||||
{
|
||||
//Make SR Check
|
||||
if (!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
//Make Will save
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, spell.Target, spell.DC, SAVING_THROW_TYPE_MIND_SPELLS, spell.Caster))
|
||||
{
|
||||
//Make metamagic extend check
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration * 2;
|
||||
}
|
||||
//Apply paralyze effect and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_icestorm.ncs
Normal file
BIN
_removed/nw_s0_icestorm.ncs
Normal file
Binary file not shown.
84
_removed/nw_s0_icestorm.nss
Normal file
84
_removed/nw_s0_icestorm.nss
Normal file
@ -0,0 +1,84 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Ice Storm
|
||||
//:: NW_S0_IceStorm
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Everyone in the area takes 3d6 Bludgeoning
|
||||
and 2d6 Cold damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Sept 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDamage, nDamage2, nDamage3;
|
||||
int nVariable = spell.Level/3;
|
||||
float fDelay;
|
||||
effect eExplode = EffectVisualEffect(VFX_FNF_ICESTORM); //USE THE ICESTORM FNF
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
effect eDam,eDam2, eDam3;
|
||||
//Apply the ice storm VFX at the location captured above.
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, spell.Loc);
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, spell.Loc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, spell.Caster))
|
||||
{
|
||||
fDelay = GetRandomDelay(0.75, 2.25);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
if (!MyResistSpell(spell.Caster, oTarget, fDelay))
|
||||
{
|
||||
//Roll damage for each target
|
||||
nDamage = MaximizeOrEmpower(6,3,spell.Meta);
|
||||
nDamage2 = MaximizeOrEmpower(6,2,spell.Meta);
|
||||
nDamage3 = MaximizeOrEmpower(6,nVariable,spell.Meta);
|
||||
|
||||
//High-level shifter version - damage increases
|
||||
if(GetLevelByClass(CLASS_TYPE_SHIFTER) > 20 && GetRacialType(OBJECT_SELF) == RACIAL_TYPE_OUTSIDER)
|
||||
nDamage3 = (GetLevelByClass(CLASS_TYPE_SHIFTER) - 17)*d6();
|
||||
|
||||
nDamage2 = nDamage2 + nDamage3;
|
||||
//Set the damage effect
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING);
|
||||
eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_COLD);
|
||||
// Apply effects to the currently selected target.
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget));
|
||||
//This visual effect is applied to the target object not the location as above. This visual effect
|
||||
//represents the impact that erupts on the target not on the ground.
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, spell.Loc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_identify.ncs
Normal file
BIN
_removed/nw_s0_identify.ncs
Normal file
Binary file not shown.
64
_removed/nw_s0_identify.nss
Normal file
64
_removed/nw_s0_identify.nss
Normal file
@ -0,0 +1,64 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Identify
|
||||
//:: NW_S0_Identify.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Gives the caster a boost to Lore skill of +25
|
||||
plus caster level. Lasts for 2 rounds.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.71
|
||||
|
||||
- the spell couldn't be recast if caster had also legend lore effect
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nBonus = 5;
|
||||
effect eLore = EffectSkillIncrease(SKILL_LORE, nBonus);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_MAGICAL_VISION);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eVis, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eLore);
|
||||
|
||||
int nDuration = 2;
|
||||
|
||||
//Meta-Magic checks
|
||||
if(spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = 4;
|
||||
}
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
|
||||
//Apply linked and VFX effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
}
|
BIN
_removed/nw_s0_invpurge.ncs
Normal file
BIN
_removed/nw_s0_invpurge.ncs
Normal file
Binary file not shown.
63
_removed/nw_s0_invpurge.nss
Normal file
63
_removed/nw_s0_invpurge.nss
Normal file
@ -0,0 +1,63 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Invisibility Purge
|
||||
//:: NW_S0_InvPurge.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All invisible creatures become invisible in the
|
||||
area of effect even if they leave the AOE.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.71, fix by Shadoow
|
||||
|
||||
- disabled aura stacking
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "nw_i0_spells"
|
||||
|
||||
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 including Area of Effect Object
|
||||
spellsDeclareMajorVariables();
|
||||
effect eAOE = EffectAreaOfEffect(35);
|
||||
int nDuration = spell.Level;
|
||||
effect eDur1 = EffectVisualEffect(VFX_DUR_MAGICAL_SIGHT);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eDur1, eDur2);
|
||||
|
||||
//Check Extend metamagic feat.
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//prevent stacking
|
||||
RemoveEffectsFromSpell(spell.Target, spell.Id);
|
||||
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, spell.Target, TurnsToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, TurnsToSeconds(nDuration));
|
||||
spellsSetupNewAOE("VFX_MOB_INVISIBILITY_PURGE");
|
||||
}
|
BIN
_removed/nw_s0_invsph.ncs
Normal file
BIN
_removed/nw_s0_invsph.ncs
Normal file
Binary file not shown.
72
_removed/nw_s0_invsph.nss
Normal file
72
_removed/nw_s0_invsph.nss
Normal file
@ -0,0 +1,72 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Invisibility Sphere
|
||||
//:: NW_S0_InvSph.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All allies within 15ft are rendered invisible.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.71, fix by Shadoow
|
||||
|
||||
- disabled aura stacking
|
||||
- moving bug fixed, now caster gains benefit of aura all the time, (cannot guarantee the others,
|
||||
thats module-related)
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "nw_i0_spells"
|
||||
|
||||
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 including Area of Effect Object
|
||||
spellsDeclareMajorVariables();
|
||||
effect eAOE = EffectAreaOfEffect(AOE_PER_INVIS_SPHERE);
|
||||
|
||||
effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_NORMAL);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_INVISIBILITY);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eInvis, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eAOE);
|
||||
int nDuration = spell.Level;
|
||||
|
||||
//Check Extend metamagic feat.
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//prevent stacking
|
||||
RemoveEffectsFromSpell(spell.Target, spell.Id);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, TurnsToSeconds(nDuration));
|
||||
spellsSetupNewAOE("VFX_PER_INVIS_SPHERE");
|
||||
}
|
BIN
_removed/nw_s0_knock.ncs
Normal file
BIN
_removed/nw_s0_knock.ncs
Normal file
Binary file not shown.
64
_removed/nw_s0_knock.nss
Normal file
64
_removed/nw_s0_knock.nss
Normal file
@ -0,0 +1,64 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Knock
|
||||
//:: NW_S0_Knock
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Opens doors not locked by magical means.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 29, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Georg 2003/07/31 - Added signal event and custom door flags
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "nw_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
object oTarget;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_KNOCK);
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 50.0, spell.Loc, FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
float fDelay;
|
||||
int nResist;
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
SignalEvent(oTarget,EventSpellCastAt(spell.Caster,spell.Id));
|
||||
fDelay = GetRandomDelay(0.5, 2.5);
|
||||
if(!GetPlotFlag(oTarget) && GetLocked(oTarget))
|
||||
{
|
||||
nResist = GetDoorFlag(oTarget,DOOR_FLAG_RESIST_KNOCK);
|
||||
if ((nResist == 0) && (GetLockUnlockDC(oTarget) < 31))
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
AssignCommand(oTarget, ActionUnlockObject(oTarget));
|
||||
}
|
||||
else if (nResist == 1)
|
||||
{
|
||||
FloatingTextStrRefOnCreature(83887,spell.Caster); //
|
||||
}
|
||||
}
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 50.0, spell.Loc, FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_lore.ncs
Normal file
BIN
_removed/nw_s0_lore.ncs
Normal file
Binary file not shown.
63
_removed/nw_s0_lore.nss
Normal file
63
_removed/nw_s0_lore.nss
Normal file
@ -0,0 +1,63 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Legend Lore
|
||||
//:: NW_S0_Lore.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Gives the caster a boost to Lore skill of 10
|
||||
plus 1 / 2 caster levels. Lasts for 1 Turn per
|
||||
caster level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: 2003-10-29: GZ: Corrected spell target object
|
||||
//:: so potions work wit henchmen now
|
||||
/*
|
||||
Patch 1.71
|
||||
|
||||
- the spell couldn't be recast if caster had also identify effect
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nLevel = spell.Level;
|
||||
int nBonus = 10;
|
||||
effect eLore = EffectSkillIncrease(SKILL_LORE, nBonus);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_MAGICAL_VISION);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eLore, eDur);
|
||||
|
||||
//Meta-Magic checks
|
||||
if(spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nLevel *= 2;
|
||||
}
|
||||
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
//Apply linked and VFX effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, TurnsToSeconds(nLevel));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
}
|
BIN
_removed/nw_s0_magearm.ncs
Normal file
BIN
_removed/nw_s0_magearm.ncs
Normal file
Binary file not shown.
77
_removed/nw_s0_magearm.nss
Normal file
77
_removed/nw_s0_magearm.nss
Normal file
@ -0,0 +1,77 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Mage Armor
|
||||
//:: [NW_S0_MageArm.nss]
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Gives the target +1 AC Bonus to Deflection,
|
||||
Armor Enchantment, Natural Armor and Dodge.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 10, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
/*
|
||||
bugfix by Kovi 2002.07.23
|
||||
- dodge bonus was stacking
|
||||
|
||||
Patch 1.70
|
||||
- fixed stacking the shadow conjuration variant with itself
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDuration = spell.Level;
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
|
||||
effect eAC1, eAC2, eAC3, eAC4;
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
//Check for metamagic extend
|
||||
if (spell.Meta == METAMAGIC_EXTEND) //Duration is +100%
|
||||
{
|
||||
nDuration = nDuration * 2;
|
||||
}
|
||||
//Set the four unique armor bonuses
|
||||
eAC1 = EffectACIncrease(1, AC_ARMOUR_ENCHANTMENT_BONUS);
|
||||
eAC2 = EffectACIncrease(1, AC_SHIELD_ENCHANTMENT_BONUS);
|
||||
eAC3 = EffectACIncrease(1, AC_DODGE_BONUS);
|
||||
eAC4 = EffectACIncrease(1, AC_NATURAL_BONUS);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eAC1, eAC2);
|
||||
eLink = EffectLinkEffects(eLink, eAC3);
|
||||
eLink = EffectLinkEffects(eLink, eAC4);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
RemoveEffectsFromSpell(spell.Target, spell.Id);
|
||||
|
||||
//Apply the armor bonuses and the VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, HoursToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
}
|
BIN
_removed/nw_s0_metswarm.ncs
Normal file
BIN
_removed/nw_s0_metswarm.ncs
Normal file
Binary file not shown.
83
_removed/nw_s0_metswarm.nss
Normal file
83
_removed/nw_s0_metswarm.nss
Normal file
@ -0,0 +1,83 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Meteor Swarm
|
||||
//:: NW_S0_MetSwarm
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Everyone in a 50ft radius around the caster
|
||||
takes 20d6 fire damage. Those within 6ft of the
|
||||
caster will take no damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 24 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nMetaMagic;
|
||||
int nDamage;
|
||||
effect eFire;
|
||||
effect eMeteor = EffectVisualEffect(VFX_FNF_METEOR_SWARM);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
//Apply the meteor swarm VFX area impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMeteor, spell.Loc);
|
||||
//Get first object in the spell area
|
||||
float fDelay;
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, spell.Loc);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, spell.Caster) && oTarget != spell.Caster)
|
||||
{
|
||||
fDelay = GetRandomDelay();
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Make sure the target is outside the 2m safe zone
|
||||
if (GetDistanceBetween(oTarget, spell.Caster) > 2.0)
|
||||
{
|
||||
//Make SR check
|
||||
if (!MyResistSpell(spell.Caster, oTarget, 0.5))
|
||||
{
|
||||
//Roll damage
|
||||
nDamage = MaximizeOrEmpower(12,20,spell.Meta);
|
||||
|
||||
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, spell.DC,SAVING_THROW_TYPE_FIRE,spell.Caster);
|
||||
//Set the damage effect
|
||||
eFire = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply damage effect and VFX impact.
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in the spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, spell.Loc);
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_mscharm.ncs
Normal file
BIN
_removed/nw_s0_mscharm.ncs
Normal file
Binary file not shown.
109
_removed/nw_s0_mscharm.nss
Normal file
109
_removed/nw_s0_mscharm.nss
Normal file
@ -0,0 +1,109 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Mass Charm]
|
||||
//:: [NW_S0_MsCharm.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The caster attempts to charm a group of individuals
|
||||
who's HD can be no more than his level combined.
|
||||
The spell starts checking the area and those that
|
||||
fail a will save are charmed. The affected persons
|
||||
are Charmed for 1 round per 2 caster levels.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 29, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 10, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
/*
|
||||
Patch 1.71
|
||||
|
||||
- was doing charm effect even for players (replaced for daze in this case)
|
||||
- HD pool check corrected (if found target with HD matching HD pool)
|
||||
- HD pool decreased also in case of spell being resisted
|
||||
- added scaling by difficulty into duration
|
||||
- added delay into SR and saving throw's VFX
|
||||
- extended duration corrected to calculate twice of normal duration as usual
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
|
||||
spellsDeclareMajorVariables();
|
||||
effect eCharm = EffectCharmed();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_20);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eMind, eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_CHARM);
|
||||
int nDuration = spell.Level;
|
||||
float fDelay;
|
||||
int nAmount = spell.Level * 2;
|
||||
//Check for metamagic extend
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration * 2;
|
||||
}
|
||||
|
||||
effect scaledEffect;
|
||||
int scaledDuration;
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, spell.Loc);
|
||||
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, spell.Loc);
|
||||
while (GetIsObjectValid(oTarget) && nAmount > 0)
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, spell.Caster))
|
||||
{
|
||||
fDelay = GetRandomDelay();
|
||||
//Check that the target is humanoid
|
||||
if(AmIAHumanoid(oTarget) && nAmount >= GetHitDice(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
//Make an SR check
|
||||
if (!MyResistSpell(spell.Caster, oTarget, fDelay))
|
||||
{
|
||||
//Make a Will save to negate
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, oTarget, spell.DC, SAVING_THROW_TYPE_MIND_SPELLS, spell.Caster, fDelay))
|
||||
{
|
||||
scaledEffect = GetScaledEffect(eCharm, oTarget);
|
||||
scaledEffect = EffectLinkEffects(eLink, scaledEffect);
|
||||
scaledDuration = GetScaledDuration(nDuration, oTarget);
|
||||
|
||||
//Apply the linked effects and the VFX impact
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, scaledEffect, oTarget, RoundsToSeconds(scaledDuration)));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
//Add the creatures HD to the count of affected creatures
|
||||
//nCnt = nCnt + GetHitDice(oTarget);
|
||||
}
|
||||
nAmount = nAmount - GetHitDice(oTarget);
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, spell.Loc);
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_phankill.ncs
Normal file
BIN
_removed/nw_s0_phankill.ncs
Normal file
Binary file not shown.
93
_removed/nw_s0_phankill.nss
Normal file
93
_removed/nw_s0_phankill.nss
Normal file
@ -0,0 +1,93 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Phantasmal Killer
|
||||
//:: NW_S0_PhantKill
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Target of the spell must make 2 saves or die.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Dec 14 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 3, 2001
|
||||
/*
|
||||
Patch 1.70, fix by Shadooow
|
||||
|
||||
- second saving throw subtype changed to fear (as per spell's descriptors)
|
||||
- missing feedback when target was fear immune
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDamage = MaximizeOrEmpower(6,3,spell.Meta);
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Make an SR check
|
||||
if(!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
// Immunity to fear or mind spells, makes you immune to Phantasmal Killer.
|
||||
if (!GetIsImmune(spell.Target, IMMUNITY_TYPE_FEAR, spell.Caster) && !GetIsImmune(spell.Target, IMMUNITY_TYPE_MIND_SPELLS, spell.Caster))
|
||||
{
|
||||
//Make a Will save //1.70 - removed, the immunity and feedback is now handled differently
|
||||
if (!MySavingThrow(SAVING_THROW_WILL, spell.Target, spell.DC, SAVING_THROW_TYPE_MIND_SPELLS, spell.Caster))
|
||||
{
|
||||
//Make a Fort save
|
||||
if (MySavingThrow(SAVING_THROW_FORT, spell.Target, spell.DC, SAVING_THROW_TYPE_FEAR, spell.Caster))
|
||||
{
|
||||
//Set the damage property
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL);
|
||||
//Apply the damage effect and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, spell.Target);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, spell.Target);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Apply the death effect and VFX impact
|
||||
// Immunity to death magic, should not make you immune to Phantasmal Killer.
|
||||
// So we need to make the effect supernatural.
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, SupernaturalEffect(EffectDeath()), spell.Target);
|
||||
//uncommented because of save subtype changed
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
}
|
||||
}
|
||||
}
|
||||
else//fear or mind spells immune
|
||||
{
|
||||
//engine workaround to get proper feedback and VFX
|
||||
eVis = EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectFrightened(), spell.Target, 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_raisdead.ncs
Normal file
BIN
_removed/nw_s0_raisdead.ncs
Normal file
Binary file not shown.
35
_removed/nw_s0_raisdead.nss
Normal file
35
_removed/nw_s0_raisdead.nss
Normal file
@ -0,0 +1,35 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Raise Dead]
|
||||
//:: [NW_S0_RaisDead.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Brings a character back to life with 1 HP.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 31, 2001
|
||||
//:: Modified 69MEH69 July2003
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
#include "69_hench_lib"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eRaise = EffectResurrection();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE));
|
||||
if(GetIsDead(oTarget) && GetIsHenchmanDying(oTarget) == FALSE)
|
||||
{
|
||||
//Apply raise dead effect and VFX impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
|
||||
if(GetDidDie(oTarget)) //Added for henchman
|
||||
{
|
||||
PostRespawnCleanup69(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
_removed/nw_s0_rayfrost.ncs
Normal file
BIN
_removed/nw_s0_rayfrost.ncs
Normal file
Binary file not shown.
72
_removed/nw_s0_rayfrost.nss
Normal file
72
_removed/nw_s0_rayfrost.nss
Normal file
@ -0,0 +1,72 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Ray of Frost
|
||||
//:: [NW_S0_RayFrost.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
If the caster succeeds at a ranged touch attack
|
||||
the target takes 1d4 damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: feb 4, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Bug Fix: Andrew Nobbs, April 17, 2003
|
||||
//:: Notes: Took out ranged attack roll.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.70, by Shadooow
|
||||
|
||||
- empower metamagic empowered total value not just dice part
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x0_i0_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
//1 additional damage for every 2 caster levels.
|
||||
int cMultiplier = GetCasterLevel(OBJECT_SELF) / 2;
|
||||
if (cMultiplier <= 1) cMultiplier = 1;
|
||||
if (cMultiplier >= 15) cMultiplier = 15;
|
||||
int nDam = MaximizeOrEmpower(4,1,spell.Meta,cMultiplier);
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
effect eRay = EffectBeam(VFX_BEAM_COLD, spell.Caster, BODY_NODE_HAND);
|
||||
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
//Make SR Check
|
||||
if(!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
//Set damage effect
|
||||
eDam = EffectDamage(nDam, DAMAGE_TYPE_COLD);
|
||||
//Apply the VFX impact and damage effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, spell.Target);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, spell.Target);
|
||||
}
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, spell.Target, 1.7);
|
||||
}
|
BIN
_removed/nw_s0_resserec.ncs
Normal file
BIN
_removed/nw_s0_resserec.ncs
Normal file
Binary file not shown.
40
_removed/nw_s0_resserec.nss
Normal file
40
_removed/nw_s0_resserec.nss
Normal file
@ -0,0 +1,40 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Ressurection]
|
||||
//:: [NW_S0_Ressurec.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Brings a character back to life with full
|
||||
//:: health.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 31, 2001
|
||||
//:: Modified 69MEH69 July2003
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
#include "69_hench_lib"
|
||||
void main()
|
||||
{
|
||||
//Get the spell target
|
||||
object oTarget = GetSpellTargetObject();
|
||||
//Check to make sure the target is dead first
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESURRECTION, FALSE));
|
||||
if (GetIsDead(oTarget) && GetIsHenchmanDying(oTarget) == FALSE)
|
||||
{
|
||||
//Declare major variables
|
||||
int nHealed = GetMaxHitPoints(oTarget);
|
||||
effect eRaise = EffectResurrection();
|
||||
effect eHeal = EffectHeal(nHealed + 10);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||
//Apply the heal, raise dead and VFX impact effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
if(GetDidDie(oTarget)) //Added for henchman
|
||||
{
|
||||
PostRespawnCleanup69(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
_removed/nw_s0_sanctuary.ncs
Normal file
BIN
_removed/nw_s0_sanctuary.ncs
Normal file
Binary file not shown.
58
_removed/nw_s0_sanctuary.nss
Normal file
58
_removed/nw_s0_sanctuary.nss
Normal file
@ -0,0 +1,58 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Sanctuary
|
||||
//:: NW_S0_Sanctuary.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Makes the target creature invisible to hostile
|
||||
creatures unless they make a Will Save to ignore
|
||||
the Sanctuary Effect
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "70_inc_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_SANCTUARY);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eSanc = EffectSanctuary(spell.DC);
|
||||
|
||||
effect eLink = EffectLinkEffects(eVis, eSanc);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
int nDuration = spell.Level;
|
||||
if(nDuration > 20) nDuration = 20;
|
||||
//Enter Metamagic conditions
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
}
|
BIN
_removed/nw_s0_silence.ncs
Normal file
BIN
_removed/nw_s0_silence.ncs
Normal file
Binary file not shown.
93
_removed/nw_s0_silence.nss
Normal file
93
_removed/nw_s0_silence.nss
Normal file
@ -0,0 +1,93 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Silence
|
||||
//:: NW_S0_Silence.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target is surrounded by a zone of silence
|
||||
that allows them to move without sound. Spell
|
||||
casters caught in this area will be unable to cast
|
||||
spells.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Patch 1.71, fix by Shadoow
|
||||
|
||||
- disabled aura stacking
|
||||
- if cast on ally the effect bypass spell resistance/immunity properly
|
||||
- moving bug fixed, now caster gains benefit of aura all the time, (cannot guarantee the others,
|
||||
thats module-related)
|
||||
*/
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "nw_i0_spells"
|
||||
#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 including Area of Effect Object
|
||||
spellsDeclareMajorVariables();
|
||||
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_SILENCE);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_AURA_SILENCE);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eSilence = EffectSilence();
|
||||
effect eImmune = EffectDamageImmunityIncrease(DAMAGE_TYPE_SONIC, 100);
|
||||
|
||||
effect eLink = EffectLinkEffects(eDur2, eSilence);
|
||||
eLink = EffectLinkEffects(eLink, eImmune);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eAOE);
|
||||
|
||||
int nDuration = spell.Level;
|
||||
//Check Extend metamagic feat.
|
||||
if(spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//prevent stacking
|
||||
RemoveEffectsFromSpell(spell.Target, spell.Id);
|
||||
|
||||
if(!GetIsFriend(spell.Target))
|
||||
{
|
||||
if(!MyResistSpell(spell.Caster, spell.Target))
|
||||
{
|
||||
if(!MySavingThrow(SAVING_THROW_WILL, spell.Target, spell.DC, SAVING_THROW_TYPE_NONE, spell.Caster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id));
|
||||
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
spellsSetupNewAOE("VFX_MOB_SILENCE");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, FALSE));
|
||||
//Create an instance of the AOE Object using the Apply Effect function
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, spell.Target, RoundsToSeconds(nDuration));
|
||||
spellsSetupNewAOE("VFX_MOB_SILENCE");
|
||||
}
|
||||
}
|
BIN
_removed/nw_s0_summon.ncs
Normal file
BIN
_removed/nw_s0_summon.ncs
Normal file
Binary file not shown.
354
_removed/nw_s0_summon.nss
Normal file
354
_removed/nw_s0_summon.nss
Normal file
@ -0,0 +1,354 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: 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
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
effect SetSummonEffect(int nSpellID);
|
||||
|
||||
#include "70_inc_spells"
|
||||
#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
|
||||
spellsDeclareMajorVariables();
|
||||
int nDuration = 24;
|
||||
|
||||
effect eSummon = SetSummonEffect(spell.Id);
|
||||
|
||||
//Make metamagic check for extend
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, spell.Loc, HoursToSeconds(nDuration));
|
||||
}
|
||||
|
||||
|
||||
effect SetSummonEffect(int nSpellID)
|
||||
{
|
||||
int nFNF_Effect;
|
||||
int nRoll = d4();
|
||||
string sSummon;
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) //WITH THE ANIMAL DOMAIN
|
||||
{
|
||||
if(nSpellID == SPELL_SUMMON_CREATURE_I)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "NW_S_BOARDIRE";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_II)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "NW_S_WOLFDIRE";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_III)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "NW_S_SPIDDIRE";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_IV)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "NW_S_beardire";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_V)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "NW_S_diretiger";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VI)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRHUGE";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERHUGE";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREHUGE";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHHUGE";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VII)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRGREAT";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERGREAT";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREGREAT";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHGREAT";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VIII)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
if (GetCasterLevel(OBJECT_SELF) >= 33)
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRELDER2";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERELDER2";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREELDER2";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHELDER2";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRELDER";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERELDER";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREELDER";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHELDER";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_IX)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
if (GetCasterLevel(OBJECT_SELF) >= 28)
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRELDER2";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERELDER2";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREELDER2";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHELDER2";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRELDER";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERELDER";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREELDER";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHELDER";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else //WITOUT THE ANIMAL DOMAIN
|
||||
{
|
||||
if(nSpellID == SPELL_SUMMON_CREATURE_I)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "NW_S_badgerdire";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_II)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "NW_S_BOARDIRE";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_III)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "NW_S_WOLFDIRE";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_IV)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "NW_S_SPIDDIRE";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_V)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "NW_S_beardire";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VI)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "NW_S_diretiger";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VII)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRHUGE";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERHUGE";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREHUGE";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHHUGE";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VIII)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRGREAT";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERGREAT";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREGREAT";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHGREAT";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_IX)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
if (GetCasterLevel(OBJECT_SELF) >= 30)
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRELDER2";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERELDER2";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREELDER2";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHELDER2";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (nRoll)
|
||||
{
|
||||
case 1:
|
||||
sSummon = "NW_S_AIRELDER";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
sSummon = "NW_S_WATERELDER";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sSummon = "NW_S_FIREELDER";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sSummon = "NW_S_EARTHELDER";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//effect eVis = EffectVisualEffect(nFNF_Effect);
|
||||
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||
effect eSummonedMonster = EffectSummonCreature(sSummon, nFNF_Effect);
|
||||
return eSummonedMonster;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user