A trigger for me being lazy, but I can't get it right...

by Unknown

Back to Mechanic's Corner.

Unknown2007-08-03 16:39:36
QUOTE(Forren @ Aug 2 2007, 06:10 PM) 431079
Yeah.. if that was my trigger, I'd also check the first word of the line for being in a list of enemies.


Ooh... how would that work?

Pattern: "(%w) has been slain by (%1)"

Value:

#if (%ismember(%w, @enemies)(%1, @serens)) {cheer %1}

Is that how?
Xenthos2007-08-03 16:42:50
QUOTE(Myrkr @ Aug 3 2007, 12:39 PM) 431229
Is that how?

With all the comments about how annoying this is-- why are you still so excited about it?
Unknown2007-08-03 16:50:16
QUOTE(Xenthos @ Aug 3 2007, 12:42 PM) 431231
With all the comments about how annoying this is-- why are you still so excited about it?


Because I'm learning how things work, that's why.

No one said you have to stay on the thread, you know...
Xenthos2007-08-03 16:57:05
QUOTE(Myrkr @ Aug 3 2007, 12:50 PM) 431235
Because I'm learning how things work, that's why.

No one said you have to stay on the thread, you know...

And yet, I still have to deal with the end result-- as does everyone else around you at ANY point where ANYTHING might be dying. Thus, I'm still involved.

There are much more useful applications for this sort of thing, though. Checking a list of afflictions for curing, or checking a list of names to colour green (Serenwilde), or red (Enemy), etc.

If you really want a personal notice that someone has just done something, you could go with:
#if (%ismember(%1, @enemies) AND %ismember(%2, @serens)) {#echo Hooray to %2!}

This would give you a personal notice without annoying the Nil out of everyone around.
Unknown2007-08-03 17:05:13
QUOTE(Xenthos @ Aug 3 2007, 12:57 PM) 431239
This would give you a personal notice without annoying the Nil out of everyone around.


It isn't meant to annoy everyone...

... it's supposed to cheer them on for doing a good job... unsure.gif
Xenthos2007-08-03 17:09:55
QUOTE(Myrkr @ Aug 3 2007, 01:05 PM) 431242
It isn't meant to annoy everyone...

... it's supposed to cheer them on for doing a good job... unsure.gif

Yeah. It's "supposed" to. I said a bit earlier, however, that the end result is that it *will* annoy everyone, intended or not.

Doing things using it to learn is fine, but the trigger itself... is just not going to be beneficial for you or anyone around you.

Do you have a queue or prompt triggers yet, by the way? Those would seem much better ways to get into "basic triggering," since they allow for a heck of a lot more options and can just build off of them (queues allow for auto defence raising, auto-pickup, and on and on, very simply. Prompt trigger allows for healing-- health, mana, bromides, and afflictions beyond that). Both of these can utilize %ismember, and definitely utilize #if (a thing you were looking for practice with).
Unknown2007-08-03 17:12:42
QUOTE(Xenthos @ Aug 3 2007, 12:57 PM) 431239
#if (%ismember(%1, @enemies) AND %ismember(%2, @serens)) {#echo Hooray to %2!}


So you're away, it'd have to be %ismember(%3, @serens) because %2 would reference something alphanumeric, at which point I'd be cheering on my enemy. o_o

Or at least that's how it executed when I had an illusionist help me.
Xenthos2007-08-03 17:14:46
QUOTE(Myrkr @ Aug 3 2007, 01:12 PM) 431244
So you're away, it'd have to be %ismember(%3, @serens) because %2 would reference something alphanumeric, at which point I'd be cheering on my enemy. o_o

Or at least that's how it executed when I had an illusionist help me.

Not if your trigger is set up as:
Pattern: "(%w) has been slain by (%w)"
(Note: the second is not a %1, as you had put up earlier).

% in the value pulls from the fields within the patterns. %1 pulls from the first %w, %2 pulls from the second.

Edit: And if you missed it while making that post, please read the post above yours.
Unknown2007-08-03 17:17:22
QUOTE(Xenthos @ Aug 3 2007, 01:09 PM) 431243
Do you have a queue or prompt triggers yet, by the way?


Lemme see... I have something to cure dizziness, crotamine, asthma, broken limbs, cleared-up insomnia, sprawled on the ground, bleeding (clot trigger, not chervil), haemophilia... that's it so far.

Edit: I didn't miss your other post. tongue.gif
Xenthos2007-08-03 17:19:38
QUOTE(Myrkr @ Aug 3 2007, 01:17 PM) 431246
Lemme see... I have something to cure dizziness, crotamine, asthma, broken limbs, cleared-up insomnia, sprawled on the ground, bleeding (clot trigger, not chervil), haemophilia... that's it so far.

Edit: I didn't miss your other post. tongue.gif

Okay, so it looks like you're going at the curing thing a bit backwards.

Prompt first! From the prompt comes all good things.

(By which I mean-- your life will be much easier!)
Unknown2007-08-03 17:20:42
QUOTE(Xenthos @ Aug 3 2007, 01:19 PM) 431248
Okay, so it looks like you're going at the curing thing a bit backwards.

Prompt first! From the prompt comes all good things.

(By which I mean-- your life will be much easier!)


Backwards? :: Blink. ::

How am I goin' backwards? :: Confused. ::
Xenthos2007-08-03 17:24:09
QUOTE(Myrkr @ Aug 3 2007, 01:20 PM) 431249
Backwards? :: Blink. ::

