Health/mana/ego/power gauges

by Kamion

Back to Mechanic's Corner.

Kamion2006-10-23 02:21:03
Now I have some gauges to tell me my health, mana etc but they wont work for some reason with the "prompt" tickbox enabled. I have no idea whatsoever why. Truly I don't. It *SHOULD* work, works fine with newline instead, but...

Here it is, in any case, the prompt trigger:

#TRIGGER {^(*)h, (*)m, (*)e, (*)p (*)-} {
health=%1
mana=%2
ego=%3
power=%4
#if (@prone=1)&(@IsStanding=0) {DoStand}
} "" {prompt}

Like that, it doesn't work, for some reason, unless I enable newline AS WELL AS prompt tickboxes. Or disable prompt and leave newline on.

The gauges are:

#BUTTON 1 {Health} {} {} {} {@health} {} {} {} {} {} {} {} {} {78} {} {Gauge||12|@maxhealth|@maxhealth/10|7} {} "" {Explore|Inset} {} {} {2}
#BUTTON 2 {Mana} {} {} {} {@mana} {} {} {} {} {} {} {} {} {30} {} {Gauge||9|@maxmana|@maxmana/10|7} {} "" {Explore|Inset} {} {} {2}
#BUTTON 3 {Ego} {} {} {} {@ego} {} {} {} {} {} {} {} {} {46} {} {Gauge||10|@maxego|@maxego/10|7} {} "" {Explore|Inset} {} {} {2}
#BUTTON 4 {Power} {} {} {} {@power} {} {} {} {} {} {} {} {} {94} {} {Gauge||13|10|3|7} {} "" {Explore|Inset} {} {} {2}

It's completely automated to work with triggers that fire when I hit SCORE, so I just hit SCORE every time I level up and I don't have to edit the buttons myself.

The triggers that do this:

#TRIGGER {*Ego*:*(*)/(*)*Reserves*:*(*)%} {#var maxego %2}
#TRIGGER {*Health*:*(*)/(*)*Endurance*:*(*)/(*)} {#var maxhealth %2}
#TRIGGER {*Mana*:*(*)/(*)*Willpower*:*(*)/(*)} {#var maxmana %2}

I've checked it over a few times, I can't find anything that would stop it.

I have different classes for every character, and it works on Kamion but not on Tamerlane...?

It's so badly pissing me off, there is basically nothing in the way and it's still not working. Any help greatly appreciated, but I don't really expect anything.

EDIT: Just noticed, Tamerlane for some reason has a blank line put underneath the prompt, and I don't know what's causing that...Could that be the problem? Kamion's prompt is at the very bottom instead. It might be it. If it is, how do I fix it?
Unknown2006-10-23 15:42:40
The options on a prompt trigger should also include nocr (no carriage return), so replace {prompt} with {nocr|prompt}.

When matching a number in a trigger pattern, use %d instead of *. When matching special characters like %, put a ~ before them.

For triggering prompts with zMUD, don't use the linebreak option in Lusternia. Get rid of it with CONFIG PROMPT REMOVE LINEBREAK. Make sure you have the zMUD GA/EOR option enabled, too.

Hope that helps.