Dealing with those damned knight messages

by Morik

Back to Combat Guide.

Morik2005-08-29 14:58:28
I'm looking for some basic ideas for implementing decent weapon affliction tracking. The wrapping is pissing me off. How do others do it?
Amaru2005-08-29 15:00:23
System ====================> 900cr.
Unknown2005-08-29 15:11:57
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.

This is basically what I do. I first get all the lines there are that knights use that signifies that they are attacking you examples include:

With a focused look, Shiro strikes at you with...
With a heavy overhand stroke, Shiro slams.....
With a powerfule lunge, Shiro strikes at you with....

And so on.

You need to make your system recognize these as the starter class. Basically, the moment one of these lines are shown, you have to catch everything under that, until you reach the prompt. Once you reach the prompt, you tell your system to stop capturing it, or else you will never see anything come on your screen again.

For me, I store whatever I caught into a variable (depends on what client you use. I think zMud has a stringlist or something like that?). I then basically regmatch the variable to see where I would have to parry, deepwound heal, or cure for afflictions. Example:

(cuts|hacks|slashes|strikes) your (left|right) (arm|leg), striking a major artery which splurts blood in all directions

If this statement is in my variable, it means I am going to parry one of my extremities (it will recognize which one was hit), cure for deepwound and also eat a yarrow to stop the bleeding.

This is how I do it. Weapon name length doesn't matter to me by using this technique. Much love to Elaria for giving me the idea and Razyx for bug crushing.
Murphy2005-08-29 15:12:29
System ==========> 100 CR, and mine has been done properly and hours spent fighting other knights is just about every possilbe situation, not some half baked job like 'ru!

PS I'm joking there about amaru's system, i haven't seen him miss a cure for some time.
Unknown2005-08-29 15:15:27
If you have credits to burn I'd personally reccommend Murphy's or Thorgal's system. I'd pick Murphy's solely for the entertainment purpose though.

The only problem about other people's systems is that it may be difficult to get used to. If you want to customize it to fit your own liking, it may be hard, as trying to read other people's code is generally not an easy task. (Unless it is documented very well.)
Unknown2005-08-29 15:16:41
Nine_Breaker, what about if you get two messages without prompt between them? (Does that ever happen?). Or four (haymaker?).
Unknown2005-08-29 15:18:55
QUOTE(Kashim @ Aug 29 2005, 10:16 AM)
Nine_Breaker, what about if you get two messages without prompt between them? (Does that ever happen?). Or four (haymaker?).
175234



For knight attacks, I don't think I have gotten two messages without prompt between them. As for a haymaker... I didn't take that into consideration. xD
Thorgal2005-08-29 17:58:21
I'd advertise my system, but since everyone already knows it's far superior to anything else daring to call itself a system, I'll just give advice.

Just make a class called "afflictingstuff".. and have your prompt triggered to #t- afflictingstuff.

Then trigger the messages you already had:

With a focused look, Shiro strikes at you with...
With a heavy overhand stroke, Shiro slams.....
With a powerfule lunge, Shiro strikes at you with....

..to #t+ afflictingstuff.

Now you trigger the wounding lines, using an as short as possible pattern (all placed within the class afflictingstuff), to set your afflictions, preferably without using #if statements.

Example:

pattern -> * your (*) (*), striking a major artery

value -> artery%1%2=1

- which will for example set the variable @arteryleftleg to 1.

or, depending how you queue:

value -> #additem herbafflictions %1%2artery

- which will for example add leftlegartery to the stringlist @herbafflictions.

Like that you can easily and effectively capture all knight afflictions, you can add hexes and venoms into the class as well.
Unknown2005-08-29 18:00:50
That's what I have currently and it has its flaws.
For example, when the location/part of afflict message is in the first line.
Thorgal2005-08-29 18:02:25
Shaddap, none of its flaws can weigh up against its awesomeness! The affliction pattern only ever appears on the first line when the weapon name is very short and they're using regular jabs or swings.

So if you're getting hit a lot by random jabs and swings, just diagnose, having all the knight affliction triggers always active will just slow your system down, I always say: "Don't have triggers active when they don't have to be active!"
Unknown2005-08-29 18:34:40
Pah, I'd think you're the one striving for the perfect system, and you just agree it's fallible and neglect it. tongue.gif
Thorgal2005-08-29 18:39:55
Wish you good luck finding a better way, because there just plain.. isn't one. tongue.gif
Unknown2005-08-29 18:46:42
QUOTE(Thorgal @ Aug 29 2005, 01:02 PM)
So if you're getting hit a lot by random jabs and swings, just diagnose, having all the knight affliction triggers always active will just slow your system down, I always say: "Don't have triggers active when they don't have to be active!"
175303



