How to capture this?

Jor'Mox
Posts: 1089
Joined: Wed Apr 03, 2013 2:19 am

Re: How to capture this?

Post by Jor'Mox » Sat Aug 25, 2018 4:27 pm

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

Vooku
Posts: 70
Joined: Sun Aug 21, 2016 2:42 pm

Re: How to capture this?

Post by Vooku » Sat Aug 25, 2018 5:46 pm

Making progress...
Code: [show] | [select all] lua
< 585h/585H 127v/127V |ss +|ap +|ev +|ts +|bs +| |3|2|3|3|2| T: Vokuran TC: excellent E: noble EC:
pretty hurt EP: std P: std > 

[Resetting round...]
An Ashstone noble misses you with his hit.
An Ashstone noble misses you with his hit.
Your massive slash slightly wounds an Ashstone noble.1

Your massive slash slightly wounds an Ashstone noble.2

Your massive slash slightly wounds an Ashstone noble.3

Your massive slash slightly wounds an Ashstone noble.4

Your massive slash slightly wounds an Ashstone noble.5


[Resetting round...]
< 585h/585H 127v/127V |ss +|ap +|ev +|ts +|bs +| |3|2|3|3|2| T: Vokuran TC: excellent E: noble EC:
pretty hurt EP: std P: std > 

[Resetting round...]
An Ashstone noble misses you with his hit.
An Ashstone noble misses you with his hit.
Your massive slash slightly wounds an Ashstone noble.1

Your massive slash badly wounds an Ashstone noble.2

An Ashstone noble dodges your futile attack.
Your massive slash badly wounds an Ashstone noble.3

An Ashstone noble dodges your futile attack.

[Resetting round...]
< 585h/585H 127v/127V |ss +|ap +|ev +|ts +|bs +| |3|2|3|3|2| T: Vokuran TC: excellent E: noble EC:
pretty hurt EP: std P: std > 
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.

Jor'Mox
Posts: 1089
Joined: Wed Apr 03, 2013 2:19 am

Re: How to capture this?

Post by Jor'Mox » Sat Aug 25, 2018 6:01 pm

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.

Vooku
Posts: 70
Joined: Sun Aug 21, 2016 2:42 pm

Re: How to capture this?

Post by Vooku » Sat Aug 25, 2018 7:50 pm

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. :P
Attachments
NonCondensedCounter.JPG

Jor'Mox
Posts: 1089
Joined: Wed Apr 03, 2013 2:19 am

Re: How to capture this?

Post by Jor'Mox » Sat Aug 25, 2018 7:55 pm

echo(string.format(" [%s]",hits))

Or if you want color to make it stand out, use cecho

cecho(string.format(" [<red>%s<reset>]",hits))

Vooku
Posts: 70
Joined: Sun Aug 21, 2016 2:42 pm

Re: How to capture this?

Post by Vooku » Sat Aug 25, 2018 8:27 pm

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!

Jor'Mox
Posts: 1089
Joined: Wed Apr 03, 2013 2:19 am

Re: How to capture this?

Post by Jor'Mox » Sat Aug 25, 2018 8:30 pm

^\.+ 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)

Vooku
Posts: 70
Joined: Sun Aug 21, 2016 2:42 pm

Re: How to capture this?

Post by Vooku » Sun Aug 26, 2018 5:06 am

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.

Jor'Mox
Posts: 1089
Joined: Wed Apr 03, 2013 2:19 am

Re: How to capture this?

Post by Jor'Mox » Sun Aug 26, 2018 11:39 am

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 .+

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests