Hey there.
My mission currently is to get Nick's health bar plugin to work for my prompt, which is:
935h, 236e, 1033m xb A:50% -
and I'm matching it with this:
^(\d+)h, (\d+)e, (\d+)m x?b?.*$
I sort of understand how it all works. My issue is my prompt doesn't give me a current/max display. Just the current. I already have a variable that tracks my max hp (for use in a info bar display). I'm sure it's possible, but I don't know how to get the plugin to use my MaxHealth variable instead of the local max_hp.
For the sake of clarity, this is an extract from the .xml I'm currently using, cut down to size for the post (I took out the bits I could see regarding the Move variables and gauge as I don't have movement points):
function do_prompt (name, line, wildcards)
local hp, max_hp = tonumber (wildcards [1]), tonumber (wildcards [2])
local mana, max_mana = tonumber (wildcards [3]), tonumber (wildcards [4])
local hp_percent = hp / max_hp
local mana_percent = mana / max_mana
Instead of max_hp taking it's value from a wildcard I want it to either replace it or get it to get it's value from an existing variable.
Currently, when I enable it, it just says
Quote: Trigger function "do_prompt" not found or had a previous error.
Thanks in advance guys :] |