Lusternia Bashing Sequence

Post Reply
Posts: 1
Joined: Sat Mar 03, 2018 10:57 pm

Lusternia Bashing Sequence

Post by Xiluym »

Hey guys,

So I recently restarted in Lusternia. However, as I was a Nexus baby (for quite a few years), I decided this time I would get down and dirty and teach myself how to code in Mudlet for all of the things I have wanted to do.

That being said.. I can only do simplistic functions, like alias and triggers. However, I have been trying to branch out and do my own bashing sequence so that I don't have to constantly mash buttons on my keyboard to kill a single mob.

My thought process for this goes as such:
I press the button to attack --> Switches autobash variable to true, changes balance to false, and swings at my target.
Pattern: ^aa$
send ("cleave "
send ("beast order attack "

balance = false
autobash = true

Simple enough, yes?

However, my problem becomes complex when it comes to the next swing and the trigger associated with it.
Pattern: You have recovered balance on your ^(\w+) arm. Type: substring
if ( autobash == true ) then
balance = true
send ("cleave "
balance = false
balance = true

I would think with that the trigger should swing my sword, but it doesn't. And I haven't the fuzziest idea of why that would be. Once I get this part down, I think I am comfortable enough that the "You have slain a ()" or "has been slain by ()" trigger shuts off the autobash variable.. but I'm not 100% on that either.

Is there any advice that you guys can give me, or could you help me write this out proper? I've been struggling on this for 3 days now, and it has finally driven me up a wall. :x :x

Thanks, -X

User avatar
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: Lusternia Bashing Sequence

Post by Belgarath »

Your trigger seems to be using regex patterns while being of type substring. You'll want to change that to type regex and use it like so:

Code: Select all

^You have recovered balance on your (?:left|right) arm\.$
I'm presuming the mud output will be left and right there.

For the slain triggers, () bits will need to be (.+) to parse correctly.

Post Reply