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


Joined: 06 Feb 2002
Posts: 5
Location: Canada

PostPosted: Wed Feb 06, 2002 11:44 pm   

Counter? IF THEN ??
 
I would like to quaff water from a container
which clears the stomach for more heal potions. I need to quaff water once for every
10 heal potions used.Could someone please help me out on this? :)


Thanks, eh!
Freeman
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 07, 2002 12:35 am   
 


#VAR V_Heal_Pot_Quaffed 10 10
#TRIGGER {You quaff a healing potion} {
#ADD V_Heal_pot_Quaffed 1
#IF (@V_Heal_Pot_Quaffed >= 10) {
drink canteen
}
}
#TRIGGER {You drink a canteen of water.} {
#VAR V_Heal_Pot_Quaffed 0
}


Concept is you add up a variable everytime
you quaff a healing potion. Then you
clear that variable when you drink the water.

I defaulted the variable to 10 so if you
log out/back in or crash it will try and
drink water as soon as possible to ensure
your stomach feels good ;)

Change the triggers to match what you really
see.

TonDiening
Uses 6.16
Reply with quote
dacheeba
Adept


Joined: 29 Oct 2001
Posts: 250

PostPosted: Thu Feb 07, 2002 12:41 am   
 
#TR {You quaff a heal potion} {#ADD quaffcounter 1;IF {@quaffcounter=10}{drink water;#VAR quaffcount 0}}
#VAR quaffcounter 0
Try that, it should do the trick :)

EDITUse TonDiening
's, if you can, its more thurough .
Reply with quote
Freeman
Newbie


Joined: 06 Feb 2002
Posts: 5
Location: Canada

PostPosted: Thu Feb 07, 2002 11:10 am   
 
TonDeining

I see the potential of your trigger suggestion. I am quite excited about it.
I tried it tonight but I could not get it to work. :( I am using Zmud 5.55 and I have never b4 used variables. I am unclear as to what part goes into the Varible window and what part is actually in the Trigger window.
I have read the through the help files and I am no clearer. Woud you mind just explaining in base language what lines and values go where? I would be your humble servant forever if I can get this to work :)

Thanks again..I can hardly wait to see this work.*wOOt*


Thanks, eh!
Freeman
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Thu Feb 07, 2002 2:52 pm   
 
I'm just turning TonDiening's script into a cut-n-pastable version:

#VAR V_Heal_Pot_Quaffed 10 10;#TRIGGER {You quaff a healing potion} {#ADD V_Heal_pot_Quaffed 1;#IF (@V_Heal_Pot_Quaffed >= 10) {drink canteen}};#TRIGGER {You drink a canteen of water.} {#VAR V_Heal_Pot_Quaffed 0}


You can just cut-n-paste that whole block into the command line.

Iljhar
Reply with quote
Freeman
Newbie


Joined: 06 Feb 2002
Posts: 5
Location: Canada

PostPosted: Fri Feb 08, 2002 10:01 am   
 
THANKS FOR ALL YOU HELP!!!!
I got it to work and managed to learn about these whacky things called variables too :)
To the 3 guys who helped with suggestions..
YOU ALL ROCK!!!


Thanks, eh!
Freeman
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