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


Joined: 21 Nov 2002
Posts: 3
Location: USA

PostPosted: Fri Jul 15, 2005 1:37 am   

Prompt line
 
In Medievia MUD, i have a line on my prompt displaying the mlr's and points needed to next level. Is there a way to show the points needed in one color and have another color for the mlr if i've already made it for that level? Another option would be to have mlr's needing points display in the prompt line and then "disappear" once they were achieved. Any help greatly appreciated...
_________________
If the entire universe shrunk by 50%, how would we know?
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Fri Jul 15, 2005 10:10 am   
 
MLRs? Can you provide an example of what the prompt looks like and which bits would need gagging or colouring.

What you're needing though is #PCOL and #SUB to colour specific parts of the line and to remove unneeded bits.
Reply with quote
wolfshadow
Newbie


Joined: 21 Nov 2002
Posts: 3
Location: USA

PostPosted: Fri Jul 15, 2005 12:28 pm   
 
Here is my actual prompt line...

[sflqvw] <952/952hp 172/172m 540/540mv 100br -970al
26,358,188xp -100aq -52,410,929ld 3,000,000tr 0egg -9,007dps>

The mlr's are multi-level requirements. On line two, what I'd like to do is if I still need points (which are the positive numbers) I would like them in red, while zero and the negative numbers (which means I achieved that specific requirement) I would like to change to green when I reach it. If that is not possible, I would like the zero and negative req's to "disappear" from the line as reached and return when I level. Thanks for the assistance.
_________________
If the entire universe shrunk by 50%, how would we know?
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Fri Jul 15, 2005 1:22 pm   
 
The following should work:
Code:
#TRIGGER {^~[sflqvw] <(%n)/(%n)hp (%n)/(%n)m (%n)/(%n)mv (%n)br -(%n)al$} {}
#COND {^(%n)xp (%n)aq (%n)ld (%n)tr (%n)egg (%n)dps>$} {#if (%1 > 0) {#PCOL green %x1} {#PCOL red %x1};#if (%2 > 0) {#PCOL green %x2} {#PCOL red %x2};#if (%3 > 0) {#PCOL green %x3} {#PCOL red %x3};#if (%4 > 0) {#PCOL green %x4} {#PCOL red %x4};#if (%5 > 0) {#PCOL green %x5} {#PCOL red %x5};#if (%6 > 0) {#PCOL green %x6} {#PCOL red %x6}}



I tried to make it more tidy using a loop - if anyone can tell me where my syntax went wrong then I'd be interested to know...
Since there are 6 matches, I used
Code:
#loop 6 {#if (%{%i} > 0) {#PCOL green %x{%i}} {#PCOL red %x{%i}}}
Code:
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Jul 15, 2005 7:36 pm   
 
basing off the pattern from Guinn Also untested

#TRIGGER {^~[(%x)~] ~<(%n)/(%n)hp (%n)/(%n)m (%n)/(%n)mv (%n)br (%n)al} {}
#COND {^(%n)xp (%n)aq (%n)ld (%n)tr (%n)egg (%n)dps~>} {
#PCOL %if(%1=%abs(%1),red,green) %x1
#PCOL %if(%2=%abs(%2),red,green) %x2
#PCOL %if(%3=%abs(%3),red,green) %x3
#PCOL %if(%4=%abs(%4),red,green) %x4
#PCOL %if(%5=%abs(%5),red,green) %x5
#PCOL %if(%6=%abs(%7),red,green) %x6
} {prompt|nocr}
_________________
Zmud Support Library
Zmud Knowledge Base
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