Macro Author Macro AuthorReturn to the Getting Started Page.
%list Lynx DelayOtell Skant gen-morph Timur DelayPose Skant list-match Timur DelayListTell Skant look-notify Cymoryl DelayExec Skant pmatch Cymoryl DelayString Skant pose Squirrelly DelayList Skant subindex [unknown] DelayListEval Skant tmatch Cymoryl StoreList Skant right/left Chirik Default Skant secsday Chirik listrand Chirik phase Chirik zombies Chirik ListTell Skant sit Squirrelly DelayTell Skant Commander Dekhyr
Night: 18:45 to 05:45 Dawn: 05:45 to 06:15 Day: 06:45 to 18:15 Dusk: 18:15 to 18:45These phases are preset, and do not change with the time of the year. They should be useful for creating a room with a description that changes depending on the phase of the day. (For an example, check out Nuthatch Village Park, in Nuthatch Village. It uses a different description for day and night)
Phase takes two arguments, and both are optional. If you use phase with arguments, then it will return the current phase. If you provide the isphase argument, then phase will check to see if that is the current phase, and return either a 1 (true) or 0 (false). If you provide the timezone argument, then phase will return the phase relative to that timezone. If you wish to find out the phase for a specific timezone, then either leave the isphase argument blank {phase:,timezone} or put a '-' there {phase:-,timezone}
Drachenswald is beautiful!
If you do not own the room, they will see:
> Drachenswald is beautiful!
Dragons are special!
or, if you don't own the room:
> Dragons are special!
Visit the Kaleidocave!
...after a 15 second delay. Note this could not be done with: {delay:{lit:{tell:Visit the {&placetovisit}!,JoeSchmoe}}} because {&placetovisit} will not exist when the string is evaluated.
Khryss is testing a new function.
...after a 12 second delay.
Skant poses for the camera.
...after a 3 second delay.
You feel woozie.
..after an 8 second delay or:
> You feel woozie.
...after an 8 second delay if you don't own the room.
{&1} was set to the {&arg} that was passed to the trigger
{&2} was set to {prop:TheAction}, which for this example will be 'smiles'
{&3} was set to 'Cymoryl'
...so if DelayedProp has been set to:
DelayedProp:{&2} at {rand:{contents:here,player}} and says, '{&1}'
and the {delayexec} had been called from @osucc then it would print:
Skant smiles at Khryss and says, 'Hi there!'
...after a 12 second delay to everyone else in the room.
Of course, this function has better uses than just simulating lag. }:>
Note on literals in general: Escape characters ('\') do work inside literals and are necessary if a literal contains {}'s which are not part of an MPI command. (Commas do not need to be escaped in a literal)
The list itself can do many things. The list can contain MPI code (which will be evaluated) or anything else. Commas in the list work properly (that is, they output correctly and do not need to be escaped out). When a list item is evaluated, it has access to several variables:
{&1},{&2},{&3}: These are variables that are passed to the each line of the list and are initially set by in the call to {DelayListEval}. Note that you have access to these variables whether you define them in the call to {DelayListEval} or not. And you may change their contents using {set} (ex: {set:2,<new value>} changes the value of {&2} and that value will be present for the rest of the list until it is changed with another {set}. That is, as far as the list is concerned, none of these variables are temporary). These are 'general purpose' variables and may be used for anything you desire.
{&4}: This variable contains the delay value. You may read this value and you may set it with {set:4,<newdelay>}. Thus you can speed up or slow down the 'play back' of the list.
{&5}: This variable contains the index of the next list item that will be evaluated. That's right. If you {set} this variable, you can jump to different lines of the list. {Set}'ing this variable to 0 will end the list evaluation. (This value is automatically set to 0 just before the last line of the list is evaluated and the list will terminate if it is still 0 by the end of the evaluation).
{&6}: This variable contains the name of the list being evaluated. Yup. If you {set} this variable, you can jump to another list.
{&7}: This variable contains the name of the object where the list is located. You guessed it. If you {set} this variable, you can jump to another object entirely. By using {&5},{&6}, and {&7}, you can jump to any part of any list anywhere.
Then... after 8 seconds it would output...
This is first. The first arg is 'var 1'.
...after another 8 seconds...
This is second and will speed up.
...after 1 second...
This is the third line. It slows down again.
...after 4 seconds...
This is the fourth line.
...and it will {tell} you that it's about done... after 4 seconds...
This is the last line! Now arg 1 is 'new'.
...and then it will terminate.
Note: Use '@kill me' to stop this if it gets out of control.
The Commander treats <text> as a string of words, each separated by one or more spaces.
Each command thus executed may access the list of words gleaned from the command line arguments via the Commander's local variable {&parms}. Example setup on next page.
This would allow commands 'press floor1' and 'press floor2'. In general, 'press X' is allowed, provided _cmd/X is present.