 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Tue Dec 24, 2002 2:51 am
Need help with a trigger |
I need to add to the following alias so that it will check to see if i an stunned and if stunned wait till the stunned variable is set back to 0 before eating the cure.
kelp=1
#if (@herbbalance=1) {outb kelp
eat kelp
herbbalance=0}
Right now it will check to see if my herb balance is 1 so that I don't over eat my herbs. But when I get stunned I can't eat.
I was thinking something like this:
kelp=1
#if (@herbbalance=1 @stunned=0) {outb kelp
eat kelp
herbbalance=0}
but if I do this will it continue to evaluate the trigger until that matches. or missfire.
Not sure I am explaining this clearly. If you think you can help please post. |
|
|
 |
IceChild Magician

Joined: 11 Oct 2000 Posts: 419 Location: Post Falls, ID, USA
|
Posted: Tue Dec 24, 2002 3:00 am |
hmmm, so let me get this straight:
You need to eat your herb, but not when your stunned.
Ok, fairly simple:
#IF(@herbbalance=1 AND @stunned=0) {outb kelp;eat kelp;@herbbalance=0}
however:
why set kelp equal to 1? If you want to send
"eat 1" then you should be doing "eat @kelp" instead of "eat kelp"... I guess I'm a little confused as to the reasoning behind that potion.
Some more information as to what your exactly going for would help.
Icechild |
|
|
 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Tue Dec 24, 2002 3:10 am |
Ok here is the scenario:
Opponent stuns me followed by giving me an affliction. At this point my trigger fires to heal the affliction but I can't because of the stun. I have to wait till the stun is gone before I can cure the affliction.
I have a system in place which prevents me for eating my herbs when they will not be effective. Thats what the kelp=1 is. When I get the message "you may eat another general healing item" it sets kelp=0..
Now in the trigger you proposed if I get attacked and the stun variable is triggered. Will it keep checking for @Herbbalance and @stunned to = 0 then fire. Or will it miss because @herbalance=0 and @stunned=1.
Hope that helps. |
|
|
 |
IceChild Magician

Joined: 11 Oct 2000 Posts: 419 Location: Post Falls, ID, USA
|
Posted: Tue Dec 24, 2002 3:25 am |
Ahhh, so what your saying is, you want it to keep checking to see if you can eat it, until such time as it succeeds?
Am I reading you correctly there?
If so, what you could most likely do is the following:
#IF(@herbbalance=1 AND @stunned=0) {outb kelp;eat kelp;@herbbalance=0} {
#ALARM +2 {//insert string that triggers this here\}}
That should (when you are not stunned(@stunned=0), and your herbbalance is set to 1) trigger, and if it doesn't, it'll send the string for the trigger to be checked in another 2 seconds.
Something like that could easily work I believe.
Icechild |
|
|
 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Tue Dec 24, 2002 3:29 am |
Yes thats it.
Another question...will that work with zMUD 5.55?
and
By this :
{//insert string that triggers this here\}
Do you mean the trigger that states that I am no longer stunned? |
|
|
 |
IceChild Magician

Joined: 11 Oct 2000 Posts: 419 Location: Post Falls, ID, USA
|
Posted: Tue Dec 24, 2002 3:36 am |
1) Yes, it should work in 5.55
2) if you have a string that allows you to know when your not stunned anymore, just do this:
#IF(@herbbalance=1) {outb kelp;eat kelp;@herbbalance=0}
right in a trigger for that string... that'd be the most simple approach, then you wouldn't need the alarm portion...
I was doing the whole alarm thing based on the idea that you had no way of knowing when you became unstunned...
Icechild |
|
|
 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Tue Dec 24, 2002 3:42 am |
