Page 4 of 4

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 9:37 pm
by Vadi
You don't capture any info from it, you can just use 'return isPrompt()' to make your trigger to off on a prompt (which is terribly useful when these can be customized, change depending on the context and so on).

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sat Jan 18, 2014 11:22 pm
by Silvine
Well if this array of talent cant get a trigger firing I'll be beyond amazed. Just need some input from the original poster.

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sun Jan 19, 2014 6:21 pm
by Akaya
Alright. Attached is a .zip file containing the correct trigger. Install it via the Package Manager on your Mudlet toolbar. And replace it with your old trigger. Went into your MUD and tested it myself so it works great :)

The problem (if it wasn't the trigger capture) is that your current_health and max_health are strings and setValue requires numbers as arguments. That's why it wasn't updating your gauge.

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Sun Jan 19, 2014 6:59 pm
by trentont101
IT works!!!!
Thanks Akayan for the fix!

as Akaya said, anyone else with a similar problem you need to make sure that your variables are tonumber() so that the gauge is not attempting to compare two strings.

Thanks Akaya!!

if anyone else needs some help with him, feel free to message me i will help you with what ive learned if i can
thanks!

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Mon Jan 20, 2014 12:56 am
by Jor'Mox
Just curious, I assume it was a pattern issue? What pattern did you ultimately use?

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Mon Jan 20, 2014 4:19 am
by Akaya
I'd assume it was a pattern problem, but just to rule everything out, I made it myself in his MUD:
Code: [show] | [select all] lua
--Pattern
^(\d+)/(\d+) > $
--Script
current_health, max_health = tonumber(matches[2]), tonumber(matches[3])
hpbar:setValue(current_health, max_health)

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Mon Jan 20, 2014 6:05 am
by icesteruk
Akaya wrote:I'd assume it was a pattern problem, but just to rule everything out, I made it myself in his MUD:
Code: [show] | [select all] lua
--Pattern
^(\d+)/(\d+) > $
--Script
current_health, max_health = tonumber(matches[2]), tonumber(matches[3])
hpbar:setValue(current_health, max_health)
it might have been he never used the tonumber(matches[2]) etc

Re: PLEASE HELP!!!! Using Gyser to create a HP bar

Posted: Mon Jan 20, 2014 6:13 am
by trentont101
i did have it in there, it looks there is a space after the > i did not have that in the script, but i could have sworn i tried it