|  | 
	
	
		| milty111 Beginner
 
 
 Joined: 16 Jan 2017
 Posts: 19
 Location: Oregon
 
 | 
			
			  |  Posted: Thu Feb 09, 2017 11:56 pm 
 math in a variable and test value with an IF
 
 |  
				| Hey all! 
 Trying to do something a bit beyond my abilities and hoping some kind person will help me out here. Then I'll also have something to learn more from. So here goes:
 
 I want a variable named bucket which should be set to 1 for starters.
 As I fill a pot from a bucket with command "fill pot bucket" I want the variable to increment by 1 and test with an IF or something else to see if the variable is 8, which if yes would reset the variable to 1 and put the bucket into my bag.
 
 Thanks in advance.
 Mike
 |  | 
	
	  |  | 
	
		|  | 
	
		| Vijilante SubAdmin
 
  
 Joined: 18 Nov 2001
 Posts: 5187
 
 
 | 
			
			  |  Posted: Fri Feb 10, 2017 4:49 am 
 |  
				| This gives you the short command 'fbp' to do all of it. 
 #ALIAS fpb {#SEND {fill pot bucket};#ADD bucket 1;#IF (@bucket=8) {bucket=1;#SEND {put bucket bag}}}
 |  | 
	
	  | 
		    
			  | _________________ 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: Sun Feb 12, 2017 12:31 pm 
 |  
				| Awesome! Very much appreciated! 
 |  | 
	
	  |  | 
	
		|  | 
	
		|  | 
	
		|  |