 |
Laurus Newbie
Joined: 30 Jun 2004 Posts: 7 Location: USA
|
Posted: Wed Jun 30, 2004 11:50 am
Health Bar won't Update |
I download a script for a health bar, and it doesn't update anything but my experience. It says I have to Must CONFIG PROMPT HMEW. I have no idea what that means, but here's the script:
#CLASS {Health Bar}
#VAR endurance {0} {_nodef} "Healthbar"
#VAR exp {0} {_nodef} "Healthbar"
#VAR hp {0} {_nodef} "Healthbar"
#VAR hpheal {0} {_nodef} "Healthbar"
#VAR level {0} {_nodef} "Healthbar"
#VAR levelname {(none)} {_nodef} "Healthbar"
#VAR mana {0} {_nodef} "Healthbar"
#VAR manaheal {0} {_nodef} "Healthbar"
#VAR maxendurance {0} {_nodef} "Healthbar"
#VAR maxhp {0} {_nodef} "Healthbar"
#VAR maxmana {0} {_nodef} "Healthbar"
#VAR maxwillpower {0} {_nodef} "Healthbar"
#VAR mossheal {0} {_nodef} "Healthbar"
#VAR mossmana {0} {_nodef} "Healthbar"
#VAR willpower {0} {_nodef} "Healthbar"
#TRIGGER {Endurance: (%d)/(%d) Willpower: (%d)/(%d)} {#VAR endurance %1;#VAR maxendurance %2;#VAR willpower %3;#VAR maxwillpower %4} "Healthbar"
#TRIGGER {Health: (%d)/(%d) Mana: (%d)/(%d)} {#VAR maxhp %2;#VAR maxmana %4} "Healthbar"
#TRIGGER {You have achieved level (%d) (*) and are (%d)~% of the} {#VAR level %1;#VAR levelname %2;#VAR exp %3} "Healthbar"
#BUTTON 86 {@endurance} {} {} {} {@endurance} {} {} {Size} {110} {15} {Pos} {50} {1} {112} {} {Gauge|118|12|@maxendurance|@maxendurance/4} {45} "Healthbar" {Explore|Inset} {Endurance} {2} {2}
#BUTTON 87 {@exp} {} {} {} {@exp} {} {} {Size} {110} {15} {Pos} {80} {1} {112} {} {Gauge|127|12||} {-25} "Healthbar" {Explore|Inset} {Experience} {1} {2}
#BUTTON 89 {@hp} {sip health} {} {} {@hp} {} {} {Size} {110} {15} {Pos} {20} {1} {} {} {Gauge|10|12|@maxhp|@maxhp/4} {45} "Healthbar" {} {Health} {} {2}
#BUTTON 106 {@level - @levelname} {} {} {} {} {} {} {Size} {110} {15} {Pos} {5} {2} {112} {} {} {45} "Healthbar" {Explore} {Current Level} {} {2}
#BUTTON 90 {@mana} {sip mana} {} {} {@mana} {} {} {Size} {110} {15} {Pos} {35} {1} {112} {} {Gauge|123|12|@maxmana|@maxmana/4} {45} "Healthbar" {Explore|Inset} {Mana} {2} {2}
#BUTTON 88 {@willpower} {} {} {} {@willpower} {} {} {Size} {110} {15} {Pos} {65} {1} {112} {} {Gauge|125|12|@maxwillpower|@maxwillpower/4} {45} "Healthbar" {Explore|Inset} {Willpower} {2} {2}
#ALIAS heal {sc;#MATH hpheal {@maxhp-800};#MATH manaheal {@maxmana-1400}}
#TRIGGER "normalheal" {(%d)h, (%d)m, (%d)e, (%d)w (*)-} hp=%1;mana=%2;endurance=%3;willpower=%4;#if @vialbalance=1 {#if (%1<@hpheal) {sip health;vialbalance=0}};#if @vialbalance=1 {#if %2<@manaheal {sip mana;vialbalance=0}} "" {nocr|prompt}
#TRIGGER {Enter an option or enter your character's name. (%w)} {name=%1}
#BUTTON 36 {@name} {} {} {} {} {} {} {Size} {110} {15} {Pos} {1} {647} {112} {96} {} {} "" {Explore} {Active Character} {} {4}
#TRIGGER {You have reached the illustrious level of} {Score;heal} ""
#CLASS 0
I'm not sure which parts I need to add information to, any suggestions? |
|
|
 |
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Wed Jun 30, 2004 12:10 pm |
Without a paste of the 'score' output and of your prompt, this is just a guess...
at the prompt try: CONFIG PROMPT HMEW
This script seems to be looking for a prompt that's something like this:
120h, 110m, 98e, 114w 12ab34-
If your prompt doesn't look like that then I don't think your healthbar will be updated properly. |
|
|
 |
