|
Mythprod Beginner
Joined: 09 Sep 2005 Posts: 11
|
Posted: 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.
|
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Thu Sep 29, 2005 10:46 pm |
You can use the #SAYPROMPT command and %ansi() function to accomplish that.
|
|
|
|
Mythprod Beginner
Joined: 09 Sep 2005 Posts: 11
|
Posted: 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.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
|
|