Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
BooRadders
Newbie


Joined: 06 May 2002
Posts: 0
Location: United Kingdom

PostPosted: 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!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
BooRadders
Newbie


Joined: 06 May 2002
Posts: 0
Location: United Kingdom

PostPosted: 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)
Reply with quote
heidi
Newbie


Joined: 04 May 2002
Posts: 1

PostPosted: 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
Reply with quote
EagleVeteran
Newbie


Joined: 31 Mar 2006
Posts: 7

PostPosted: 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
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net