multiline trigger variables

Posted by Aznvt33 on Sun 03 Dec 2006 01:07 PM — 4 posts, 16,302 views.

#0
I'm trying to modify Nick Gammon's health bar plugin to include an XP gauge in the info bar. I'm having a problem with the variables in the multiline trigger, however.

This is the trigger:
<trigger
enabled="y"
group="Multi Line"
lines_to_match="3"
keep_evaluating="y"
match="You are level (.*?) and (.*?)\% of the way to the next level\.\nHealth\: (.*?)\/(.*?) Mana\: (.*?)\/(.*?)\nEndurance\: (.*?)\/(.*?)

Willpower\: (.*?)\/(.*?)\Z"
multi_line="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "HealthMax", %4
world.setvariable "ManaMax", %6
world.setvariable "EnduranceMax", %8
world.setvariable "WillpowerMax", %10
world.setvariable "TNL", %2</send>
</trigger>

The problem is that Willpower variable is supposed to be the 10th (last) wildcard in that multiline trigger, but instead of setting the 10th wildcard, it sets the 1st wildcard and puts a 0 at the end.

For example, instead of the Willpower variable being an integer, it picks up something like "61 (Impregnable)0" (the string in the first wildcard).

Any ideas?
Australia Forum Administrator #1
You need:


world.setvariable "WillpowerMax", %<10>

#2
I'm getting an error:

Line 116: Element name must start with letter or underscore, but starts with "1" (problem in this file)

Line 116 is: world.setvariable "WillpowerMax", %<10>
Australia Forum Administrator #3
Plugins are stored in XML, I was giving the "raw" code. You need to do this inside a plugin:



world.setvariable "WillpowerMax", %&lt;10&gt;