CMUD: back and knap auto-complete triggers

Scripts for zMUD and CMUD

CMUD: back and knap auto-complete triggers

Postby Gladavar » Wed May 12, 2010 6:20 am

Copy the code below into a text editor and save as a .xml file then use CMUD's import option in the package editor to import into your session package.

I am currently using 3.17 and have not tested on any previous versions but it should work fine.

Code: Select all
<class name="containers" id="430">
  <trigger type="Command Input" priority="4310" id="431">
    <pattern>^(*) knap$</pattern>
    <value>%replace(%1~ knap,knap,knapsack)
</value>
  </trigger>
  <trigger type="Command Input" priority="4320" id="432">
    <pattern>^(*) back$</pattern>
    <value>%replace(%1~ back,back,backpack)</value>
  </trigger>
</class>


What's it do? Anything you send to the mud that ends in the words back or knap will be auto-completed for you saving those four extra keystrokes.

get barrel back = get barrel backpack
L in knap = L in knapsack

The pattern is anchored so if you don't want a line ending in back or knap to be completed simply end with a punctuation or space and it won't be.

I don't have anything but noob containers to use it with right now but you could easily add to the class to suit your needs.
Last edited by Gladavar on Tue Jul 05, 2011 1:01 am, edited 1 time in total.
Gladavar
 
Posts: 16
Joined: Thu Mar 04, 2010 10:21 pm
Status: Offline

Postby Vixn » Wed May 12, 2010 3:29 pm

Well done, Gladavar.

Now try this:
{I use a golden-sack from centaur merchant. It's a good & stylish container.}

#al getr {rem @robe;get @junk-sack @robe;get %1 @junk-sack;put @junk-sack @robe;wear @robe}
#al putr {rem @robe;get @junk-sack @robe;put %1 @junk-sack;put @junk-sack @robe;wear @robe}
junk-sack=golden-sack (or whatever are you using)

I also improved this aliases to use it in different modes, i.e. for different robes in regen_mode, ac_mode etc.

p.s. All credits go to Falca, the famous fief.


Have a good scripts!

Vixn.
Vixn
Triple 40 Poster
 
Posts: 449
Joined: Fri Jan 21, 2005 2:02 am
Status: Offline


Return to zMUD/CMUD Scripts

Who is online

Users browsing this forum: No registered users and 2 guests

cron