Newbie wants help with failed spells

Posted by ErockMahan on Thu 10 Jun 2004 10:46 PM — 2 posts, 15,380 views.

#0
I have been using MushClient for a long time, and I have been terribly impressed. I've been reading these posts and have learned lots and lots. You guys are great, and I'm glad for the help you've given me, though you've never done so directly. I'll stop kissing up and cut to the chase.

I hate it when I fail a spell and I want to find some way to make it so that I will automatically re-cast when I fail. If it makes things easier, the spells I want to have this work with are all trigger-based.

------------------------------
Example:

You are hungry.

(TRIGGER:) cast 'satiate'

You lost your concentration!

You starve to death.

You are dead! R.I.P.
------------------------------

Now, that doesn't really happen, but it is a good example of what I am facing and what I'd like to prevent.

If anyone can help me (or even if EVERYONE can) please try to keep your answers relatively simple. Because I am still new to this coding world, I have no idea how the Planet.output(trigger) whatever works. I am used to opening up the particular window and clicking on the neat little "new" button (like for triggers or macros, etc.)

Thank you very much for your help everyone! Again, if you can provide a solution to the problem as presented above, that will be more than enough for me to adapt it to my particular situations. Thank you very much!
Russia #1
If all the spells give the same failure message then you'll need 1 variable and 1 trigger. When casting a spell, set the variable to the spell command you just issued. The trigger should match on 'You lost your concentration. It should send the contents of the variable above. So, supposing that you name the variable "LastSpell":

variable
name = LastSpell

trigger
match="You lost your concentration."
send="@LastSpell"
expand variables=y

A possible spell trigger could then be:

trigger
match="You are hungry."
send={world.Send "cast 'satiate'"
world.SetVariable "LastSpell", "cast 'satiate'"}
send to="Scripting"