Your powers increase!!! Trigger Help Please.

Post Reply
noblestone
Posts: 154
Joined: Sun Jul 29, 2012 6:50 am

Your powers increase!!! Trigger Help Please.

Post by noblestone »

Your gain is: 7/2400 hp, 6/1640 m, 3/1494 mv 3/531 prac.

I have tried this:

^Your gain is: (\d+)/(\d+) hp, (\d+)/(\d+) m, (\d+)/(\d+) mv (\d+)/(\d+) prac. <- on Perl Regex

added: (Note: |XX| Is color code)

send("b |BB|{|C|Ap|BW|oc|Y|al|C|yp|BW|se|BB|} |BW|I am stronger now! Got|R|" .. matches[2] "|BW|hp,|R|" .. matches[4] "|BW|m,|R|" .. matches[8] "|BW|prac!")


It wont work. What did I do wrong here?

Thanks in advance.

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Your powers increase!!! Trigger Help Please.

Post by kevutian »

You're not concatting properly. Try this:
Code: [show] | [select all] lua
send("b |BB|{|C|Ap|BW|oc|Y|al|C|yp|BW|se|BB|} |BW|I am stronger now! Got|R|" .. matches[2] .. "|BW|hp,|R|" .. matches[4] .. "|BW|m,|R|" .. matches[8] .. "|BW|prac!")
It's always wise to echo rather than send when you are testing new stuff like this, by the way.

noblestone
Posts: 154
Joined: Sun Jul 29, 2012 6:50 am

Re: Your powers increase!!! Trigger Help Please.

Post by noblestone »

Thanks, worked. how could I miss other ..

Solved!

Post Reply