  | 
	
	
	
		milty111 Beginner
 
  Joined: 16 Jan 2017 Posts: 19 Location: Oregon
  | 
		
		  
			
			   Posted: Mon Jan 16, 2017 5:46 am   
  Help with alias/variable   | 
			 
			
				Hi all. New to Zmud.  Have made a little progress but ran into an obstacle and hoping some kind people might help me out.
 
 
Game syntax is get itemname backpack
 
I'd like to make an alias gb where I can type gb itemname and that itemname is retrieved and also becomes a variable that I can use for selling
 
 
so like gb taco
 
 
get taco from backpack and sell it to merchant
 
 
Any help will be greatly appreciated.
 
 
sincerely,
 
Mike | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Vijilante SubAdmin
  
  Joined: 18 Nov 2001 Posts: 5187
 
  | 
		
		  
			
			   Posted: Mon Jan 16, 2017 5:58 pm      | 
			 
			
				Copy and paste into the command line and then modify it in the settings editor as needed. 
 
	  | Code: | 
	 
	
	  #CLASS Backpack
 
#VAR GetItem {} {}
 
#ALIAS gb {#IF (%1<>"") {GetItem=%1;#SEND {get %1 backpack}} {#IF (@GetItem<>"") {#SEND {get @GetItem backpack}}}}
 
#ALIAS sell {#IF (@GetItem<>"") {#SEND {sell @GetItem}}}
 
#CLASS 0 | 
	 
 
 | 
			 
		  | 
	
	
	  
		  
		    
			  _________________ The only good questions are the ones we have never answered before.
 
Search the Forums | 
			       | 
			 
		   
		 | 
	
	
		  | 
	
	
		milty111 Beginner
 
  Joined: 16 Jan 2017 Posts: 19 Location: Oregon
  | 
		
		  
			
			   Posted: Mon Jan 16, 2017 9:59 pm      | 
			 
			
				Thank you so much! Works great! Now I just need to figure out what it all means...LOL
  | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |