MULTIBOXING COMMANDS

Questions and answers

I’m confused. How do I even start?

You type a “script” with Notepad or any other program. A script is just a little text file. It can be extremely simple. Then you load it into Mojo on the bottom of Mojo’s Hotkeys page.

Okay, but what do I write in the script?

Start with one little hotkey. Just one. Get that to work. Then add another hotkey. Build your script one little piece at a time.

One of the things I often see people do is try to write an enormous long script all at once and load the whole thing into Mojo. That way lies madness. Trust me, I’ve been a programmer for 34 years and I’m here to tell you that the last thing you ever want to do with any kind of programming — and these scripts are a kind of programming — is write something long and complicated and try to load it. Always start with something tiny and simple and work your way up.

Okay, but what is a hotkey?

A hotkey means that when you press a key combination with your fingers, Mojo triggers actions in one or more DAOCs.

People often call this a “macro” but it’s not a macro because the main idea here is that Mojo sends instructions to more than one DAOC. Macros don’t go to more than one DAOC. Macros go only to the program you’re working with (the foreground program).

Let’s look at a simple example. Suppose you write this in your script:

Hotkey ( F1 )
{
   Key ( G )
}

That tells Mojo, “When I press F1 with my finger, Mojo will press the key G in all my DAOCs.”

F1 is the trigger, the thing you press with your finger. G is the action, the thing Mojo does in all your games. (Hotkeys can have more than one action, but this is a simple example.)

Suppose you have two casters and you bind G to pbaoe in their DAOCs. You also have a healer and you bind G to group heal in that DAOC.

When you press F1, the casters will pbaoe and the healer will cast group heal.

Why do I have to press this hotkey twice?

This hotkey makes the toon assist and then face the target. When it’s pressed the assist part works — the toon acquires the target — but the toon doesn’t face unless the hotkey is pressed a second time. What’s wrong?

Hotkey ( F1 )
{
   Slash ( "/assist Curtis" )
   Key ( F ) // face
}

What’s wrong is that DAOC’s /assist command takes place on DAOC's server. When Mojo issues the /assist command — or when you do it yourself without Mojo — your computer sends the /assist command to the server over the Internet. Then the server sends the name of the acquired target back to your computer over the Internet. These things take time, maybe as long as a third of a second depending on where you live and the quality of your Internet connection.

Now let's look at the hotkey. First it issues the /assist command — in other words, it tells your computer to start the process I just described. Then immediately, without waiting, it issues the /face command. But there is nothing to face yet because your copy of DAOC doesn’t have a target yet. It won’t have a target until the process I just described takes place.

The solution is to tell the hotkey to wait after it issues the assist command until your computer receives the target from the server, like this:

Hotkey ( F1 )
{
   Slash ( "/assist Curtis" )
   Wait ( 300 )
   Key ( F ) // face
}

Depending on where you live, 300 milliseconds may be too short or longer than necessary. Use the shortest number that works reliably for you.

Only my main PC responds to hotkeys. How do I fix this?

Make sure Mojo is running on all PCs. Then make sure the Mojos have automatically connected themselves to each other. To do this, on every PC, look at Mojo’s first page. You will see pictures of the computers to which that one is connected.

Every picture should be yellow or blue.

If some pictures are missing, or if they are black, you must force your Mojos to connect manually. To do this, on the computers where you press hotkeys with your fingers, go to Mojo’s Settings: Set Manual Connections and enter the IP address(es) of the computer(s) which aren’t connected.

Why doesn’t my hotkey ( + ) work?

Because you must use the name of the key not the symbol on it.

This applies to all keys, not just the plus keys. Luckily the names of letter keys and number keys are mostly the same as the symbols. The other keys, however, are less straightforward.

There are two plus keys on the keyboard. The main one is named “Plus”. The other one is named “NumpadPlus”. Therefore the first hotkey below won’t work but the other two will.

Hotkey ( + )
{  
   // doesn’t work
}
Hotkey ( Plus )
{  
   // works
}
Hotkey ( NumpadPlus )
{  
   // works
}

Okay but how am I supposed to know the names of keys?

Mojo will tell you. Look at Mojo’s Geeky Stuff page while you press the key. You’ll see the name in the upper left corner.

Do I need a script on every computer?

No. You only need scripts on computers on which you press hotkeys with your fingers.

If I put scripts on more than one computer, do they need to be the same script?

No. They can be different. If they are different, pressing hotkeys on different computers will perform different actions.

Can each of my computers send hotkey commands to all the others?

Yes. Every Mojo is equal. Any one of them can send commands to all the others. In order to send commands from a computer, you must load a script on that computer.

How do I make hotkeys stop when I’m using some other program (not DAOC)?

Put Foreground ( DAOC) in all your hotkeys. This makes them work only when DAOC is the foreground (active) window. Or save yourself some typing and put this at the top of your script:

Defaults
{
   Foreground ( DAOC )
}

How do I make hotkeys stop when I’m typing on DAOC’s chat line?

Make a hotkey that toggles hotkeys or turns them off. If you make a hotkey that turns them off, also make one that turns them on. Examples:

Hotkey ( Shift Enter )
{
   Toggle Hotkeys ()
}

Hotkey ( Shift Alt F)
{
   TurnHotkeysOff ()
}

Hotkey ( Shift Alt N )
{
   TurnHotkeysOn ()
}

Is Mojo case-sensitive?

No. Everything in Mojo is case-insensitive, even window names. That means it makes no difference whether or not you capitalize letters.

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