Winslow Novice
Joined: 17 Feb 2007 Posts: 48
|
Posted: Tue Jul 17, 2007 11:57 pm
Script for Exile: Spellup |
This script does the usual spellup spells on a player. Useful part is that if you don't successfully cast a spell, run out of mana, or anything else, it will recast it. Additionally, instead of many commands flooding into your mud buffer, it only cast them one at a time and will only cast the next one if the last is successful. So you can talk in between casts and do other things, don't lose mudding time.
Code: |
#trigger {Sorry, you can't do that} {#if (@bSpellup) {CastNextSpell}} grpSpellup;#trigger {Impossible! You can't concentrate enough!} {ResetSpellup} grpSpellup;#trigger {You utter the words,} {#if (@bSpellup) {CastNextSpell}} grpSpellup;#trigger {You lost your concentration!} {#if (@bSpellup) {CastSameSpell}} grpSpellup;#trigger {You have not practiced that} {#if (@bSpellup) {CastNextSpell}} grpSpellup;#alias CastFirstSpell {#if (%numitems(@lstSpells) > 0) {#var nSpellIndex {1};#if (@spstat) {#show Casting %item(@lstSpells,@nSpellIndex)...};c %item(@lstSpells,@nSpellIndex) me} {rs}} grpSpellup;#alias CastNextSpell {#math nSpellIndex @nSpellIndex+1;#if (@nSpellIndex <= %numitems(@lstSpells)) {c %item(@lstSpells,@nSpellIndex) me;#if (@spstat) {#show SUCCESS, Next is --> %item(@lstSpells,@nSpellIndex)}} {ResetSpellup}} grpSpellup;#alias CastSameSpell {c %item(@lstSpells,@nSpellIndex) me;#if (@spstat) {#show FAILED, Recasting --> %item(@lstSpells,@nSpellIndex)}} grpSpellup;#alias ResetSpellup {#if (@bSpellup) {#show Spellup has been reset.;emote is Done spelling up...;#var bSpellup {0};#var nSpellIndex {0};copyspell;getemoutahere}} grpSpellup;#alias copyspell {#var lstSpells "";#var lstSpells "";#loop 1,%numitems(@spells) {#additem lstSpells %item(@spells,%i)}} grpSpellup;#alias rs {ResetSpellup} grpSpellup;#alias sp {#var bSpellup {1};emote is spelling up....;CastFirstSpell} grpSpellup;#alias sp- {#t- grpSpellup} grpSpellup;#alias spadd {#additem lstSpells %1} grpSpellup;#alias spdel {#additem lstSpells %1} grpSpellup;#alias sphelp {#show %char(10)Commands - - - - - - What they do... %char(10)-------------------------------------------------------%char(10)Sphelp - - - - - - - This listing%char(10)Sp - - - - - - - - - Begins casting spells%char(10)Spp - - - - - - - - - DISABLED)%char(10)Spshow - - - - - - - Displays Spells in the List%char(10)Spadd <xx> - - - - - Adds spell <xx> to the List%char(10)Spdel <xx> - - - - - Removes spell <xx> from the List%char(10)Sp- - - - - - - - - - Disables the entire group of commands%char(10)Sp+ - - - - - - - - - Enables group of commands%char(10)Spstat - - - - - - - Toggles the status of spell casting} grpSpellup;#alias spshow {#show @lstSpells} grpSpellup;#alias spstat {#if (@spstat) {#var spstat {0};#show Spell Info OFF} {#var spstat {1};#show Spell Info ON}} grpSpellup;#var bSpellWasCast {0} "" grpSpellup;#var nSpellIndex {0} "" grpSpellup;#var lstSpells "";#additem lstSpells armor;#additem lstSpells bless;#additem lstSpells detect invis;#additem lstSpells stone;#additem lstSpells invis;#additem lstSpells lev;#additem lstSpells infra;#additem lstSpells det;#additem lstSpells sanc;#additem lstSpells firesh;#additem lstSpells stren itemadd lstSpells blur;#var spells "";#additem spells armor;#additem spells bless;#additem spells detect invis;#additem spells stone;#additem spells invis;#additem spells lev;#additem spells infra;#additem spells det;#additem spells sanc;#additem spells firesh;#additem spells stren;#additem spells blur
|
Commands - - - - - - What they do...
Sphelp - - - - - - - This listing
Sp - - - - - - - - - Begins casting spells
Spshow - - - - - - - Displays Spells in the List
Spadd <xx> - - - - - Adds spell <xx> to the List
Spdel <xx> - - - - - Removes spell <xx> from the List
Sp- - - - - - - - - - Disables the entire group of commands
Sp+ - - - - - - - - - Enables group of commands
Spstat - - - - - - - Toggles the status of spell casting
Helpful. |
|