Making a 'defup' alias for zMud

by Unknown

Back to Mechanic's Corner.

Tsuki2006-02-24 03:39:30
QUOTE(Razorvine @ Feb 23 2006, 08:56 PM) 261853

I'd really, really recommend setting up a command queue.


Which is .... what? unsure.gif Can't seem to find anything easily in the zmud help files that would explain, and if I go digging at random places I'll just end up confusing myself.

I know what basic aliases are, and triggers. And vaguely what macros and variables are. Other things I'm picking up bits and pieces here and there, but I either need to be pointed to something or see and understand the parts of an example. biggrin.gif

The conditional thing's almost working, which makes me happy enough.
Shorlen2006-02-24 03:52:23
I much perfer the conditionals - defense strippers (dark moon, psionics, invoke spring) don't say which one they destroy, so having the conditionals lets you set up your defences a LOT faster than with a command queue.

Mine, Tsu:

#ONINPUT "defup_trig" {defup} {
#T- (folder for alt I never play's stuff)
#t+ thingsshorlensays
reset
curesystem=on
charismaticaura=off
nowham
score
#VAR faepipe {pipe5443}
#VAR coltpipe {pipe57763}
#VAR myrpipe {pipe57834}
cps
thirdeye
nightsight
insomnia
deathsense
} "" {notrig}
#COND {^{You have recovered equilibrium.|Your mind is already linked to the strings of fate.}$} {spiritbond wolf}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond trout}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {
wield athame
nature rooting
}
#COND {^{You have recovered equilibrium.|You are already rooted.}$} {invoke red}
#COND {^You have recovered equilibrium.$} {moondance aura}
#COND {^{You have recovered equilibrium.|You are already surrounded by the moon aura.}$} {spiritbond sun}
#COND {^({You have recovered equilibrium.|You are already bonded with that totem spirit.|It must be day to bond with sun spirit.})$} {#if ("%1"="You have recovered equilibrium.") {
spiritbond monkey
#state defup_trig 9
} {spiritbond moon}}
#COND {^({You have recovered equilibrium.|You are already bonded with that totem spirit.|It must be night to bond with moon spirit.})$} {spiritbond monkey}

#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond horse}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond stag}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond squirrel}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond groundhog}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond skunk}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond snake}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {lipread}
#COND {^{You have recovered equilibrium.|You are already lipreading.}$} {self}
#COND {^{You have recovered equilibrium.|You already are a selfish bastard.}$} {nature torc}
#COND {^You have recovered equilibrium.$} {
spiritbond tree
spiritbond river
spiritbond rock
#state defup_trig 0
}
#CLASS 0


Bolded bit saves me 90 mana most of the time dry.gif

The initial stuff lets me have an alt and not need a new system, or to have two seperate .muds for my characters, who mostly want to use the same triggers/curing.
Tsuki2006-02-24 03:53:01
It works, it works!! Just didn't need the thing about already having a talisman. biggrin.gif

frenzy.giffrenzy.giffrenzy.giffrenzy.gif
frenzy.giffrenzy.giffrenzy.giffrenzy.gif

CODE

#ONINPUT "defup_trig" {defup} {invoke red} "" {notrig}
#COND {^You have recovered equilibrium.$} {invoke blue}
#COND {^{You have recovered equilibrium.|The blue chakra already burns bright within your body.}$} {deathsense on}
#COND {^{You have recovered equilibrium.|Your mind is already linked to the strings of fate.}$} {selfishness}
#COND {^{You have recovered equilibrium.|You already are a selfish bastard.}$} {nature barkskin}
#COND {^{You have recovered equilibrium.|Your skin is already covered in protective bark.}$} {moondance aura}
#COND {^{You have recovered equilibrium.|You are already surrounded by the moon aura.}$} {spiritbond squirrel}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond skunk}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond groundhog}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond trout}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond wolf}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond bear}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond stag}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond monkey}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond horse}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {spiritbond snake}
#COND {^{You have recovered equilibrium.|You are already bonded with that totem spirit.}$} {nature talisman}
#COND {^You have recovered equilibrium.$} {wield athame;nature rooting}
#COND {^{You have recovered equilibrium.|You must be on firm ground to cast that.|You are already rooted.}$} {nature torc}
#COND {^You have recovered equilibrium.$} {nightsight;thirdeye;insomnia;#state defup_trig 0}



whee.gif
Unknown2006-02-24 04:16:40
QUOTE(Shorlen @ Feb 24 2006, 01:22 PM) 261885

I much perfer the conditionals - defense strippers (dark moon, psionics, invoke spring) don't say which one they destroy, so having the conditionals lets you set up your defences a LOT faster than with a command queue.


How?
Unless you track defences - in which case wouldn't it be exactly the same as a queue that tracked defences.

The difference is that the conditional is less work but useful only for this one task. The queue is more work but useful elsewhere.

Tsuki2006-02-24 08:20:48
QUOTE(Razorvine @ Feb 23 2006, 11:16 PM) 261888

