#CLASS {Spellup} {enable}
#ALIAS CastFirstSpell {#VAR nSpellIndex {1};#SHOW {%ansi(magenta)Casting %ansi(cyan)%item(@lstSpells,@nSpellIndex)%ansi(magenta)...};%item(@lstSpells,@nSpellIndex)} 
#ALIAS CastNextSpell {#MATH nSpellIndex {@nSpellIndex+1};#IF (@nSpellIndex <= %numitems(@lstSpells)) {%item(@lstSpells,@nSpellIndex);#SHOW {%ansi(green)SUCCESS%ansi(magenta), Next is --> %ansi(cyan)%item(@lstSpells,@nSpellIndex)%char(10)}} {ResetSpellup}}
#ALIAS CastSameSpell {%item(@lstSpells,@nSpellIndex);#SHOW {%ansi(red)FAILED%ansi(magenta), Recasting --> %ansi(cyan)%item(@lstSpells,@nSpellIndex)}} 
#ALIAS ResetSpellup {#SHOW {%ansi(yellow)Spellup has been reset.};#T- {Spellup|Events};#VAR nSpellIndex {0}}
#ALIAS {rs} {ResetSpellup}
#ALIAS {sp} {#T+ {Spellup|Events};CastFirstSpell}
#ALIAS {spadd} {#ADDITEM {lstSpells} {%1}}
#ALIAS {spdel} {#DELITEM {lstSpells} {%1}}
#ALIAS {sphelp} {#SHOW {%char(10)%ansi(bold,red)Commands  - - - - - -  What they do... %char(10)-------------------------------------------------------%char(10)%ansi(bold,magenta)sphelp%ansi(bold,red)  - - - - - - -  %ansi(bold,green)This listing%char(10)%ansi(bold,magenta)sp%ansi(bold,red)  - - - - - - - - -  %ansi(bold,green)Begins casting spells%char(10)%ansi(bold,magenta)spshow%ansi(bold,red)  - - - - - - -  %ansi(bold,green)Displays Spells in the List%char(10)%ansi(bold,magenta)spadd <xx>%ansi(bold,red)  - - - - -  %ansi(bold,green)Adds spell <xx> to the List%char(10)%ansi(bold,magenta)spdel <xx>%ansi(bold,red)  - - - - -  %ansi(bold,green)Removes spell <xx> from the List%char(10)}}
#ALIAS {spshow} {#FORALL @lstSpells {#SHOW {%i}}}
#VAR {nSpellIndex} {0} {0}
lstSpells="c armor me|c bless me|c breathe me|c detect evil|c detect invis|c detect magic|c infra me|c mass invis|c mass lev|c protection|c mass quickness|c sense life|c shield|c stone|c str me|c detect good"
#T- {Spellup|Events}
#SA {Kernighan's Spellup Script V1.1}
#CLASS 0

#CLASS {Spellup|Events} {disable}
#TRIGGER {^The battle distracts you from your spell casting.} {ResetSpellup}
#TRIGGER {^You chant out the arcane words and are drained of %1 mana.} {CastNextSpell}
#TRIGGER {^You have not practiced that spell} {CastNextSpell}
#TRIGGER {^Sorry, you can't do that.} {CastNextSpell}
#TRIGGER {^You dream of accomplishing such great and wonderous feats.} {ResetSpellup}
#TRIGGER {^You fumble over the correct inflection} {CastSameSpell}
#CLASS 0



