MULTIBOXING COMMANDS

Wait

Pauses for a specified number of milliseconds.

Syntax

Wait ( milliseconds )

Parameters

Milliseconds is the length of the pause in thousandths of a second.

Example

Hotkey ( ScrollLockOn F1 )
{
   Slash ( "/say First I clear my throat." )
   Wait ( 3000 )
   Slash ( "/say After a pause, I say this." )
}

Remarks

Mojo needs Wait because some DAOC commands execute on DAOC’s server. It takes time for those commands to travel from your computer to the server and back. The hotkey must wait while that action takes place before it does anything else. For example:

Hotkey ( F6 )
{
   Slash ( "/assist Percival" )
   Wait ( 300 )
   Slash ( "/face" )
}

This hotkey waits after issuing /assist because it takes time for the command to travel to DAOC’s server and for the server to send the target to the user’s computer. If the hotkey didn’t wait, /face wouldn’t work because DAOC wouldn’t have a target.

Technical remarks

Mojo executes each hotkey package in its own thread inside an individual DAOC window. If you don’t keep this in mind, Wait may not work as you expect. For example, Wait does nothing in the following hotkey because it’s in a package by itself without any commands before or after it.

Hotkey ( CapsLockOn Shift Y )
{
   Package
   {
      Sendto ( remote )
      Slash ( "/say Yowsa" )
   }
   
   Wait ( 3000 )
   
   Package
   {
      Sendto ( remote )
      Slash ( "/say Bowsa" )
   }
}

If you want that Wait command to do something, you can put it in the same package (same threads) as the other commands by rewriting the hotkey like this:

Hotkey ( CapsLockOn Shift Y )
{
   Package
   {
      Sendto ( remote )
	  
      Slash ( "/say Yowsa" )
      Wait ( 3000 )
      Slash ( "/say Bowsa" )
   }
}

This page was first published on November 3, 2017 and last modified on November 27, 2017