Re: CLIENT: Dump of mudlet related things for y'all
Posted: Sat Sep 09, 2023 5:26 pm
I hadn't had a chance to reply, but Reyne's reply is nearly spot on.
The only thing that I would change is the regex pattern. As written, it will capture, e.g., "an ancient tree" as the targetting variable - but trying to "kill an ancient tree" will likely not give the response you want
The pattern I had was which can be used to capture the last word of whatever you're engaged on (in my example case, just "tree"), which I've found is typically a keyword that can be used for most mobs. For pcs, this will always capture their name. And in this case you would use to set the target, as the pattern was slightly different.
The only thing that I would change is the regex pattern. As written, it will capture, e.g., "an ancient tree" as the targetting variable - but trying to "kill an ancient tree" will likely not give the response you want
The pattern I had was
Code: Select all
(\S+): (\S+) >
Code: Select all
CurrentEnemy = matches[2]