Gag and Echo help

by Serrin

Back to Mechanic's Corner.

Serrin2005-12-16 02:50:46
I'm using Ethelon's free system and I'm a complete noob when it comes to scripting and such.

What I want to do is create a series of echos/gags to help me in combat.

Basically I want to gag a good portion of combat spam. Clotting messages, attacking messages, ect..

The thing is, I don't really know how to go about gagging these (I don't know the syntax that MUSH uses, and the help files suck).

How would I go about capturing something like:

Swinging a deep green rapier in an underhand arc, you strike at Lyco, who
smoothly steps away from the blow. Your rapier slashes through the air, missing
completely.

Gagging that and returning only
YOU MISS LYCO

Or:
Swinging a deep green rapier in an underhand arc, you strike at Lyco. You slash
his belly, merely scratching the flesh.

Gagging and replacing with
WEAK HIT.

And then for affliction type things like:

With a heavy overhand stroke, you slam a deep green rapier down upon Lyco. You
hack his forehead, which turns his face into a bloody mask.

Gagging and replacing with
HIT!!! SLICED FOREHEAD

Focusing on his gut, you strike at Lyco with a deep green rapier, who
brandishes an unadorned darksteel rapier. Your rapier is deflected by a flick
of the opposing rapier.

Gagged and replaced with:
THEIR GUT IS PARRIED

I'd imagine then setting up the proper gags/echos for incoming attacks wouldn't be any different really.

That's all for now, there is a lot more I'd like to do to this system but for now getting this down so I can at least tell what the heck is going on is most important.

Nyanco2005-12-16 08:00:53
To gag something you can make a standard trigger and check "Omit from output".
Replacing is just a bit more difficult because that option also hide the output of the various Note and Tell functions. So a workaround would be to pass the matched line to a script (inserting the script name near label and group) and code the output inside the script.
Strakc2005-12-16 11:03:43
you cant howerver omit multiline triggers, if you need help figuring out a way to work that, hit me up on aim and I'll help you out a bit.
Ashteru2005-12-16 23:58:08
Couldn't he substitute multilines, though, or just take the first line, substitue this one and gag the rest?
Strakc2005-12-17 03:42:19
Multi-line triggers are really hard to gag... but Its not impossble... i'll work on it a bet to see if i can help.
Ethelon2005-12-17 08:11:51
Multiline triggers are gagged by making another trigger for each line and gagging them and setting them for repeat and keep eval.