Dealing with those damned knight messages

by Morik

Back to Combat Guide.

Morik2005-08-30 03:48:52
Unless you sell a tinyfugue system, buying your systems for xxx cr is not worth it. You'll probably use nifty zmud multi-line triggers or stateful stuff because it really would make this much easier, and I can't do that in tinyfugue.

Oh, and I'm an open source developer. I'm quite happy to spend more time reinventing the wheel and learning along the way than pay someone something for it. tongue.gif
Morik2005-08-30 04:05:04
QUOTE(Nine Breaker @ Aug 29 2005, 11:11 PM)
Everytime you get something from the server, it is generally followed by a prompt. Example:

Flourishing a dragon-hilted claymore above his head, Shiro takes a swing at
you. Your left arm is completely sliced through, which flies through the air as
blood splurts out in a fountain at the severed shoulder joint.
2334h, 3173m, 3380e, 10p, 18110en, 18130w ex-    <--- This is the prompt.


Trouble with this is that the first line isn't anywhere near enough to tell me whether it hit me or someone else. tongue.gif
Murphy2005-08-30 04:32:46
buy mine, i'll include a complimentary version of zmud!!!
Gorokan2005-08-30 08:48:56
QUOTE(Murphy @ Aug 30 2005, 12:32 PM)
buy mine, i'll include a complimentary version of zmud!!!
175673



Which won't work.

You'll never drive Morik away from TF, never. Trust me!
Morik2005-08-30 13:28:53
QUOTE(Murphy @ Aug 30 2005, 12:32 PM)
buy mine, i'll include a complimentary version of zmud!!!
175673


Cool. can you throw in a complimentary PC laptop? My silly mac laptop doesn't run Zmud too well.

(Yeah, I have zmud. It runs on my Windows machine. That thing I use for Java development, some Visual Basic crap, and guildwars. Yup, Guildwars.)
Laysus2005-08-30 15:30:17
#tr {Flourishing a dragon-hilted claymore above} {#var knightposs 1}
#tr {you} {#if (@knightposs) {#t+ knight;#var knightposs 0}
And on prompt reset the knightposs variable is how i'd do it.
Gregori2005-08-30 15:38:42
My method is similar to Laysus' Except instead of using a variable. I turn on the trigger on the primary messages, and turn it off again on prompt.

CODE
#TRIGGER {{Cleaving|Flourishing|With a focused look|Swinging a|Swinging an|Letting|With a heavy overhand stroke|swings a|swings an|wildly jabs|With a powerful lunge|strikes at}} {#T+ youcheck} "" {case}
#TRIGGER "youcheck" {{you|your}} {#T+ parrycheck;#T+ "LC|Afflictions|deepwounds|Wound_Afflictions";#TEMP {%dh, %dm*} {#T- parrycheck;#T- "LC|Afflictions|deepwounds|Wound_Afflictions"};#T- youcheck} "" {disable}


Then I just have a folder(parrycheck) holding all the body parts as seperate triggers, wrapped and not wrapped, which tell me which area to parry. Plus a seperate folder containing the wound afflictions(Wound_Afflictions) that pretty much does the same thing.

I haven't yet had a problem with missing a parry, other than due to my just not having the primary set right. There likely is better ways to do it, but I am happy.
Soll2005-08-30 15:49:02
That method never works for me. The folder always opens after the line is received, and by then, the knight attack is usually finished. sad.gif
Shiri2005-08-30 15:58:01
Yeah, I'm trying the same thing on JAVA with #if formulae (#group s seem to be broken), but the variables change too slowly for it to work. (I cut it down to two variables, and had to ignore those people with stupid long weapons that went over a whole freaking line for the strike message (angry.gif angry.gif angry.gif) but it still didn't work.)
Thorgal2005-08-30 15:59:59
QUOTE(Gregori @ Aug 30 2005, 05:38 PM)
My method is similar to Laysus' Except instead of using a variable. I turn on the trigger on the primary messages, and turn it off again on prompt.
176017



That's the one and only, best way to do it, using variables will have the exact same result, except much slower, since you have all these triggers active.

The reason for this is, as example:

some message:

"Oogle blah you and abloogle." ... now, if abloogle is the affliction, and the message class is only enabled after "Oogle blah".. the affliction won't get tracted.

Now if you use a variable that gets set to 1 when you see "Oogle blah".. and then only accept the affliction when said variable is set to 1, the affliction won't get tracted either. Which you can test for yourself if you like.

However, the second method always has all triggers active, resulting in slowe processing, the first method doesn't, and is therefor the preferable method.
Alger2005-08-31 04:46:13
*points at his post*
Morik2005-08-31 04:57:40
QUOTE(Alger @ Aug 31 2005, 12:46 PM)
*points at his post*
176375



Yeah, but thats a really, really long function. I have this .. desire for elegance. I'll see what I can do.

But thanks though. I'll post what I determine.
Gorokan2005-08-31 05:05:51
QUOTE(Soll @ Aug 30 2005, 11:49 PM)
That method never works for me. The folder always opens after the line is received, and by then, the knight attack is usually finished. sad.gif
176027



This should be fixed if you make the trigger fire on 'prompt' instead of 'newline.' (This can be changed in a triggers Options in Zmud).

At least that's what I'm hoping. I was having the same problem, changed every to prompt last night but haven't had a chance to test it.
Alger2005-08-31 06:23:25
You called my work unelegant! I want you to show me this so-called elegant function of yours when you're done!!! NOTE: It has to be reliable, track atleast 40 different afflictions, echo alerts and be shorter than mine! *snort*
Unknown2005-08-31 10:33:25
QUOTE(Kashim @ Aug 29 2005, 09:55 PM)
Hmm. If you say it works, it works, but...

There's often a space before a newline while this catches only one of them (either space or a newline). So why does it work?
175611



You missed the + after the pattern. It captures one or more of them, so you can have a space AND a newline. If you want to be even more specific, make it match on 1 or 2... (?: |\\n){1,2}
Morik2005-08-31 12:32:19
QUOTE(Alger @ Aug 31 2005, 02:23 PM)
You called my work unelegant!  I want you to show me this so-called elegant function of yours when you're done!!!  NOTE: It has to be reliable, track atleast 40 different afflictions, echo alerts and be shorter than mine! *snort*
176413



Cool. I'll patch tinyfugue. I've been wanting to implement proper multi-line regular expressions for a while.. tongue.gif
Morik2005-08-31 12:33:55
QUOTE(morik @ Aug 31 2005, 08:32 PM)
Cool. I'll patch tinyfugue. I've been wanting to implement proper multi-line regular expressions for a while.. tongue.gif
176506



Hah. crap. I should really concentrate on passing lingustics/psychology before I patch tinyfugue. Maybe next weekend.

But yeah. Multi-line regular expressions, even limited to the last 5 lines, would really, really make matching this stuff so much nicer.

(Where I say multi-line, I mean "consider the last 5 lines as one long line with no character returns. Yup, one long string. Now, match this regular expression on it.")