|
taishar77 Newbie
Joined: 06 Dec 2008 Posts: 8
|
Posted: Tue Dec 23, 2008 4:28 am
Problems with alias variables |
Well I have tried for a while to try to figure this out so I am breaking down and asking about it. I have a MUD I play where some people use tells for ic and some for ooc. Most of us made an ooc alias for tells in zmud but I can't get the variables to read in cmud because of how they were changed? I am not sure I used to use alias otell %1 (ooc) %2 and now that no longer works. The ooc portion also has a color code attached but I figure I can worry about that later because it uses brackets {D {W etc.. for that MUD. Thanks ahead of time for anyone who can help me with this. I tried how I had it formatted above and it works minus it cuts off the actual tell so it's only picking up one word.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue Dec 23, 2008 1:33 pm |
The problem is probably that you are using %2 instead of %-2. The former grabs a single word, the latter will grab the second word and all the subsequent words. If you type the following at the command line, it should work:
Code: |
#alias otell {%1 ~(ooc~) %-2} |
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue Dec 23, 2008 1:33 pm |
The problem is probably that you are using %2 instead of %-2. The former grabs a single word, the latter will grab the second word and all the subsequent words. If you type the following at the command line, it should work:
Code: |
#alias otell {%1 ~(ooc~) %-2} |
|
|
|
|
zannai Novice
Joined: 21 Jul 2008 Posts: 41
|
Posted: Tue Dec 23, 2008 1:44 pm |
to get more than 1 word add a - between % and 2
so you might have something like this for your alias- Where %1 is the character you're sending the tell to, and 2nd parameter is the message.
#alias otell tell %1 (ooc) %-2
so at a command line you would type: otell fred Hey w'sup?
That would send tell fred (ooc) Hey w'sup? to the mud. |
|
|
|
taishar77 Newbie
Joined: 06 Dec 2008 Posts: 8
|
Posted: Tue Dec 23, 2008 5:49 pm |
zannai wrote: |
to get more than 1 word add a - between % and 2
so you might have something like this for your alias- Where %1 is the character you're sending the tell to, and 2nd parameter is the message.
#alias otell tell %1 (ooc) %-2
so at a command line you would type: otell fred Hey w'sup?
That would send tell fred (ooc) Hey w'sup? to the mud. |
Hello and thanks for the reply :) That works for the most part but cmud strips out the () on the ooc and when I go to add colorcode which is like {C({Dooc{D) {D it strips everything part of that out. Is there a way around it reading brackets as coding language? Zmud didn't but cmud does.. Thanks again. |
|
|
|
calesta Apprentice
Joined: 07 Dec 2008 Posts: 102 Location: New Hampshire, USA
|
Posted: Tue Dec 23, 2008 6:15 pm |
When Rahab responded he put the ~ character in front of the (). The ~ character is the 'escape' character in CMUD which means to not process the next character as a special character. Add that in for the () and it should work fine.
|
|
|
|
taishar77 Newbie
Joined: 06 Dec 2008 Posts: 8
|
Posted: Tue Dec 23, 2008 6:37 pm |
calesta wrote: |
When Rahab responded he put the ~ character in front of the (). The ~ character is the 'escape' character in CMUD which means to not process the next character as a special character. Add that in for the () and it should work fine. |
Oh I got it now, thanks for clarifying that and it works perfectly now.
Thanks everyone for help on this :) |
|
|
|
|
|