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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Killfile
Novice


Joined: 30 Sep 2002
Posts: 32
Location: USA

PostPosted: Mon Nov 04, 2002 4:14 pm   

Optional Paramaters
 
I'm trying to write an alias to chant spells from a tome. Currently the alias allows one target

get tome container
wear tome
turn tome 1
chant %1
turn tome 5
chant %1
rem tome
put tome container

But sometimes I want to target more than one person. Idealy the alias would execute the above code when I pass it one paramater (i.e. aliasname target)... but would execute the following code if I passed it two

get tome ball
wear tome
turn tome 1
chant %1
chant %2
turn tome 5
chant %1
chant %2
rem tome
put tome ball

And in a perfect world this would be scaleable, so I could cast this on 1 target, or 10 with the same alias.

Any thoughts?


--Killfile
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Nov 04, 2002 5:17 pm   
 
#AL tome {get tome container;wear tome;turn tome 1;#LOOP 1,%numparam() {chant %param(%i)};turn tome 5;#LOOP 1,%numparam() {chant %param(%i)};rem tome;put tome container;#NOOP}

LightBulb
Senior Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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