I have all mine active and it's blazing fast. Just don't use zMUD. biggrin.gif
Alger2005-08-29 19:55:08
you guys can advertise your systems but Morik is a TF user hehe.
Alger2005-08-29 19:59:59
Heres part of my warrior tracker

CODE

/def warrior_affliction_track = \\
/if ({left_or_right} =/ 'left') \\
 /set hitlimb=left %{limbpart} %;\\
/elseif ({left_or_right} =/ 'right') \\
 /set hitlimb=right %{limbpart} %;\\
/endif %;\\
/if (({warriorattack} = 1) & ({warriorattack_on_you} = 1)) \\
 /set hit=1 %;\\
 /if (({chesthit} = 1) & ({nervehit} = 0)) \\
  /if ({pcheste} = 1) \\
   /set pchest=1 %;\\
   /set sip=4 %;\\
   /set aoc=1 %;\\
   pc %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({piercede} = 1) \\
   /set cchest=1 %;\\
   /set sip=4 %;\\
   /set aoc=1 %;\\
   pc %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({plunge} = 1) \\
   /set plung=1 %;\\
   /set sip=4 %;\\
   /set aoc=1 %;\\
   pc %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({flap} = 1) \\
   /set ochest=1 %;\\
   /set sip=4 %;\\
   /set aoc=1 %;\\
   pc %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({viciously} = 1) \\
   /set brokenchest=1 %;\\
   /set sip=4 %;\\
   /set aoc=1 %;\\
   pc %;\\
   /set stun=1 %;\\
   /set say=1 %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({snap} = 1) \\
   /set crushedchest=1 %;\\
   /set sip=4 %;\\
   /set aoc=1 %;\\
   pc %;\\
   /set stun=1 %;\\
   /set say=1 %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /endif %;\\
 /elseif (({arteryhit} = 1) & ({majorarterye} = 1)) \\
  /majorartery %;\\
 /elseif (({completely} = 1) & ({flies} = 1)) \\
  /set stun=1 %;\\
  /amputate %;\\
 /elseif (({bicep} = 1) & ({flows} = 1)) \\
  /cbicep %;\\
 /elseif (({nervehit} = 1) & ({headhit} = 0)) \\
  /if ({piercede} = 1) \\
   /pierced %;\\
  /elseif ({severede} = 1) \\
   /severed %;\\
  /endif %;\\
 /elseif ({headhit} = 1) \\
  /if (({nervehit} = 1) & ({piercede} =1)) \\
   /set slitthroat=1 %;\\
   /set sip=4 %;\\
   /set aoh=1 %;\\
   ph %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({slicedeare} = 1) \\
   /set slicedear=1 %;\\
   /set dizziness=1 %;\\
   /set stun=1 %;\\
   /set sip=4 %;\\
   /set aoh=1 %;\\
   ph %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({scalpede} = 1) \\
   /set scalped=1 %;\\
   /set sip=4 %;\\
   /set aoh=1 %;\\
   ph %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({slicedforeheade} = 1) \\
   /set slicedforehead=1 %;\\
   /set sip=4 %;\\
   /set aoh=1 %;\\
   ph %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif (({shatters} = 1) & ({bcalhits} = 1)) \\
   /set brokenjaw=1 %;\\
   /set sip=4 %;\\
   /set aoh=1 %;\\
   /set stun=1 %;\\
   /set say=1 %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif (({savagely} = 1) & ({bcalhits} = 1)) \\
   /set brokennose=1 %;\\
   /set sip=4 %;\\
   /set aoh=1 %;\\
   /set stun=1 %;\\
   /set say=1 %;\\
   ph %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif (({hard} = 1) & ({bcalhits} = 1)) \\
   /set fracturedskull=1 %;\\
   /set sip=4 %;\\
   /set aoh=1 %;\\
   /set stun=1 %;\\
   /set say=1 %;\\
   ph %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif (({addled} = 1) & ({bcalhits} = 1)) \\
   /set concussion=1 %;\\
   /set sip=4 %;\\
   /set aoh=1 %;\\
   /set stun=1 %;\\
   /set say=1 %;\\
   ph %;\\
   /set concussion_echo=@{hCred}@{n} %;\\
  /endif %;\\
 /elseif ({guthit} = 1) \\
  /if ({pourse} = 1) \\
   /set opengut=1 %;\\
   /set sip=4 %;\\
   /set aog=1 %;\\
   pg %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({intestinee} = 1) \\
   /set dysentry=1 %;\\
   /set sip=4 %;\\
   /set aog=1 %;\\
   pg %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif ({impalede} = 1) \\
   /set impaled=1 %;\\
   /set sip=4 %;\\
   /set aog=1 %;\\
   pg %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /elseif (({mortally} = 1) & ({internal} = 1)) \\
   /set burstorgans=1 %;\\
   /set sip=4 %;\\
   /set aog=1 %;\\
   pg %;\\
   /set limb_echo=@{hCred}@{n} %;\\
  /endif %;\\
 /elseif (({tendon} = 1) & ({agony} = 1)) \\
  /stendond %;\\
 /elseif (({swept} = 1) & ({elegantly} = 1)) \\
  /set prone=1 %;\\
  /set stun=1 %;\\
  /set sip=4 %;\\
  /set aol=1 %;\\
  /if ({left_or_right} =/ 'left') \\
   pll %;\\
  /elseif ({left_or_right} =/ 'right') \\
   prl %;\\
  /endif %;\\
  /set limb_echo=@{hCred}@{n} %;\\
 /endif %;\\
/endif %;\\
/set warriorattack=0 %; /set warriorattack_on_you=0 %; /set pcheste=0 %; /set ccheste=0 %; /set plunge=0 %; /set chesthit=0 %; /set arteryhit=0 %; /set majorarterye=0 %; /set nervehit=0 %; /set piercede=0 %; /set severede=0 %; /set headhit=0 %; /set slicedeare=0 %; /set scalpede=0 %; /set slicedforeheade=0 %; /set guthit=0 %; /set intestinee=0 %; /set pourse=0 %; /set impalede=0 %; /unset left_or_right %; /unset limbpart %; /set tendon=0 %; /set agony=0 %; /set flap=0 %; /set bicep=0 %; /set flows=0 %; /set bcalhits=0 %; /set jaw=0 %; /set shatters=0 %; /set savagely=0 %; /set hard=0 %; /set addled=0 %; /set viciously=0 %; /set snap=0 %; /set swept=0 %; /set elegantly=0 %; /set mortally=0 %; /set internal=0 %; /set completely=0 %; /set flies=0

/def -F -p9999 -P1Cyellow -mregexp -t'(^Cleaving through your defenses,)' cleave = /set warriorattack=1 %; /set reboundcheck=0
/def -F -p9999 -P1Cyellow -mregexp -t'(^With a (focused look|powerful lunge|heavy overhand stroke|deft move),|swings|wildly jabs|^Letting (.*) droop,|^Flourishing (.*) above|^Swinging (.*) in an underhand arc,)' warriorattack = /set warriorattack=1
/def -F -p9999 -P1Cyellow -mregexp -t'((at|upon) you|(strikes|slices|hacks|slashes) you|You are (sliced|cut| hacked)|Your (left|right) (arm|leg)|your ribs)' warriorattack1 = /set warriorattack_on_you=1
/def -F -p9999 -P1Cyellow -mregexp -t'(chest|sternum|ribs)' chesthit = /set chesthit=1
/def -F -p9999 -P1Cyellow -mregexp -t'(teeth)' punctredchest = /set pcheste=1
/def -F -p9999 -P1Cyellow -mregexp -t'(foams)' punctredlung = /set plunge=1
/def -F -p9999 -P1Cyellow -mregexp -t'(puncture|surface|oozing)' chestscratch

