|
wolfshadow Newbie
Joined: 21 Nov 2002 Posts: 3 Location: USA
|
Posted: 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? |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: 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. |
|
|
|
wolfshadow Newbie
Joined: 21 Nov 2002 Posts: 3 Location: USA
|
Posted: 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? |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: 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}}} |
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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} |
|
|
|
|
|