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


Joined: 01 Feb 2003
Posts: 7
Location: USA

PostPosted: Sun Jan 18, 2004 1:31 am   

gauges
 
I've got a gauge set on both my char's I usually multiplay 2 at the same time, but typicly stay in one window and dont see the other. Is there a way to get my alt's gauge to show up in my main window? I've looked thru the help files but dont see nothing on this
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jan 18, 2004 2:04 am   
 
No, I don't think there's any way to have your alt's gauges shown in another character's main window. However, there's nothing to stop you from having a duplicate set. It's just a matter of providing the information to the second character for storage in a variable there. This can easily be done with the same trigger which provides the information for the alt's gauges.

Typical hp trigger for a character named LightBulb (the alt):
#TR {(%n)/(%d)hp} {#VAR hp %1;#VAR maxhp %2}

Modified to provide the same information to a second character named Cronus (the main):
#TR {(%n)/(%d)hp} {#VAR hp %1;#VAR maxhp %2;:Cronus:#VAR LBhp %1;:Cronus:#VAR LBmaxhp %2}

Cronus can now have a gauge to display LightBulb's hp using its own variables, @LBhp and @LBmaxhp.

For additional information, see Introduction to Multiplaying in the zMUD helpfiles.
Reply with quote
cronus
Newbie


Joined: 01 Feb 2003
Posts: 7
Location: USA

PostPosted: Sun Jan 18, 2004 6:22 am   
 
thanks that works pretty good :)
Reply with quote
malice
Newbie


Joined: 26 May 2004
Posts: 4
Location: Austria

PostPosted: Wed May 26, 2004 4:41 am   
 
I am using a registerd zmud 7.05 and I want to make a graphical bar thing to show how much hp and mp I have etc, Is that best done in a gauge or status bar?

also, I have no idea how to do it, [:I] my toggle looks like this:
=* 2206/2206hp 1369/1389mp 786/786mv 321,304,880tnl
its in the form of current/max hp=health mp=mana mv=move tnl=exp tnl

from reading this post I did the following:
#TR {(*)/(*)hp (*)/(*)mp (*)/(*)mv (*)tnl }{
#VAR hp %1
#VAR maxhp %2
#VAR mp %3
#VAR maxmp %4
#VAR mv %5
#VAR maxmv %6
#VAR tnl %7
}

But I have no idea where to put it or what to do with it to make it into a bar thing. Could you please help?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed May 26, 2004 7:41 am   
 
The status line isn't very good for graphical displays, use a gauge.

Click the Buttons button on the Tool Bar.
Click New
Select the Gauge kind
Put HP in the Caption
Go to the Gauge tab
Put @hp in the Value box
Put @maxhp in the Gauge Max box
Put @maxhp/4 in the Gauge Low box
Choose bright blue as the Gauge Color
Choose bright red as the Low Color
Click the Save button

There, one HP gauge. Other gauges are similar.

I suspect you'll need to modify your trigger pattern. If you had read the topic a little closer you'd have noticed that I didn't use the * wildcard. It will probably work okay for everything EXCEPT your hp. But, since you have additional characters and spaces before the hp value, they will also be picked up by the * you used for %1. There's good reason to use the more specific wildcards.
Reply with quote
malice
Newbie


Joined: 26 May 2004
Posts: 4
Location: Austria

PostPosted: Wed May 26, 2004 12:38 pm   
 
Okay!

I changed it to:
-------------------------------------------
#TR {(%a)/(%b)hp (%c)/(%d)mp (%e)/(%f)mv }{
#VAR hp %1
#VAR maxhp %2
#VAR mp %3
#VAR maxmp %4
#VAR mv %5
#VAR maxmv %6
}
--------------------------------------------
And put that info in Vars.

In buttons I made them like you said,
@hp
@maxhp
@maxhp/4
-
I did them for mana and move aswell, but none of the gauges change when either goes lower. I have no idea whats wrong with it [V]

Any ideas?
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed May 26, 2004 4:35 pm   
 
PLEASE PLEASE PLEASE Read the pattern matching helpfile its REALLY great

Change all your %a through %f to (%d) (will match numbers)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed May 26, 2004 5:57 pm   
 
%a = alphanumeric characters. Matches numbers
%b = undefined. Matches nothing (except the characters %b) and will prevent your pattern from ever matching anything
%c = undefined
%d = digits 0-9. Matches numbers
%e = escape character
%f = undefined

I don't try very hard to make my scripts foolproof. I used %d and %n. If you are basing your triggers on mine, why don't you use %d and %n also?
Reply with quote
malice
Newbie


Joined: 26 May 2004
Posts: 4
Location: Austria

PostPosted: Wed May 26, 2004 6:01 pm   
 
heh, ok changed then to %d, it still doesnt work though :(
Reply with quote
xenapan
Wanderer


Joined: 26 May 2004
Posts: 68

PostPosted: Wed May 26, 2004 6:17 pm   
 
try
#TR {&hp/&maxhp~hp &mp/&maxmp~mp &mv/&maxmv~mv }
your prompt should be eg.
1000/1532hp 3241/5321mp 1234/1423mv
just with different numbers. anything else, it wont work.
Reply with quote
malice
Newbie


Joined: 26 May 2004
Posts: 4
Location: Austria

PostPosted: Wed May 26, 2004 7:23 pm   
 
nah it wont work :(

I give up...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed May 26, 2004 9:56 pm   
 
#TR {(%n)/(%d)hp (%n)/(%d)mp (%n)/(%d)mv} {
#VAR hp %1
#VAR maxhp %2
#VAR mp %3
#VAR maxmp %4
#VAR mv %5
#VAR maxmv %6
} {} {prompt}
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