Tavon2005-02-01 01:47:53
So I finally sprang for zMud. So I finally decided to make a curing system. I need help now... Here's what I have.
#ALIAS pennyroyal {
 outr pennyroyal
 eat pennyroyal
 #var eatingherb 1
 #alarm +1 {
  #if (@eatingherb=1) {
   #var herbbalance 1
   #var eatingherb 0
   #if @stupidity=1 {herbs}
   }
  }
 }
#TRIGGER {^You eat a (*).$} {
 #if (%1="sparkleberry") {
  #if (@eatingberry=1) {
   #var berrybalance 0
   #var eatingberry 0
   #var ateberry 1
   }
  } {
  #if (@eatingherb=1) {
   #var herbbalance 0
   #var eatingherb 0
   #var eatenherb 1
   }
  }
 }
The problem here is that when I eat the pennyroyal, it's not resetting eatingherb to 0. What's the problem?
CODE
#ALIAS pennyroyal {
 outr pennyroyal
 eat pennyroyal
 #var eatingherb 1
 #alarm +1 {
  #if (@eatingherb=1) {
   #var herbbalance 1
   #var eatingherb 0
   #if @stupidity=1 {herbs}
   }
  }
 }
#TRIGGER {^You eat a (*).$} {
 #if (%1="sparkleberry") {
  #if (@eatingberry=1) {
   #var berrybalance 0
   #var eatingberry 0
   #var ateberry 1
   }
  } {
  #if (@eatingherb=1) {
   #var herbbalance 0
   #var eatingherb 0
   #var eatenherb 1
   }
  }
 }
The problem here is that when I eat the pennyroyal, it's not resetting eatingherb to 0. What's the problem?
Drago2005-02-01 01:51:06
Humbug, topics can just be moved you know
Go Here for my suggestion.
In case you don't, just make a trigger which is specifically for eatting pennyroyal ie: "You eat a bunch of pennyroyal" - do stuff.
Go Here for my suggestion.
In case you don't, just make a trigger which is specifically for eatting pennyroyal ie: "You eat a bunch of pennyroyal" - do stuff.
Unknown2005-02-01 08:21:28
What the hell... Tavon's got talking about pennyroyal, but the second part of the script is for sparkleberry.
Unknown2005-02-01 12:58:42
The trigger pattern "You eat a (*)." will not work for all herbs, because some of them read without "a" in front. I'd recommend making a trigger for each type of herb that can be eaten and tracking them separately. The main benefit of that (besides anti-illusion possibilities) is that you can make a failsafe to reset any afflictions that should have been cured by that particular herb and weren't. If you eat something and get a prompt immediately after, you're not really afflicted with anything that herb should have cured, right?
Tavon2005-02-01 13:09:36
Er, right. You're right. I'll take a look at that.
That trigger was more to test everything than to be the final one. Thanks for the advice though. I'm just so happy I'm finally getting this together. Maybe I won't be useless in fights anymore.
That trigger was more to test everything than to be the final one. Thanks for the advice though. I'm just so happy I'm finally getting this together. Maybe I won't be useless in fights anymore.