[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Substitution
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Lisev_   (2 posts)  [Biography] bio
Date Mon 20 Sep 2004 05:05 AM (UTC)
Suggestion for you Nick.

It would be cool if triggers in Mush would have substitution option. The way they would work would be for example:

Trigger: ^You are strong\.$
Flags: enabled, regular expression, keep evaluating, SUBSTITUE
Send: Wee!

The substitue flag would tell that trigger, to replace match string with 'send' field. So instead of 'You are strong' we would see 'Wee!'. Of course this can be done by the script with no problem, but then colours of other triggers won't work so if i have fancy coloured line 'Big small male human says: I rock' and like to replace Big small male human with ie. the name of that player, final output would be mono-coloured so right now its not worth a shot.

Hope you understand my point :P

[Go to top] top

Posted by Norbert   USA  (61 posts)  [Biography] bio
Date Reply #1 on Mon 20 Sep 2004 09:55 AM (UTC)

Amended on Mon 20 Sep 2004 10:07 AM (UTC) by Norbert


   match="You are strong."

This omits what 'You are strong.' from the output and then sends Wee! to the output instead.
You can also adjust the color that it appears on the screen by using 'Change colour and style to:' in the edit trigger window.


-Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens
It's a dumb question... skip it.
[Go to top] top

Posted by Lisev_   (2 posts)  [Biography] bio
Date Reply #2 on Tue 21 Sep 2004 05:46 AM (UTC)
You didn't read carefully.

I wrote, colour of OTHER triggers.

If ie. i have a trigger that changes colour of word 'strong' into red. And i would like to substitue words 'You are' into 'Wee!', The line 'You are strong' would be monocoloured (as set in that replacement trigger) and trigger that matches and changes colour of word 'strong' has zero effect in that case since whole line is omited from output by substitute trigger and generated by it.

[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #3 on Tue 21 Sep 2004 06:21 AM (UTC)
There is plenty of other problems that come into play. How would you match? What happens if you wanted to match using color? (so you can distinguish colors) what happens if there is a color change in the middle of a word? (is [Blue]Te[Red]st the same as [Blue]Test?)

Search the forums for this, youll see it come up dozens of times. And you can read all the issues with implimenting it as well.


Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] 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.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]