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
Mythprod
Beginner


Joined: 09 Sep 2005
Posts: 11

PostPosted: Thu Sep 29, 2005 10:22 pm   

appending a string onto a line from the mud
 
When I receive a description I want to be able to append a name (one word) onto that string from the mud. I can use the #echo command to put it on the line following the triggered pattern but I'd like it to just go on the end of that line. Would the #SUB be the easiest / best way to accomplish this? I'd also like to #color the name so it stands out from the default green.
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Thu Sep 29, 2005 10:46 pm   
 
You can use the #SAYPROMPT command and %ansi() function to accomplish that.
Reply with quote
Mythprod
Beginner


Joined: 09 Sep 2005
Posts: 11

PostPosted: Thu Sep 29, 2005 11:28 pm   
 
Hrmm ... it's kind of the right idea although it starts it on a new line and then starts the next line right next to it. I want the name to appear immediately after the trigger pattern.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Sep 30, 2005 2:35 am   
 
Use #SUBSTITUTE, or possibly #PSUB. With #SUBSTITUTE, you need to provide or reconstruct the entire line plus whatever you want to add into it. #PSUB allows you to substitute specific parts so as long as you can capture like the punctuation or the last word.
_________________
EDIT: I didn't like my old signature
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Sep 30, 2005 8:34 am   
 
I would use a trigger of
#TRIGGER {(?)$} {#PSUB {%1 %ansi(somecolor)name} %x1}

It is just a matter of turning it off and on during description lines.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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