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

Joined: 18 Feb 2009
Posts: 2

PostPosted: Wed Feb 18, 2009 3:28 am   

Status bar. help needed please.
Hello there,
I play an lpmud called Revenge of the end of the line and I would like to use the status bar as a way to view my hp mana and fatigue in real time and to remove the spam produced by the damaged received.

This is how the mud tells me my current state of my character:

HP: 484/484 Mana: 318/318 Fatigue: 306/306 Exp: 119130

I would like to have this shown in the status bar hopefully with the green / orange / red color displayed by the mud for healthy / damaged / near death.
and also remove the echo of this from the actual mud screen.

If this makes sense.
At the moment I have say #ST {HP: / Mana: / Fatigue: / Exp: } which basically shows me what i want on the status bar but no values, this is the part im stuck at. Please help me.

Thanks in Advance
Reply with quote

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

PostPosted: Wed Feb 18, 2009 5:45 am   
You want to read up on #VARIABLES, #TRIGGERSand the %color and %ansi functions.

I'm about to got bed that should be enough to get you started. Or you'll also need %if to control your colors.
Asati di tempari!
Reply with quote

Joined: 18 Feb 2009
Posts: 2

PostPosted: Wed Feb 18, 2009 6:00 am   
I have read up on #variables and #triggers but its not that easy for me to grasp as I do not have any experience in programing of any type. I grasp how it should work ( zmud needs to gather the information and store it as a variable and then trigger the status bar to update) but I cannot put this into code :( even after reading the help files. I know it might seems extremely simple for someone who has even the smallest amount of experience but I have absolutely none :(
Reply with quote

Joined: 15 Feb 2009
Posts: 3

PostPosted: Fri Feb 20, 2009 5:29 am   
I use zMUD 7.21, so hopefully this will work for you... This is the first time I've ever given zMUD advice on a forum so any of the more experienced peeps will be able to clean this up if I'm totally off-base.

First, you need to capture the variables from the pattern the mud gives you. You've told us the MUD shows you:

HP: 484/484 Mana: 318/318 Fatigue: 306/306 Exp: 119130

So, how I've done it in my zMUD (and I warn you, I work under the premise of, if it ain't pretty but it works, it's beautiful) is:

- make a new trigger with the Pattern ->

HP: (%d)/(%d) Mana: (%d)/(%d) Fatigue: (%d)/(%d) Exp: (%d)

For the Command, or Script enter ->

#var hp %1
#var mhp %2
#var mana %3
#var manamax %4
#var fatigue %5
#var mfatigue %6
#var exp %7

- Now that you've captured all the values into variables, you can use them in your status bar. So, right click on the status bar, click "customize status bar", and in the Status Line put ->

HP: @hp/@mhp Mana: @mana/@manamax Fatigue: @fatigue/@mfatigue Exp: @exp

I have no idea how to make those coloured the way you want, but at least it should allow you to check the values at a glance along the status bar. I use my status bar to show me how many coins I have, and how much exp I have, and for HP/Mana I use gauges (you should learn how to make gauges, very useful for HP/Mana/Fatigue) I learned how to make gauges at which also has a few other trigger instructions you may find useful.
Reply with quote
Fang Xianfu

Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Feb 20, 2009 6:29 am   
You can use the %ansi function to color text on the status bar, like %ansi(red)Hp:@hp. I think you might be able to use MXP in zMUD, too, which would look like <color red>Hp:@hp</color>.
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote

Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Feb 23, 2009 2:34 pm   
Command line variables are numbered %1, %2, %3, etc

You can make an alias named MyProg with a content of #SHOW Hello %1

Now, when you type MyProg 'anything' in the input, ZMud will return this: Hello 'thing you typed'

If you type the word 'World', you will send Hello World to the screen. 'World' was %1

That 'Hello World' thing is is something of a tradition among programming, in case you wondered. The rest just follows.
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