I only want to mushroom sigils if I send certain aliases and if the sigils are flamed. If they're not flamed, I want to pick them up only when the aliases are sent. This does that, only it will also mushroom if I probe sigils that are flamed without using the aliases. If anyone knows how I can fix it, I'd appreciate it.
Aliases:
^ccc$
mushroom = cube
flame = no
send("p cube")
if flame == no then
send("get cube")
end
^mmm$
mushroom = monolith
flame = no
send("p monolith")
if flame == no then
send("get monolith")
end
Trigger:
^There is a flame-shaped sigil attached\. \((\d+) months remaining\)$
flame = yes
if mushroom == cube then
sendAll("get mushroom from pack", "attach mushroom to cubesigil")
elseif mushroom == monolith then
sendAll("get mushroom from pack", "attach mushroom to monolithsigil")
end
I dont know if its the easiest way, but you could enabletrigger() in your alias, and only have those triggers fire when using said alias, then disabletrigger() at the end.. So that when you probe without the alias it doesn't recognize the trigger or send the commands
All I've had today are six gummy bears and some scotch
So, I copied my profiles folder over to my laptop to get an updated system on work trips. Settings moved over fine, but my map don't work. Anything besides copying profiles folders I need to do?
So, I copied my profiles folder over to my laptop to get an updated system on work trips. Settings moved over fine, but my map don't work. Anything besides copying profiles folders I need to do?
What you really want to do is put your profiles folder into a Dropbox or equivalent cloud sharing type folder and link your Mudlet to that, then you'll always have the latest set of profiles. I do this for my desktop PC and laptop. There's instructions on how to do it on the Mudlet forums themselves
Hiroma tells you, "I just got to listen to someone complain about your deadly axekick being the bane of their existence." Archdragon Mizik Corten, Herald of Ruin says, "Man, that was a big axk." Hellrazor Cain de Soulis, Sartan's Hammer says, "Your [sic] a beast."
I'm having a bit of an issue with my Mudlet-2.1 client (obviously, or I woudln't be here). Anytime I try to open some functionality of Mudlet that requires I choose something from a directory, the selection window opens, then Mudlet freezes and crashes. This includes updating the Mapper script or important a Profile. The directory it tries to go to is ~/Applications/Mudlet-2.1.app/
I'm running on Mac OS 10.8.5. I don't know why its defaulting to this package rather than the .config directory I would have expected.
The error the Apple report gives is:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '(
"<NSIndexPath 0x1d71650> 3 indexes [0, 1, 0]"
Obviously, that may not necessarily mean anything to you, but if there would be a way to circumvent this directory path, that would be great.
Hello, let me start off by saying I don't really know much about lua. I would like to be able to catch a number when assessing and send different commands based on where the number is inbetween. For example if it is between 2500 and 3500 I would like to send one thing and if it is between 3501 and 4500 something else. I tried to look on the internet and make something. In short it did not work, if maybe someone could tell me how to do this, I would really appreciate it.
This looks valid to me. Although I am not sure if you want to send the
"shn "..target.." XX" to Achaea, or if you'd rather like to expandAlias
on this.
If you want to send this, the output of the window that
appears, if you click on the exclamation mark symbol on the left side in the
script/alias/trigger window could be helpful.
The easiest way would be to replace the calls to send by a call to expandAlias then. This should work.
I would try to tinker with the svo.kl_list (or similar, depending on the counter), because I like that more than pretending to have this as manual input, but I am not sure if this is a two way api and if one has to be careful about specifics. @Vadimuses should be able to explain that better than me, as I don't have his counter.
This can have multiple reasons: 1. Your trigger isn't firing. Enable highlighting in the trigger (right side above the script box) to see the matching.
2. There is an runtime error. Open the error log (left side exclamation mark) and give the output there.
I figured the problem out. The line I got was modified by svo like I though originally. I went through all the triggers (sigh) and found which one it was, turned it off and now it is working. Thank you for the help @keneanung.
It is necessary. Matches always contains strings, which can't be compared by numbers and are not autocasted on comparison.
Couldn't remember if they were cast on comparison or not.
A couple things to clean this up a bit. First, instead of calling tonumber() in every statement, you can just store the number in a local variable and use that. Second, if you're doing the comparisons in order like you have in your example, you can just use elseifs with a single comparison:
local health = tonumber(matches[4])
if health<=n1 then
stuff
elseif health<=n2 then
stuff
elseif health <=n3 then
stuff
....
end
As long as the numbers increase each time, you'll only get to the second "if" if health is >n1, and so on, so the > checks are redundant.
You'll find that people commonly advise against using expandAlias in situations like this. There are a couple of reasons, one being that it's slow, since it has to run the text through the alias matching engine and check it against all of your aliases, and another being that if for some reason you have two aliases that match what you're sending, both will fire when you might just be looking for one. More generally, expandAlias just isn't intended for use other than as a debugging tool, as I understand it. The preferred method, I think, would be to figure out what function that "shn" alias is calling, and just call it directly in your if statements.
so I know that with 'string:title()' , you can capitalize a single word, but what do you use when you want to capitalize all the letters of two or more words?
My display function seems to be acting up, it's not displaying anything. For instance if I make an alias to call display(gmcp.Char) it returns nothing, and the same if I try to run it from the command box with lua gmcp.Char, and any other variant of any other table I've tried. Was the syntax changed or something?
Comments
All I've had today are six gummy bears and some scotch
What you really want to do is put your profiles folder into a Dropbox or equivalent cloud sharing type folder and link your Mudlet to that, then you'll always have the latest set of profiles. I do this for my desktop PC and laptop. There's instructions on how to do it on the Mudlet forums themselves
Archdragon Mizik Corten, Herald of Ruin says, "Man, that was a big axk."
Hellrazor Cain de Soulis, Sartan's Hammer says, "Your [sic] a beast."
Svof
Mudlet Discord join up
if matches[4] >= 2500 && matches[4] <= 3500 then
do stuff
elseif etc....
end
Thank you.
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof
if tonumber(matches[4]) < 1500 then
cecho("<maroon>[Fallen]: <red> Target is weak, crush it quickly!")
elseif tonumber(matches[4]) >= 1500 and tonumber(matches[4]) < 2501 then
send("shn "..target.." 12")
elseif tonumber(matches[4]) >= 2501 and tonumber(matches[4]) < 3501 then
send("shn "..target.." 18")
elseif tonumber(matches[4]) >= 3501 and tonumber(matches[4]) < 4501 then
send("shn "..target.." 21")
elseif tonumber(matches[4]) >= 4501 and tonumber(matches[4]) < 5501 then
send("shn "..target.." 24")
elseif tonumber(matches[4]) >= 5501 and tonumber(matches[4]) < 6501 then
send("shn "..target.." 27")
elseif tonumber(matches[4]) >= 6501 and tonumber(matches[4]) < 7501 then
send("shn "..target.." 30")
elseif tonumber(matches[4]) >= 7501 and tonumber(matches[4]) < 8501 then
send("shn "..target.." 33")
elseif tonumber(matches[4]) >= 8501 and tonumber(matches[4]) < 9501 then
send("shn "..target.." 36")
elseif tonumber(matches[4]) >= 9501 then
send("shn "..target.." 39")
end
If you want to send this, the output of the window that appears, if you click on the exclamation mark symbol on the left side in the script/alias/trigger window could be helpful.
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof
I would try to tinker with the svo.kl_list (or similar, depending on the counter), because I like that more than pretending to have this as manual input, but I am not sure if this is a two way api and if one has to be careful about specifics. @Vadimuses should be able to explain that better than me, as I don't have his counter.
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof
1. Your trigger isn't firing. Enable highlighting in the trigger (right side above the script box) to see the matching.
2. There is an runtime error. Open the error log (left side exclamation mark) and give the output there.
There might be more but I'd try these first.
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof
yourstring:gsub("(%w+)", string.title)
→My Mudlet Scripts
Come join the Achaea discord!
Come join the Achaea discord!