Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Changing Output Colors
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| ChronicHobo
(2 posts) Bio
|
| Date
| Mon 13 Dec 2010 04:56 AM (UTC) |
| Message
| Okay first time posting no hazing please :) Been supporter since 1999 and I am now delving into changing the output of a MUD so I can have fun and change things up some.
I currently have a trigger set to remove the line and input a current:
<triggers>
<trigger
enabled="y"
match="*A lightning bolt leaps from your hand and arcs to a*"
omit_from_output="y"
send_to="2"
sequence="100"
>
<send>Your hands form a deadly arc as you launch a Kamehameha a%2</send>
</trigger>
</triggers>
<triggers>
<trigger
enabled="y"
match="Your lightning * a *!"
omit_from_output="y"
send_to="2"
sequence="100"
>
<send>Your Kamehameha %1 a %2!</send>
</trigger>
</triggers>
But I don't want to change any of the colors from the game.
The output shows:
A lightning bolt leaps from your hand and arcs to a rainbow warrior.
You fade into existence.
Your lightning *** DEVASTATES *** a rainbow warrior!
The bolt arcs to an alchemist!
You claim an alchemist.
Your lightning RAZES an alchemist!
Where "*** DEVASTATES ***" and "RAZES" are red while the rest of the text is off white.
When the trigger responds it does the text replacement right but all the text comes out blue.
Been messing around with it for a lil while and can't get the output to leave the %1 color alone or keep the text the same.
Any tips?
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 13 Dec 2010 05:06 AM (UTC) |
| Message
| To start with:
In more detail, it is probably simplest to use a script function (ie. script file) rather than "send to script" because then you get the style runs as the 4th argument to the trigger function.
Then using the general technique described there, you can display existing stuff (using ColourTell) in the style it originally was, and changing words here and there as required.
That FAQ actually uses a slightly different technique, using TriggerStyleRuns which basically has the same stuff - the style runs (that is, colours etc.) of each piece of text on the line. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| ChronicHobo
(2 posts) Bio
|
| Date
| Reply #2 on Mon 13 Dec 2010 05:15 AM (UTC) |
| Message
| Appreciate it Nick man.
I'll be working more on this later tonight still delving into scripting and what not. Triggers I am at home with and can normally work around.
I'll post a follow - up with a working and what I did in case anyone runs into this as well :) | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
13,268 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top