Laurus Newbie
Joined: 30 Jun 2004 Posts: 7 Location: USA
|
Posted: Wed Jun 30, 2004 1:56 pm |
That's exactly what I need to do to activate it, but the health still wont' update and now I have percentages for mana, endurance, and willpower. This is my character's information:
You have achieved level 51 (Mighty) and are 29% of the way to the next level.
Health: 2340/2187 Mana: 2446/2646
Endurance: 9835/9835 Willpower: 12130/12130
Now the bar reads: 51 - (Mighty)
%2
%3
%4
29
Any ideas on how I can fix this? |
|
|
 |
Amylon Novice
Joined: 31 Jan 2003 Posts: 49 Location: Australia
|
Posted: Wed Jun 30, 2004 2:40 pm |
YEP!
It was bad scripting by who ever released the script, the cap trigger is missing () and such.
Delete the capture trigger and paste this into the command line:
#TRIGGER {(%d)h, (%d)m, (%d)e, (%d)w (*)-} {hp=%1;mana=%2;endurance=%3;willpower=%4;#if (@vialbalance=1) {#if (%1<@hpheal) {sip health;vialbalance=0}};#if (@vialbalance=1) {#if %2<@manaheal {sip mana;vialbalance=0}}} "Healthbar"
Could be more mistakes but this is what Ive found so far
P.S.
Remove red star and put a space here:
#TRIGGER {Endurance: (%d)/(%d) *Willpower: (%d)/(%d)} {#VAR endurance %1;#VAR maxendurance %2;#VAR willpower %3;#VAR maxwillpower %4} "Healthbar"
#TRIGGER {Health: (%d)/(%d) *Mana: (%d)/(%d)} {#VAR maxhp %2;#VAR maxmana %4} "Healthbar" |
|
|
 |
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Wed Jun 30, 2004 2:58 pm |
quote: Originally posted by Laurus
#TRIGGER "normalheal" {(%d)h, (%d)m, (%d)e, (%d)w (*)-} hp=%1;mana=%2;endurance=%3;willpower=%4;#if @vialbalance=1 {#if (%1<@hpheal) {sip health;vialbalance=0}};#if @vialbalance=1 {#if %2<@manaheal {sip mana;vialbalance=0}} "" {nocr|prompt}
This is a screwy trigger syntax for one thing. Try this instead:
#TRIGGER "normalheal" {(%d)h, (%d)m, (%d)e, (%d)w (*)-} {#VAR hp %1;#VAR mana %2;#VAR endurance %3;#VAR willpower %4;#IF ((@vialbalance = 1) AND (%1 < @hpheal)) {sip health;vialbalance=0};#IF ((@vialbalance = 1) AND (%2 < @manaheal)) {sip mana;vialbalance=0}} "" {nocr|prompt}
Edit: Saw that someone was way ahead of me in debugging this script. I'll give my modest ability and effort a rest.[:o)] |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jun 30, 2004 6:13 pm |
Although there are many problems with this script, the one that's giving you problems is that the #BUTTON command expands the Caption argument and you don't want it to. This can be prevented by using quotes instead of braces for that argument.
Start by deleting both the classes created by this script, along with all their settings.
#DELCLASS {Health Bar}
#DELCLASS {Healthbar}
Then enter this script, I've corrected all the problems I've noticed. Significant changes are in red.
#VAR endurance {9835}
#VAR exp {29}
#VAR hp {2340}
#VAR hpheal {1387}
#VAR level {51}
#VAR levelname {Mighty}
#VAR mana {2446}
#VAR manaheal {1246}
#VAR maxendurance {9835}
#VAR maxhp {2187}
#VAR maxmana {2646}
#VAR maxwillpower {12130}
#VAR willpower {12130}
#VAR name {Laurus}
#TRIGGER {Endurance: (%d)/(%d) Willpower: (%d)/(%d)} {#VAR endurance %1;#VAR maxendurance %2;#VAR willpower %3;#VAR maxwillpower %4} "Healthbar"
#TRIGGER {Health: (%d)/(%d) Mana: (%d)/(%d)} {#VAR maxhp %2;#VAR maxmana %4} "Healthbar"
#TRIGGER {You have achieved level (%d) (*) and are (%d)~% of the} {#VAR level %1;#VAR levelname {%2};#VAR exp %3} "Healthbar"
#BUTTON 0 "@endurance" {} {} {} {@endurance} {} {} {Size} {110} {15} {Pos} {50} {1} {112} {} {Gauge|118|12|@maxendurance|@maxendurance/4} {45} "Healthbar" {Explore|Inset} {Endurance} {} {2}
#BUTTON 0 "@exp" {} {} {} {@exp} {} {} {Size} {110} {15} {Pos} {80} {1} {112} {} {Gauge|127|12||} {-25} "Healthbar" {Explore|Inset} {Experience} {} {2}
#BUTTON 0 "@hp" {sip health} {} {} {@hp} {} {} {Size} {110} {15} {Pos} {20} {1} {} {} {Gauge|10|12|@maxhp|@maxhp/4} {45} "Healthbar" {} {Health} {} {2}
#BUTTON 0 "@level - @levelname" {} {} {} {} {} {} {Size} {110} {15} {Pos} {5} {2} {112} {} {} {45} "Healthbar" {Explore} {Current Level} {} {2}
#BUTTON 0 "@mana" {sip mana} {} {} {@mana} {} {} {Size} {110} {15} {Pos} {35} {1} {112} {} {Gauge|123|12|@maxmana|@maxmana/4} {45} "Healthbar" {Explore|Inset} {Mana} {} {2}
#BUTTON 0 "@willpower" {} {} {} {@willpower} {} {} {Size} {110} {15} {Pos} {65} {1} {112} {} {Gauge|125|12|@maxwillpower|@maxwillpower/4} {45} "Healthbar" {Explore|Inset} {Willpower} {} {2}
#ALIAS heal {sc;#MATH hpheal {@maxhp - 800};#MATH manaheal {@maxmana - 1400}}
#TRIGGER "normalheal" {(%d)h, (%d)m, (%d)e, (%d)w (*)-} {hp = %1;mana = %2;endurance = %3;willpower = %4;#IF (@vialbalance) {#IF (%1 < @hpheal) {sip health;vialbalance = 0}};#IF (@vialbalance) {#IF (%2 < @manaheal) {sip mana;vialbalance = 0}}} "" {nocr|prompt}
#TRIGGER {Enter an option or enter your character's name. (%w)} {name = %1}
#BUTTON 0 "@name" {} {} {} {} {} {} {Size} {110} {15} {Pos} {1} {647} {112} {96} {} {} "" {Explore} {Active Character} {} {4}
#TRIGGER {You have reached the illustrious level of} {score;heal}
EDIT: Removed (left blank) the ID argument (next to last field) from all #BUTTON commands. |
|
|
 |
Laurus Newbie
Joined: 30 Jun 2004 Posts: 7 Location: USA
|
Posted: Thu Jul 01, 2004 12:59 am |
Mr. Lightbulb, I can't tell you how grateful I am. I spent 3 hours trying to figure out the problem last night/this morning, and you answered my prayer. I think I need a tissue. You're all fantastic.
My sincere thanks, |
|
|
 |
|
|