dr-scripts icon indicating copy to clipboard operation
dr-scripts copied to clipboard

Jail-Buddy kicked in randomly during combat-trainer

Open swhalengold opened this issue 6 years ago • 2 comments

While hunting thugs in crossing sewers Jail-Buddy randomly kicked in. I am not sure why exactly. Wanted to share the log.

> [combat-trainer]>attack
> < You draw a steel throwing hammer at a ruffian.  A ruffian fends off little of the hammer with a misericorde.
> [You're winded, nimbly balanced with opponent in very strong position.]
> [Roundtime 6 sec.]
> >
> * With great skill, a thug feints high at you.  You barely fail to block with cougar-hide targe.  The misericorde lands a glancing strike to your abdomen.
> [You're winded, nimbly balanced with opponent in strong position.]
> >
> --- Lich: training-manager paused.
> --- Lich: hunting-buddy paused.
> --- Lich: combat-trainer paused.
> [jail-buddy: ** DON'T PANIC JAIL BUDDY HAS YOUR BACK! **]
> You feel fully prepared to cast your spell.
> >
> A silverfish just arrived!

***not doing anything *****several mins later I die

swhalengold avatar Dec 15 '18 19:12 swhalengold

So I believe this was triggered by an lnet chat message that went out on that day. Specifically

[DRPrime]-DR:Aurayn: "hmm is this bad?    The town guard, with the help of several others, wrestle you to the ground, bind you in chains, and drag you off to jail.  "Gotcha Mitkhian sympathiser!" the guard crows with glee."

hitting the

 if [/^Before you really realize .* you are marched off./, / wrestle you to the ground, bind you in chains, and drag you off to jail/, /ushered to a cell, the door opened just long enough for you to be shoved inside/, /\[Guard House, Jail Cell\]/, /^The guard looks you over.* and leads you firmly off to jail/, /A sparkling cloud of silver motes envelops your body like a mist of stars/, /Although your head is still ringing from the assault/, /The sentinel brings you to the jail/, /^You slowly wake up again to find that all your belongings have been stripped/].find { |x| x =~ line }

regex and triggering it. There's a lot there, and I'm not sure which messages can safely be anchored to the start of line and which can't. But I think for most of the ones that aren't anchored we could start them with ^[:alpha:].*, as in

/^[:alpha:].* wrestle you to the ground, bind you in chains, and drag you off to jail/,

That won't be tripped by lnet messages regardless of what happens. Anyone have a better or more graceful idea?

Tarhish avatar Dec 25 '18 20:12 Tarhish

I guess alternately we could leave all of those regexes alone (except for the [jail cell] one) and break out if the first character of line is a '['

Tarhish avatar Dec 25 '18 20:12 Tarhish

jail-buddy today has a check if the text triggered via lnet, and skips it. If someone reports additional issues today, we can follow them up.

MahtraDR avatar Jan 24 '23 10:01 MahtraDR