Hi,
Im trying to capture this line from my mud.
HP: 650/650 SP: 519/600 EXP: 11,487,918 DAM: 0 (Grace: 189) <holiness>
my goal is to have most of this show up in my gauges, I can get everything to work but the "<holiness>" is giving me troubles, I can capture it but I can't get it to print to the gauge, (Grace:#) works fine.
so basically I want it to pick up all buffs after the dmg and place them in one of the gauges and just need to know how to work around the "<>" symbols have been trying for hours, its probably simple.
HP: (\d+)/(\d+) SP: (\d+)/(\d+) EXP: (.*) DAM: (\d+) (.*)
auras = (matches[8])
Gauge problems
Re: Gauge problems
At a glance it seems like that would set auras equal to "<holiness>" . Are you just asking how to strip that out? <(.*)> will capture what's between the < and >
If that's not what you're asking, I'm not entirely sure what you're trying to work around.
If that's not what you're asking, I'm not entirely sure what you're trying to work around.
Re: Gauge problems
sorry for not explaining properly.
so basically my prompt looks like this:-
HP: 550/550 SP: 400/400 EXP: 4,147,918 DAM: 0
If I were to buff myself it may look something like this:-
HP: 550/550 SP: 400/400 EXP: 4,147,918 DAM: 0 (Grace) (Shelter) <Holiness> (showing what buffs I have applied)
my ultimate goal is to remove the prompt and have it run through gauges to which I have successfully done, anything that is a buff or after the damaged line no matter what it is will show up correctly in the gauge except for any buffs that are surrounded by the "<>" symbols. I can see in debugging that it is captured "capture group #8 = <(Grace) (Shelter) <Holiness>>" but when it comes to applying on the gauge the only text that comes through are the 'Grace and Shelter' buffs. I am just trying to work out why it is not displaying <holiness>.
Screenshot:
so basically my prompt looks like this:-
HP: 550/550 SP: 400/400 EXP: 4,147,918 DAM: 0
If I were to buff myself it may look something like this:-
HP: 550/550 SP: 400/400 EXP: 4,147,918 DAM: 0 (Grace) (Shelter) <Holiness> (showing what buffs I have applied)
my ultimate goal is to remove the prompt and have it run through gauges to which I have successfully done, anything that is a buff or after the damaged line no matter what it is will show up correctly in the gauge except for any buffs that are surrounded by the "<>" symbols. I can see in debugging that it is captured "capture group #8 = <(Grace) (Shelter) <Holiness>>" but when it comes to applying on the gauge the only text that comes through are the 'Grace and Shelter' buffs. I am just trying to work out why it is not displaying <holiness>.
Screenshot:
Re: Gauge problems
Oooooh! It's because when you echo to labels it is html, and I think it's trying to interpret the <holiness> as an html tag. You can use gsub to escape it
Re: Gauge problems
thanks for helping,
unfortunatley this didnt work
all it did was add a "\" to the bar instead of what was needed.
unfortunatley this didnt work
all it did was add a "\" to the bar instead of what was needed.
Re: Gauge problems
huh, try swapping them out for [] or () and see if that does it then. I would have thought escaping it would work.
Re: Gauge problems
may need to swap it with < and > actually now that I think on it, as those are the html variants
Re: Gauge problems
worked it out while waiting... yeah didnt like the escape so I just changed the escape to some brackets and now it works great! thanks for the help!