QUOTE(Shorlen @ Feb 23 2006, 10:52 PM) 261885

I much perfer the conditionals - defense strippers (dark moon, psionics, invoke spring) don't say which one they destroy, so having the conditionals lets you set up your defences a LOT faster than with a command queue.

How?
Unless you track defences - in which case wouldn't it be exactly the same as a queue that tracked defences.

The difference is that the conditional is less work but useful only for this one task. The queue is more work but useful elsewhere.

I might be wrong, but I think it's faster because the conditionals run through all of them. With mine (allow me to pause for a moment to wub.gif my new thing I finally figured out up there), if not for the pausing because you can 'invoke red' and 'nature torc' and 'nightsight' again even if you've got 'em all, I could run through and check that all those defs were up just about instantly, pausing to put up any that weren't. Really spammy, yes, but I imagine that could be worked on too. So someone Springs away a def, hit 'defup' and get it back. They try again, rinse and repeat.

Someone, do correct me if I'm wrong there, though. smile.gif
Unknown2006-02-24 12:09:59
I would like to correct you because a queue is more efficient, if you do proper defense tracking. You mark your defenses off in a string list or data record variable and then when you need to def up you simply do the following:

1. Setup a list of the defenses you want to put up.
2. Iterate through the defenses you already have up and delete them from the list of those to put up.
3. Loop through your list of defenses left to be put up and execute them one at a time as you recover balance.

That removes the extra "You already have that up."-type messages and keeps you from trying to do defenses needlessly, saving you at least a small amount of time over the conditionals. Plus, it's a lot more flexible, so you could have separate list of defenses for hanging out vs actively fighting vs fighting a certain archetype.
Xenthos2006-02-24 15:21:02
QUOTE(Tsuki @ Feb 24 2006, 03:20 AM) 261901

How?
Unless you track defences - in which case wouldn't it be exactly the same as a queue that tracked defences.

The difference is that the conditional is less work but useful only for this one task. The queue is more work but useful elsewhere.

I might be wrong, but I think it's faster because the conditionals run through all of them. With mine (allow me to pause for a moment to wub.gif my new thing I finally figured out up there), if not for the pausing because you can 'invoke red' and 'nature torc' and 'nightsight' again even if you've got 'em all, I could run through and check that all those defs were up just about instantly, pausing to put up any that weren't. Really spammy, yes, but I imagine that could be worked on too. So someone Springs away a def, hit 'defup' and get it back. They try again, rinse and repeat.

Someone, do correct me if I'm wrong there, though. smile.gif


The problem with this is, if they spring away a defence you then lose eq / balance on all the defs that allow you to use them again even when up, because it goes through the ENTIRE LIST. I have it set up so I can just do DEF, it checks my defences and my spirits (and sets flags for which ones are up and which aren't), then I can do "redef" and it only puts up the ones that are missing by inserting them into a queue and popping them out whenever I've got balance/eq (and I can delete everything from the queue immediately by hitting f12, in case something is happening).
Strakc2006-02-24 16:13:16
Then someone mind explaining... how one would use a que system?
Xenthos2006-02-24 17:04:55
It's actually pretty simple. You make a variable, then you pop and push values.

I name my queue variable... Queue, obviously, so I can #additem Queue vitality.

Then check if you have anything in Queue using numitems, and whether you have balance/eq.

A quick example (this trigger is probably best attached to your prompt, obviously):
#if (%numitems ( @Queue) and @Balance and @Equilibrium) { %pop(Queue) }

This pops out the first thing in Queue and sends it to Lusternia if something is in queue and you have balance and equilibrium. Mine's a little more complicated, I have it checking for other stuff as well.

This is in zMud, obviously.
Strakc2006-02-24 22:11:42
Interesting so all a queue is, is a string list variable with a function to use the first string in the variable?
Strakc2006-02-25 05:05:25
Also with what you've said you'd need a trigger to offest your balance and equilibrium tracking no?
Xenthos2006-02-25 05:10:33
QUOTE(Strakc @ Feb 25 2006, 12:05 AM) 262261

Also with what you've said you'd need a trigger to offest your balance and equilibrium tracking no?


In the prompt trigger, before it checks to see whether or not to pop something, you have something like:
#if (%pos( e, %7)) {#var Equilibrium 1} {#var Equilibrium 0}
#if (%pos( x, %7)) {#var Balance 1} {#var Balance 0}

That's if you are using the full prompt (including endurance and willpower). If you aren't using endurance/willpower, it's just %5... the % is the position of the "word" you're scanning, which is the ex- part of the prompt.

This is a handy thing to have ANYWAYS, even if you don't use queues.
Strakc2006-02-25 05:38:19
yea normally I use the you have recovered to trigger balance, this way might be a bit more usefull but definatly bloches up my prompt trigger
Strakc2006-02-25 19:41:45
Heh, if i might ask Xenthos, mind showing the line you catch for your prompt?