This might save you some work, this is custom / prefab, spell hook system I threw together for the community....
Save the scripts under the name at the top of the script..
Also, due to forum bug, you will need to change all instances of "class" to ALL CAPS which is a constant, and change all isntances of "class" which is a function to capitalize the "c"...
UPDATED: Added fixs suggested by Lightfoot8 below (Simple to do)
------------------------------------------
//Script Name: myhook
////////////////////////////////////////////
///Created by Genisys / Guile
// Created on: 6/12/08
// Updated On: 4/23/09
////////////////////////////////////////////
/*
I created this generic 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. I tried to
comment this script the best I could to ensure nobody got
confused when reading the code below..
To ensure there were no conflicts or errors between nw_i0_spells and this
script 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!, if you do delete it!)
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: NOCASTING Type: Int Value: 1
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.
Optional Restrictions to Specific Spells (For an Area with these variables)
Name: NO_SANCTUARY Type: Int Value: 1
No Santuary or Greater Sanctuary Spells Allowed In THIS Area
Name: NO_TIMESTOP Type: Int Value: 1
Timestop NOT allowed in THIS Area
*/
///////////////////////////////////////////////////////////////////////////
//Do not delete any of these includes! (They are vital for this script)
#include "x2_inc_switches"
#include "nw_i0_spells"
//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"
///////////////////////////////////////////////////////////////////////////////
//PROTOTYPE DEFINED
//This checks to see if the spell being cast is NOT Hostile...
int GetIsNonHostileSpell(int nSpell)
{
return !StringToInt(Get2DAString("spells","HostileSetting",nSpell));
}
//Main Script..
void main()
{
//Determine who is casting this spell..
object oCaster = OBJECT_SELF;
//If it's a DM or NOT a PC!
if(GetIsDM(oCaster) || !GetIsPC(oCaster))
{ return; } ///Stop the script here!
//Declare Major Variables;
int nSpell=GetSpellId();
int nNonHostile = GetIsNonHostileSpell(nSpell);
int nCastLevel = GetCasterLevel(OBJECT_SELF);
int zInt;
//I used s instead of oTarget or nclass to denote "spell"
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 sTag = GetTag(sItem);
int nType;
int a;
//Be sure to set these Variables to TRUE on areas you DO NOT want the
//spells Timestop & Greater Sancuary Cast (I disallow these spells in Arena)
int NoGS = GetLocalInt(GetArea(OBJECT_SELF), "NO_SANCUARY");
int NoTS = GetLocalInt(GetArea(OBJECT_SELF), "NO_TIMESTOP");
//For NO Timestop & No GS
int nArena = GetLocalInt(GetArea(OBJECT_SELF), "ARENA_AREA");
//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), "NOCASTING")==1)
{
a = 0;
//If the spell is NOT Hostile then DO NOT 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 && sTag != "ammo_maker" &&
sTag != "namingtool" && sTag != "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 hostile 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;
}
//Spells that will not be allowed to target other players (from an item!)..
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
}
/////////////////////////////////////////////////////////////////////////////
//Main Script for handling ALL spells
///////////////////////////////////////////////////////////////////////////
///////////Modifications For All Individual Spells////////////////////////
//NOTE the /* is what is commenting out all of the spells NOT USED...
//you will need to make sure you add */ above the spell you wish to add
//and then add /* after the spell you are adding...
//NOTE: If you wish to edit ALL spells, then simply delete ALL /* & */
//Switch/Case Statments (for all spells)
switch(nSpell)
{
//This is here to comment out all non-used spells..
/* DO NOT DELETE! rather
//Example on HOW to property add a spell to this system
//The following goes ABOVE the spell you are editing..
*/
case SPELL_ACID_FOG:
{
//Your Code Goes Here..
}break;
//The following goes BELOW the spell you are editing..
/*
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: //Greater Sancuary
{
if(nPVP>=1 || nArena || NoGS)
{
SetModuleOverrideSpellScriptFinished();
FloatingTextStringOnCreature("Something prevents you from using that spell in this area.", 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 || NoGS)
{
SetModuleOverrideSpellScriptFinished();
FloatingTextStringOnCreature("Something prevents you from using that spell in this area.", 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 || nArena || NoTS)
{
FloatingTextStringOnCreature("Something prevents you from using Timestop in this area.", 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 Main Script
}
///////////////////////////////////////////////////
--------------------------------------------------------
(Copy Above This Line)
--------------------------------------------------------
In the OnModuleLoad Event Script you will need this function at the TOP of the script.....
SetLocalString(GetModule(), "X2_S_UD_SPELLSCRIPT", "myhook");
Modifié par _Guile, 15 mai 2012 - 02:14 .