In my system (not Treant) I use queueing all the time, for curing, attacking, hunting, walking around, influencing, deffing up, keeping my song going, etc. etc. I have more than 400 commands that can be queued up. Triggers and queueing are the pillars of a system, in my opinion.
Yes, the ability to queue things is a base functionality of Treant as he uses it in a few different places. The most obvious one I can think of is the autodeffer.
Um.. guessing that's something people have to figure out though? There isn't any instructions to that or anything. It's just.. files.
I never heard of queueing. Seriously there needs to be like a beginners forum or something. I feel like a complete idiot.
Um.. guessing that's something people have to figure out though? There isn't any instructions to that or anything. It's just.. files.
I never heard of queueing. Seriously there needs to be like a beginners forum or something. I feel like a complete idiot.
Well, there's no beginners forum for Treant because Treant is a system created and maintained by Zarquan/Iasmos - one player in the Lusternian game world. It is in no way affiliated with Lusternia proper. If you need in depth help with it because you're just not getting things, I highly recommend buying a support contract from Zarquan. He's incredibly helpful.
Um.. guessing that's something people have to figure out though? There isn't any instructions to that or anything. It's just.. files.
I never heard of queueing. Seriously there needs to be like a beginners forum or something. I feel like a complete idiot.
Treant is free basically because it doesn't come with anything but minimal instructions and little support. If you pay, you get wonderful support. If you don't, you get to figure it out yourself or hope one of us will answer.
Unknown2010-05-03 03:44:33
Ok, so so close now. I can get the trigger to begin running, but I can't get it to alternate. Here's what I got.
if GetVariable == "0" then Send("influence @target with begging") SetVariable ("beg", 1) else Send("influence @target with supplication") SetVariable ("beg", 0) end
So it starts of with this
influence woman with begging You thrust your hand out to a village woman and beg shamelessly. A village woman is so caught up in admiring herself that she barely notices you.
You have recovered equilibrium.
influence woman with supplication Explaining your abject poverty, you humbly request a little help from a village woman. A village woman is so caught up in admiring herself that she barely notices you.
You have recovered equilibrium.
influence woman with supplication Explaining your abject poverty, you humbly request a little help from a village woman. A village woman is so caught up in admiring herself that she barely notices you.
So from what I understand, I got the process correct. I just need that variable to turn to 1 whenever I beg. I thought I have that with if GetVariable == "0" then Send("influence @target with begging") SetVariable ("beg", 1) But that doesn't seem to be working.
Sylphas2010-05-03 03:51:13
It probably does turn to 1. The first thing I'd check with that is whether Lua treats numbers and strings differently. You're looking to see if the variable is a string with the value "0", not looking for the number 0. It might make no difference, but that'd be the first thing I tried, changing it to if GetVariable == 0 then, etc, etc.
Unknown2010-05-03 10:05:31
You didn't use GetVariable correctly. You need to specify which variable to get...
It probably does turn to 1. The first thing I'd check with that is whether Lua treats numbers and strings differently. You're looking to see if the variable is a string with the value "0", not looking for the number 0. It might make no difference, but that'd be the first thing I tried, changing it to if GetVariable == 0 then, etc, etc.
Even after using GetVariable correctly, Sylphas is correct. Lua sometimes (not always, but sometimes) has trouble differentiating between strings and numbers. To circumvent this, the neat little snippet tonumber or tostring can be inserted into the code anytime a variable is established. I'll do a demonstration using the variables enemy and enemies, one being a "target" and therefore a stringed value and the other quantitative and therefore a number. Watch:
CODE
enemy = "Aidyn" tostring(enemy)
Lua now knows everytime it evaluates the variable enemy that it is a stringed value and therefore should always match letters. Now for numbers:
CODE
enemies = "5" tostring(enemies)
Now the code is telling your Lua interpreter that enemies will always be a numerical value. Note that numbers don't have to have quotation marks, however, it may be useful in the long run to always have your variables quoted for easy identification later on. The cool thing about numbers is that Lua will evaluate anything other than 0 or nil as a true value; which means that you can use your numerical variable to establish booleans as well. For a bit of a rundown on basic Lua I found a decent website. Bear in mind that it is based off of material that was translated from German to English so you'll have to overlook the webmaster's here-and-there grammatical errors, but is otherwise spot-on. That site is:
I don't want to go overboard here and insult your intelligence, but since I'm not sure of your programming experience (and because I'm still an amateur programmer who had to have someone suggest this to me) might I recommend that you find a good Lua interpreter to editor, analyze, and test your scripts? I personally use Brain Damage, but others that I know some people use are LuaEdit, and Crimson Editor. All of which can be found by using Google. In fact, there are a plethora of resources out there for Lua, the most-useful of which might actually be the creator of Mush's forums found at http://www.gammon.com.au/forum/bbshowpost.php?bbsection_id=1
Good luck and happy programming!
Unknown2010-05-03 12:43:52
You and Sylphas are only slightly correct. It has nothing to do with Lua's ability to distinguish data types and everything to do with how MUSHclient stores the value of a world variable.
The SetVariable function accepts strings, numbers, and booleans without problem. However, the values are all stored as strings internally. Consequently, GetVariable no longer knows the original type of the value and thus always returns a string.
TheSponge was actually using both SetVariable and GetVariable correctly, except for forgetting the parameter to GetVariable.
Of course, using tonumber and/or tostring is very useful in many cases, too. It's just not 100% necessary in this instance.
Unknown2010-06-04 22:22:29
Ok, I'm sooooo close to getting this done, I can feel it. I have my variables and everything set up. Here's my code for begging and supplication, switching.
if GetVariable == ("beg", 0) then Send("influence @target with begging") SetVariable ("beg", 1) else Send("influence @target with supplication") SetVariable ("beg", 0) end
What the heck? I'm pretty sure I did it perfectly.
Felicia2010-06-04 22:44:18
Trying to alternate influencing abilities, eh? I asked Nick Gammon about that exact same thing a few days ago (in CMUD, they're called "multistate triggers"). Try this:
CODE
    enabled="y"   expand_variables="y"   match="You have recovered equilibrium."   name="eq_trigger_1"   send_to="12"   sequence="100"   >  Â
Send "influence @inf with compliments"
EnableTrigger ("eq_trigger_1", false)Â Â -- disable ourself EnableTrigger ("eq_trigger_2", true)Â Â -- enable next one
 Â
    expand_variables="y"   match="You have recovered equilibrium."   name="eq_trigger_2"   send_to="12"   sequence="100"   >  Â
Send "influence @inf with admiration"
EnableTrigger ("eq_trigger_2", false)Â Â -- disable ourself EnableTrigger ("eq_trigger_3", true)Â Â -- enable next one
 Â
    expand_variables="y"   match="You have recovered equilibrium."   name="eq_trigger_3"   send_to="12"   sequence="100"   >  Â
Send "influence @inf with praise"
EnableTrigger ("eq_trigger_3", false)Â Â -- disable ourself EnableTrigger ("eq_trigger_1", true)Â Â -- enable next one
 Â
I'm too lazy to edit it, but it should be fairly self-evident. You'll have to prune it down to two repetitions if you've only got two abilities. @inf is my influencing target variable, because one should never use the same variable for both influencing and hunting. Believe me, I found this out the hard way.
So obviously, this script will spam the abilities in question at your target(s) until you disable it, and will fire whenever you recover equilibrium. It's not very elegant, but it works quite well. To control it, just assign a group name to it and use an EnableGroup("", true) alias to turn it on, and EnableGroup("", false) alias to turn it off. These aliases have to send to script, mind you.
I hope this made sense. I'm pretty new to MUSHclient myself.
Ok, I'm sooooo close to getting this done, I can feel it. I have my variables and everything set up. Here's my code for begging and supplication, switching.
if GetVariable == ("beg", 0) then Send("influence @target with begging") SetVariable ("beg", 1) else Send("influence @target with supplication") SetVariable ("beg", 0) end
What the heck? I'm pretty sure I did it perfectly.
CODE
if GetVariable("beg") == '0' then Send("influence @target with begging") SetVariable("beg", "1") else Send("influence @target with supplication") Â Â SetVariable("beg", "0") end
I'm too lazy to edit it, but it should be fairly self-evident. You'll have to prune it down to two repetitions if you've only got two abilities. @inf is my influencing target variable, because one should never use the same variable for both influencing and hunting. Believe me, I found this out the hard way.
So obviously, this script will spam the abilities in question at your target(s) until you disable it, and will fire whenever you recover equilibrium. It's not very elegant, but it works quite well. To control it, just assign a group name to it and use an EnableGroup("", true) alias to turn it on, and EnableGroup("", false) alias to turn it off. These aliases have to send to script, mind you.
I hope this made sense. I'm pretty new to MUSHclient myself.
Mine is one list of abilities and one function to cycle through a list, nice and easy, and far less work than all that.
Mine is one list of abilities and one function to cycle through a list, nice and easy, and far less work than all that.
It's not that much work. It looks more complicated than it is, but takes only a very short amount of time to set up. The code might be a tad cumbersome, but using it is dead simple.
All I have to do is set my influencing target, type "EmpOn" (an EnableGroup alias), and then get the ball rolling by using some equilibrium. A fake "recovered equilibrium" message sent to world output by the EnableGroup alias will even cause the script to kickstart itself. To stop the script, I simply type "EmpOff" (another EnableGroup alias).
It doesn't get any easier than setting a target and entering five letters (it can be one letter, if you want).
I'm not saying it's the most elegant solution ever, but it's effortless to use and easy to understand. I'm just trying to help TheSponge out if that other thing doesn't work for him or her.
if GetVariable("beg") == '0' then Send("influence @target with begging") SetVariable("beg", "1") else Send("influence @target with supplication") Â Â SetVariable("beg", "0") end
thank you SOOOO much! It's things like '0' that gets me. I never know when to add those little small details, it's a headache when I try to do my best to figure something out, only to get jipped when I forgot "0 " on the lower 0, while the first 0 has to be '0'. That never makes sense to me and I don't know when those specific quotation marks are required. Everybody gives me more complicated code telling me I can figure it out from that. Not... no not really. It's more confusing. I'm finally glad somebody had the courtesy to just simply put "look, here's what it's SUPPOSED to be." I'm not asking for freebies, I just don't know what the hell goes where. 0_e. I tried my best to get foiled by little symbol.. thingies.
pretty sure I won't be able to use this in combat related things though, considering that timers, enemy counterattacks, afflictions, and such variables would have to be taken into consideration. There's another headache.
Felicia2010-06-06 00:44:12
Labels and groups should be pretty easy to get the hang of, even for a beginner (which I am), and they're incredibly useful.
EnableGroup("", true) does exactly what it says: It enables all triggers and aliases you've assigned to . EnableGroup("", false) does the opposite.
For the record, that little snippet could use either '0' or "0" for the if statement. Sometimes it doesn't matter which quotation marks you use. In Lua, it's helpful to use them together, like when you need to use an apostrophe in a string, then you use double quotation marks around the outer text to keep the inner single quotation mark from ending your string early. (Hope that helps more than confuses...)
Labels and groups should be pretty easy to get the hang of, even for a beginner (which I am), and they're incredibly useful.
EnableGroup("", true) does exactly what it says: It enables all triggers and aliases you've assigned to . EnableGroup("", false) does the opposite.
EnableTrigger("", true) enables whatever individual trigger you've assigned to, while EnableTrigger("", false) does the opposite.
Yeah like I said earlier, I figured out the grouping quite easily. I have certain things set up for certain situations. Influence, Hunting, but only basic stuff. It's always those tiny little details I miss that end up screwing things up. But I don't want you to give me your own influence code, I feel much more accomplished when I use mine. I had help, but I appreciate it.
And Zarquan... yeah that confuses me. In school math, I would always need to see examples of the correct way to do it, have all these little details point out and the whole process done. Like when I was younger, maybe about 6 or 7, I couldn't grasp the concept of "carrying numbers" when doing subtraction. But once the teacher showed me a what she was doing (she would put the number that was supposed to be subtracted at the top of the problem) I was able to do it easy from then on.
Yeah like I said earlier, I figured out the grouping quite easily. I have certain things set up for certain situations. Influence, Hunting, but only basic stuff. It's always those tiny little details I miss that end up screwing things up. But I don't want you to give me your own influence code, I feel much more accomplished when I use mine. I had help, but I appreciate it.
And Zarquan... yeah that confuses me. In school math, I would always need to see examples of the correct way to do it, have all these little details point out and the whole process done. Like when I was younger, maybe about 6 or 7, I couldn't grasp the concept of "carrying numbers" when doing subtraction. But once the teacher showed me a what she was doing (she would put the number that was supposed to be subtracted at the top of the problem) I was able to do it easy from then on.
I used apostrophe instead of quotation marks because that would end the string started by the quotation marks. When I press F4 mush calls the function offense:exec ("attack", "man_bashbrains"). I typically use quotation marks for all my strings, and apostrophe for when I write a string inside another string. Hope this helps.
You can try this in the Immediate Window (CTRL+I) and see what error it raises:
CODE
AcceleratorTo ("CTRL+T", "Note ('it works')", 12) --that will work AcceleratorTo ("CTRL+T", "Note ("it doesnt work")", 12) --that won't work, because it will end the string inside paranthesis, and mush will expect to close the paranthesis
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
Enable or Disable Cookies
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.