Hi people.
I had the Health Bar working, but i mess it up when i start playing with the prompt and now i can't remember the regexp that i had. Been trying alot but can't manage to get it working.
My prompt:
<%h/%H {b%m/%M{x {g%v/%V{x %B %e {r>{x
Wich returns:
<2717/2717 982/982 1037/1037 E >
Now, i've been trying to set the trigger for the Health Bar plugin.
Then we have the part of the wildcards:
I know that the problem is in the regexp, but i can't figure out where.
[EDIT] Changed [\code] to [/code].
I had the Health Bar working, but i mess it up when i start playing with the prompt and now i can't remember the regexp that i had. Been trying alot but can't manage to get it working.
My prompt:
<%h/%H {b%m/%M{x {g%v/%V{x %B %e {r>{x
Wich returns:
<2717/2717 982/982 1037/1037 E >
Now, i've been trying to set the trigger for the Health Bar plugin.
<triggers>
<trigger
enabled="y"
match="^\<(\d+)\/(\d+)(\s*)(\d+)\/(\d+)(\s*)(\d+)\/(\d+)$"
regexp="y"
script="do_prompt"
sequence="100"
>
</trigger>
</triggers>
Then we have the part of the wildcards:
function do_prompt (name, line, wildcards)
hp, max_hp = tonumber (wildcards [2]), tonumber (wildcards [3])
mana, max_mana = tonumber (wildcards [5]), tonumber (wildcards [6])
move, max_move = tonumber (wildcards [8]), tonumber (wildcards [9])
I know that the problem is in the regexp, but i can't figure out where.
[EDIT] Changed [\code] to [/code].