[MUD-Dev] Web vs. Java client

Christopher Allen ChristopherA at skotos.net
Fri Nov 7 12:55:34 CET 2003

Mark 'Kamikaze' Hughes <kamikaze at kuoi.asui.uidaho.edu> wrote:

> I'm not concerned about client-side scripting right now.  From
> what I've seen, it's mostly used to cause grief.  The client's in
> the hands of the enemy, sure, and a dedicated griefer can still
> modify the client, but it puts one obstacle in their way.  Is
> there a legitimate use for it?

We don't allow client side scripting with our client, but we do
allow macros.  See http://www.skotos.net/clientdist/alice.html for
what we support.

-- Christopher Allen

.. Christopher Allen <ChristopherA at skotos.net>       Skotos Tech Inc. ..
..                2342 Shattuck Ave Ste #512, Berkeley, CA 94704-1517 ..
.. www.skotos.net  www.rpg.net       o510/647-2760x202  f510/849-1717 ..


Macro Processing

Macros have been added to Alice.  Macros define a single word of
text which will be replaced by an arbitrary string of text when
encountered in user input.  There are several macro commands in

  - MACRO LOAD -- This command will load the macros stored in the
  registry for a specific combination of world and character.  Every
  character in every world has its own set of macros.  MACRO LOAD is
  executed when you first log in, but has its uses in overwriting
  macro changes you have made that you do not wish to keep.

  - MACRO STORE -- This command will take all in-memory macros and
  write them to the registry for the current world and character
  (deleting any macros currently in storage).  ANY CHANGES OR
  SESSION UNLESS THIS COMMAND IS ISSUED.  By making the storage of
  macros separate from the creation and deletion of macros, it is
  possible to set up task-specific macros without having macro
  clutter at a later date.

  - MACRO ADD -- This command associates a single word with an
  arbitrary block of text.  For example:

    MACRO ADD lmsr long may She reign

  This command will define a macro such that any time the word
  "lmsr" is seen in the input text, it will be replaced with "long
  may She reign".  For example:

    say "Her Majesty, lmsr, is truly a beauteous woman."

  expands to:

    say "Her Majesty, long may She reign, is truly a beauteous woman."

The name of a macro can have any combination of uppercase and
lowercase letters, numbers and the underscore "_" and single quote
"'" character.  Macro names are case-insensitive, so "lmsr", "LMSR"
and "LmSr" are the same macro.

Macro replacement is done on whole words only.  The above macro
would not expand the text "Gooberlmsr" into "Gooberlong may She
reign" for example.

Keep in mind that MACRO ADD will only add a macro to memory.  MACRO
STORE will have to be used to make the macro stick around across

  - MACRO REMOVE -- This command will remove a macro from memory.

  For example:


deletes the macro we defined above from memory.  As always, MACRO
STORE will have to be used to cause permanent deletion across

  - MACRO REMOVEALL -- This command deletes all macros currently
  active in memory.  Again, MACRO STORE is needed to make the
  changes permanent.

  - MACRO LIST -- This command lists all macros currently defined in
  memory. This list is provided in alphabetical order.  If an
  optional string is provided afterwards, the list will be pruned to
  show only those macros which begin with that string.  The
  following command, for example, will only list the macros
  beginning with the letters "Ab":


Advanced Macro Features

  - Macros which contain macros in their expansion text will further
  expand these macros.  Consider the following macros:

    MACRO ADD bowp bow politely

    MACRO ADD nodp nod politely

    MACRO ADD greetr bowp women
    nodp men

(You would use Ctrl-Enter to accomplish the multi-line macro.)  If
you used the macro "greetr" on the command line, the text would
expand to the following two lines in the entry field:

    bow politely to women
    nod politely to men

  - Words contained in curly brackets will have one member of the
  list randomly selected.  Consider the following macros:

    MACRO add polite0 {politely|courteously|cordially}

    MACRO ADD bowp bow polite0

    MACRO ADD nodp nod polite0

    MACRO ADD greetr bowp women
    nodp men

Typing "bowp Launfal" will expand, at random into any of the
following three command lines:

    bow politely Launfal
    bow courteously Launfal
    bow cordially Launfal

Typing "greetr" could expand to, among others, the following pairs
of commands:

    bow courteously women
    nod cordially men

    bow politely women
    nod politely men

    bow cordially women
    nod courteously men

Note how having macros that expand to macros can combine with
selection lists in interesting ways to make characters more lifelike
and believable (and less repetitious) without straining your typing

  - The character "%" followed by any digit between 1 and 9
  inclusive will look forward in the input text that many words and
  replace the %-sequence with the found word.  Consider the
  following example:

    MACRO ADD bogus say "A bogus %1 %2 %3 %4 %5 %6 %7 %8 %9 test with

Typing the following at the command line:

    bogus 1st 2nd 3rd 4th 5th 6th 7th 8th 9th added junk

will result in the following text being generated:

    say "A bogus 1st 2nd 3rd 4th 5th 6th 7th 8th 9th test with added junk

Note that the %-sequences don't have to show up in numerical order.

Consider this macro:

    MACRO ADD bogus2 say "Bogus %3 %1 %2 test."

Typing "bogus2 1st 2nd 3rd" will expand to:

    say "Bogus 3rd 1st 2nd test."

Also note that you don't have to actually use all the arguments
given to a macro.  If the highest-numbered %-sequence in your macro
text is, say, %3, the next three words are considered arguments EVEN


    MACRO ADD bogus3 say "Bogus %3 test with added junk:

Typing "bogus3 1st 2nd 3rd Cirrus Socrates Pelican" will result in
the following text:

    say "Bogus 3rd test with added junk: Cirrus Socrates Pelican

The strings "1st" and "2nd" will be swallowed up and ignored in this

Again, as with selection lists, expanded macros can contain macro
invocations of their own.  Indeed it is possible to create very
complex sets of macros which include arguments and selection lists
both to do many wonderful things with the system.  Let your
imaginations run free while you experiment with the new, powerful
MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the mud-dev-archive mailing list