Comparing a variable

Posted by Jerry on Fri 23 Jul 2010 09:47 PM — 7 posts, 24,538 views.

USA #0
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.
Australia Forum Administrator #1
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.
USA #2
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.
Australia Forum Administrator #3
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.
USA #4
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.
Australia Forum Administrator #5
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".
USA #6
Alright, I'll try that out.
Thanks again Nick!