|
Othinn Newbie
Joined: 09 Apr 2007 Posts: 3
|
Posted: Tue Apr 10, 2007 5:01 am
an alias question |
It use to be that in Zmud you could use %0 to add thing after a command for example:
alias gooc
command gdt -(ooc)- %0
and youd use it gooc blah blah and it would then send to guildtalk gdt -(ooc)- blah blah
but in Cmud I tried that but it results in that it actually send just %0 after the gdt -(ooc)-
whats the command and how do I do that in CMUD? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Tue Apr 10, 2007 9:40 am |
You are looking for %-1 or %params either will work. Personally, I prefer the latter.
As an aside, %0 was a curious zMUD artifact that worked even though it wasn't supposed to. In other words it was a bug that became widely used. |
|
_________________ Asati di tempari! |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Tue Apr 10, 2007 11:33 am |
You can also create the alias with the option enabled to pass on the unused arguments to the MUD, and it will have the same effect as putting %-1 or %params at the end of your text.
|
|
|
|
Othinn Newbie
Joined: 09 Apr 2007 Posts: 3
|
Posted: Tue Apr 10, 2007 5:18 pm |
well.... I tried the first suggestion...
%-1 resulted in : Spearhawk tells the group '-=(ooc)=- %-1'.
%param resulted in : Spearhawk tells the group '-=(ooc)=- %param'.
Its like its not capturing what im writing and adding that but merely puts the test in the alias as its written... |
|
|
|
Othinn Newbie
Joined: 09 Apr 2007 Posts: 3
|
Posted: Tue Apr 10, 2007 5:37 pm |
I figured out what was wrong...
your not allowed to use either - or ( or = in the alias. it will not react then on the %-1 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Apr 10, 2007 6:25 pm |
That's a good point - if the alias won't compile (which it won't with unmatched special characters like this) it'll send special variables verbatim. Try this:
#alias gooc {gdt "-=(ooc)=-" %-1}
In future, try having a look at the Compiled Code tab and see if your alias has compiled properly. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Tue Apr 10, 2007 7:13 pm |
Othinn wrote: |
well.... I tried the first suggestion...
%-1 resulted in : Spearhawk tells the group '-=(ooc)=- %-1'.
%param resulted in : Spearhawk tells the group '-=(ooc)=- %param'.
Its like its not capturing what im writing and adding that but merely puts the test in the alias as its written... |
%param didn't work because the it's actually %params. However the post about quotes still holds true, especially at the command prompt. Anything between double quotes are treated as literals and are not evaluated any further. |
|
_________________ Asati di tempari! |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Apr 10, 2007 9:23 pm |
Quote: |
%0 was a curious zMUD artifact that worked even though it wasn't supposed to.
|
It had an actual use in ZMud, but probably wasn't as narrowly focused as it should have been. Or perhaps even Zugg took advantage of the bug (it sort of depends on which feature came first), knowing that in ZMud he probably would never be able to actually fix it.
#MXPTRIG allows you to reference the text between a tag using %0 if you used the closing tag, I think, whereas triggering on the other tag would only expose the attributes of the tag. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|