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
milty111
Beginner


Joined: 16 Jan 2017
Posts: 19
Location: Oregon

PostPosted: 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
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
milty111
Beginner


Joined: 16 Jan 2017
Posts: 19
Location: Oregon

PostPosted: Sun Feb 12, 2017 12:31 pm   
 
Awesome! Very much appreciated!
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