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


Joined: 10 Jan 2004
Posts: 9
Location: USA

PostPosted: Sat Jan 10, 2004 1:44 am   

help with status bar
 
ok i want to know how to extract text from the mud i am playing, such as Hp: 4120(4120) Tactics: 426(426) Xp: 10,656 and transfer that to the status bar i dont know if that is possible but in the screen shots it showed hp and mana and i wondered if i could transfer it from game to status bar and a way to keep it updated so during combat it doesnt get old?[^] please help i am in dire need hehe thanks for your time
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jan 10, 2004 2:14 am   
 
You extract the information using a trigger (see #TRIGGER command). You store the information using variables (see #VARIABLE command). You display the information on the status bar with the #STATUS command. For the sample line you provided the commands would be something like this, for command-line entry.
#TR {HP: (%d)~((%d)~) Tactics: (%d)~((%d)~) Xp: (%n)} {#VA hp %1;#VA maxhp %2;#VA tac %3;#VA maxtac %4;#VA xp %5} {} {prompt}
#ST {HP: @hp~(@maxhp~) Tactics: @tac~(@maxtac~) Xp: @xp}

NOTE: Additional spaces may be necessary in the trigger pattern
Reply with quote
mystic
Newbie


Joined: 10 Jan 2004
Posts: 9
Location: USA

PostPosted: Sat Jan 10, 2004 2:32 am   
 
ya thanks for all the info but like where do i enter it (sorry i am really new to this)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jan 10, 2004 2:45 am   
 
"for command-line entry"

Enter it at the command line. That's the box where you do most of your typing. It's usually at the bottom of the main window.
Reply with quote
mystic
Newbie


Joined: 10 Jan 2004
Posts: 9
Location: USA

PostPosted: Sat Jan 10, 2004 2:48 am   
 
so what copy paste it all and enter it or sections at a time (sorry again i am totally lost)
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Sat Jan 10, 2004 6:22 am   
 
Yes. Instead of writing code and compiling it for use, all you need to do is copy and paste the code he wrote into the command line, and press enter. zMUD will parse it all and create everything for you. Sometimes, it is better for everyone to show some ambition and try to solve the problem yourself, you will remember the solution more clearly and it will save everyone some time in the process :)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jan 10, 2004 9:50 am   
 
Yes, copy-paste the whole thing. It's actually two lines, and if you use the clipboard it should preserve the carriage-return between them.

I've separated the two lines below, in case you prefer to enter them one at a time.

#TR {HP: (%d)~((%d)~) Tactics: (%d)~((%d)~) Xp: (%n)} {#VA hp %1;#VA maxhp %2;#VA tac %3;#VA maxtac %4;#VA xp %5} {} {prompt}

#ST {HP: @hp~(@maxhp~) Tactics: @tac~(@maxtac~) Xp: @xp}
Reply with quote
mystic
Newbie


Joined: 10 Jan 2004
Posts: 9
Location: USA

PostPosted: Sat Jan 10, 2004 5:05 pm   
 
ok i did exactly as you said and this is what happened
HP: () Tactics: () Xp:
i am beginning to think maybe this isnt possible on this mud well thanks for all the help
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jan 10, 2004 5:49 pm   
 
In that case, the trigger probably isn't working. That's because the trigger pattern doesn't EXACTLY match the MUD output. That's because some places in the MUD output have more than one space. As I said in my NOTE in my first reply:

ADDITIONAL SPACES MAY BE NEEDED IN THE TRIGGER PATTERN

The forum only displays one space. Find where the extra spaces are needed and add them.
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