  | 
	
	
	
		nostra Wanderer
 
  Joined: 23 May 2001 Posts: 68 Location: Sweden
  | 
		
		  
			
			   Posted: 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.  
 
 
Cheers,
 
Mikael | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Insomniac Wanderer
 
  Joined: 25 Mar 2004 Posts: 78 Location: United Kingdom
  | 
		
		  
			
			   Posted: 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! | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Insomniac Wanderer
 
  Joined: 25 Mar 2004 Posts: 78 Location: United Kingdom
  | 
		
		  
			
			   Posted: 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. | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		nostra Wanderer
 
  Joined: 23 May 2001 Posts: 68 Location: Sweden
  | 
		
		  
			
			   Posted: Fri Jun 11, 2004 7:01 pm      | 
			 
			
				Works great. Thanx :>
  | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |