|
Rezo Newbie
Joined: 21 Jan 2002 Posts: 6 Location: USA
|
Posted: Mon Jan 21, 2002 3:19 pm
Fading spell |
I currently have a spell trigger that kicks off when a spell fades. It's a very simple trigger, but it seems to work. What I would like is a trigger that will recast the same spell if the first attempt fails.
Sample output:
You feel your grip on the magic disappear.
What I have:
Trigger - cast 'mana shield'
If it fails I get:
You lost your concentration!
I tried this, but it doesn't work:
cast '@lastspell' @lastsay
This obvously only works for the last person who actually asks for me to spell them up.
Can anyone help me out on this issue. I took a year off from mudding and now I'm trying to get back into it.
Rezo
Rezo, the Red Priest |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Jan 21, 2002 3:28 pm |
Well, you are in the correct direction. In the trigger that casts 'mana shield', set a variable to equal that:
#VAR currspell "mana shield"
Now, create a trigger for the fail message and have it do this:
cast '@currspell'
Kjata |
|
|
|
Rezo Newbie
Joined: 21 Jan 2002 Posts: 6 Location: USA
|
Posted: Mon Jan 21, 2002 4:22 pm |
What if I had multiple spells that I needed recast? I couldn't use a #VAR or currspell with only mana shield. What if I had multiplel spells that I might want to recast on myself after they fade. The failure message is the same for all of them, 'You lost your concentration!', but the fade messages are all different.
For example:
Your magic shield dissipates. - cast 'shield' rezo
You feel less righteous. - cast 'bless' rezo;cast 'improved bless' rezo
You feel less protected as the magical vestment vanishes. - cast 'magical vest' rezo
Can I give one variable for all these? and a repeat if fail?
Rezo, the Red Priest |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Mon Jan 21, 2002 5:34 pm |
Go to Carabas's website. He has a trigger system for recasting fading spells for Medievia that you may be able to change for your mud.
http://www.bealenet.com/~wfrye/Carabasurl
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Jan 21, 2002 6:19 pm |
In this case you set up a queue by using a stringlist. You add the name of each spell that need recasting to the stringlist using the #ADDITEM command and then trigger of the fail message to cast the first spell on the stringlist and then delete the first item on the stringlist. Once the stringlist is empty, you have finished re-casting spells.
Kjata |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Mon Jan 21, 2002 11:50 pm |
I just checked the URL I put above and he doesn't have it up. You may want to just email [url]carabas@bealenet.com[/url] and see if he can send you the script I was talking about
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
|
|