Unknown2008-04-03 23:01:57
Okay so I am using the guide to create a combat system and ran into a bit of a problem....
I have an alias that is called herbqueue and is setup just like in the guide...
But for some reason when I hit herbqueue it won't fire at all...any suggestions? Or should I just do the herbqueue off the trigger itself? Though I though that would slow it down...
Thanks.
I have an alias that is called herbqueue and is setup just like in the guide...
QUOTE
#If (@herbbalance=1 and @anorexia=0 and @asleep=0 and @stunned=0 and @aeoned=0) {#if stupidity=1 {pennyroyal} {#if @peace=1 {reishi} {#if @lovers=1 {galingale} {etc..}}}}
But for some reason when I hit herbqueue it won't fire at all...any suggestions? Or should I just do the herbqueue off the trigger itself? Though I though that would slow it down...
Thanks.
Ashteru2008-04-03 23:06:04
you don't have a @ in front of stupidity. But that might not be the problem, hm.
Unknown2008-04-03 23:23:50
I fixed that. I found out the problem...
I have asleep, stunned and anorexia variables in there but didn't have the actual variables so it wasn't able to check for them and wasn't able to proceed.
Thanks though!
EDIT: New problem...
I ran the queue and had stupidity. Was trying to make sure no other bugs were present before I continued with the system and it looped outr pennyroyal eat pennyroyal till it kicked me out of Zmud...
My alias for pennyroyal is the same as in the guide...
"pennyroyal" ->
outr pennyroyal
eat pennyroyal
herbbalance=0.5
#alarm +1 {
#if @herbbalance="0.5" {
herbbalance=1
#if @stupidity=1 {herbqueue}
}
}
I just took out #if @stupidity=1 {herbqueue} hoping that will fix it...any suggestions?
I have asleep, stunned and anorexia variables in there but didn't have the actual variables so it wasn't able to check for them and wasn't able to proceed.
Thanks though!
EDIT: New problem...
I ran the queue and had stupidity. Was trying to make sure no other bugs were present before I continued with the system and it looped outr pennyroyal eat pennyroyal till it kicked me out of Zmud...
My alias for pennyroyal is the same as in the guide...
"pennyroyal" ->
outr pennyroyal
eat pennyroyal
herbbalance=0.5
#alarm +1 {
#if @herbbalance="0.5" {
herbbalance=1
#if @stupidity=1 {herbqueue}
}
}
I just took out #if @stupidity=1 {herbqueue} hoping that will fix it...any suggestions?
Ashteru2008-04-03 23:40:21
You don't set the herbbalance in a trigger for eating the herb to 0, do you? It will always see herbbalance at 0.5, set it to 1 and run the queue resulting in a loop.
Unknown2008-04-04 00:04:53
QUOTE(Ashteru @ Apr 3 2008, 04:40 PM) 499313
You don't set the herbbalance in a trigger for eating the herb to 0, do you? It will always see herbbalance at 0.5, set it to 1 and run the queue resulting in a loop.
Umm...probably not. I'm just following the guide. I took out the #if @stupidity=1 {herbqueue} thing and it stopped looping.
Thanks for the help though I appreciate it.
Ashteru2008-04-04 00:09:25
Don't take it out. Just set the herbbalance to 0 on eating * herb, then to 1 when you get it back, that should do.
Unknown2008-04-04 23:33:17
If you get problems like "my queue" doesn't fire, (I had that a lot when I was writing a system), the best thing you can do is look at the conditions that must be passed in order for the queue to fire. If you have something like, "if(@aeon=0) {herbqueue}, for example. One of these might be set to 1 without you knowing, or you might have forgotten to create one of the variables, or all sorts of other things. Add a print statement to the first line of your herbqueue trigger (not inside the if), and have it print out the value of every variable that must be passed in order for the queue to fire. Things like a simple misspelling can be causing your queues to fire, or maybe you wrote a check wrong and instead of checking to see if a variable is 1 or 0, it actually sets it to that number, causing it to always set to true or false.
Another thing, if you want to try and protect yourself against illusions...
In your "eat" alias, set your herbbalance to something like 2, and make a "tryingherb" variable, and set it to 2. Then have an alarm, for however long herbbalance is, that sets balance back to 1 and trying back to zero. Then in your lines that say something like, "you eat whatever herb", set the trying to zero, and the ate to 1, and the balance to 0, but ONLY if the trying already equaled 1. By doing this, you can protect yourself against illusions that try to make it look like your eatings herbs you aren't, because your system will know if you even tried to eat that herb to begin with.
Another good idea to add a second trigger state (you can read about those in the zmud help files), that checks to see if you actually cured something. If you eat an herb or drink something (as long as it isn't something with a delayed cure, but those are pretty easy to figure out), if the very next line is your prompt, you need to set every affliction curable by that herb to zero, because you obviously don't have it, and someone has illusioned you or your system got confused. This way you only waste balance 1 instead of your system getting in an infinite loop.
Another thing, if you want to try and protect yourself against illusions...
In your "eat
Another good idea to add a second trigger state (you can read about those in the zmud help files), that checks to see if you actually cured something. If you eat an herb or drink something (as long as it isn't something with a delayed cure, but those are pretty easy to figure out), if the very next line is your prompt, you need to set every affliction curable by that herb to zero, because you obviously don't have it, and someone has illusioned you or your system got confused. This way you only waste balance 1 instead of your system getting in an infinite loop.
Unknown2008-04-06 01:17:52
Alright I appreciate all the help. Been working on it a bit more and ran into a couple other things I can't seem to figure out...like first off...
I have it triggered for the message when you get slickness. Yet sometimes it fires...sometimes it doesn't.
Here is an example
You notice that your sweat glands have begun to rapidly secrete a foul, oily
You notice that your sweat glands have begun to rapidly secrete a foul, oily
outr calamus
eat calamus
substance.
3223h, 2600m, 3900e, 10p exkb-
You remove 1 calamus, bringing the total in the Rift to 55.
3223h, 2600m, 3900e, 10p exkb-
You eat a calamus root.
Your glands cease their oily secretion.
As you can see...the messages are exactly the same...but it didn't fire until the second time...any ideas why?
Also...
As you can see by the code...it should be using the faeleaf alias I have to cure blindness....but it is firing pennyroyal. No idea why and no idea how to solve it.
Thanks again
I have it triggered for the message when you get slickness. Yet sometimes it fires...sometimes it doesn't.
Here is an example
QUOTE
You notice that your sweat glands have begun to rapidly secrete a foul, oily
QUOTE
You notice that your sweat glands have begun to rapidly secrete a foul, oily
outr calamus
eat calamus
substance.
3223h, 2600m, 3900e, 10p exkb-
You remove 1 calamus, bringing the total in the Rift to 55.
3223h, 2600m, 3900e, 10p exkb-
You eat a calamus root.
Your glands cease their oily secretion.
As you can see...the messages are exactly the same...but it didn't fire until the second time...any ideas why?
Also...
QUOTE
You are:
blind.
outr pennyroyal
eat pennyroyal
an insomniac.
blind.
outr pennyroyal
eat pennyroyal
an insomniac.
CODE
#ALIAS herbqueue {#if (@herbbalance=1 and @aeon=0 and @stunned=0 and @anorexia=0 and @asleep=0) {#if @slickness=1 {calamus} {#if @stupidity=1 {pennyroyal} {#if @blindness=1 {faeleaf}}}}} "Curing|Herbs"
As you can see by the code...it should be using the faeleaf alias I have to cure blindness....but it is firing pennyroyal. No idea why and no idea how to solve it.
Thanks again
Ashteru2008-04-06 01:38:54
QUOTE(Black Dragon @ Apr 6 2008, 01:17 AM) 499941
Alright I appreciate all the help. Been working on it a bit more and ran into a couple other things I can't seem to figure out...like first off...
I have it triggered for the message when you get slickness. Yet sometimes it fires...sometimes it doesn't.
Here is an example
As you can see...the messages are exactly the same...but it didn't fire until the second time...any ideas why?
I have it triggered for the message when you get slickness. Yet sometimes it fires...sometimes it doesn't.
Here is an example
As you can see...the messages are exactly the same...but it didn't fire until the second time...any ideas why?
Maybe something to do with linebreaks, or if you have a blank at the end of the triggerline.
QUOTE
Also...
As you can see by the code...it should be using the faeleaf alias I have to cure blindness....but it is firing pennyroyal. No idea why and no idea how to solve it.
Thanks again
CODE
#ALIAS herbqueue {#if (@herbbalance=1 and @aeon=0 and @stunned=0 and @anorexia=0 and @asleep=0) {#if @slickness=1 {calamus} {#if @stupidity=1 {pennyroyal} {#if @blindness=1 {faeleaf}}}}} "Curing|Herbs"
As you can see by the code...it should be using the faeleaf alias I have to cure blindness....but it is firing pennyroyal. No idea why and no idea how to solve it.
Thanks again
You should try putting the things you check (ie @slickness=1 into brackets, so it's then #if (@slickness=1) {blah}). Otherwise, I'll look at it tomorrow if you can't find other help till then, it's late now.
Unknown2008-04-06 05:00:19
What Ash said, and you probably shouldn't be letting your triggers fire in the middle of your diagnose lines.
What you should do is have an alias, make it "di" or something. That alias will set a variable, call it "diagnose" and set it to 1.
Then, when the "You Are:" pops up, you have two choices. Either set a really short alarm, or set another variable, call it "diagnosing", but ONLY if your "diagnose" variable is 1. This prevents people from illusioning "you are" onto the screen, and causing all of your afflictions to reset to 0, as I assume you are doing. You need them to only reset themselves if you were the one did the diagnosis.
Then, when "you are" pops up, and if "diagnose" is equal to 1, reset all your afflictions, set them to what comes up in diagnose, then after the short alarm, fire your queue alias's, once again only if diagnose is 1. Then reset your diagnose variable to 0.
The other way, instead of using an alarm, you can have "diagnosing" set to 1, then have a check in your prompt trigger that says "if diagnosing = 1, fire queues, then set diagnose and diagnosing to 0."
What you should do is have an alias, make it "di" or something. That alias will set a variable, call it "diagnose" and set it to 1.
Then, when the "You Are:" pops up, you have two choices. Either set a really short alarm, or set another variable, call it "diagnosing", but ONLY if your "diagnose" variable is 1. This prevents people from illusioning "you are" onto the screen, and causing all of your afflictions to reset to 0, as I assume you are doing. You need them to only reset themselves if you were the one did the diagnosis.
Then, when "you are" pops up, and if "diagnose" is equal to 1, reset all your afflictions, set them to what comes up in diagnose, then after the short alarm, fire your queue alias's, once again only if diagnose is 1. Then reset your diagnose variable to 0.
The other way, instead of using an alarm, you can have "diagnosing" set to 1, then have a check in your prompt trigger that says "if diagnosing = 1, fire queues, then set diagnose and diagnosing to 0."
Unknown2008-04-06 08:33:52
The diagnose thing just sets the variables to one if the stuff is there then cures it in the order I have. Variables are only set to 0 based off the cure message. For the blind one...I have it set to do
All it pretty much is.
CODE
#TRIGGER {You are blind.} {blindness=1;herbqueue} "Afflictions
All it pretty much is.
Unknown2008-04-07 04:10:46
Okay new development...
Zmud isn't saving my variables even though I personally go in and save them...when I close it and reopen it...they are all blank instead of having 0s since I never leave the realm unless everything is cured...
Any ideas?
Thanks.
Zmud isn't saving my variables even though I personally go in and save them...when I close it and reopen it...they are all blank instead of having 0s since I never leave the realm unless everything is cured...
Any ideas?
Thanks.
Ashteru2008-04-07 07:04:15
Need to set the default values, I guess.
Rauros2008-05-26 16:52:38
I'm having a problem with my queue aliases. I've checked to make sure all the variables are created and set to default, but as soon as it goes through the first nested if, it errors and returns junk to Zmud.
Here's my herbqueue alias:
Alias: check_herbqueue #if (@herbbalance & !@anorexia & !@asleep & !@stunned & !@aeon) {#echo checking stupidity;#if (@stupidity=1) {cure_stupidity} {#if (@peace=1) {cure_reishi} {#if (@lovers=1) {cure_galingale} {#if (@slickness=1) {cure_calamus} {etc...}
I have the echo in there as a start for testing the queue to see where it's not working. I manually set slickness to 1 to check if it will try to cure it. This is what happened when I ran the alias:
check_herbqueue
{#echo
outr calamus
eat calamus
One more time?
*h, *m, *e, 10p ex-
You remove 1 calamus, bringing the total in the Rift to *.
*h, *m, *e, 10p ex-
You eat a calamus root.
You may eat or smoke another herb.
It seems to have no problems after the first #echo command, but why is it treating "{#echo" like a command?
Edit: Problem found and solved. Thanks y'all.
Here's my herbqueue alias:
Alias: check_herbqueue #if (@herbbalance & !@anorexia & !@asleep & !@stunned & !@aeon) {#echo checking stupidity;#if (@stupidity=1) {cure_stupidity} {#if (@peace=1) {cure_reishi} {#if (@lovers=1) {cure_galingale} {#if (@slickness=1) {cure_calamus} {etc...}
I have the echo in there as a start for testing the queue to see where it's not working. I manually set slickness to 1 to check if it will try to cure it. This is what happened when I ran the alias:
check_herbqueue
{#echo
outr calamus
eat calamus
One more time?
*h, *m, *e, 10p ex-
You remove 1 calamus, bringing the total in the Rift to *.
*h, *m, *e, 10p ex-
You eat a calamus root.
You may eat or smoke another herb.
It seems to have no problems after the first #echo command, but why is it treating "{#echo" like a command?
Edit: Problem found and solved. Thanks y'all.