English
Chinese
  yTin Online Help  

  Home (english) | Home (chinese) | Downloads | Sample scripts | Online help | Utilities | FAQs | Discussions/Messages | Mud&links | My Progs | Mirrors |
substitute

format:            #substitute [{text}] [{new text}]

The [] signify optional arguments.

Allows you to replace original text from the mud with different text, or
delete it altogether.   This is helpful for if you have a slow modem, or
there is a lot of text sent during battles, and the like.   the %0-9
variables can be used to capture text and use it as part of the new output,
and the ^ char is valid to only check the beginning of the line for the
text specified.

If a . is the only character in the new text argument, if the line is
matched, it will be deleted.

If only one argument is given, all subs that match the string are displayed.
The * char is valid in this instance.   See help wildcard.

If no argument is given, all subs are displayed.

examples:
#sub {leaves} {.}
gag any line that has the word 'leaves' in it.
#sub {^Zoe%0} {ZOE%0}
any line that starts with the name Zoe will be replaced by a line that
starts with 'ZOE'
#sub {%0massacres%1} {%0MASSACRES%1}
replace all occurrences of 'massacres' with 'MASSACRES'

See also: #gag, #action, #presub