|
Jaqyl Newbie
Joined: 16 Sep 2006 Posts: 2
|
Posted: 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 |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Sun Sep 17, 2006 8:35 am |
Moved from 'Finished MUD Scripts' to 'zMUD General Discussion'.
|
|
_________________ Taz :) |
|
|
|
prestojosh Beginner
Joined: 21 Feb 2006 Posts: 19
|
Posted: 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 |
|
|
|
Jaqyl Newbie
Joined: 16 Sep 2006 Posts: 2
|
Posted: 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 |
|
|
|
|
|