Welcome to the Achaea Forums! Please be sure to read the Forum Rules.
Quick Coding Questions
Comments
-
Just updated mudlet and my alertness is being strange.
This is what I'm seeing.
https://ada-young.appspot.com/pastebin/n5Yn9ufF
this is the error.
https://ada-young.appspot.com/pastebin/hpo7gbm5
Not really sure where to go from here, used to work fine pre-update to 3.17.0 mudlet.0 -
It's a known fault with Mudlet, something to do with getLineNumber or some other internal function.Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."0
-
Klendathu said:It's a known fault with Mudlet, something to do with getLineNumber or some other internal function.0
-
-
No, there isn't any GMCP support for queueing.0
-
Likely a super easy answer that I just can't seem to find, but how do you get string.format() to put the % sign in the text and not interpreted as a variable? Trying to get svo.cc to announce the precent health following assess and it doesn't seem to like lonely % signs and I can't figure out how to escape the interpreter for % symbols- example below of where the percent sign would go to appear in front of the calculated health percent.
In this example multimatches[2][2] is the name, and removing the second % sign does report properly just sans % sign in the sentence.local percent = math.floor((100/tonumber(multimatches[2][4])) * tonumber(multimatches[2][3])) svo.cc("%s at % %s",multimatches[2][2],percent)
0 -
try %%0
-
This might not be quick, but does anyone have Depthswalker tracking coded into AK?
If not, I'll pay someone to do that.0 -
Oh, nice! I definitely forgot about that update. Thank you.0
-
I don't need anything fancy for that, just basic tracking! I was struggling with how to make loop track even semi accurately, and also how to make the progressive stuff work decently. This seems to do that out of the box!0
-
-
-
Cooper said:I don't need anything fancy for that, just basic tracking! I was struggling with how to make loop track even semi accurately, and also how to make the progressive stuff work decently. This seems to do that out of the box!If aeon < 100 then chrono aeon farrah end?1
-
-
Is there a way to get full gmcp access on nexus or are you limited to what is shown to you in the help pages and whatnot?0
-
Something is super off with my logic and it feels I'm in a loop at making things worse. Who can help?Problem is that the script stops working at a stage where paralysis haemophilia and impatience are all given, then works again when the opponent loses the affliction. Grrr.function paralysislock()
if affstrack.score.paralysis<99 and
affstrack.score.impatience<99 and
affstrack.score.weariness<99 and
affstrack.score.asthma<99 and
affstrack.score.haemophilia<99 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "paralysis"
curse2 = "haemophilia"
relapsecurse = "paralysis"
bloodletcurse = "haemophilia"
coagcurse = "impatience"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis<99 and
affstrack.score.impatience>40 and
affstrack.score.weariness<99 and
affstrack.score.asthma<99 and
affstrack.score.haemophilia<99 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "paralysis"
curse2 = "haemophilia"
relapsecurse = "paralysis"
bloodletcurse = "haemophilia"
coagcurse = "impatience"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis>40 and
affstrack.score.impatience<99 and
affstrack.score.weariness<99 and
affstrack.score.asthma<99 and
affstrack.score.haemophilia<99 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "haemophilia"
curse2 = "impatience"
relapsecurse = "impatience"
bloodletcurse = "haemophilia"
coagcurse = "impatience"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis>40 and
affstrack.score.impatience>40 and
affstrack.score.weariness<99 and
affstrack.score.asthma<99 and
affstrack.score.haemophilia<99 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "haemophilia"
curse2 = "haemophilia"
relapsecurse = "impatience"
bloodletcurse = "haemophilia"
coagcurse = "impatience"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis<99 and
affstrack.score.impatience<99 and
affstrack.score.weariness<99 and
affstrack.score.asthma<99 and
affstrack.score.haemophilia>40 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "paralysis"
curse2 = "impatience"
relapsecurse = "impatience"
bloodletcurse = "haemophilia"
coagcurse = "impatience"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis>40 and
affstrack.score.impatience<99 and
affstrack.score.weariness<99 and
affstrack.score.asthma<99 and
affstrack.score.haemophilia>40 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "impatience"
curse2 = "asthma"
coagcurse = "asthma"
relapsecurse = "asthma"
bloodletcurse = "haemophilia"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis>40 and
affstrack.score.impatience>40 and
affstrack.score.weariness<99 and
affstrack.score.asthma<99 and
affstrack.score.haemophilia>40 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "asthma"
curse2 = "weariness"
coagcurse = "weariness"
relapsecurse = "weariness"
bloodletcurse = "haemophilia"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis>40 and
affstrack.score.impatience>40 and
affstrack.score.weariness<99 and
affstrack.score.asthma>40 and
affstrack.score.haemophilia>40 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "weariness"
curse2 = "anorexia"
coagcurse = "anorexia"
relapsecurse = "anorexia"
bloodletcurse = "haemophilia"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis>40 and
affstrack.score.impatience>40 and
affstrack.score.weariness>40 and
affstrack.score.asthma>40 and
affstrack.score.haemophilia>40 and
affstrack.score.anorexia<99 and
affstrack.score.slickness<99 then
curse1 = "anorexia"
curse2 = "lethargy"
coagcurse = "slickness"
relapsecurse = "lethargy"
bloodletcurse = "haemophilia"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis>40 and
affstrack.score.impatience>40 and
affstrack.score.weariness>40 and
affstrack.score.asthma>40 and
affstrack.score.haemophilia>40 and
affstrack.score.anorexia>40 and
affstrack.score.slickness<99 then
curse1 = "lethargy"
curse2 = "clumsiness"
coagcurse = "slickness"
relapsecurse = "lethargy"
bloodletcurse = "haemophilia"
kickassparalysiscoagulate()
elseif affstrack.score.paralysis>40 and
affstrack.score.impatience>40 and
affstrack.score.weariness>40 and
affstrack.score.asthma>40 and
affstrack.score.haemophilia>40 and
affstrack.score.anorexia>40 and
affstrack.score.slickness<99 then
curse1 = "lethargy"
coagcurse = "slickness"
kickassparalysislockdown()
end
end----------------------Would also love to learn how to make tables for this kind of stuff, but can't seem to grasp it!0 -
-
No there isn't0
-
Regex help with Nexus:
^She|He suffers from (/d) (/w) fractures\.$
The line:
She suffers from 10 leg fractures.
It gives me undefined and undefined for the two values. Why is that??Deucalion says, "Torinn is quite nice."0 -
(?:Sh|H)e, (\d+), (\w+)0
-
Torinn said:The non capturing sh/he part is required? Also why w+ when I only want the one word there? (Also thank you @Sophi )No, the non capturing part isn't required. (She|he) or (Sh|H)e would work just fine.In the (\w+) and (\d+) expressions, the + sign signifies the presence of one or more of that type of symbol/character. Having (\w) or (\d) would only capture a single instance of the sought for characters. So they only recognize a single letter or a single digit number respectively.i.e. Given the line and trigger:She suffers from 10 leg fractures.^(She|He) suffers from (\d+) (\w) fractures\.$The trigger wouldn't recognize the line because the only thing (\w) captures is the 'l' of leg. The trigger would go "Here's a lowercase L. Is it followed by a space and the word fractures? No. This is not the line I'm looking for." and move on.You want (\w+) because that tells the trigger to look for one or more alphanumeric symbols instead of simply one such symbol. If (\w+) were in the above trigger, the trigger would go, "Here's a lowercase L. Are there any more alphanumeric symbols? Yes, there are. We'll put those all in a single argument. Is this collection of alphanumeric symbols followed by a space and the word fractures? Yes, it is. This is the line we're looking for!"And you'd have a happily working regex trigger.TL;DR: (\w) and (\d) only capture 1 letter/number respectively. (\w+) and (\d+) capture collections of letters (words) and multi digit numbers.4
-
Thanks for a great explanation!
Since I'm late I just wanted to add the reason why I used (?:Sh|H)e. While (She|He) works just fine, regex should be as literal as possible (excludes the most variations) in order to optimize for speed and performance. This seems like a small thing but most people have hundreds to thousands of lines of code and it can make a difference. And capturing a match would be more resource intensive than not capturing it, of course.
Basically just a best practice kinda thing, like escaping your end periods. Same idea.2 -
(\w+) covers for the eventuality of Achaea following Imperian/Starmourn with gender-neutral terms (Their/They etc).Performance is all well and good, but Achaea/Mudlet in general is not going to get to the point of it being noticeable unless you're running on it on a literal toaster.0
-
Pyori said:(\w+) covers for the eventuality of Achaea following Imperian/Starmourn with gender-neutral terms (Their/They etc).Performance is all well and good, but Achaea/Mudlet in general is not going to get to the point of it being noticeable unless you're running on it on a literal toaster.0
-
Archaeon said:Pyori said:(\w+) covers for the eventuality of Achaea following Imperian/Starmourn with gender-neutral terms (Their/They etc).Performance is all well and good, but Achaea/Mudlet in general is not going to get to the point of it being noticeable unless you're running on it on a literal toaster.
0 -
Archaeon said:Pyori said:(\w+) covers for the eventuality of Achaea following Imperian/Starmourn with gender-neutral terms (Their/They etc).Performance is all well and good, but Achaea/Mudlet in general is not going to get to the point of it being noticeable unless you're running on it on a literal toaster.0
Sign In to Comment.
Categories
- 6K All Categories
- 3K Everything Achaea
- 1.5K North of Thera
- 21 Archives of the Terraformer
- 240 The Matsuhama Arena
- 873 The Golden Dais of Creation
- 283 The Scarlattan Theatre
- 144 The Blank Canvas
- 1.9K Getting Help
- 391 General Questions
- 247 Quick Class Questions
- 1.3K Tech Support
- 298 Client Help
- 456 Curing Systems and Scripts
- 829 Off-Topic
- 250 The Wander Inn
- 579 The Universal Membrane
- 280 Class Discussions
- 280 Individual Class Sections
- 20 Alchemist
- 8 Apostate
- 29 Blademaster
- 9 Depthswalker
- 12 Druid
- 4 Infernal
- 20 Jester
- 19 Magi
- 30 Monk
- 9 Occultist
- 7 Paladin
- 7 Priest
- 28 Runewarden
- 17 Sentinel
- 24 Serpent
- 19 Shaman
- 9 Sylvan