Search FAQ

Gammon Forum

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.
 Entire forum ➜ MUSHclient ➜ General ➜ Substitution

Substitution

Posting of new messages is disabled at present.

Refresh page


Posted by Lisev_   (2 posts)  Bio
Date Mon 20 Sep 2004 05:05 AM (UTC)
Message
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


Lisev
Top

Posted by Norbert   USA  (61 posts)  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

Message

<triggers>
  <trigger
   enabled="y"
   match="You are strong."
   omit_from_output="y"
   send_to="2"
   sequence="100"
  >
  <send>Wee!</send>
  </trigger>
</triggers>

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.

Norbert

-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.
Top

Posted by Lisev_   (2 posts)  Bio
Date Reply #2 on Tue 21 Sep 2004 05:46 AM (UTC)
Message
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.

Lisev
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Tue 21 Sep 2004 06:21 AM (UTC)
Message
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.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
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.


14,363 views.

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

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