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
cosine_omerta
Wanderer


Joined: 14 Oct 2007
Posts: 50

PostPosted: Mon Dec 08, 2008 10:44 am   

New alias formatting
 
I used to have a simple alias used for keys called dokey. It consisted of:
take %1
unlock %2 %3
drop %1
open %2 %3

So that when you typed in dokey key door e, it would take key, unlock door e, etc. Well now when I try to use it with cMud, it tries to take key door e, instead of just the first variable. The other parts work fine but the first line isn't working properly. So I wanted to try to use the new $variable aliases in cMud, but the help file is confusing and I don't see how to use multiple local variables.

If anybody could tell me how to fix the %%'s or how to use the new alias function to work the way I want I would appreciate it. Thanks.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Dec 08, 2008 12:13 pm   
 
Adjust the options for the alias by turning off "Auto append" and making sure "Parse arguments" is on. This will correct the problem.

An example of how to setup the alias to use local variables is
Code:
<alias name="dokey" id="11">
  <value>take $key
unlock $door $dir
drop $key
open $door $dir</value>
  <arglist>$key,$door,$dir</arglist>
</alias>
Simply paste that into the XML table of your existing alias then click Save Changes. You can then go to the script tab to see where everything goes.
_________________
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 » 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