How to capture this?
Re: How to capture this?
Okay, so first rule for debugging triggers, always put that debugging message as the VERY FIRST line in the code, so it will be seen even if there is some bug in the other code. In this case, I realized that I didn't put in anything to ensure that the hit variable existed, so that is a likely cause of issues. I would change hits = hits + 1 to hits = (hits or 0) + 1
Re: How to capture this?
Making progress...
display(hits) --is what i have atm
Not sure why I'm getting a space between each attack tho.
How can I get a space between the "." and displayed number?
display(hits) --is what i have atm
Not sure why I'm getting a space between each attack tho.
Re: How to capture this?
Instead of using display, use echo, and you won’t get those extra blank lines. To add a space, add it to what you are having it print, like this, echo(“ “ .. hits)
Note that those quotes were typed on my phone, so don’t copy/paste that. Lua is picky about its quotes.
Note that those quotes were typed on my phone, so don’t copy/paste that. Lua is picky about its quotes.
Re: How to capture this?
Got it working... thanks for the help! How can I get [] to be around the hits echo? I can get the [ fine, but the ] is giving me issues.
Re: How to capture this?
echo(string.format(" [%s]",hits))
Or if you want color to make it stand out, use cecho
cecho(string.format(" [<red>%s<reset>]",hits))
Or if you want color to make it stand out, use cecho
cecho(string.format(" [<red>%s<reset>]",hits))
Re: How to capture this?
Thanks
I can't get the capture for these to work. (can be slash, pierce, bludgeon)
A woman staggers from your massive slash!
You critically wound A woman with a massive slash!
A woman is nearly slain by the force of your massive slash!
I can't get the capture for these to work. (can be slash, pierce, bludgeon)
A woman staggers from your massive slash!
You critically wound A woman with a massive slash!
A woman is nearly slain by the force of your massive slash!
Re: How to capture this?
^\.+ staggers from your massive (?:slash|pierce|bludgeon)
^You critically wound \.+ with a massive (?:slash|pierce|bludgeon)
^\.+ is nearly slain by the force of your massive (?:slash|pierce|bludgeon)
^You critically wound \.+ with a massive (?:slash|pierce|bludgeon)
^\.+ is nearly slain by the force of your massive (?:slash|pierce|bludgeon)
Re: How to capture this?
For some reason the ^\.+ wouldn't work but ^(.*) does. Not sure why.
Is there a way to modify the capture pattern to capture all of these? There are weapon buffs that aren't always active. I could make a whole new set of captures, but I'm hoping there is a way for one to capture all of them.
Your massive slash barely wounds an Ashstone noble.
Your massive flame-enshrouded slash barely wounds an Ashstone noble.
Your massive greenfire slash badly wounds an Ashstone noble.
Is there a way to modify the capture pattern to capture all of these? There are weapon buffs that aren't always active. I could make a whole new set of captures, but I'm hoping there is a way for one to capture all of them.
Your massive slash barely wounds an Ashstone noble.
Your massive flame-enshrouded slash barely wounds an Ashstone noble.
Your massive greenfire slash badly wounds an Ashstone noble.
Re: How to capture this?
Yeah... my brain failed me. .+ would work as I intended, not sure why I put in the slashes when they obviously make it not work (because \. matches '.' whereas . matches anything).
^Your massive(?:[\w-]+)? slash \w+ wounds .+
^Your massive(?:[\w-]+)? slash \w+ wounds .+