Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Create/Modify Setting Items
  #BUTTON
  #CLASS
  #DIRECTION
  #EDITOR
  #GAUGE
  #KEY
  #MENU
  #RENAME
  #STATUS
  #STWIN
  #T+
  #T-
  #TAB
Command Reference
  #
  #ABORT
  #ACTION
  #ADD
  #ADDITEM
  #ADDKEY
  #AFK
  #ALARM
  #ALIAS
  #ALL
  #BACKUP
  #BEEP
  #BREAK
  #BUTTON
  #C-
  #C+
  #CALL
  #CAPTURE
  #CASE
  #CHARACTER
  #CLASS
  #CLOSE
  #CLR
  #COLOR
  #COM
  #CONDITION
  #CONFIGURE
  #CONNECT
  #CR
  #CW
  #DBCLOSE
  #DBDELETE
  #DBFIRST
  #DBGET
  #DBLOAD
  #DBNEXT
  #DBOFFLINE
  #DBONLINE
  #DBPREV
  #DBPUT
  #DBRESET
  #DBSAVE
  #DDE
  #DEFAULT
  #DELCLASS
  #DELITEM
  #DELKEY
  #DELNITEM
  #DESCRIBE
  #DIRECTION
  #DISCONNECT
  #DOOR
  #ECHO
  #ECHOPROMPT
  #EDITOR
  #ERASE
  #EVALUATE
  #EXECUTE
  #FILE
  #FIND
  #FORALL
  #FREEZE
  #FTP
  #FUNCTION
  #GAG
  #GAGBLOCK
  #GAGOFF
  #GAGON
  #GALIAS
  #GAUGE
  #GVARIABLE
  #H-
  #H+
  #HELP
  #HIGHLIGHT
  #HISTORY
  #HOST
  #IF
  #IGNORE
  #IMAGE
  #INPUT
  #KEY
  #KILLALL
  #LAUNCH
  #LMAP
  #LOAD
  #LOG
  #LOOK
  #LOOP
  #LOOPDB
  #LOOPVIEW
  #MAKEROOM
  #MAKEWINDOW
  #MAP
  #MAPQUERY
  #MARK
  #MATH
  #MEDIA
  #MENU
  #MERGE
  #MESSAGE
  #MOVE
  #MSS
  #MXP
  #MXPTRIG
  #NAME
  #NEW
  #NODEF
  #NODIR
  #NOMAP
  #NOOP
  #OK
  #ONINPUT
  #PATH
  #PATHHIGH
  #PAUSE
  #PCOL
  #PICK
  #PLAY
  #PLUGIN
  #PORTAL
  #PRIORITY
  #PROMPT
  #PSUB
  #PW
  #QUERY
  #QUEUE
  #READ
  #RECALL
  #RECORD
  #REGEX
  #RENAME
  #REPEAT
  #RESET
  #RESUME
  #RETRACE
  #SAVE
  #SAY
  #SAYPROMPT
  #SCRIPT
  #SCROLL
  #SEND
  #SENDPROMPT
  #SESSION
  #SET
  #SETPROMPT
  #SHOW
  #SHOWARR
  #SHOWDB
  #SHOWPROMPT
  #SLOW
  #SS
  #STATE
  #STATUS
  #STEP
  #STOP
  #STWIN
  #SUBSTITUTE
  #SUSPEND
  #T-
  #T?
  #T+
  #TAB
  #TAG
  #TELEPORT
  #TEMP
  #TIMER
  #TRIGGER
  #TSET
  #TYPE
  #TZERO
  #UNALIAS
  #UNBUTTON
  #UNCLASS
  #UNDIR
  #UNGAG
  #UNKEY
  #UNMENU
  #UNPORTAL
  #UNTAB
  #UNTIL
  #UNTRIGGER
  #UNVAR
  #UNWATCH
  #URL
  #VARIABLE
  #VERBATIM
  #VERSION
  #VIEW
  #WAIT
  #WALK
  #WATCH
  #WHILE
  #WINDOW
  #WIZLIST
  #WRAP
  #WRITE
  #YESNO
#ALIAS [[#AL]] 
ALIAS

Syntax: #AL [aliasname] [string] [classname]
Related: #VARIABLE

Assign the command string to the shortcut aliasname. Variables in string are expanded when the ALIAS command is executed. To delay expansion of variables, use two variable characters.

If ALIAS is used with no parameters, all aliases are listed to the output window. If ALIAS is given a single parameter, the definition of aliasname will be displayed.

Aliases can also be expanded via tab completion. If the aliasname is entered into the command line by itself and <TAB> is pressed, the aliasname will be replaced with the string assigned to that alias.

Text following the aliasname in the command line is stored in parameters. These parameters %1 through %99 can be used in the string definition of the alias. Special parameters %-1 through %-99 are also defined which represent the parameter plus all text following it. Thus, %-1 contains all text following the alias. %-2 contains everything past the first parameter, and so on. Thus, in the example alias foo bar, alias is the aliasname, foo is assign to %1, bar is assigned to %2, foo bar is assigned to %-1, and bar is assigned to %-2. Any text following the aliasname that is not used as a parameter is appended to the results of the alias expansion.

Simple alias

#AL fs {fill waterskin statue}

When fs is entered, the string fill waterskin statue is sent to the MUD.

Using delayed expansion

#AL fs {fill @container statue}

When fs is entered, the value of @container is expanded, and the result is send to the MUD. If @container has the value of jug, then the string fill jug statue is sent to the MUD.

Using parameters

#AL kk {kill %1;kick %1}

Used with a parameter. If kk rabbit is entered, the commands kill rabbit and kick rabbit are sent to the MUD.

Delayed expansion

#AL make {#ALIAS %1 {cast %1 %%1}}

This is a complicated alias which creates another alias. In this case, the 'make' alias takes a parameter which is the name of a spell to cast. When you use the 'make' alias, another alias is created with a name equal to the spell name. Since each % is removed each time a command is parsed, the %%1 is delayed by one step. Thus, when you enter

make heal

the command

#ALIAS heal {cast heal %1}

is entered, which creates the new spell alias called 'heal'
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net