Page 1 of 1

Using an Alias to Target

Posted: Mon Oct 12, 2009 2:17 pm
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!

Re: Using an Alias to Target

Posted: Mon Oct 12, 2009 2:25 pm
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.

Re: Using an Alias to Target

Posted: Mon Oct 12, 2009 3:52 pm
by Jules
Sweet! Everything works wonderfully!

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

Thank you very much, Heiko!