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
wolfspyr
Newbie


Joined: 06 Jan 2006
Posts: 5

PostPosted: Fri Jan 06, 2006 5:51 am   

Status bar for Dragon's gate
 
I'm trying to get a status bar set up for Dragon's gate. I was hoping to get my hp, ftg, gold, and silver displayed. But for the life of me I can't get it to work. Help please.

Stephanie
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Jan 06, 2006 6:40 am   
 
What does your prompt look like or your score to capture "hp, ftg, gold, and silver"?

#ST stuff here

That sets up the status bar.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jan 06, 2006 10:41 pm   
 
Stephanie's referring to the Wizard Mode hex string that is sent with the prompt. If I recall, it looks something like this:

not in Wizard Mode
>

in Wizard Mode
>00000000000000000000000000000000

The zeroes represent a 60-digit (possibly 64, but I forget exactly everything that it breaks down to) hex string that contains all the information such as health, fatigue, and so on.

#1-4 = current health
#5-8 = max health
#9-12 = current fatigue
#13-16 = max fatigue
#17-20 = current psionic points
#21-24 = max psionic points
#25-28 = current web points
#29-32 = max web points
#33-40 = gold onhand
#41-48 = silver onhand

I might have the psi and web positions reversed.

After that I'm a little rusty, but there's a 1-digit value each for your posture (standing, sitting, lying down), whether you are holding a weapon, whether you are holding a shield, and two values which as far as I've ever known nobody's managed to figure out what they do. Then you have a 2-digit or 3-digit value representing your current roundtime delay (which includes an extra second for some commands that isn't displayed in the [6 seconds] message that is printed to the screen). The last 4 digits represent the room number you are currently in, but this information is only available to Guides and GMs.

To get your status bar information set up, you will need one trigger to match the >00000 prompt. Each block of numbers representing a given item needs to be matched using the (&#) format (the fixed-width pattern). This trigger will then go through all the variables and pass them off to a hex-converting function that rips the item apart and translates digit-by-digit (using a second function):

#trigger {^>(&4)(&4)(&4)(&4)(&4)(&4)(&4)(&4)(&4)(&4)(&4)(&4)(&1)(&1)(&1)(&1)(&1)(&3)(&4)} {CurHealth = GetHex(%1,4);MaxHealth = GetHex(%2,4);etc}

The 1-digit values are identical to decimal values, and don't have to be sent off to the GetHex() function.

You can probably find more information and the full code by searching these forums for "Dragon's Gate".
_________________
EDIT: I didn't like my old signature
Reply with quote
wolfspyr
Newbie


Joined: 06 Jan 2006
Posts: 5

PostPosted: Sat Jan 07, 2006 1:02 am   
 
I'm talking about when your on the wizard you have all that stuff at the top. HP, FTG, WEIGHT, PSI, WEB and so on. It's got directions and a little person standing or sitting, RT, Pause and stuff like that. I'm trying to put one in the status bar that just has HP, FTG, Gold, Silver, and probably weight if I can.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jan 07, 2006 5:00 am   
 
Not sure if you were responding to my explanation, but like I said, search here for 'Dragon's Gate" and you should find what you are looking for. We answered this question pretty thoroughly already circle 2000 or 2001, when DGate moved to the web. The only thing you'd have to do differently is to create the status bar instead of doing the buttons as the original Wizard emulation project did.
_________________
EDIT: I didn't like my old signature
Reply with quote
wolfspyr
Newbie


Joined: 06 Jan 2006
Posts: 5

PostPosted: Sat Jan 07, 2006 3:30 pm   
 
Thanks. Found it.
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