|
BooRadders Newbie
Joined: 06 May 2002 Posts: 0 Location: United Kingdom
|
Posted: Thu Apr 04, 2002 1:53 am
Replacing text |
Hello,
I was wondering if there was an easy way to replace main window text with other text. For example...
the MUD sends -> A large, green blob of jelly arrives and looks around.
zMUD outputs to me -> A large, green blob of jelly (Monster X) arrives and looks around.
Thanks! |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Apr 04, 2002 2:08 am |
quote:
Hello,
I was wondering if there was an easy way to replace main window text with other text. For example...
the MUD sends -> A large, green blob of jelly arrives and looks around.
zMUD outputs to me -> A large, green blob of jelly (Monster X) arrives and looks around.
Thanks!
It depends on what X is supposed to mean. If it's a count of the number of monsters, then we'll need to see sample output of how monsters are listed in the room descriptions (so we can get an initial count on which to base our incrementation).
Other than the trigger(s) for that, all you need is:
#trigger {({A|An} %*) arrives and looks around.} {#sub {%1 ~(Monster @Count~) arrives and looks around~.}}
li'l shmoe of Dragon's Gate MUD |
|
|
|
BooRadders Newbie
Joined: 06 May 2002 Posts: 0 Location: United Kingdom
|
Posted: Thu Apr 04, 2002 3:09 am |
Sorry for the confusion there, Monster X refers to the common name of the monster, not a count. So its basically replacing the text with itself and then adding (Common name of monster)
|
|
|
|
heidi Newbie
Joined: 04 May 2002 Posts: 1
|
Posted: Thu Apr 04, 2002 6:20 pm |
Try something like this:
#var LongName {large, green blob of jelly|large, blue troll}
#var CommonName {GreenGoo|BlueTroll}
#trigger {(@LongName)} {#sub {%1 ~(%item( @CommonName, %ismember( "%1", @LongName))~)}}
This seems to work for me.
El_Dickman |
|
|
|
EagleVeteran Newbie
Joined: 31 Mar 2006 Posts: 7
|
Posted: Tue Apr 04, 2006 11:34 pm Is anyone really having a system like this work? |
When I change this to my strings... it triggers but the output is garbled
|
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Wed Apr 05, 2006 12:16 am |
Try the following
Quote: |
#VAR CommonName {GreenGoo|BlueTroll}
#VAR LongName {large, green blob of jelly|large, blue troll}
#TRIGGER {({@LongName})} {#substitute %-1 {%1 ~(%item( @CommonName, %ismember( "%1", @LongName))~)}} |
Worked for me when I tested with
#say A large, green blob of jelly says hello
and zmud shows
A large, green blob of jelly (GreenGoo) says hello |
|
|
|
|
|