I do know when I become unstunned but not all classes stun. Only one. So verse this class I want it to :
Get hit (now I am stunned)
Get affliction applyed
Wait till stun is gone
Heal Affliction
This is what it does now:
Get hit (now I am stunned)
Get affliction applyed
It trys to eat herb (but can't because of stun)
Stun wears off
I still am afflicted because trigger missed due to stun.
So with this:
#IF(@herbbalance=1 AND @stunned=0) {outb kelp;eat kelp;@herbbalance=0} {
#ALARM +2 {ekelp //for eat kelp\}}
can I set the inital attack of this class to set @stunned=1...then have this wait till @herbbalance=1 and @stunned=0 before eating the herb. |
|
|
 |
IceChild Magician

Joined: 11 Oct 2000 Posts: 419 Location: Post Falls, ID, USA
|
Posted: Tue Dec 24, 2002 3:56 am |
quote:
#IF(@herbbalance=1 AND @stunned=0) {outb kelp;eat kelp;@herbbalance=0} {
#ALARM +2 {ekelp //for eat kelp\}}
If that is the "ekelp" alias/trigger, then what that will do, is keep going until @herbbalance = 1, and @stunned = 0... and it will try every 2 seconds. If that'll work for ya, than there ya have it
And yes, you could set stunned to 1, and on the wearoff of stunning, just set stunned to 0 like your saying.
Icechild |
|
|
 |
drazzen Beginner
Joined: 13 Dec 2002 Posts: 12
|
Posted: Fri Dec 27, 2002 2:05 am |
This didn't work.. Upon test this is what happened: (This is for Aetolia MUD by the way )
Got attacked (Now I am stunned)
Opponent afflicted me
Stun wears off
I never try to eat the cure for the affliction.
Here is what I have:
Trigger that sets stun variable:
With a soft hiss, (%w) launches * at you, battering you in a frenzied
Commands in this trigger:
target=%1
stunned=1
-----------------------
Trigger to set stunned variable to 0 again once it wears off:
You are no longer stunned.
Commands in this trigger:
#color 11
stand
stunned=0
--------------------------
Trigger for the stupidity affliction:
Your mind feels somewhat slower and more plodding.
Commands in this trigger:
egs
#EC (-- Press F7 --) ---> Echo set right now for when heals miss. -sigh-
-----------------------------
<Left this as it was pre-change above>
EGS (eat goldenseal) alias commands:
goldenseal=1
#if (@herbbalance=1) {outb goldenseal
eat goldenseal
herbbalance=0}
-------------------------
Question is how can I set this up so that I get stunned and afflicted and it waits till @herbalance=1 and @stunned=0 then eats the right herb to cure the affliction.
Have I setup these triggers and alias right?
Any help appreciated. |
|
|
 |
Tsylox Newbie
Joined: 21 Dec 2002 Posts: 9 Location: USA
|
Posted: Fri Dec 27, 2002 3:17 am |
I played a mud with a similar combat system. I made variables and triggers and counts, etc, to account for the herbs and afflictions and the stuns, ad hoc. To me, that became a vain attempt to right a super-inclusive, all-in-1 trigger which complicated everything beyond necessity.
In the end, the easiest thing for me was to trigger the various messages and use the appropriate cure. If I was stunned, then it wouldn't cure, but another message would be sent because the affliction remained.
So, after the stun resolved and another message was sent about the affliction, THEN the trigger fired and applied the cure. It may not be swift and sweet, but it nonetheless cured all my afflictions.
Example:
MrX connects with an uppercut and stuns you.
MrX stabs you with a poisoned tipped dagger.
> [## ## ##] -
You feel your body begin to sieze! trigger
> [## ## ##] - outb goldenseal
eat goldenseal
You are unable to do that while stunned.
"
5 seconds later
"
You are no longer stunned.
> [## ## ##] - kick MrX
You cannot do that while parylized! trigger
> [## ## ##] - outb goldenseal
eat goldenseal
You remove a root of goldenseal from your pocketbag and eat it.
You feel your limbs beginning to loosen.
> [## ## ##] -
etc. |
|
|
 |
|
|