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, confirm your email, resolve issues, 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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Comparing a variable

Comparing a variable

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


Posted by Jerry   USA  (6 posts)  Bio
Date Fri 23 Jul 2010 09:47 PM (UTC)
Message
Hi, I'm new to MUSHclient, and scripting in lua, I have some of the basics down, and most of what was covered in the "getting started" section.
I do have a question about comparing variables, though.
Does it work the same as when you compare a wildcard? Or do I need to type it in a different way?
Apologies if I missed it during a search.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 23 Jul 2010 09:58 PM (UTC)
Message
Template:faq=32 Please read the MUSHclient FAQ - point 32.


If that doesn't answer your question please post an example of what you are trying to do.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Jerry   USA  (6 posts)  Bio
Date Reply #2 on Wed 28 Jul 2010 05:48 PM (UTC)
Message
Thanks Nick! I apologize, I didn't read that correctly.
So I would need to do the "incorrect" version to compare a variable, right?
And sorry for the late reply.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 28 Jul 2010 08:37 PM (UTC)
Message
No, I would not use the incorrect version. Can you please post what you are doing (copy and paste).

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Jerry   USA  (6 posts)  Bio
Date Reply #4 on Tue 03 Aug 2010 10:02 AM (UTC)
Message
I haven't made anything yet, I'm thinking about how to do it.
Should I go about making a queue, or would it be better to compare?
For instance, once the line "You are afflicted with slickness." Comes up, I want to set the variable slick to 1, and try to cure it.
If something else comes up like, "You watch, in horror, as your left arm shrivels up and becomes useless."
I want to compare if slick is equal to one, so I cure slickness before I try to cure the broken arm.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #5 on Tue 03 Aug 2010 09:17 PM (UTC)
Message
This is getting more complex. Try searching this forum for "curing system". Add in the MUD name too, that may help narrow it down.

There are examples of batching up outstanding ailments and even curing them in the desired order. However this requires more complex scripting than "comparing a variable".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Jerry   USA  (6 posts)  Bio
Date Reply #6 on Tue 03 Aug 2010 09:34 PM (UTC)
Message
Alright, I'll try that out.
Thanks again Nick!
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.


20,533 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.