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
Flow
Newbie


Joined: 12 Dec 2003
Posts: 8

PostPosted: Fri Dec 12, 2003 11:33 pm   

Queues (Achaea)
 
Well currently my triggers just check if i have herb balance, eat the herb if i do, or #echo what herb i need to eat if not. What i'm looking for is a beginner's [:I] guide to making queues and priority. Could someone give me a hand?
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Sat Dec 13, 2003 4:06 am   
 
You'd need some examples from your mud, flow. Like text for when to take off from the queue, when to put on etc.
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Sat Dec 13, 2003 4:19 am   
 
This is a very basic sort by importance way. Not sure what all you are looking for.

#VAR HerbImportance (herb1|herb2|herb3|herb4}
#ALIAS EatHerb {#FORALL @HerbImportance {eat %i}


just type: EatHerb and it will loop through the string list and "eat" (don't know what command you use) an herb of each type.
Reply with quote
Flow
Newbie


Joined: 12 Dec 2003
Posts: 8

PostPosted: Sat Dec 13, 2003 11:16 am   
 
OK - this is what i have

Variable: herbbalance
Trigger: Pattern: You may eat another plant. Value: #CW high,green #VAR herbbalance true
Trigger: Pattern: (affliction message) Value: #CO 1245 #IF(@herbbalance) {outr ash; eat ash; #VAR herbbalance false} {#ECHO You need to eat ash!}

Currently the settings on that las trig don't seem to set the variable to false though, so could someone help with that as well.
Reply with quote
Flow
Newbie


Joined: 12 Dec 2003
Posts: 8

PostPosted: Sat Dec 13, 2003 11:25 am   
 
When i get the affliction message, it eats the herb when herbbalance is true, it just doesn't seem to set it to false Sad
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Sat Dec 13, 2003 2:40 pm   
 
Part of the problem may be using "true" and "false" for your herbbalance. These are treated as strings and not boolean. I'd suggest using 0 for false and 1 for true instead.

Also, you'll probably want to only set the herbbalance to 0 when you actually eat the herb and not just when you try to eat it. This is a problem with many systems.

Larkin
Reply with quote
Flow
Newbie


Joined: 12 Dec 2003
Posts: 8

PostPosted: Sat Dec 13, 2003 5:16 pm   
 
Now what i have: Variable: herbbalance
Trigger: Pattern (affliction message) Value: #CO 1245
#IF (@herbbalance) {outr ash; eat ash} {#ECHO You need to eat ash!}
Trigger: Pattern: You eat a piece of *****ly ash. Value: #VAR herbbalance 0
Trigger: Pattern: You may eat another plant. Value: #VAR herbbalance 1

This seems to work... Anyone see any probs?
Reply with quote
Flow
Newbie


Joined: 12 Dec 2003
Posts: 8

PostPosted: Sat Dec 13, 2003 5:19 pm   
 
or should it be

#IF (@herbbalance=1) {outr ash; eat ash} {#ECHO You need to eat ash!}


(the =1 part)
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Sat Dec 13, 2003 7:00 pm   
 
#IF (@herbbalance) will just check to see if there is ANYTHING in the variable. If the value isn't null it will run the true portion of your if check. Try using ToeTag's example and see how it works.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Dec 14, 2003 6:11 am   
 
Not quite true. If @herbbalance is 0 the FALSE portion will be run.
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