Using an Alias to Target

Post Reply
User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Using an Alias to Target

Post by Jules »

Hey all! Just want to start off by saying how much I absolutely LOVE using Mudlet! It's a lot more pleasant to use that MUSHclient, and a lot more powerful than Nexus! Great Job!!

Now, onto my question!

I play Lusternia, and I've been using Lusternia's built-in alias system for combat, specifically to target people/mobs for combat. For example:

Code: Select all

setalias pve kick &tar (This is the alias I'd use to kick my target, where &tar is the target variable)
To set the target variable, I do:

Code: Select all

st tar (target I want to kill)
Translation: set target (target variable) (target)

Now, how exactly can I replicate that in Mudlet? I'm still very new to the client, and I don't know Lua very well, so if this seems like a very... noobish question, forgive me!

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Using an Alias to Target

Post by Heiko »

regex pattern would be ^st (\w+)
script would be

Code: Select all

tar = matches[2]
send( "kick " .. tar )
Have a look at the manual first. It isn't finished and slightly outdated at places, but it'll get you started quickly with both Mudlet and basic Lua.

You might also want to contact the user Ronny as he has built a fairly complex healing & figthing system for Lusternia already and I'm sure he'll help you out with the Lusternia specific stuff.

User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Re: Using an Alias to Target

Post by Jules »

Sweet! Everything works wonderfully!

I think my problem was that I mistook (\w+) for (/w+). Oops!!

Thank you very much, Heiko!

Post Reply