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
pintofbass
Newbie


Joined: 27 May 2016
Posts: 5

PostPosted: Fri Jan 18, 2019 2:48 am   

I knew zmud 10 years ago, help learning cmud today.
 
I have been able to make some triggers work as expected but making some simple alias work has been a problem.

I need to make alias for spells like #alias mm "cast 'magic missile'"

I do that and it saves it like it would in zmud, but then when I type, mm troll, troll is not added, hence I have no target for my command.

I read the manual and it seams like I would need to make an alias not only for each command, but each command + target.

If I am missing something obvious I sure would like a hint.

PoB
Reply with quote
pintofbass
Newbie


Joined: 27 May 2016
Posts: 5

PostPosted: Fri Jan 18, 2019 3:56 am   
 
I guess this works,

#ALIAS mm($target) {cast 'magic missile' $target}

Seems more complicated then it needs to be
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Fri Jan 18, 2019 10:57 am   
 
That example is more complicated than it needs to be.
#Local variables are great, but they aren't needed unless you are actually manipulating the data in some way.
The simplest form you want would be:

#ALIAS mm {cast 'magic missile' %params}

You could use %1, but that is technically only one parameter, or %param(1), so if you had a multiword target you would need to pass it in quotes. This is easier.
_________________
Discord: Shalimarwildcat
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