/def -F -p9998 -P1Cyellow -mregexp -t'(left|right)' left_or_right = /set left_or_right=%P1
/def -F -p9998 -P1Cyellow -mregexp -t'(leg|arm)' leg_or_arm = /set limbpart=%P1
/def -F -p9999 -P1Cyellow -mregexp -t'(nerve|fountains)' nervehit = /set nervehit=1
/def -F -p9999 -P1Cyellow -mregexp -t'(spray|twitch)' nervehit2 = /set piercede=1
/def -F -p9999 -P1Cyellow -mregexp -t'(numb)' nervehit3 = /set severede=1
/def -F -p9999 -P1Cyellow -mregexp -t'your (scalp|forehead|(left|right) ear|neck|jaw|nose|skull|mind)' headhit = /set headhit=1 %; /set warriorattack_on_you=1
/def -F -p9999 -P1Cyellow -mregexp -t'(your entire head\\.$)' entire_head = /set headhit=1 %; /set warriorattack_on_you=1
/def -F -p9999 -P1Cyellow -mregexp -t'(ear(,| ))' slicedear = /set slicedeare=1
/def -F -p9999 -P1Cyellow -mregexp -t'(reverberates)' scalped = /set scalpede=1
/def -F -p9999 -P1Cyellow -mregexp -t'(eyes)' slicedforehead = /set slicedforeheade=1
/def -F -p9999 -P1Cyellow -mregexp -t'(pours)' pours = /set pourse=1
/def -F -p9999 -P1Cyellow -mregexp -t'(intestine)' intestinee = /set intestinee=1
/def -F -p9999 -P1Cyellow -mregexp -t'(impaled)' impalede = /set impalede=1
/def -F -p9999 -P1Cyellow -mregexp -t'(gut)' guthit = /set guthit=1
/def -F -p9999 -P1Cyellow -mregexp -t'(artery)' arteryhit = /set arteryhit=1
/def -F -p9999 -P1Cyellow -mregexp -t'(splurts)' arterysplurt = /set majorarterye=1
/def -F -p9999 -P1Cyellow -mregexp -t'(tendon)' tendon = /set tendon=1
/def -F -p9999 -P1Cyellow -mregexp -t'(agony)' agony = /set agony=1
/def -F -p9999 -P1Cyellow -mregexp -t'(flap)' flap = /set flap=1
/def -F -p9999 -P1Cyellow -mregexp -t'(bicep)' bicep = /set bicep=1
/def -F -p9999 -P1Cyellow -mregexp -t'(flows)' flows = /set flows=1
/def -F -p9999 -P1Cyellow -mregexp -t'(pounded|smashed|bashed|pulped|smited|struck|striked|crushed)' bcalhits = /set bcalhits=1
/def -F -p9999 -P1Cyellow -mregexp -t'(shatters)' shatters = /set shatters=1
/def -F -p9999 -P1Cyellow -mregexp -t'(savagely)' savagely = /set savagely=1
/def -F -p9999 -P1Cyellow -mregexp -t'(hard)' hard = /set hard=1
/def -F -p9999 -P1Cyellow -mregexp -t'(addled)' addled = /set addled=1
/def -F -p9999 -P1Cyellow -mregexp -t'(viciously)' viciously = /set viciously=1
/def -F -p9999 -P1Cyellow -mregexp -t'(snap)' snap = /set snap=1
/def -F -p9999 -P1Cyellow -mregexp -t'(swept)' swept = /set swept=1
/def -F -p9999 -P1Cyellow -mregexp -t'(elegantly)' elegantly = /set elegantly=1
/def -F -p9999 -P1Cyellow -mregexp -t'(mortally)' mortally = /set mortally=1
/def -F -p9999 -P1Cyellow -mregexp -t'(internal)' internal = /set internal=1
/def -F -p9999 -P1Cyellow -mregexp -t'(completely)' completely = /set completely=1
/def -F -p9999 -P1Cyellow -mregexp -t'(flies)' flies = /set flies=1
Amaru2005-08-29 20:01:47
QUOTE(Thorgal @ Aug 29 2005, 06:58 PM)
your (*) (*)
175301



laugh.gif
Richter2005-08-29 20:03:13
Murphy's echos are hilarious, buy his.
Cwin2005-08-29 22:42:24
I realized two things about myself:

1. I get realy ansy using other people's systems and

2. I also get ansy using anything except Jaba Mud Client (and I can do Zmud but it feels 'bulky')

It's not a matter of me feeling I'm 'cheating myself'. I just like knowing just what's happening. Also typing things like 'ehf' to eat faeleaf.. UGG. I just type 'fae'. I love seeing how a trigger is done so I can convert it to my system, though.

Given that, I must thank Thorgal for that tip on handling swings. I think I might have a way around the problem Kashim has (I have it too actualy).

Only one problem: getting the full messages in the first place, not just the messages you can use to trigger with, but the entire thing.
Unknown2005-08-30 01:50:59
In MUSHclient, something like this works for me. (Tested offline with lines copied from many posted logs, as I still use zMUD primarily.)

CODE

 enabled="y"
 match="You(?: |\\n)+grimace(?: |\\n)+in(?: |\\n)+pain(?: |\\n)+as(?: |\\n)+your(?: |\\n)+ribs(?: |\\n)+are(?: |\\n)+(?:smited|pulped|crushed|smashed|pounded|striked)(?: |\\n)+viciously\\.$"
 regexp="y"
 send_to="10"
 sequence="100"
 name="aff_broken_chest"
 multi_line="y"
 lines_to_match="2">
   afflicted broken chest



I've got an "afflicted" alias that grabs any affliction and keeps track of it/tries to cure it. This trigger just matches any two lines with the proper message for a broken chest wrapped around in any possible way. If you put it in a special "warriors only" group, you can make it illusion-proof and turn it on or off at will. I wish this pattern worked as well in zMUD...
Unknown2005-08-30 01:55:50
Hmm. If you say it works, it works, but...
QUOTE
(?: |\\n)

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?