Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Simple newbie-trigger - heal until full HP:s

Simple newbie-trigger - heal until full HP:s

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


Posted by Mazarin   (14 posts)  Bio
Date Thu 24 Jun 2010 10:31 AM (UTC)
Message
A simple newbie question: howto make triggers that fires until a certain condition is met like in the following, heal until full HP:s:

Input from mud: 'You heal you wounds' leads to send to mud 'cast heal'

Then, when I get a response: 'You are now fully healed' the trigger is to be disabled until the user casts heal next time.

How can this be accomplished?


I would also appreciate much more simple newbie-help on the client. It is, after all, not meant only for programmers, is it (though this forum prolly is). :)


Thank you very much for the attention.
// Mazarin

P.S. I got a very wellworking answer to my previous question (about instant disabling of trigs). Thank you also for that.
Top

Posted by Daniel P   USA  (97 posts)  Bio
Date Reply #1 on Fri 25 Jun 2010 05:52 PM (UTC)

Amended on Fri 25 Jun 2010 05:57 PM (UTC) by Daniel P

Message
I think you've pretty much solved it yourself.

You just need a total of two triggers; a named trigger to send "cast heal" when you match "You heal your wounds" and another that will EnableTrigger("name",false) when you match "You are now fully healed".

A side note: it will be necessary to turn the trigger back on once you've finished, so your initial cast heal, whether it be in an alias, trigger, macro or script would need to not only send "cast heal", but also EnableTrigger("name",true).

The "name" referred to is that bit you enter into the Label box in the editor.

Trigger 1:

Match: You heal your wounds
Label: HealMe
Send_To: World
Send: cast heal


Trigger 2:

Match: You are now fully healed
Send_To: Script (12)
Send: EnableTrigger("HealMe",false)


Alias 1:

Match: begin heal
Send_To: Script (12)
Send: EnableTrigger("HealMe",true)
      Send("cast heal")
Top

Posted by Nick Gammon   Australia  (23,057 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 26 Jun 2010 12:16 AM (UTC)

Amended on Tue 26 Nov 2013 03:41 AM (UTC) by Nick Gammon

Message
Mazarin said:

I would also appreciate much more simple newbie-help on the client. It is, after all, not meant only for programmers, is it (though this forum prolly is). :)


Have you looked at the "Getting Started" part of the forum?

http://www.gammon.com.au/forum/?bbtopic_id=120


That covers, with screenshots and in some cases, videos, quite a bit of the basics.

The client isn't intended for programmers, however to do more complex things like "heal the tank if his health is less then 30%" a little bit of scripting is helpful.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


13,919 views.

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

Go to topic:           Search the forum


[Go to top] top

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