Direct port of someones zmuds % to dragon script.
Import, do qsc, and if you believe the black magic, be happy or sad
[Achaea] % to Dragon
[Achaea] % to Dragon
- Attachments
-
- % to dragon.xml
- (3.88 KiB) Downloaded 815 times
Re: [Achaea] % to Dragon
I downloaded and then imported the XML, although it doesn't seem to be noticing when I type QSC. Is there any customization needed, or anyway I can troubleshoot this?
Re: [Achaea] % to Dragon
Hmm, looking at the file, I see the pattern:
^You are level (\d+) \(.*\) and (\d+.\d+)\% of the way to the next level\.$
This will match only if your level is at least three digits long (in which case you obviously already are a dragon), or have the ability innersight in vision, so the level will be shown with a decimal point. Changing both + to * should make it work otherwise as well (\d*.\d*)\%
Alternatively, add a question mark after the dot: (\d+.?\d+)
In the second case it will still only match on levels that are at least two digits long, but I guess if you're below level 10 you shouldn't really worry too much yet about your percentage to dragon
^You are level (\d+) \(.*\) and (\d+.\d+)\% of the way to the next level\.$
This will match only if your level is at least three digits long (in which case you obviously already are a dragon), or have the ability innersight in vision, so the level will be shown with a decimal point. Changing both + to * should make it work otherwise as well (\d*.\d*)\%
Alternatively, add a question mark after the dot: (\d+.?\d+)
In the second case it will still only match on levels that are at least two digits long, but I guess if you're below level 10 you shouldn't really worry too much yet about your percentage to dragon
Re: [Achaea] % to Dragon
I'm not seeing what you're seeing here.Iocun wrote:Hmm, looking at the file, I see the pattern:
^You are level (\d+) \(.*\) and (\d+.\d+)\% of the way to the next level\.$
This will match only if your level is at least three digits long (in which case you obviously already are a dragon), or have the ability innersight in vision, so the level will be shown with a decimal point. Changing both + to * should make it work otherwise as well (\d*.\d*)\%
Alternatively, add a question mark after the dot: (\d+.?\d+)
In the second case it will still only match on levels that are at least two digits long, but I guess if you're below level 10 you shouldn't really worry too much yet about your percentage to dragon
^You are level (\d+) should match one or any number of digits.
Re: [Achaea] % to Dragon
Oh, but I do see a problem with what comes next. the line is:tsuujin wrote:I'm not seeing what you're seeing here.Iocun wrote:Hmm, looking at the file, I see the pattern:
^You are level (\d+) \(.*\) and (\d+.\d+)\% of the way to the next level\.$
This will match only if your level is at least three digits long (in which case you obviously already are a dragon), or have the ability innersight in vision, so the level will be shown with a decimal point. Changing both + to * should make it work otherwise as well (\d*.\d*)\%
Alternatively, add a question mark after the dot: (\d+.?\d+)
In the second case it will still only match on levels that are at least two digits long, but I guess if you're below level 10 you shouldn't really worry too much yet about your percentage to dragon
^You are level (\d+) should match one or any number of digits.
so the regex should beYou are level 42 (Heroic) and 86% of the way to the next level.
I'm never seeing a decimal on the percentage.
Re: [Achaea] % to Dragon
Er, silly me, I confused myself there. Obviously I meant not the level, but the percentage after it. (and (\d+.\d+)\% of the way)
Still, changing that part to (\d*.\d*) as I said should do the trick.
The decimal does appear if you have, as I mentioned, the ability Innersight, which I guess Vadi's script is based on.
Still, changing that part to (\d*.\d*) as I said should do the trick.
The decimal does appear if you have, as I mentioned, the ability Innersight, which I guess Vadi's script is based on.
Re: [Achaea] % to Dragon
Thanks for the help thus far, but I'm still having problems. I'm new to Mudlet and to the Lua scripts and trying to pick up as much as I can from all of this.
Is there a different suggestion that I could try besides changing (\d+.\d+)\% to (\d*.\d*)\% as that did not work for me? I have tried reducing the two numerical wildcards to just one (it was entered in as just (\d+)\% to the next level), but that didn't work either.
Is there a different suggestion that I could try besides changing (\d+.\d+)\% to (\d*.\d*)\% as that did not work for me? I have tried reducing the two numerical wildcards to just one (it was entered in as just (\d+)\% to the next level), but that didn't work either.
Re: [Achaea] % to Dragon
Unfortunately changing the trigger to ^You are level (\d+) \(.*\) and (\d+(?:\.\d+)?)% of the way to the next level\.$ didn't work either. Perhaps it would help to know what my QSC displays currently in this case? The second and third lines of my QSC are:Denarii wrote:(\d+(?:\.\d+)?)%
You are level 84 (2nd Circle of Celestial Power) and 22% of the way to the next
level.
Hopefully this will bring an "ah hah!" moment for someone.
Re: [Achaea] % to Dragon
Well, one "ah hah!" may be that you might not have your screenwidth set to 0, so that wrapping into two lines is done by Achaea. In that case the trigger won't match.
Either make your Achaean screenwidth 0 and let Mudlet do your wrapping (I recommend this), or change the pattern to, for instance: ^You are level (\d+) \(.*\) and (\d+(?:\.\d+)?)% of the way
I.e. just leave out the last few words of the pattern.
Either make your Achaean screenwidth 0 and let Mudlet do your wrapping (I recommend this), or change the pattern to, for instance: ^You are level (\d+) \(.*\) and (\d+(?:\.\d+)?)% of the way
I.e. just leave out the last few words of the pattern.