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


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: Fri Jun 11, 2004 6:25 pm   

Simple alias question..
 
Hi everyone,

I have written a small healing script and made an alias (healon) to kick it off.. Now I would like to add a person to heal and I therefor wonder if it's possible to have an alias like this:

healon player1

where "player1" would be the person I want to heal.

Question is: (if it's possible at all), how do I tell zMud that the word after "healon" should be stored in a @variable (which would be used in my healing script)?


If this is possible it would be a quick way to kick of a script and tell what person it should be directed at. Smile

Cheers,
Mikael
Reply with quote
Insomniac
Wanderer


Joined: 25 Mar 2004
Posts: 78
Location: United Kingdom

PostPosted: Fri Jun 11, 2004 6:42 pm   
 
To answer your question...

#ALIAS healon {#VAR PersonToHeal %1}

Then you'd just reference it for whatever you need to do ie.

cast heal @PersonToHeal

heal @PersonToHeal

transfer @PersonToHeal right arm

Whatever your mud uses!
Reply with quote
Insomniac
Wanderer


Joined: 25 Mar 2004
Posts: 78
Location: United Kingdom

PostPosted: Fri Jun 11, 2004 6:48 pm   
 
Also, if you're wanting to have it so that 'healon' with no options heals yourself, and healon with someones name on it heals them, you're wanting something like this....

#ALIAS healon {#IF (%1) {#VAR PersonToHeal %1;cast heal @PersonToHeal} {cast heal self}}

The above is for example only, you'll have to edit the commands needed to heal which are specific to your Mud.
Reply with quote
nostra
Wanderer


Joined: 23 May 2001
Posts: 68
Location: Sweden

PostPosted: Fri Jun 11, 2004 7:01 pm   
 
Works great. Thanx :>
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