Funky,
Hear is my script as requested, could you please merge the above code and as Baaleos mentioned above would it be possible to wait until time is up rather than loose the spell if cast before time is up, It would also be good if this did not affect there buff spells.
Thanks
////////////////////////////////////////////
/*
I created this base spellhooking script to give builders a resource for
a quality spell hook script which will include quite a few options for
all spells cast, and a variety of options for scripters. NOTE: At the
bottom of this script are examples codes you can use to modify a particular
spell to your likings, the codes are there for fast use and a referrence
on how to utilize this system. I tried to comment this script the best I
could to ensure nobody got confused when reading the code below..
//NOTE: Configuration Settings are in the script "spellfunc_inc"
To ensure there were no conflicts or errors between nw_i0_spells and this
script (and the include attached) I changed names of int / floats / strings
to make sure that no errors kicked out, if you find an error within nw_i0_spells
it's because you changed something here which is most likely used there..
(Simply change the name of your int / float / or string to correct this.)
(IMPORTANT, DO NOT SAVE nw_i0_spells script ever!, if you do delete it!)
The best part about this system is, even with updates to your main game
this script will still work normally!! If you edit a particular spell script
then it might be changed when you update nwn to a new version.. ie. 1.69 etc.
NOTE: This script requires intermediate to advanced scripting skills to edit
properly, if you want to edit it, but aren't a good scripter, you may want
to save it under a different name and keep this script as a reference! All you
will need to do is change the string on the module variable (edit/mod properties
advanced tab), change the string myhook to the name of your script.
// */
////////////////IMPORTANT PLEASE READ/////////////////////////////
/*
//If you do NOT want to run the original spell script simply place
//the function below within the case statement {} of the spell you do
//not wish to allow to execute (ie. the spell does only what you script here!)
SetModuleOverrideSpellScriptFinished();
// */
///////////////////////////////////////////////////////////////////
// NO CASTING AREAS //////// OPTIONAL SETTING/////////////////////
/*
If you wish to dissallow casting of any spell (even from items) in a particular
area, simply open up the area, click edit at the top / then area properties,
select the advanced tab, select the variable button [...], then add the
the following int to the area.. (as shown below..)
Name: NOCAST Type: Int Value: 2
Then click add.. and your done! (Make sure the int is there at the top!)
Open up the No Casting Area and edit the area to see how it's set up properly.
For Jail Areas Set this Int in the Advanced Tab / Variables Box..
Name: JAIL Type: Int Value: 1
This will prevent all speech and item use in those areas!
*/
///////////////////////////////////////////////////////////////////////////
//Do not delete any of these includes! (They are vital for this script)
#include "x2_inc_switches"
#include "nw_i0_spells"
#include "check_host_spell"
//See this script to learn premade functions to use in this script
//Those functions save you time as this script is rather long!
//Also you can configure important settings to this script in that script!
//#include "spellfunc_inc"
///////////////////////////////////////////////////////////////////////////////
//Main Script..
void main()
{
//First check who the caster is!
object oCaster = OBJECT_SELF;
//This doesn't run on DMs or NPCs!
if(GetIsDM(oCaster) || !GetIsPC(oCaster))
{ return; }
//Declare Major Variables;
int nSpell=GetSpellId();
int nNonHostile = GetIsNonHostileSpell(nSpell);
int nNonHostileItem;
int nCastLevel = GetCasterLevel(OBJECT_SELF);
int zInt;
object sTarget = GetSpellTargetObject();
object sItem = GetSpellCastItem();
object oArea = GetArea(oCaster);
int nJail = GetLocalInt(oArea, "JAIL");
int nPVP = GetLocalInt(oArea, "PVP");
location sLocation = GetSpellTargetLocation();
int sclass = GetLastSpellCastclass();
string sTN = GetTag(sItem);
int nType;
int a;
//Manual override...
if(GetLocalInt(oCaster, "OVERRIDE_SPELL")==1)
{
//Stop them cold!
AssignCommand(oCaster, ClearAllActions());
//Though the player may show animation, nothing happens!
'>
SetModuleOverrideSpellScriptFinished();
FloatingTextStringOnCreature("That item is too powerful for you to use!", oCaster, FALSE);
return;
}
//Let's get the area of the PC
//string cArea = GetTag(GetArea(oCaster));
//This is here to dissallow the script to run if it's not a PC casting spells
//ie. monsters don't get to use the changed effects, only PCs, though if you
//this script to run always no matter who is casting simply type // before if
//to comment out the line below..
if(!GetIsPC(OBJECT_SELF) || GetIsDM(OBJECT_SELF) || GetIsDMPossessed(OBJECT_SELF))
{return;} //Stop the script here..
///////////////////////////////////////////////////////////////////////////////
//Handle Jail...
//NOTHING WORK IN JAIL!!!
if(nJail==1)
{
//If it's an item!
if(sItem!=OBJECT_INVALID)
{
AssignCommand(oCaster, ClearAllActions());
//Though the player may show animation, nothing happens!
'>
SetModuleOverrideSpellScriptFinished();
return;
}
//Otherwise stop the spell COLD!
else
{
AssignCommand(oCaster, ClearAllActions());
//Though the player may show animation, nothing happens!
'>
SetModuleOverrideSpellScriptFinished();
return;
}
}
//////////////////No Spells Allowed In Area///////////////////////////////////
//If the PC is in a no casting area, no spell will be cast (even from items!)
//To set up see the above outline
if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2)
{
a = 0;
//If the spell is NOT Hostile then don't stop the spell!
//Note this code allows the rest of the spell hook to run on the
//non-hostile spell being cast (in town!)
if(nNonHostile!=1)
{
a = 1;
}
if(a==1)
{
//If using a special power or spell from an item...
//If it's not the listed special item..
//& it is in fact a valid object!
if(sItem!=OBJECT_INVALID && sTN != "ammo_maker" &&
sTN != "namingtool" && sTN != "colorwand")
{
nType = GetBaseItemType(GetSpellCastItem());
if(nType != BASE_ITEM_POTIONS &&
nType != BASE_ITEM_ENCHANTED_POTION)
{
AssignCommand(oCaster, ClearAllActions());
//Though the player may show animation, nothing happens!
'>
SetModuleOverrideSpellScriptFinished();
FloatingTextStringOnCreature("All spells fizzle in town.", oCaster);
return;
}
}
//Make them stop what they are doing instantly!
AssignCommand(oCaster, ClearAllActions());
//Though the player may show animation, nothing happens!
'>
SetModuleOverrideSpellScriptFinished();
FloatingTextStringOnCreature("You cannot cast that spell in this area.", oCaster);
return;
}
}
///////////////Handling Spells Cast From Items/////////////////////////////////
//This is what will happen if the spell was cast from an item..
if(GetSpellCastItem()!=OBJECT_INVALID)
{
//If the PC uses an item on a PC, and it's one of the following spells
//Then the spell will not work on the PC, note you can add other effects
//like if you don't like the spell level restriction of a spell on an item
//you could add aditional changes to the spell here to boost power. Or, if you
//don't like some aspect of a spell and don't want players abusing it, you could
//modify the spell here to run your edited version instead. (copy/paste original)
//Don't forget to add SetModuleOverrideSpellScriptFinished(); at the end
//to stop the original script from running.
//NO ITEMS WORK IN JAIL!!!
if(GetLocalInt(GetArea(oCaster), "JAIL")==1)
{
AssignCommand(oCaster, ClearAllActions());
//Though the player may show animation, nothing happens!
'>
SetModuleOverrideSpellScriptFinished();
return;
}
////////////////////////////////////////////////////////////////////////////
//Main Script for handling spells
//Spells that will not be allowed to target other players..
switch (nSpell)
{
//Feel free to copy/paste a case function and rename the spell to the
//name of the spell you don't want PC's targeting PCs with from items only!
//case SPELL_NAME: (Like So)
case SPELL_EPIC_RUIN:
{
if(GetIsPC(sTarget))
{
//Don't Cast the original spell
AssignCommand(oCaster, ClearAllActions());
SetModuleOverrideSpellScriptFinished();
}
}break;
//Copy everything above this line if you wish to add more case statements
//simply paste below this line and edit it to fit the spell
//PLEASE NOTE: You should have the spell names filed in alpahbetical order!
case SPELL_HARM:
{
if(GetIsPC(sTarget))
{
//Don't cast the original spell at all
AssignCommand(oCaster, ClearAllActions());
SetModuleOverrideSpellScriptFinished();
}
}break;
case SPELL_DROWN:
{
if(GetIsPC(GetSpellTargetObject()))
{
//Stop the original spell from running..
AssignCommand(oCaster, ClearAllActions());
SetModuleOverrideSpellScriptFinished();
}
}break;
//End switch statement
}
//End if statment
}
///////////Modifications For All Individual Spells////////////////////////
//Switch/Case Statments (for all spells)
switch(nSpell)
{
case SPELL_ACID_FOG:
{
//Code Goes Here..
}break;
case SPELL_ACID_SPLASH:
{
//Code Goes Here..
}break;
case SPELL_AID:
{
//Code Goes Here..
}break;
case SPELL_AMPLIFY:
{
//Code Goes Here..
}break;
case SPELL_ANIMATE_DEAD:
{
//Code Goes Here..
}break;
case SPELL_AURA_OF_VITALITY:
{
//Code Goes Here..
}break;
case SPELL_AURAOFGLORY:
{
//Code Goes Here..
}break;
case SPELL_AWAKEN:
{
//Code Goes Here..
}break;
case SPELL_BALAGARNSIRONHORN:
{
//Code Goes Here..
}break;
case SPELL_BALL_LIGHTNING:
{
//Code Goes Here..
}break;
case SPELL_BANE:
{
//Code Goes Here..
}break;
case SPELL_BANISHMENT:
{
//Code Goes Here..
}break;
case SPELL_BARKSKIN:
{
//Code Goes Here..
}break;
case SPELL_BATTLETIDE:
{
//Code Goes Here..
}break;
case SPELL_BESTOW_CURSE:
{
//Code Goes Here..
}break;
case SPELL_BIGBYS_CLENCHED_FIST:
{
//Code Goes Here..
}break;
case SPELL_BIGBYS_CRUSHING_HAND:
{
//Code Goes Here..
}break;
case SPELL_BIGBYS_FORCEFUL_HAND:
{
//Code Goes Here..
}break;
case SPELL_BIGBYS_GRASPING_HAND:
{
//Code Goes Here..
}break;
case SPELL_BIGBYS_INTERPOSING_HAND:
{
//Code Goes Here..
}break;
case SPELL_BLACK_BLADE_OF_DISASTER:
{
//Code Goes Here..
}break;
case SPELL_BLACKSTAFF:
{
//Code Goes Here..
}break;
case SPELL_BLADE_BARRIER:
{
//Code Goes Here..
}break;
case SPELL_BLADE_THIRST:
{
//Code Goes Here..
}break;
case SPELL_BLESS:
{
//Code Goes Here..
}break;
case SPELL_BLESS_WEAPON:
{
//Code Goes Here..
}break;
case SPELL_BLINDNESS_AND_DEAFNESS:
{
//Code Goes Here..
}break;
case SPELL_BLOOD_FRENZY:
{
//Code Goes Here..
}break;
case SPELL_BOMBARDMENT:
{
//Code Goes Here..
}break;
case SPELL_BULLS_STRENGTH:
{
//Code Goes Here..
}break;
case SPELL_BURNING_HANDS:
{
//Code Goes Here..
}break;
case SPELL_CALL_LIGHTNING:
{
//Code Goes Here..
}break;
case SPELL_CAMOFLAGE:
{
//Code Goes Here..
}break;
case SPELL_CATS_GRACE:
{
//Code Goes Here..
}break;
case SPELL_CHAIN_LIGHTNING:
{
//Code Goes Here..
}break;
case SPELL_CHARM_MONSTER:
{
//Code Goes Here..
}break;
case SPELL_CHARM_PERSON:
{
//Code Goes Here..
}break;
case SPELL_CHARM_PERSON_OR_ANIMAL:
{
//Code Goes Here..
}break;
case SPELL_CIRCLE_OF_DEATH:
{
//Code Goes Here..
}break;
case SPELL_CIRCLE_OF_DOOM:
{
//Code Goes Here..
}break;
case SPELL_CLAIRAUDIENCE_AND_CLAIRVOYANCE:
{
//Code Goes Here..
}break;
case SPELL_CLARITY:
{
//Code Goes Here..
}break;
case SPELL_CLOUD_OF_BEWILDERMENT:
{
//Code Goes Here..
}break;
case SPELL_CLOUDKILL:
{
//Code Goes Here..
}break;
case SPELL_COLOR_SPRAY:
{
//Code Goes Here..
}break;
case SPELL_COMBUST:
{
//Code Goes Here..
}break;
case SPELL_CONE_OF_COLD:
{
//Code Goes Here..
}break;
case SPELL_CONFUSION:
{
//Code Goes Here..
}break;
case SPELL_CONTAGION:
{
//Code Goes Here..
}break;
case SPELL_CONTINUAL_FLAME:
{
//Code Goes Here..
}break;
case SPELL_CONTROL_UNDEAD:
{
//Code Goes Here..
}break;
case SPELL_CREATE_GREATER_UNDEAD:
{
//Code Goes Here..
}break;
case SPELL_CREATE_UNDEAD:
{
//Code Goes Here..
}break;
case SPELL_CREEPING_DOOM:
{
//Code Goes Here..
}break;
case SPELL_CRUMBLE:
{
//Code Goes Here..
}break;
case SPELL_CURE_CRITICAL_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_CURE_LIGHT_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_CURE_MINOR_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_CURE_MODERATE_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_CURE_SERIOUS_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_DARKFIRE:
{
//Code Goes Here..
}break;
case SPELL_DARKNESS:
{
//Code Goes Here..
}break;
case SPELL_DAZE:
{
//Code Goes Here..
}break;
case SPELL_DEAFENING_CLANG:
{
//Code Goes Here..
}break;
case SPELL_DEATH_ARMOR:
{
//Code Goes Here..
}break;
case SPELL_DEATH_WARD:
{
//Code Goes Here..
}break;
case SPELL_DELAYED_BLAST_FIREBALL:
{
//Code Goes Here..
}break;
case SPELL_DESTRUCTION:
{
//Code Goes Here..
}break;
case SPELL_DIRGE:
{
//Code Goes Here..
}break;
case SPELL_DISMISSAL:
{
//Code Goes Here..
}break;
case SPELL_DISPEL_MAGIC:
{
//Code Goes Here..
}break;
case SPELL_DISPLACEMENT:
{
//Code Goes Here..
}break;
case SPELL_DIVINE_FAVOR:
{
//Code Goes Here..
}break;
case SPELL_DIVINE_MIGHT:
{
//Code Goes Here..
}break;
case SPELL_DIVINE_POWER:
{
//Code Goes Here..
}break;
case SPELL_DOMINATE_ANIMAL:
{
//Code Goes Here..
}break;
case SPELL_DOMINATE_MONSTER:
{
//Code Goes Here..
}break;
case SPELL_DOMINATE_PERSON:
{
//Code Goes Here..
}break;
case SPELL_DOOM:
{
//Code Goes Here..
}break;
case SPELL_DROWN:
{
//Code Goes Here..
}break;
case SPELL_EAGLE_SPLEDOR:
{
//Code Goes Here..
}break;
case SPELL_EARTHQUAKE:
{
//Code Goes Here..
}break;
case SPELL_ELECTRIC_JOLT:
{
//Code Goes Here..
}break;
case SPELL_ELEMENTAL_SHIELD:
{
//Code Goes Here..
}break;
case SPELL_ELEMENTAL_SWARM:
{
//Code Goes Here..
}break;
case SPELL_ENDURANCE:
{
//Code Goes Here..
}break;
case SPELL_ENDURE_ELEMENTS:
{
//Code Goes Here..
}break;
case SPELL_ENERGY_BUFFER:
{
//Code Goes Here..
}break;
case SPELL_ENERGY_DRAIN:
{
//Code Goes Here..
}break;
case SPELL_ENERVATION:
{
//Code Goes Here..
}break;
case SPELL_ENTANGLE:
{
//Code Goes Here..
}break;
case SPELL_ENTROPIC_SHIELD:
{
//Code Goes Here..
}break;
case SPELL_EPIC_DRAGON_KNIGHT:
{
//Code Goes Here..
}break;
case SPELL_EPIC_HELLBALL:
{
//Code Goes Here..
}break;
case SPELL_EPIC_MAGE_ARMOR:
{
//Code Goes Here..
}break;
case SPELL_EPIC_MUMMY_DUST:
{
//Code Goes Here..
}break;
case SPELL_EPIC_RUIN:
{
//Code Goes Here..
}break;
case SPELL_ETHEREAL_VISAGE:
{
//Code Goes Here..
}break;
case SPELL_ETHEREALNESS:
{
if(nPVP>=1)
{
SetModuleOverrideSpellScriptFinished();
FloatingTextStringOnCreature("Greater Sanctuary is an illegal spell in PVP Areas.", oCaster);
return;
}
}break;
case SPELL_EVARDS_BLACK_TENTACLES:
{
//Code Goes Here..
}break;
case SPELL_EXPEDITIOUS_RETREAT:
{
//Code Goes Here..
}break;
case SPELL_FEAR:
{
//Code Goes Here..
}break;
case SPELL_FEEBLEMIND:
{
//Code Goes Here..
}break;
case SPELL_FIND_TRAPS:
{
//Code Goes Here..
}break;
case SPELL_FINGER_OF_DEATH:
{
//Code Goes Here..
}break;
case SPELL_FIRE_STORM:
{
//Code Goes Here..
}break;
case SPELL_FIREBALL:
{
//Code Goes Here..
}break;
case SPELL_FIREBRAND:
{
//Code Goes Here..
}break;
case SPELL_FLAME_ARROW:
{
//Code Goes Here..
}break;
case SPELL_FLAME_LASH:
{
//Code Goes Here..
}break;
case SPELL_FLAME_STRIKE:
{
//Code Goes Here..
}break;
case SPELL_FLAME_WEAPON:
{
//Code Goes Here..
}break;
case SPELL_FLARE:
{
//Code Goes Here..
}break;
case SPELL_FLESH_TO_STONE:
{
//Code Goes Here..
}break;
case SPELL_FOXS_CUNNING:
{
//Code Goes Here..
}break;
case SPELL_FREEDOM_OF_MOVEMENT:
{
//Code Goes Here..
}break;
case SPELL_GATE:
{
//Code Goes Here..
}break;
case SPELL_GEDLEES_ELECTRIC_LOOP:
{
//Code Goes Here..
}break;
case SPELL_GHOSTLY_VISAGE:
{
//Code Goes Here..
}break;
case SPELL_GHOUL_TOUCH:
{
//Code Goes Here..
}break;
case SPELL_GLOBE_OF_INVULNERABILITY:
{
//Code Goes Here..
}break;
case SPELL_GLYPH_OF_WARDING:
{
//Code Goes Here..
}break;
case SPELL_GREASE:
{
//Code Goes Here..
}break;
case SPELL_GREAT_THUNDERCLAP:
{
//Code Goes Here..
}break;
case SPELL_GREATER_MAGIC_FANG:
{
//Code Goes Here..
}break;
case SPELL_GREATER_MAGIC_WEAPON:
{
//Code Goes Here..
}break;
case SPELL_GREATER_PLANAR_BINDING:
{
//Code Goes Here..
}break;
case SPELL_GREATER_RESTORATION:
{
//Code Goes Here..
}break;
case SPELL_GREATER_SHADOW_CONJURATION_ACID_ARROW:
{
//Code Goes Here..
}break;
case SPELL_GREATER_SHADOW_CONJURATION_MINOR_GLOBE:
{
//Code Goes Here..
}break;
case SPELL_GREATER_SHADOW_CONJURATION_MIRROR_IMAGE:
{
//Code Goes Here..
}break;
case SPELL_GREATER_SHADOW_CONJURATION_SUMMON_SHADOW:
{
//Code Goes Here..
}break;
case SPELL_GREATER_SHADOW_CONJURATION_WEB:
{
//Code Goes Here..
}break;
case SPELL_GREATER_SPELL_BREACH:
{
//Code Goes Here..
}break;
case SPELL_GREATER_SPELL_MANTLE:
{
//Code Goes Here..
}break;
case SPELL_GREATER_STONESKIN:
{
//Code Goes Here..
}break;
case SPELL_GUST_OF_WIND:
{
//Code Goes Here..
}break;
case SPELL_HAMMER_OF_THE_GODS:
{
//Code Goes Here..
}break;
case SPELL_HARM:
{
//Code Goes Here..
}break;
case SPELL_HASTE:
{
//Code Goes Here..
}break;
case SPELL_HEAL:
{
//Code Goes Here..
}break;
case SPELL_HEALING_CIRCLE:
{
//Code Goes Here..
}break;
case SPELL_HEALING_STING:
{
//Code Goes Here..
}break;
case SPELL_HOLD_ANIMAL:
{
//Code Goes Here..
}break;
case SPELL_HOLD_MONSTER:
{
//Code Goes Here..
}break;
case SPELL_HOLD_PERSON:
{
//Code Goes Here..
}break;
case SPELL_HOLY_AURA:
{
//Code Goes Here..
}break;
case SPELL_HOLY_SWORD:
{
//Code Goes Here..
}break;
case SPELL_HORIZIKAULS_BOOM:
{
//Code Goes Here..
}break;
case SPELL_HORRID_WILTING:
{
//Code Goes Here..
}break;
case SPELL_ICE_DAGGER:
{
//Code Goes Here..
}break;
case SPELL_ICE_STORM:
{
//Code Goes Here..
}break;
case SPELL_IDENTIFY:
{
//Code Goes Here..
}break;
case SPELL_IMPLOSION:
{
//Code Goes Here..
}break;
case SPELL_IMPROVED_INVISIBILITY:
{
//Code Goes Here..
}break;
case SPELL_INCENDIARY_CLOUD:
{
//Code Goes Here..
}break;
case SPELL_INFERNO:
{
//Code Goes Here..
}break;
case SPELL_INFESTATION_OF_MAGGOTS:
{
//Code Goes Here..
}break;
case SPELL_INFLICT_CRITICAL_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_INFLICT_LIGHT_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_INFLICT_MINOR_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_INFLICT_MODERATE_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_INFLICT_SERIOUS_WOUNDS:
{
//Code Goes Here..
}break;
case SPELL_INVISIBILITY:
{
//Code Goes Here..
}break;
case SPELL_INVISIBILITY_PURGE:
{
//Code Goes Here..
}break;
case SPELL_INVISIBILITY_SPHERE:
{
//Code Goes Here..
}break;
case SPELL_IRONGUTS:
{
//Code Goes Here..
}break;
case SPELL_ISAACS_GREATER_MISSILE_STORM:
{
//Code Goes Here..
}break;
case SPELL_ISAACS_LESSER_MISSILE_STORM:
{
//Code Goes Here..
}break;
case SPELL_KEEN_EDGE:
{
//Code Goes Here..
}break;
case SPELL_KNOCK:
{
//Code Goes Here..
}break;
case SPELL_LEGEND_LORE:
{
//Code Goes Here..
}break;
case SPELL_LESSER_DISPEL:
{
//Code Goes Here..
}break;
case SPELL_LESSER_MIND_BLANK:
{
//Code Goes Here..
}break;
case SPELL_LESSER_PLANAR_BINDING:
{
//Code Goes Here..
}break;
case SPELL_LESSER_RESTORATION:
{
//Code Goes Here..
}break;
case SPELL_LESSER_SPELL_BREACH:
{
//Code Goes Here..
}break;
case SPELL_LESSER_SPELL_MANTLE:
{
//Code Goes Here..
}break;
case SPELL_LIGHT:
{
//Code Goes Here..
}break;
case SPELL_LIGHTNING_BOLT:
{
//Code Goes Here..
}break;
case SPELL_MAGE_ARMOR:
{
//Code Goes Here..
}break;
case SPELL_MAGIC_CIRCLE_AGAINST_CHAOS:
{
//Code Goes Here..
}break;
case SPELL_MAGIC_CIRCLE_AGAINST_EVIL:
{
//Code Goes Here..
}break;
case SPELL_MAGIC_CIRCLE_AGAINST_GOOD:
{
//Code Goes Here..
}break;
case SPELL_MAGIC_CIRCLE_AGAINST_LAW:
{
//Code Goes Here..
}break;
case SPELL_MAGIC_FANG:
{
//Code Goes Here..
}break;
case SPELL_MAGIC_MISSILE:
{
//Code Goes Here..
}break;
case SPELL_MAGIC_VESTMENT:
{
//Code Goes Here..
}break;
case SPELL_MAGIC_WEAPON:
{
//Code Goes Here..
}break;
case SPELL_MASS_BLINDNESS_AND_DEAFNESS:
{
//Code Goes Here..
}break;
case SPELL_MASS_CAMOFLAGE:
{
//Code Goes Here..
}break;
case SPELL_MASS_CHARM:
{
//Code Goes Here..
}break;
case SPELL_MASS_HASTE:
{
//Code Goes Here..
}break;
case SPELL_MASS_HEAL:
{
//Code Goes Here..
}break;
case SPELL_MELFS_ACID_ARROW:
{
//Code Goes Here..
}break;
case SPELL_MESTILS_ACID_BREATH:
{
//Code Goes Here..
}break;
case SPELL_MESTILS_ACID_SHEATH:
{
//Code Goes Here..
}break;
case SPELL_METEOR_SWARM:
{
//Code Goes Here..
}break;
case SPELL_MIND_BLANK:
{
//Code Goes Here..
}break;
case SPELL_MIND_FOG:
{
//Code Goes Here..
}break;
case SPELL_MINOR_GLOBE_OF_INVULNERABILITY:
{
//Code Goes Here..
}break;
case SPELL_MONSTROUS_REGENERATION:
{
//Code Goes Here..
}break;
case SPELL_MORDENKAINENS_DISJUNCTION:
{
//Code Goes Here..
}break;
case SPELL_MORDENKAINENS_SWORD:
{
//Code Goes Here..
}break;
case SPELL_NATURES_BALANCE:
{
//Code Goes Here..
}break;
case SPELL_NEGATIVE_ENERGY_BURST:
{
//Code Goes Here..
}break;
case SPELL_NEGATIVE_ENERGY_PROTECTION:
{
//Code Goes Here..
}break;
case SPELL_NEGATIVE_ENERGY_RAY:
{
//Code Goes Here..
}break;
case SPELL_NEUTRALIZE_POISON:
{
//Code Goes Here..
}break;
case SPELL_ONE_WITH_THE_LAND:
{
//Code Goes Here..
}break;
case SPELL_OWLS_INSIGHT:
{
//Code Goes Here..
}break;
case SPELL_OWLS_WISDOM:
{
//Code Goes Here..
}break;
case SPELL_PHANTASMAL_KILLER:
{
//Code Goes Here..
}break;
case SPELL_PLANAR_ALLY:
{
//Code Goes Here..
}break;
case SPELL_PLANAR_BINDING:
{
//Code Goes Here..
}break;
case SPELL_POISON:
{
//Code Goes Here..
}break;
case SPELL_POLYMORPH_SELF:
{
//Code Goes Here..
}break;
case SPELL_POWER_WORD_KILL:
{
//Code Goes Here..
}break;
case SPELL_POWER_WORD_STUN:
{
//Code Goes Here..
}break;
case SPELL_PRAYER:
{
//Code Goes Here..
}break;
case SPELL_PREMONITION:
{
//Code Goes Here..
}break;
case SPELL_PRISMATIC_SPRAY:
{
//Code Goes Here..
}break;
case SPELL_PROTECTION__FROM_CHAOS:
{
//Code Goes Here..
}break;
case SPELL_PROTECTION_FROM_ELEMENTS:
{
//Code Goes Here..
}break;
case SPELL_PROTECTION_FROM_EVIL:
{
//Code Goes Here..
}break;
case SPELL_PROTECTION_FROM_GOOD:
{
//Code Goes Here..
}break;
case SPELL_PROTECTION_FROM_LAW:
{
//Code Goes Here..
}break;
case SPELL_PROTECTION_FROM_SPELLS:
{
//Code Goes Here..
}break;
case SPELL_QUILLFIRE:
{
//Code Goes Here..
}break;
case SPELL_RAISE_DEAD:
{
//Code Goes Here..
}break;
case SPELL_RAY_OF_ENFEEBLEMENT:
{
//Code Goes Here..
}break;
case SPELL_RAY_OF_FROST:
{
//Code Goes Here..
}break;
case SPELL_REGENERATE:
{
//Code Goes Here..
}break;
case SPELL_REMOVE_BLINDNESS_AND_DEAFNESS:
{
//Code Goes Here..
}break;
case SPELL_REMOVE_CURSE:
{
//Code Goes Here..
}break;
case SPELL_REMOVE_DISEASE:
{
//Code Goes Here..
}break;
case SPELL_REMOVE_FEAR:
{
//Code Goes Here..
}break;
case SPELL_REMOVE_PARALYSIS:
{
//Code Goes Here..
}break;
case SPELL_RESIST_ELEMENTS:
{
//Code Goes Here..
}break;
case SPELL_RESISTANCE:
{
//Code Goes Here..
}break;
case SPELL_RESTORATION:
{
//Code Goes Here..
}break;
case SPELL_RESURRECTION:
{
//Code Goes Here..
}break;
case SPELL_SANCTUARY:
{
if(nPVP>0)
{
SetModuleOverrideSpellScriptFinished();
FloatingTextStringOnCreature("Sanctuary is an illegal spell in PVP Areas.", oCaster);
return;
}
//Code Goes Here..
}break;
case SPELL_SCARE:
{
//Code Goes Here..
}break;
case SPELL_SCINTILLATING_SPHERE:
{
//Code Goes Here..
}break;
case SPELL_SEARING_LIGHT:
{
//Code Goes Here..
}break;
case SPELL_SEE_INVISIBILITY:
{
//Code Goes Here..
}break;
case SPELL_SHADES_CONE_OF_COLD:
{
//Code Goes Here..
}break;
case SPELL_SHADES_FIREBALL:
{
//Code Goes Here..
}break;
case SPELL_SHADES_STONESKIN:
{
//Code Goes Here..
}break;
case SPELL_SHADES_SUMMON_SHADOW:
{
//Code Goes Here..
}break;
case SPELL_SHADES_WALL_OF_FIRE:
{
//Code Goes Here..
}break;
case SPELL_SHADOW_CONJURATION_DARKNESS:
{
//Code Goes Here..
}break;
case SPELL_SHADOW_CONJURATION_INIVSIBILITY:
{
//Code Goes Here..
}break;
case SPELL_SHADOW_CONJURATION_MAGE_ARMOR:
{
//Code Goes Here..
}break;
case SPELL_SHADOW_CONJURATION_MAGIC_MISSILE:
{
//Code Goes Here..
}break;
case SPELL_SHADOW_CONJURATION_SUMMON_SHADOW:
{
//Code Goes Here..
}break;
case SPELL_SHADOW_DAZE:
{
//Code Goes Here..
}break;
case SPELL_SHADOW_SHIELD:
{
//Code Goes Here..
}break;
case SPELL_SHAPECHANGE:
{
//Code Goes Here..
}break;
case SPELL_SHELGARNS_PERSISTENT_BLADE:
{
//Code Goes Here..
}break;
case SPELL_SHIELD:
{
//Code Goes Here..
}break;
case SPELL_SHIELD_OF_FAITH:
{
//Code Goes Here..
}break;
case SPELL_SHIELD_OF_LAW:
{
//Code Goes Here..
}break;
case SPELL_SILENCE:
{
//Code Goes Here..
}break;
case SPELL_SLAY_LIVING:
{
//Code Goes Here..
}break;
case SPELL_SLEEP:
{
//Code Goes Here..
}break;
case SPELL_SLOW:
{
//Code Goes Here..
}break;
case SPELL_SOUND_BURST:
{
//Code Goes Here..
}break;
case SPELL_SPELL_MANTLE:
{
//Code Goes Here..
}break;
case SPELL_SPELL_RESISTANCE:
{
//Code Goes Here..
}break;
case SPELL_SPELLSTAFF:
{
//Code Goes Here..
}break;
case SPELL_SPHERE_OF_CHAOS:
{
//Code Goes Here..
}break;
case SPELL_SPIKE_GROWTH:
{
//Code Goes Here..
}break;
case SPELL_STINKING_CLOUD:
{
//Code Goes Here..
}break;
case SPELL_STONE_BONES:
{
//Code Goes Here..
}break;
case SPELL_STONE_TO_FLESH:
{
//Code Goes Here..
}break;
case SPELL_STONEHOLD:
{
//Code Goes Here..
}break;
case SPELL_STONESKIN:
{
//Code Goes Here..
}break;
case SPELL_STORM_OF_VENGEANCE:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_I:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_II:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_III:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_IV:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_IX:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_V:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_VI:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_VII:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_CREATURE_VIII:
{
//Code Goes Here..
}break;
case SPELL_SUMMON_SHADOW:
{
//Code Goes Here..
}break;
case SPELL_SUNBEAM:
{
//Code Goes Here..
}break;
case SPELL_SUNBURST:
{
//Code Goes Here..
}break;
case SPELL_TASHAS_HIDEOUS_LAUGHTER:
{
//Code Goes Here..
}break;
case SPELL_TENSERS_TRANSFORMATION:
{
//Code Goes Here..
}break;
case SPELL_TIME_STOP:
{
if(nPVP>=1)
{
FloatingTextStringOnCreature("Timestop is not allowed in PVP Areas.", OBJECT_SELF, TRUE);
//Though the player may show animation, nothing happens!
'>
SetModuleOverrideSpellScriptFinished();
}
}break;
case SPELL_TRUE_SEEING:
{
//Code Goes Here..
}break;
case SPELL_TRUE_STRIKE:
{
//Code Goes Here..
}break;
case SPELL_TYMORAS_SMILE:
{
//Code Goes Here..
}break;
case SPELL_UNDEATH_TO_DEATH:
{
//Code Goes Here..
}break;
case SPELL_UNDEATHS_ETERNAL_FOE:
{
//Code Goes Here..
}break;
case SPELL_UNHOLY_AURA:
{
//Code Goes Here..
}break;
case SPELL_VAMPIRIC_TOUCH:
{
//Code Goes Here..
}break;
case SPELL_VINE_MINE:
{
//Code Goes Here..
}break;
case SPELL_VINE_MINE_CAMOUFLAGE:
{
//Code Goes Here..
}break;
case SPELL_VINE_MINE_ENTANGLE:
{
//Code Goes Here..
}break;
case SPELL_VINE_MINE_HAMPER_MOVEMENT:
{
//Code Goes Here..
}break;
case SPELL_VIRTUE:
{
//Code Goes Here..
}break;
case SPELL_WAIL_OF_THE_BANSHEE:
{
//Code Goes Here..
}break;
case SPELL_WALL_OF_FIRE:
{
//Code Goes Here..
}break;
case SPELL_WAR_CRY:
{
//Code Goes Here..
}break;
case SPELL_WEB:
{
//Code Goes Here..
}break;
case SPELL_WEIRD:
{
//Code Goes Here..
}break;
case SPELL_WORD_OF_FAITH:
{
//Code Goes Here..
}break;
case SPELL_WOUNDING_WHISPERS:
{
//Code Goes Here..
}break;
//Default happens when a normal spell not listed here is cast...
//Feel free to add any code you wish to apply to all spells not listed
default:
{
//Code goes here
}break;
//End Switch Statement
}
//End Script
}
///////////////////////////////////////////////////
/*
///////////////////EXAMPLE SCRIPTS FUNCTIONS/////////////////////////
//The script functions below are for you to copy / paste if you want to utilize
//They are actual script functions that work and were predone to save you time.
/* (Commenting out, do not touch this line!) / (Copy / Paste below here)
////////////////////////////////////////////////////////////////////////
//Case Statment Examples..
//Example of Generic Code for an Area of Effect Spell
//Note: (The Spell name constant below must be valid!)
case SPELL_WHATEVER: //Change this to the actual spell being cast..
{
//Note if the spell does area damage use this always!
DoAreaBonusDmg(GetSpellTargetLocation());
//Do a generic visual (see the "spellfunc_inc" script)
DoAVisual(GetSpellTargetLocation());
//Do Positive Damage to all in area (if not resisted or saved)
DoAreaDmg();
//Don't run the original script at all!
SetModuleOverrideSpellScriptFinished();
}
break;
//Example Generic Code for a Spell that only targets one target..
case SPELL_BLAHZAM: //Change the SPELL_NAME to the actual spell being cast.
{
//Note if the spell does target damage use this always!
DoBonusDmg(GetSpellTargetObject());
//Do a generic targeted visual (see the "spellfunc_inc" script)
DoTVisual();
//Do Positive Damage to the target of the spell (if not resisted or saved)
DoTDmg();
//Don't run the original script at all!
SetModuleOverrideSpellScriptFinished();
}
break;
//Example of code for modifying a spell for an additional effect..
//Replace SPELL_SHAZAM with the actual name of the spell being cast..
//ie. SPELL_ICE_STORM for icestorm ...etc...
case SPELL_SHAZAM:
{
//Note sTarget is defined at the top after void main()
//This script happens to do no dmg so we won't use bonus dmg..
'>
effect eEffect;
eEffect = EffectParalysis(sTarget);
eEffect = SupernaturalEffect(eEffect);
//Apply paralysis to the target for 6 seconds if save failed..
if(!WillSave(aTarget, GetSpellDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, sTarget, 6.0f)
}
//Note this effect would be in addition to the spell's normal effects!
//Because the line below is commented out.. (Delete the // below to activate)
//SetModuleOverrideSpellScriptFinished();
}
break;
/////////////////////////////////////////////////////////////////////////
(Copy / Paste above this line only)
// (commenting out end, do not touch this line!) */