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

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

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

Post 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).

Silvine
Posts: 142
Joined: Sat Oct 23, 2010 2:36 pm

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

Post 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.
Mapper of Bedlam

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

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

Post 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.
Attachments
Prompt Capture.zip
(656 Bytes) Downloaded 390 times

trentont101
Posts: 17
Joined: Fri Jan 17, 2014 12:07 am

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

Post 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!

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

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

Post by Jor'Mox »

Just curious, I assume it was a pattern issue? What pattern did you ultimately use?

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

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

Post 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)

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

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

Post 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

trentont101
Posts: 17
Joined: Fri Jan 17, 2014 12:07 am

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

Post 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

Post Reply