That would only work if she changed the order of the commands (set the description first) and could guarantee that there'd never be any other output from the game in between hitting the alias, the command being sent and the response being sent back.
Better to use a trigger gate using the actual lines, so:
Trigger 1
Name: Gag describe self
Type: Begin of line substring
Pattern: Your previous description was:
Code: deleteLine()
Fire length: 999 more lines (or some other suitably high number, 999 is probably slightly excessive)
Trigger 2
Name: Description line
Type: Perl regex
Pattern: .*
Code: deleteLine()
Trigger 3
Name: Gag desc prompt
Type: Lua function
Pattern: return isPrompt()
Code: deleteLine()
setTriggerStayOpen("Gag describe self", 0) -- close the gate
Then you drag trigger 2 and trigger 3 onto trigger 1, so they appear as sub-triggers (they're indented in the menu, the icon for the "Gag describe self" trigger changes). That means that they'll only fire if the first trigger - "Gag describe self" - has fired previously within the last 999 lines, but you then set that to 0 (closing the gate, and stopping them from firing) when it hits the next prompt.
Name: Description line
Type: Perl regex
Pattern: .*
Code: deleteLine()
Just as a side note, for a pattern that will match any line, it's probably more efficient to either use a regex trigger with pattern "^", or a lua code trigger with pattern "return true". Not that you're likely to actually see the performance difference in any real-world use of Mudlet triggers; I just happened to have regex performance on the brain when I saw this.
Name: Description line
Type: Perl regex
Pattern: .*
Code: deleteLine()
Just as a side note, for a pattern that will match any line, it's probably more efficient to either use a regex trigger with pattern "^", or a lua code trigger with pattern "return true". Not that you're likely to actually see the performance difference in any real-world use of Mudlet triggers; I just happened to have regex performance on the brain when I saw this.
From what I remember of trigger performance, lua triggers are the least performant type you can choose.
This will pull out the rage number from the "Rage: ##.#" string, be it a full number or decimal
Relying on it being the second element in charstat may break as soon as they add another field in there.
True, but iterating through the table falls out of the scope of a quick answer. It would be nice if it was a named element in the table, but what can you do.
This will pull out the rage number from the "Rage: ##.#" string, be it a full number or decimal
Relying on it being the second element in charstat may break as soon as they add another field in there.
True, but iterating through the table falls out of the scope of a quick answer. It would be nice if it was a named element in the table, but what can you do.
If you want to match it in this case, here it is:
^\[Rage\]\: .* Total\: (\d+\.?\d+?)$
rageNum = tonumber(matches[2])
You don't need to escape the colons.
A ? after a quantifier doesn't make the quantified expression optional, it makes the quantifier lazy.
In this case, the lazy quantifier means that your regex will never match a single-digit rage number: if the rage is 5, the first \d+ will match it and be satisfied, then the decimal won't be there, but it's optional, so you're fine, but then there's no remaining numeral to satisfy the second \d+.
This is going to match anything beyond single-digit rage numbers pretty inefficiently. The first \d+ will capture all of them until it hits the decimal or the end of the string, then the second \d+ won't be satisfied, so it'll force a backtrack, giving up one of those numbers so it can satisfy the second \d+.
The .* is very inefficient. It's going to capture the entire part of the string after "[Rage]: ", then the regex engine will be forced to backtrack over and over until it finds a space, but then that space will be the wrong space, so it will have to undo that match and backtrack even further until it gets the space before "Total".
You should specify the radix for tonumber.
What you actually want (if you're not just going to use GMCP) is this:
To turn this into a not-quick answer, in case anyone is unfamiliar with regex, that's:
^: Start of line \[: The character "[" (you need to use \ to tell it to ignore the normally special meaning of [ in regex) Rage: The characters "Rage" \]: The character "]" (you need to use \ to tell it to ignore the normally special meaning of ] in regex) : : The characters ": " (notice the space - that has to match too) \+: The character "+" (you need to use \ to tell it to ignore the normally special meaning of + in regex) \d: Any number (the characters 0-9) *: Zero or more of the previous thing (so zero or more numbers), this is called a quantifier
Then you have something in parentheses, which means to "group" it. Grouping is used for two things, to save something for actual use or because you're going to quantify the whole group.
The first thing in the parentheses is ?:, which is a special thing meaning that you're not using the group for saving things - you're telling the regex engine not to save the match. We don't care about using this number (we only care about total rage), so we don't need to save it.
After the group is a ?, which means zero or one of the thing before it (so the whole group is optional).
Inside that group is \., which matches the character "." (you need to use \ to tell it to ignore the normally special meaning of . in regex), then \d, which means a numeral, then +, which is the quantifier that means one or more (as opposed to *, which was zero or more). We use + here because we know that if there's a decimal, there has to be one or more numbers. We used the * before because the number might not have any numerals before the decimal (it might be something like ".9").
So as a whole, "\d*(?:.\d+)?" says: zero or more numerals that might be (but don't have to be) followed by: a decimal and one or more numerals.
Then you've got:
\.: The character "." (you need to use \ to tell it to ignore the normally special meaning of . in regex) Total: : The characters " Total: " (again, note the spaces, they need to match too)
Then you've got the same thing in parentheses as before, with \d*(?:\.\d+)?, which means zero or more numerals that might be (but don't have to be) followed by: a decimal and one or more numerals. Except this time all of that is inside parentheses, and those parentheses don't have a ?: in them, so they are going to get saved (because this is the number you actually care about saving).
Then you have a $, which means the end of the line.
After you've done that, you have the characters of the rage string stored in the matches table. That's matches[2] in Mudlet (matches[1] is always the whole line, matches[2] is the first capture group, matches[3] is the second, etc.). That's args[1] in HTML5 (same scheme, but JavaScript starts numbering from 0, not 1). Note that if we didn't put the ?: thing in the first group, it would end up saved in matches[2] or args[1] (even though we don't care about it at all) and the thing we actually care about would be in matches[3] or args[2].
But those aren't actually numbers yet, they're just characters in a string that happen to be numerals. So you have to call a function to turn them into actual numbers - in Mudlet you want tonumber() and in HTML5 you want parseInt(). You also want to specify the radix (what base the number is in - in this case it's a base-ten number, not binary or something else). So you want to call tonumber(matches[2], 10) or parseInt(args[1], 10)
(Nitpicky note: This can theoretically match a string without any numbers at all in it. You would have to make it more complicated to avoid that. Or you could swap the * for a + if it turns out the game represents fractional rage as "0.5" rather than ".5".)
Name: Description line
Type: Perl regex
Pattern: .*
Code: deleteLine()
Just as a side note, for a pattern that will match any line, it's probably more efficient to either use a regex trigger with pattern "^", or a lua code trigger with pattern "return true". Not that you're likely to actually see the performance difference in any real-world use of Mudlet triggers; I just happened to have regex performance on the brain when I saw this.
From what I remember of trigger performance, lua triggers are the least performant type you can choose.
Hm, that wouldn't be surprising, actually. I know I have some "return true" triggers and figured there was probably a reason I did that instead of "^", but that reason might not have been performance. I'd still go with "^" over ".*", though.
@Tecton or whomever has a moment to answer, regarding the new promotion:
How precisely do the various pails work? It says they are re-useable every 24 hours, but do the new descs stay permanently despite the pail's reset? If they do, is there any way to change them back to the "original" ship room desc? Can you have one pail down, and then if you have a different pail, set it down to change the room desc? I am severely torn between the neat pail and seaweed pail, but I want to make sure they're worth it! (By the way, if anyone gets descs, please paste them here!)
Is the crossbow upgradeable (level 2 and 3) per the normal command?
For the glass bottle, and in general for a lot of the talismans... are these able to be made resetting to a room? The glass bottle sounds extremely neat, but I would definitely prefer to have it as a display item rather than just sitting in my inventory.
And I love too Be still, my indelible friend That love soon might end You are unbreaking And be known in its aching Though quaking Shown in this shaking Though crazy Lately of my wasteland, baby That's just wasteland, baby
Also have a question on the talismans, specifically the special set of wings. Can they be combined with wings that somebody might already have, meaning eagle or atavian? Or rather, can the artefact power of wings be transferred to or from the talisman?
(Also, for those who can log in right now, how much are the pieces going for and how many do you need for a complete set?)
- (Eleusis): Ellodin says, "The Fissure of Echoes is Sarathai's happy place." - With sharp, crackling tones, Kyrra tells you, "The ladies must love you immensely." - (Eleusian Ranger Techs): Savira says, "Most of the hard stuff seem to have this built in code like: If adventurer_hitting_me = "Sarathai" then send("terminate and selfdestruct")." - Makarios says, "Serve well and perish." - Xaden says, "Xaden confirmed scrub 2017."
Also have a question on the talismans, specifically the special set of wings. Can they be combined with wings that somebody might already have, meaning eagle or atavian? Or rather, can the artefact power of wings be transferred to or from the talisman?
(Also, for those who can log in right now, how much are the pieces going for and how many do you need for a complete set?)
4 pieces. Doesn't seem to be anyone selling wing pieces as of yet.
@Tecton or whomever has a moment to answer, regarding the new promotion:
How precisely do the various pails work? It says they are re-useable every 24 hours, but do the new descs stay permanently despite the pail's reset? If they do, is there any way to change them back to the "original" ship room desc? Can you have one pail down, and then if you have a different pail, set it down to change the room desc? I am severely torn between the neat pail and seaweed pail, but I want to make sure they're worth it! (By the way, if anyone gets descs, please paste them here!)
Is the crossbow upgradeable (level 2 and 3) per the normal command?
For the glass bottle, and in general for a lot of the talismans... are these able to be made resetting to a room? The glass bottle sounds extremely neat, but I would definitely prefer to have it as a display item rather than just sitting in my inventory.
1. The descriptions stay, yes. They are overwritten if you drop a different pail in the room. 2. Not upgradeable at this time. 3. We may look at some option there - stay tuned.
Weaponmastery, skirmishing, swashbuckling, and pranks all have the skill level equalisation (where it picks the highest of the class skill and weaponry for determining skill level in attacks).
Nothing about Subterfuge, so I'd assume garrote simply uses your Subterfuge skill to determine everything.
I might be mistaken, but did I read somewhere that Achaea was considering removing endurance and willpower all together? I could have sworn I'd read that, but can't remember details. If it's true, I'll hold off on buying a willpower artie.
Give us -real- shop logs! Not another misinterpretation of features we ask for, turned into something that either doesn't help at all, or doesn't remotely resemble what we wanted to begin with.
Thanks!
Current position of some of the playerbase, instead of expressing a desire to fix problems:
Vhaynna: "Honest question - if you don't like Achaea or the current admin, why do you even bother playing?"
If they did remove endurance and willpower entirely then they'd also remove the artefacts associated with regen and should refund people accordingly. That said, I don't recall reading anything about that, and I doubt it would happen for various reasons. If you're considering buying one, go ahead and buy it. You'll get the benefit for as long as it exists (or until you trade it in), and should get all of your credits back if it disappears entirely.
Comments
That would only work if she changed the order of the commands (set the description first) and could guarantee that there'd never be any other output from the game in between hitting the alias, the command being sent and the response being sent back.
Better to use a trigger gate using the actual lines, so:
Then you drag trigger 2 and trigger 3 onto trigger 1, so they appear as sub-triggers (they're indented in the menu, the icon for the "Gag describe self" trigger changes). That means that they'll only fire if the first trigger - "Gag describe self" - has fired previously within the last 999 lines, but you then set that to 0 (closing the gate, and stopping them from firing) when it hits the next prompt.
Results of disembowel testing | Knight limb counter | GMCP AB files
About 435. 1738 lessons per Trans skill, so ~290 credits, and you get half of that back.
Results of disembowel testing | Knight limb counter | GMCP AB files
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof
[Rage]: +6.4. Total: 77.9
so I can make better use of battlerage abilities. However, I can't seem to match the total no matter how many different things I try. Any help?
tonumber(gmcp.Char.Vitals.charstats[2]:match("%d+[%p]?[%d+]?"))
This will pull out the rage number from the "Rage: ##.#" string, be it a full number or decimal
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof
If you want to match it in this case, here it is:
^\[Rage\]\: .* Total\: (\d+\.?\d+?)$
rageNum = tonumber(matches[2])
- You don't need to escape the colons.
- A ? after a quantifier doesn't make the quantified expression optional, it makes the quantifier lazy.
- In this case, the lazy quantifier means that your regex will never match a single-digit rage number: if the rage is 5, the first \d+ will match it and be satisfied, then the decimal won't be there, but it's optional, so you're fine, but then there's no remaining numeral to satisfy the second \d+.
- This is going to match anything beyond single-digit rage numbers pretty inefficiently. The first \d+ will capture all of them until it hits the decimal or the end of the string, then the second \d+ won't be satisfied, so it'll force a backtrack, giving up one of those numbers so it can satisfy the second \d+.
- The .* is very inefficient. It's going to capture the entire part of the string after "[Rage]: ", then the regex engine will be forced to backtrack over and over until it finds a space, but then that space will be the wrong space, so it will have to undo that match and backtrack even further until it gets the space before "Total".
- You should specify the radix for tonumber.
What you actually want (if you're not just going to use GMCP) is this:^\[Rage\]: \+\d*(?:\.\d+)?\. Total: (\d*(?:\.\d+)?)$
To turn this into a not-quick answer, in case anyone is unfamiliar with regex, that's:
^: Start of line
\[: The character "[" (you need to use \ to tell it to ignore the normally special meaning of [ in regex)
Rage: The characters "Rage"
\]: The character "]" (you need to use \ to tell it to ignore the normally special meaning of ] in regex)
: : The characters ": " (notice the space - that has to match too)
\+: The character "+" (you need to use \ to tell it to ignore the normally special meaning of + in regex)
\d: Any number (the characters 0-9)
*: Zero or more of the previous thing (so zero or more numbers), this is called a quantifier
Then you have something in parentheses, which means to "group" it. Grouping is used for two things, to save something for actual use or because you're going to quantify the whole group.
The first thing in the parentheses is ?:, which is a special thing meaning that you're not using the group for saving things - you're telling the regex engine not to save the match. We don't care about using this number (we only care about total rage), so we don't need to save it.
After the group is a ?, which means zero or one of the thing before it (so the whole group is optional).
Inside that group is \., which matches the character "." (you need to use \ to tell it to ignore the normally special meaning of . in regex), then \d, which means a numeral, then +, which is the quantifier that means one or more (as opposed to *, which was zero or more). We use + here because we know that if there's a decimal, there has to be one or more numbers. We used the * before because the number might not have any numerals before the decimal (it might be something like ".9").
So as a whole, "\d*(?:.\d+)?" says: zero or more numerals that might be (but don't have to be) followed by: a decimal and one or more numerals.
Then you've got:
\.: The character "." (you need to use \ to tell it to ignore the normally special meaning of . in regex)
Total: : The characters " Total: " (again, note the spaces, they need to match too)
Then you've got the same thing in parentheses as before, with \d*(?:\.\d+)?, which means zero or more numerals that might be (but don't have to be) followed by: a decimal and one or more numerals. Except this time all of that is inside parentheses, and those parentheses don't have a ?: in them, so they are going to get saved (because this is the number you actually care about saving).
Then you have a $, which means the end of the line.
After you've done that, you have the characters of the rage string stored in the matches table. That's matches[2] in Mudlet (matches[1] is always the whole line, matches[2] is the first capture group, matches[3] is the second, etc.). That's args[1] in HTML5 (same scheme, but JavaScript starts numbering from 0, not 1). Note that if we didn't put the ?: thing in the first group, it would end up saved in matches[2] or args[1] (even though we don't care about it at all) and the thing we actually care about would be in matches[3] or args[2].
But those aren't actually numbers yet, they're just characters in a string that happen to be numerals. So you have to call a function to turn them into actual numbers - in Mudlet you want tonumber() and in HTML5 you want parseInt(). You also want to specify the radix (what base the number is in - in this case it's a base-ten number, not binary or something else). So you want to call tonumber(matches[2], 10) or parseInt(args[1], 10)
(Nitpicky note: This can theoretically match a string without any numbers at all in it. You would have to make it more complicated to avoid that. Or you could swap the * for a + if it turns out the game represents fractional rage as "0.5" rather than ".5".)
How precisely do the various pails work? It says they are re-useable every 24 hours, but do the new descs stay permanently despite the pail's reset? If they do, is there any way to change them back to the "original" ship room desc? Can you have one pail down, and then if you have a different pail, set it down to change the room desc? I am severely torn between the neat pail and seaweed pail, but I want to make sure they're worth it! (By the way, if anyone gets descs, please paste them here!)
Is the crossbow upgradeable (level 2 and 3) per the normal command?
For the glass bottle, and in general for a lot of the talismans... are these able to be made resetting to a room? The glass bottle sounds extremely neat, but I would definitely prefer to have it as a display item rather than just sitting in my inventory.
That love soon might end You are unbreaking
And be known in its aching Though quaking
Shown in this shaking Though crazy
Lately of my wasteland, baby That's just wasteland, baby
(Also, for those who can log in right now, how much are the pieces going for and how many do you need for a complete set?)
- With sharp, crackling tones, Kyrra tells you, "The ladies must love you immensely."
- (Eleusian Ranger Techs): Savira says, "Most of the hard stuff seem to have this built in code like: If adventurer_hitting_me = "Sarathai" then send("terminate and selfdestruct")."
- Makarios says, "Serve well and perish."
- Xaden says, "Xaden confirmed scrub 2017."
2. Not upgradeable at this time.
3. We may look at some option there - stay tuned.
edit: is the flare reusable?
....I want the map. I want the Monster Map. It is a halyard smash....
http://www.youtube.com/watch?v=l2PoSljk8cE
Does Weaponry give bonus damage to garrote while hunting or in combat?
Edit: Also, does Defence in Riding give you a damage reduction to Denizens?
Nothing about Subterfuge, so I'd assume garrote simply uses your Subterfuge skill to determine everything.
Results of disembowel testing | Knight limb counter | GMCP AB files
Results of disembowel testing | Knight limb counter | GMCP AB files