Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
azurerazor
Beginner


Joined: 17 Dec 2001
Posts: 20
Location: USA

PostPosted: Mon Dec 17, 2001 9:01 am   

button Health guage
 
I am trying to create a set prompt
from this prompt
[Health] 6676/6676 [Movement] 1294/1300 >

The Vars are for the purpose of making a Health guage. .

I need to get the full trigger and button code . . .If possible! Thanks!!
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Mon Dec 17, 2001 9:23 am   
 
#BUTTON 1 {hp} {} {} {} {@hp} {} {} {} {} {} {} {} {} {} {} {Gauge|9|12|@maxhp|@maxhp/10} {} "" {"Explore"|"Inset"} {} {hp}

#BUTTON 2 {mv} {} {} {} {@mv} {} {} {} {} {} {} {} {} {} {} {Gauge|14|12|@maxmv|@maxmv/10} {} "" {"Explore"|"Inset"} {} {mv}

#trigger {^~[Health~] (%d)/(%d) ~[Movement~] (%d)/(%d) >} {#var hp %1;#var maxhp %2;#var mv %3;#var maxmv %4} "" {"nocr"|"prompt"}

Cut-n-paste those at the command line and you should be good to go.

Iljhar
Reply with quote
azurerazor
Beginner


Joined: 17 Dec 2001
Posts: 20
Location: USA

PostPosted: Mon Dec 17, 2001 9:51 pm   
 
Thanks!!
Reply with quote
caveaht
Newbie


Joined: 03 Jun 2006
Posts: 7

PostPosted: Mon Jun 05, 2006 2:21 am   
 
I used the suggestions, modified slightly for my different prompt:

<100%hp 100%m 100%mv 4761tnl (9.31%)>

#trigger {^~<(%d)~%hp (%d)~%m (%d)~%mv (%d)~%tnl}}{#var hp %1;#var mv %3} ""

#BUTTON 1 {hp} {} {} {} {@hp} {} {} {} {} {} {} {} {} {} {} {Gauge|9|12|@maxhp|@maxhp/10} {} "" {"Explore"|"Inset"} {} {hp}

#BUTTON 2 {mv} {} {} {} {@mv} {} {} {} {} {} {} {} {} {} {} {Gauge|14|12|@maxmv|@maxmv/10} {} "" {"Explore"|"Inset"} {} {mv}

All I get is two black buttons that say hp and mv respectively, but they don't show anything when they change. I checked my variables too and this didn't see any @hp or @mv. What am I doing wrong here? Is it the trigger or the buttons?
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Mon Jun 05, 2006 4:00 am   
 
Try these.

#BUTTON 1 {hp} {} {} {} {@hp} {} {} {} {} {} {} {} {} {} {} {Gauge|9|12|100|10} {} "" {"Explore"|"Inset"} {} {hp}

#BUTTON 2 {mv} {} {} {} {@mv} {} {} {} {} {} {} {} {} {} {} {Gauge|14|12|100|10} {} "" {"Explore"|"Inset"} {} {mv}

#TRIGGER {^~<(%d)~%hp %d~%m (%d)~%mv %dtnl ~(%d~%~)~>} {#VAR hp%1;#VAR mv %2} "" {"nocr"|"prompt"}

The trigger pattern you used doesn't match the prompt you posted. This would cause the variables to not get set. Your button commands also don't know what @maxhp and @maxmv are either, unless you're capturing them with a different trigger.
Reply with quote
caveaht
Newbie


Joined: 03 Jun 2006
Posts: 7

PostPosted: Mon Jun 05, 2006 4:26 pm   
 
Thanks! But it still doesn't work.
The buttons show up as green/yellow (respectively) text on black background; regardless of what my hp and mv are. I checked to make sure the variable were created, and there were no @hp or @mv. I manually created the variables and assigned arbitrary values to them, but was unable to get the guages to display anything but a completely black button with caption.
Help?
Also please what are {"nocr"|"prompt"} for?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Jun 05, 2006 5:51 pm   
 
{"nocr"|"prompt"} specifies the trigger options.

NoCR - trigger fires on on a prompt
Prompt - trigger does not fire on newline

I'm at work so I can't try the code myself but try it without the prompt option. I suspect that for some reason, you prompt may not be properly detected. If that's the case then check View -> Preferences - General. Scroll down until you see 'MUD Prompt' and make sure there is a '<' in the first field. Hope that helps.
_________________
Asati di tempari!
Reply with quote
caveaht
Newbie


Joined: 03 Jun 2006
Posts: 7

PostPosted: Mon Jun 05, 2006 8:33 pm   
 
It _was_ the MUD prompt setting. Thanks!
Also, fyi in case anyone else should be having the problem, only the mv was working, and I kept getting "Variable hp100 not defined". I edited the Value field of the trigger and added a space between "hp" and "%1", it is missing if you c/p from the code above.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net