How am I goin' backwards? :: Confused. ::

Once you have a basic prompt trigger down, you can tie things to that prompt trigger. First, you can tie health and mana checks to it (curing health and mana, but primarily health, is an essential trigger-- more so than curing haemophilia, imo). After that, you can also tie in other aliases to the prompt trigger if you want-- for example, an alias that checks you for herb-curing afflictions and eats an herb.

It allows you to build and utilize an herb queue, a salve queue, a potion queue, and any number of generic queues for anything else you'd like (for example:
You have slain a large rat.
A diamond tumbles to the ground!
A key tumbles to the ground!
A rat fur tumbles to the ground!

With some simple #additem triggers, you could make your queue do:
get rat
get diamond
get key
get rat fur
Once you've gotten balance back, no need for any typing on your part.
Unknown2007-08-03 17:34:35
QUOTE(Xenthos @ Aug 3 2007, 01:24 PM) 431250
It allows you to build and utilize an herb queue, a salve queue, a potion queue, and any number of generic queues for anything else you'd like (for example:
You have slain a large rat.
A diamond tumbles to the ground!
A key tumbles to the ground!
A rat fur tumbles to the ground!

With some simple #additem triggers, you could make your queue do:
get rat
get diamond
get key
get rat fur
Once you've gotten balance back, no need for any typing on your part.


o-o ... so... that's... like...

Pattern: "You have slain (%w)"

Value:
#wait 2500
#if (%ismember(%w, @rat)) {ratstuff}

With @rat = a baby rat|a young rat|a rat|an old rat|a black rat
With ratstuff = get rat, get diamond, get key, get rat fur

?
Xenthos2007-08-03 17:37:59
QUOTE(Myrkr @ Aug 3 2007, 01:34 PM) 431252
o-o ... so... that's... like...

Pattern: "You have slain (%w)"

Value:
#wait 2500
#if (%ismember(%w, @rat)) {ratstuff}

With @rat = a baby rat|a young rat|a rat|an old rat|a black rat
With ratstuff = get rat, get diamond, get key, get rat fur

?

Except a heck of a lot more efficient. #wait shuts down your triggers, and #alarms are a stop for a set length of time (given lag bubbles, not what you want).

A queue will fire off the moment your prompt line comes to you after regaining balance and/or equilibrium (or herb balance, or salve balance, or whatever).

It does have issues when Blacked Out, but it's VERY useful in nearly every circumstance.
Xenthos2007-08-03 17:40:37
As an example, you could use something like a @Loot variable.

You have slain a rat.
#additem Loot a rat
Wooden key tumbles to the ground!
#additem Loot Wooden key
A diamond tumbles to the ground!
#additem Loot a diamond


Inside the prompt trigger:
#if (@Balance AND @Equilibrium AND %numitems(@Loot)) {%pop(@Loot)}
(Don't have access to the zMud syntax right now, so this is off the top of my head-- but it's something like this.)
Unknown2007-08-03 17:52:01
QUOTE(Xenthos @ Aug 3 2007, 01:40 PM) 431254
Inside the prompt trigger:
#if (@Balance AND @Equilibrium AND %numitems(@Loot)) {%pop(@Loot)}
(Don't have access to the zMud syntax right now, so this is off the top of my head-- but it's something like this.)


So, pop would only take off rat from the list after executing it, and then the key, and then the diamond?

Or would it only take off the rat?

And what would @Balance be? You have recovered balance on all limbs|You have recovered balance on your right arm|You have recovered balance on your left arm|You have recovered balance on your left leg|You have recovered balance on your right leg ?

And @Equilibrium would be... You have recovered equilibrium?
Malarious2007-08-03 18:16:50
In case I missed it.. I would find righteous justice if this trigger caused you to die in choke/aeon because instead of any type of curing.. this went off and screwed you.

Just pointing out that it could happen... I cant comment on most of the rest too tired.. I will return though!
Xenthos2007-08-03 18:34:50
QUOTE(Malarious @ Aug 3 2007, 02:16 PM) 431261
In case I missed it.. I would find righteous justice if this trigger caused you to die in choke/aeon because instead of any type of curing.. this went off and screwed you.

Just pointing out that it could happen... I cant comment on most of the rest too tired.. I will return though!

You generally wouldn't have actions popping into your queue in the middle of a fight in choke, assuming you have it set up right (note that this is a very, very basic Queue trigger. Doesn't check afflictions, doesn't check for any kind of a system pause. I even left out the "get" bit.) You would use this sort of queue for general things (deffing, for example, or picking things up), not for mid-fight stuff, and for a "professional / very used" system you'd flesh it out a bit!

Pop takes off one thing at a time. That's what the #numitems part of the #if is for-- every time you do an action, you'll get another prompt. Each prompt will pop off the next thing, assuming you still have equilibrium and balance!

(The best way to check for equilibrium and balance are actually to poll the prompt itself. For example:
#if (%pos( e, %7)) {#var equilibrium 1} {#var equilibrium 0}
If your prompt trigger is set up to contain 7 items (full prompt), this will poll the last bit (the exk- part) for an e. If it's found, it sets equilibrium to 1. If not, it sets it to 0. This means you don't have to track regaining and losing it on each attack-- the prompt itself lets you know your status.
Malarious2007-08-03 19:11:23
Nah I meant her cheer trigger while in aeon or choke