I'm a newbie to mudlet and have used zmud for many years.
I'm trying to recreate my own status bars to track my hp/sp/ep variables.
The prompt example is:
HP: [352/352], SP: [137/421], EP: [327/385]
I'd like to capture these numbers as the following variables - currenthp/maxhp, currentsp/maxsp, etc.
I've tried using (\d+) and matches[2] but this doesn't work. Any help would be appreciated. Thanks!
help with capture trigger
Re: help with capture trigger
^HP: \[(\d+)\/(/d+)\], SP: \[(\d+)\/(/d+)\], EP: \[(\d+)\/(/d+)\]$
Re: help with capture trigger
Removed accidental duplicate post.
Last edited by stridera on Sat Dec 28, 2019 3:33 am, edited 1 time in total.
Re: help with capture trigger
It still won't fire for me. It looks like it would work?
Re: help with capture trigger
What you can do is turn on highlighting. Then go through and add things one part at a time. Tweak it until it highlights and then move on.
Re: help with capture trigger
Code: Select all
^HP: \[(\d+)\/(\d+)\], SP: \[(\d+)\/(\d+)\], EP: \[(\d+)\/(\d+)\]$
rayotuir, take a look at https://regex101.com/r/QpGuZn/1
That will show you which matches[x] is which field. But, for mudlet, what they show as Group 1 is actually matches[2], etc.
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: help with capture trigger
Yeah, matches[1] is the whole line IIRC and changing it now would break everything...