[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Newbie wants help with failed spells
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Newbie wants help with failed spells

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by ErockMahan   (81 posts)  [Biography] bio
Date Thu 10 Jun 2004 10:46 PM (UTC)
Message
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!
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #1 on Fri 11 Jun 2004 03:02 AM (UTC)
Message
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"

[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


4,176 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]