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


Joined: 16 Sep 2006
Posts: 2

PostPosted: Sat Sep 16, 2006 7:10 pm   

Prompt Coloring
 
I'm trying to create a simple prompt coloring script, but am having little success. My issue seems to mostely stem from not knowing how to color single entries in a full line rather than the full line itself. My prompt looks like this . . .

<178/178hp 111/111m 123mv 404tnl | NEWU |>

After searching I found this topic, but its four years old.

I've manage to make a trigger that works(but may be messy) it looks like . . ..

~<(%d)/(%d)hp (%d)/(%d)m (%d)mv (%d)tnl ~| (%w) ~|~>

I'm wondering if anyone would be willing to help me make a script to modify the prompt based on hp/mana ect being a % of the max. It looks like thats what the final script on the linked post is trying to do, but the syntax may be too old.

I appreciate any help.

Thanks,
Jaqyl
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sun Sep 17, 2006 8:35 am   
 
Moved from 'Finished MUD Scripts' to 'zMUD General Discussion'.
_________________
Taz :)
Reply with quote
prestojosh
Beginner


Joined: 21 Feb 2006
Posts: 19

PostPosted: Tue Sep 26, 2006 3:30 pm   
 
~<(%d)/(%d)hp (%d)/(%d)m (%d)mv (%d)tnl ~| (%w) ~|~>

Ok, heres how it goes down. You need to put the values you wanna change the color of in variables.

#VAR curhp %1
#VAR maxhp %2
#VAR curmana %3
#VAR maxmana %4
#VAR curmove %5
#VAR curxptnl %6

Then.. in the same trigger you wanna do something along these lines

#IF (@curhp>=(0.5*@maxhp)) {#COLOR %1 green}
#IF (@curhp<(0.5*@maxhp)) {#COLOR %1 yellow}
#IF (@curhp<(0.25*@maxhp)) {#COLOR %1 red}

And so on for mana and move and xp if you wanna color those.. typically you'd only want to change the color of hp anyways.
_________________
-Presto
Reply with quote
Jaqyl
Newbie


Joined: 16 Sep 2006
Posts: 2

PostPosted: Wed Sep 27, 2006 5:02 am   
 
Thanks for the advice, gonna take a run at it tommorrow. Haven't had the time to MUD recently due to other interests, why I haven't gotten back until now.

Thanks again,
Jaqyl
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