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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Othinn
Newbie


Joined: 09 Apr 2007
Posts: 3

PostPosted: 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?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

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


Joined: 25 Mar 2003
Posts: 1113
Location: USA

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


Joined: 09 Apr 2007
Posts: 3

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


Joined: 09 Apr 2007
Posts: 3

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

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


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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