Unlimited targeting system

December 10, 2011 06:41AM
These triggers will add the ability to define an unlimited number of targets and add them to the end of any command. All aliases are Regular Expression and Send to Script.

First, add the alias:

^t(\d+)(.*)

With the text:

if "%2" == "" then
Note ("Target %1 is set to:" .. (GetVariable("target%1") or " nothing"))
else
Note ("Setting target %1 to:%2")
SetVariable("target%1", "%2")
end

That will allow you to set an alias by typing t + any number. So you could type t1 Jack or t98 Jill. Typing t1 or t98 would remind you who you set as the target.

Now add the alias:

^(\D.*?)(\d+)$

This alias will match on any line that does not start with a number (to not interfere with number shortcuts) but does end with a number. Give it the text:

Execute ("%1 " .. (GetVariable("target%2") or " "))

Now if you type something like bash1 or bash98 it will check the contents of that target variable and fill in the person for you. bash1 becomes bash Jack. But there is one potential problem we need to fix. What about commands that naturally end in numbers, such as bank commands? First, give the current alias a high sequence, like 150. Then, add one more alias:

^(withdraw|deposit)(.*)$

With the text:

Send ("%1%2")

This will allow those commands to go through (and any others you may wish to add to the pipe separated list) as long as this is a earlier sequence (default 100) than the target alias (recommended 150 or so).



Edited 1 time(s). Last edit at 12/10/2011 06:50AM by joecloud.
Subject Author Posted

MUSHclient Tips and Tricks

joecloud December 08, 2011 03:18PM

Re: MUSHclient Tips and Tricks

sketch219 January 27, 2012 06:22PM

Unlimited targeting system

joecloud December 10, 2011 06:41AM

My MUSHclient triggers and aliases are these

DurNominator(VIP) December 09, 2011 11:14AM

Posting my autoexplore here since I can't get a plugin to work

reject-o December 09, 2011 06:42AM

Speedwalk/run in any direction until you cannot

joecloud December 08, 2011 07:56PM

Improved Exits Line

joecloud December 09, 2011 05:30AM

*No way! You are still fighting!

joecloud December 08, 2011 09:02PM

Timer safeguard (recommended addition)

joecloud December 08, 2011 08:15PM

Recommended becomes somewhat required

joecloud December 08, 2011 08:54PM

Prefix any command by where

joecloud December 08, 2011 06:02PM

Add target to any command (single targetting system)

joecloud December 08, 2011 05:52PM

Important fix

joecloud December 10, 2011 06:28AM

Digit Aliases for Quick Shortcuts

joecloud December 08, 2011 05:29PM

Small bug fix

joecloud December 09, 2011 03:13PM

Heh I've actually been working on some stuff for MUSHClient

reject-o December 08, 2011 03:57PM

I'd like to see some of this...

joecloud December 08, 2011 05:06PM

Here ya go..

reject-o December 09, 2011 06:08AM

Use Directions as Aliases

joecloud December 08, 2011 03:44PM

Better Command Stacking (Support Aliases)

joecloud December 08, 2011 03:37PM

OK, the forums stripped the space out of "space star." Don't miss the space. (n/t)

joecloud December 08, 2011 05:11PM

Look and Consider

joecloud December 08, 2011 03:30PM

I use something similar to this - careful if you're playing a transmuter!

Coumidin December 08, 2011 03:55PM

Yeah. I popped out deep in Aran-Gird's dungeon

daurwyn(VIP) December 12, 2011 09:55AM

Slap Self Solution

joecloud December 08, 2011 05:09PM

Just use Send instead of Execute to avoid other aliases firing, it takes less script execution time too (n/t)

Mort December 09, 2011 03:47AM

Good point -- I'm just in the habit of using Execute because I usually want other aliases to fire. In this case you don't. (n/t)

joecloud December 09, 2011 05:31AM

Quick Look/Scan/Unlock/Open

joecloud December 08, 2011 03:24PM

Combo Unlock and Open

joecloud December 08, 2011 03:38PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 122
Record Number of Users: 2 April 29, 2024
Record Number of Guests: 172 April 28, 2024