|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Fri Feb 14, 2003 9:47 pm
Carabas Spell up Script |
I am trying to get carabas's spell up script to work correctly on Unicorn valley mud. It works great other that it won't recast a spell from the faded spell list. Can someone look at this code. Also this script uses his color replacement script with this.
******* Spell UP *******************
#CLASS {Spellup}
#STAT {Faded Spells: %if(@listSpells.faded,%replace(@listSpells.faded,"|",", "),none)}
#CLASS 0
#CLASS {Spellup|Faded Spells}
#TRIGGER {A spectral image of a raven emerges from your body, flying away.} {AddFaded bless}
#TRIGGER {You feel weaker.} {AddFaded strength}
#TRIGGER {Your lungs feel like they are on fire as the breathe water spell wears off.} {AddFaded breathe water}
#TRIGGER {You feel more vulnerable.} {AddFaded protection from evil}
#TRIGGER {The bright burst of colors has blinded you!} {AddFaded cure blind}
#TRIGGER {The detect invisible wears off.} {AddFaded detect invisibility}
#TRIGGER {You can no longer see in the dark.} {AddFaded infravision}
#TRIGGER {You feel less aware of your surroundings.} {AddFaded sense life}
#TRIGGER {Your armor returns to its mundane value.} {AddFaded armor}
#TRIGGER {You feel the protective veil of darkness vanish.} {AddFaded protection from good}
#TRIGGER {You feel very sick.} {AddFaded remove poison}
#TRIGGER {You feel yourself exposed.} {AddFaded invisibility}
#TRIGGER {You have been blinded!} {AddFaded cure blind}
#TRIGGER {You sense the blue in your vision disappear.} {AddFaded detect good}
#TRIGGER {Your endurance returns to normal.} {AddFaded quickness}
#TRIGGER {Your force shield shimmers then fades away.} {AddFaded shield}
#TRIGGER {Your levitation wears off.} {AddFaded levitate}
#TRIGGER {Your shield of fire slowly dissipates....and blinks out.} {AddFaded fireshield}
#CLASS 0
#CLASS {Spellup|System}
#CLASS 0
#CLASS {Spellup|System|Aliases}
#ALIAS CastFirstSpell {listSpells.index = 1;#IF (@Spellup) {#IF (%ismember( spprog, @spOptions.selected)) {#SHOW {%char( 10)@ansi( dRed)Casting @ansi( dCyan)%item( @listSpells.spellup, @listSpells.index)@ansi( dRed)~...}};#SEND %concat( cast %item( @listSpells.spellup, @listSpells.index));#VARIABLE listSpells.lastspell {%item( @listSpells.spellup, @listSpells.index)}};#IF (@ReSpellup) {#IF (%ismember( spprog, @spOptions.selected)) {#SHOW {%char( 10)@ansi( dRed)Casting @ansi( dCyan)%item( @listSpells.faded, @listSpells.index)@ansi( dRed)~...}};#SEND %concat( cast %item( @listSpells.faded, @listSpells.index));#VARIABLE listSpells.lastspell {%item( @listSpells.faded, @listSpells.index)}}}
#ALIAS CastNextSpell {#IF (@Spellup) {#ADD listSpells.index 1;#IF (@listSpells.index <= %numitems(@listSpells.spellup)) {#IF (%ismember(spprog,@spOptions.selected)) {#SHOW {%char(10)@ansi(bGreen)SUCCESS@ansi(dRed), Next is --> @ansi(dCyan)%item(@listSpells.spellup,@listSpells.index)}};#SEND %concat(cast %item(@listSpells.spellup,@listSpells.index));#VARIABLE listSpells.lastspell {%item(@listSpells.spellup,@listSpells.index)}} {ResetSpellup}};#IF (@ReSpellup) {listSpells.index = 1;#IF (@listSpells.index <= %numitems(@listSpells.faded)) {#IF (%ismember(spprog,@spOptions.selected)) {#SHOW {%char(10)@ansi(bGreen)SUCCESS@ansi(dRed), Next is --> @ansi(dCyan)%item(@listSpells.faded,@listSpells.index)}};#SEND %concat(cast %item(@listSpells.faded,@listSpells.index));#VARIABLE listSpells.lastspell {%item(@listSpells.faded,@listSpells.index)}} {ResetSpellup}}}
#ALIAS CastSameSpell {#IF (@Spellup) {#SHOW {%char(10)@ansi(bRed)FAILED@ansi(dRed), Recasting --> @ansi(dCyan)%item(@listSpells.spellup,@listSpells.index)};#SEND %concat(cast %item(@listSpells.spellup,@listSpells.index));#VARIABLE listSpells.lastspell {%item(@listSpells.spellup,@listSpells.index)}};#IF (@ReSpellup) {#SHOW {%char(10)@ansi(bRed)FAILED@ansi(dRed), Recasting --> @ansi(dCyan)%item(@listSpells.faded,@listSpells.index)};#SEND %concat(cast %item(@listSpells.faded,@listSpells.index));#VARIABLE listSpells.lastspell {%item(@listSpells.faded,@listSpells.index)}}}
#ALIAS ResetSpellup {#IF (@Spellup | @ReSpellup) {#SHOW {%char(10)@ansi(bYellow)Spellup has been reset.};#T- {Spellup|System|Triggers};listSpells.index = 0;ReSpellup = 0;Spellup = 0}}
#ALIAS AddFaded {#IF (%ismember(%-1,@listSpells.spellup)) {#ADDITEM listSpells.faded {%-1};#VARIABLE listSpells.faded {%dups(@listSpells.faded)}};#IF ((!@ReSpellup)&(%ismember(recastfaded,@spOptions.selected))) {rsp}}
#CLASS 0
#CLASS {Spellup|System|Variables}
#VAR ReSpellup {0}
#VAR Spellup {0}
#VAR listSpells {index0allarmor|bless|breathe water|detect evil|detect good|detect invisibility|detect magic|fireshield|infravision|invisibility|levitate|manashield|phantasmal image|protection from evil|protection from good|quickness|sanctuary|sense life|shield|stone skin|strengthpickarmor|bless|breathe water|detect evil|detect good|detect invisibility|detect magic|fireshield|infravision|invisibility|levitate|manashield|phantasmal image|protection from evil|protection from good|quickness|sanctuary|sense life|shield|stone skin|strengthspelluparmorfadedarmorlastspellarmor}
#VAR spOptions {allRecast Faded Spells Imediately:recastfaded|Show Progress During Spellup:spprog|Send a Spellup Emote to the MUD before initiating spellup:spemotepick*Recast Faded Spells Imediately:recastfaded|*Show Progress During Spellup:spprog|*Send a Spellup Emote to the MUD before initiating spellup:spemoteselectedemoteis going to be spelling up!}
#CLASS 0
#CLASS {Spellup|System|Triggers}
#TRIGGER {Sparkles of light fill the area, as the magic is absorbed into the surroundings.} {ResetSpellup}
#TRIGGER {That is impossible to do while sitting.} {stand;#IF {@Spellup | @ReSpellup} {CastSameSpell}}
#TRIGGER {The battle distracts you from your spell casting.} {ResetSpellup}
#TRIGGER {You don't have enough mana.} {ResetSpellup}
#TRIGGER {You chant out the arcane words and are drained of %d mana.} {#DELITEM listSpells.faded {@listSpells.lastspell};#VARIABLE listSpells.lastspell {%null};#IF {@Spellup | @ReSpellup} {CastNextSpell}}
#TRIGGER {You dream of accomplishing such great and wonderous feats.} {ResetSpellup}
#TRIGGER {You fumble over the correct inflection used} {#IF {@Spellup | @ReSpellup} {CastSameSpell}}
#TRIGGER {You have to stand up before you can do that.} {stand;#IF {@Spellup | @ReSpellup} {CastSameSpell}}
#CLASS 0
#CLASS {Spellup|Aliases}
#ALIAS spconfig {#IF (%null(%1)) {#SHOW {%char(10)@ansi(White)Please choose one of the following.%char(10)%char(10)@ansi(dGreen)Type @ansi(bMagenta)spconfig spells @ansi(dGreen)to choose what spells to cast during spellup.%char(10)Type @ansi(bMagenta)spconfig options @ansi(dGreen)to configure how this script works.}};#IF ("%1" = "spells") {#VARIABLE listSpells.pick {%null};#FORALL @listSpells.all {#IF (%ismember(%i,@listSpells.spellup)) {#ADDITEM listSpells.pick {~*%i}} {#ADDITEM listSpells.pick {%i}}};#VARIABLE listSpells.spellup {%pick('p:Select the spells you wish to use in your spellup.',@listSpells.pick)}};#IF ("%1" = "options") {#VARIABLE spOptions.pick {%null};#FORALL @spOptions.all {#IF (%ismember(%trim(%right(%i,%pos(":",%i))),@spOptions.selected)) {#ADDITEM spOptions.pick {~*%i}} {#ADDITEM spOptions.pick {%i}}};#VARIABLE spOptions.selected {%pick('p:Spellup Options List',@spOptions.pick)};#IF (%ismember(spemote,@spOptions.selected)) {#PROMPT spOptions.emote "Please enter the message you wish to emote before spelling up."}}}
#ALIAS sp {#IF (%numitems(@listSpells.spellup)) {#IF (%ismember(spemote,@spOptions.selected)) {#SEND %concat(emote @spOptions.emote)};#T+ {Spellup|System|Triggers};Spellup = 1;CastFirstSpell} {#SHOW {%char(10)@ansi(White)Spellup Error%char(10)%char(10)@ansi(dGreen)You have not yet selected which spells to cast during spellup.%char(10)Type @ansi(bMagenta)spconfig spells @ansi(dGreen)to choose them now.}}}
#ALIAS rs {ResetSpellup}
#ALIAS rsp {#IF (%null(%1)) {#IF (%numitems(@listSpells.faded)) {#T+ {Spellup|System|Triggers};ReSpellup = 1;CastFirstSpell} {#SHOW {%char(10)@ansi(White)Spellup Error%char(10)%char(10)@ansi(dGreen)There are no faded spells in the list.}}};#IF ("%1" = "clear") {#VARIABLE listSpells.faded {%null}}}
#CLASS 0
#CLASS {Spellup|Dispelled Spells}
#TRIGGER {A spectral raven emerges from your body, forced out by magic.} {AddFaded bless}
#TRIGGER {You can no longer detect magic.} {AddFaded detect magic}
#TRIGGER {Your skin feels like stone no longer.} {AddFaded stone skin}
#TRIGGER {You feel exposed.} {AddFaded invisibility}
#TRIGGER {You don't feel so strong.} {AddFaded strength}
#TRIGGER {Your protective veil of darkness has been shattered.} {AddFaded protection from good}
#TRIGGER {Your magical shield has been dispelled.} {AddFaded shield}
#TRIGGER {Your shield of fire collapses.} {AddFaded fireshield}
#TRIGGER {Your lungs heave and you cough water.} {AddFaded breathe water}
#TRIGGER {You don't feel lighter than air any more.} {AddFaded levitate}
#TRIGGER {Your ability to detect evil auras has been dispelled.} {AddFaded detect evil}
#TRIGGER {Your ability to detect good auras has been dispelled.} {AddFaded detect good}
#TRIGGER {You feel less morally protected.} {AddFaded protection from evil}
#TRIGGER {You feel less perceptive.} {AddFaded detect invisibility}
#TRIGGER {You feel less in touch with living things.} {AddFaded sense life}
#TRIGGER {Your sight grows dimmer.} {AddFaded infravision}
#TRIGGER {You don't feel so well protected.} {AddFaded armor}
#CLASS 0
#CLASS {Spellup|Casted Spells}
#TRIGGER {You glow with a pulsating, white light for a few moments.} {protection from evil}
#TRIGGER {Your armor begins to glow softly as it is enhanced by a cantrip.} {armor}
#CLASS 0
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Sun Feb 16, 2003 7:39 pm |
<dump>
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Feb 17, 2003 6:00 am |
Perhaps you could give us a link to the original post (by Carabas) so we could see the intended usage?
There doesn't appear to be any trigger to initiate recasting. Therefore, I'd presume Carabas intended for you to type the appropriate alias whenever you felt recasting was appropriate.
LightBulb
Advanced Member |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Mon Feb 17, 2003 7:23 pm |
The only thing I changed was a couple of trigger so that I would trigger on the wording of Unicorn Valley spells of armor instead of Medievia. If you want to see the original script it is at: http://www.clangersidi.com/ncentre.html
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Feb 18, 2003 12:29 am |
No instructions there, unless they're included in the .zip file. As I said, there aren't any triggers to initiate casting of faded spells. The triggers just add faded spells to a list. However, there are two short aliases near the end of the script, rs and rsp. It looks like the second is what you type when you want your faded spells recast.
LightBulb
Advanced Member |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Tue Feb 18, 2003 2:58 pm |
The rsp alias is what is supossed to recast the spell list which looks at the faded spell list and cast the faded spells.
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Feb 18, 2003 5:57 pm |
Right. That was your question, wasn't it?
quote: It works great other that it won't recast a spell from the faded spell list.
LightBulb
Advanced Member |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Tue Feb 18, 2003 6:10 pm |
Correct. I can't figure out why it isn't recasting. I was hoping someone can help me with this.
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Feb 19, 2003 7:56 pm |
Anyone heard from Carabas recently?
It's probably easier to rewrite the script than to find a problem in something this size that someone else wrote.
LightBulb
Advanced Member |
|
|
|
wilh Wanderer
Joined: 08 Feb 2001 Posts: 89 Location: USA
|
Posted: Wed Feb 19, 2003 9:44 pm |
Is your problem that that the rsp alias doesn't work or that it isn't being called automatically? I'm still unclear on that...
Wil
Wil Hunt |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Thu Feb 20, 2003 5:07 pm |
The problem is that the rsp alias isn't working all of the way. It will recast any spells in the faded list but won't clear them from the status bar.
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Feb 20, 2003 7:43 pm |
#TRIGGER {You chant out the arcane words and are drained of %d mana.} {#DELITEM listSpells.faded {@listSpells.lastspell};#VARIABLE listSpells.lastspell {%null};#IF {@Spellup | @ReSpellup} {CastNextSpell}}
That trigger should delete them from the faded list
#STAT {Faded Spells: %if(@listSpells.faded,%replace(@listSpells.faded,"|",", "),none)}
Using the above status line and:
#ADDITEM listSpells.faded a
#ADDITEM listSpells.faded b
#DELITEM listSpells.faded a
#DELITEM listSpells.faded b
Works for me.
Investigate that something didn't resolve when your status line was created?
ie
#STAT {Faded Spells: %if(@listSpells.faded,%replace(@listSpells.faded,"|",", "),none)}
became something like
#STAT {Faded Spells: %if("a|b|c|d",%replace("a|b|c|d","|",", "),none)}
Try having an alias set that #STAT line.
Ton Diening |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Sun Feb 23, 2003 10:41 pm |
Well, those changes still doesn't work.. I think I am going to have to rewrite this from scratch... Thanks anyway.
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Mon Mar 03, 2003 11:21 pm |
I haven't had a chance to do this yet. But I want a script similar to the way Carabas's spellup script worked. Here are the trigger lines - with the name of the spells at the end of the line. I want the spells to show up in the status line when faded and an alias to recast them.
Affect Lines
============================================
Your armor begins to glow softly as it is enhanced by a cantrip. - cast armor
The guard's armor begins to glow softly as it is enhanced by a cantrip. - cast armor guard
Traces of blue outline the magical objects in your field of vision. - cast 'detect magic'
Traces of red outline all evil in plain sight. - cast 'detect evil'
Faded Lines
============================================
Your armor returns to its mundane value. - armor
The blue outlines disappear from your vision. - detect magic
The red outlines fade from your vision. - detec magic
Failed Lines
============================================
Something distracts you, and you lose your concentration.
You don't have enough mana.
============================================
<125hp 15m 130mv> aff
Affected: detect magic
Affected: detect evil
Affected: armor
<123hp 18m 121mv>aff
No cantrip or skill affects you.
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Mar 04, 2003 6:44 am |
Here's something to start with.
#STATUS Faded: %expandlist( @Faded, ", ")
#TR {Your armor begins to glow softly as it is enhanced by a cantrip.} {#DELITEM Faded {armor}}
#TR {Traces of blue outline the magical objects in your field of vision.} {#DELITEM Faded {detect magic}}
#TR {Traces of red outline all evil in plain sight.} {#DELITEM Faded {detect evil}}
#TR {Your armor returns to its mundane value.} {#ADDITEM Faded {armor}}
#TR {The blue outlines disappear from your vision.} {#ADDITEM Faded {detect magic}}
#TR {The red outlines fade from your vision.} {#ADDITEM Faded {detect evil}}
#TR {Affected: (*)} {#DELITEM Faded {%1}}
#AL recast {#VAR recast 1;cast '%item( @Faded, 1)'}
#TR {Something distracts you, and you lose your concentration.} {#IF (@recast) {recast}}
#TR {You don't have enough mana.} {#IF (@recast) {#VAR recast 0}}
LightBulb
Advanced Member |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Tue Mar 04, 2003 4:35 pm |
Thanks Lightbulb. This will give me a good start. I was just having a little bit of the mind melt trying to think of how to start it.
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
|
|