Invisibility Sphere

Spell Description
Caster Level(s) Bard 3, Wizard/Sorverer 3
Innate Level 3
School Illusion
Descriptor(s) Visual
Component(s) Verbal, Somatic
Range Personal
Area of Effect / Target Caster, 15ft Radius
Duration 1 Turn / Level
Save Harmless
Spell Resistance No
Additional Counterspells Invisibility Purge
Dispel Yes
Description The caster brings into being a zone of invisibility that travels with him for the duration of the spell. All allies within the spell's area of effect are rendered invisible, but not to each other. Those that leave the sphere are visible once more.

Spell Scripts
Main nw_s0_invsph
AoE OnEnter nw_s0_invspha
AoE OnExit nw_s0_invsphb

Changes/Updates for Thain
Script Change Custom GetCasterLevel function
Before Get the level of the casterclass used or item property
After Get the level of the casterclass used or item property, pluss any modifiers (Palemaster++)
Script Change Custom ApplyEffectToObject function
Before Adds a given effect to object
After Same as before, but saves some variables. This is to fix the Dispel spells (Palemaster++)
Script Change Dispel of AoE changed to fit description of dispel
Before Base Chance: Lesser - 25%, Dispel - 50%, Greater -75%, Mordenkainens - 100 %.
Chance modified by caster level: Base Chance + ( CLevel + CMod ) - ( 10 + CMod ) * 2
NPC caster: Modified chance + 30
Caster of spell that is being atempted to dispel: Chance = 100%
DM trying to dispel: Chance = 100%
After Dispel Roll: d20 + CLevel. Where CLevel is capped: Lesser - 5, Dispel - 10, Greater - 15, Mordenkainens - No cap
Dispel DC: 11 + CLevel of caster of spell
Bugfix Fixed removal of AoE cause caster exited AoE
Before If caster managed to run from AoE because of lag, AoE would be destroyed
After AoE will stay in effect, even if caster manages to exit

Concept: Ankh_Phoenix and Aremah, Code: Ankh_Phoenix