|
akeisah Newbie
Joined: 01 Jul 2002 Posts: 2
|
Posted: Mon Jul 01, 2002 4:12 am
How to use Gauges in zMud 6.16 |
I've decided to try and use the Gauges feature for zMud and am at a complete loss on how to get zMud to read my current information. My prompt is as follows:
[3000|3500|400|0|118588]
Due to to the limited space we are allowed I can't add hp,mana etc... currently it is
[hp|mana|move|quest timer|current experience]
What I'm looking for is something similar to what is shown on this page (http://www.zuggsoft.com/zmud/newfeatures.htm )
Any help on how to set this up would be greatly appreciated.
Thanks! |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Jul 01, 2002 4:20 am |
#TR {~[(%d)~|(%d)~|(%d)~|(%d)~|(%d)~]} {#VAR HP {%1};#VAR Mana {%2};#VAR Move {%3};#VAR QuestTime {%4};#VAR EXP {%5}} "" {prompt|no_cr}
|
|
|
|
akeisah Newbie
Joined: 01 Jul 2002 Posts: 2
|
Posted: Mon Jul 01, 2002 6:41 am |
Thank you it worked!
|
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Mon Jul 01, 2002 3:22 pm |
Does anyone really know how to work the layout of the creating a button(guage) so it can look like that picture? As I looked at the picture and the help file, and played around. I confused myself because it didn't make sense. If anyone can understand what they did and explain it to me, that would be great. Thanks
-Death |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Jul 01, 2002 7:24 pm |
quote:
Does anyone really know how to work the layout of the creating a button(guage) so it can look like that picture? As I looked at the picture and the help file, and played around. I confused myself because it didn't make sense. If anyone can understand what they did and explain it to me, that would be great. Thanks
-Death
First, the created the gauge via the New button in the settings editor (New Button, in this case). Next, they typed in a caption into the Caption field that is automatically shown when a new button is created. Third, they clicked on the Position tab and set the left/top properties and the width/height properties. They also took care of the other options found on that page, if needed. Fourth, they clicked on the Advanced Tab and added the variables to the appropriate fields. In the sample, they also added a picture which can be found by clicking that little down arrow immediately right of the text area. If your picture is not found in the popup that appears, you can click the little folder icon immediately right of the down arrow and find it on your computer.
That's it.
li'l shmoe of Dragon's Gate MUD |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Mon Jul 01, 2002 8:07 pm |
ok, I understand on the health, mana, move thing, but how did they do the directions?
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Jul 01, 2002 11:23 pm |
Those are buttons too. There are three buttons on top, three in the middle and three in the bottom. Just create the buttons and do not give the any caption, then go into Position/Size, and manually resize and position them how you want them. Then go into Advanced and in the field named Bitmap File, click on the down arrow besides it and select the appropiate ones from the library. Be sure to also give each button the appropiate commands.
Kjata |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Mon Jul 01, 2002 11:49 pm |
oh, those r buttons to move? dang, I thought they displayed the exits. Hrmm, is there a way for them to 'show up' if there is an exit and 'not show up' if there isn't an exit??
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jul 02, 2002 3:06 am |
Yes, but without knowing much more about your particular MUD, I can only offer you some hints.
You need to give each button a different ID. You also need a trigger to catch the exits line for a room. That trigger will then enable or disable the necessary buttons. You can use #T+ and #T- to enable and disable each button.
Kjata |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Tue Jul 02, 2002 5:11 am |
Pit of Fire
You enter a plain stone room with a large fire pit in the center of it.
As you look closer at the pit you realize that hundreds of people are being
burned inside it. They Scream out to you. The noise is deafening. Several
minor imps and workers push more people into the pit, whistling while
[Exits: north east west]
This is a room in hell. In a room with all exits, it would look like this...
[Exits: north east south west up down]
so i would just create triggers to turn on and off those depending on if they showed up in the room or not? Thanks. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jul 02, 2002 12:18 pm |
Yes, tha's right. If you get stuck, just post again and we'll help you out.
Kjata |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Tue Jul 02, 2002 1:19 pm |
I've got the buttons and triggers to turn them on. But how do I turn them off if there isn't an exit? I'm thinking maybe an #if statement, not exactly sure.
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jul 02, 2002 2:39 pm |
Just turn them all off first, and then turn on the ones that do have an exit.
Kjata |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Tue Jul 02, 2002 3:16 pm |
I turn them off, then they turn back on if I look or enter a room and the exit isn't really there. I'm getting confused, because it looks ok. *shrug*
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jul 02, 2002 6:13 pm |
Post the script you currently have.
Kjata |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Tue Jul 02, 2002 7:55 pm |
I don't exactly have a script. Just a few triggers that say if the direction there turn it on, if not then turn off. I'm kinda new to the whole long script thing.
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jul 02, 2002 11:12 pm |
Yeah, that's what I meant. Post the triggers you use for this.
Kjata |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Tue Jul 02, 2002 11:41 pm |
north -> #t+ nbutton
south -> #t+ sbutton
east -> #t+ ebutton
west -> #t+ wbutton
i was messing around with an if statement like
#if north {#t+ nbutton} {#t- nbutton}
but that wasn't working. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jul 03, 2002 12:48 am |
The problem with these trigger is that they will fire every time you see one of these words. Instead, it's best to have just one trigger that fires when you see the exit line. Example:
#TRIGGER {~[Exits: (*)~]} {#T- nbutton;#T- ebutton;#T- wbutton;#T- sbutton;#T- ubutton;#T- dbutton;#FORALL %replace(%1, " ", "|") {#T+ %concat(%left(%i, 1), "button")}}
So, this trigger fires when you receive the exit line and then proceeds to disable all of the buttons (the 6 #T-'s.)
What comes next is a little bit more complicated. %1 will contain all of the exits that appear in the exit line. Each exit is separated by a space, as sent by the MUD. We want to go through each of these exits and enable the corresponding button. The way we do this is by using #FORALL. #FORALL loops through each item in a stringlist and performs a set of commands for each item. However, the contents of %1 is not a stringlist, since stringlists are many strings, each separated by a |. What we do then, is to replace each space in %1 with a | and then we give that to #FORALL.
Now, the #FORALL needs to enable the corresponding button. It does this by using the #T+ button for each item in the stringlist. The current item in the loop is referenced by %1. However, the names of the buttons are not northbutton, southbutton, etc., but nbuttom, sbutton, etc. So, we overcome this problem by concatenating two strings - the first letter of the current item in the loop (n, s, e, w, etc) and the string "button".
Kjata |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Wed Jul 03, 2002 4:04 am |
Thank you VERY much Kjata. It works perfectly.
|
|
|
|
|
|