
Note that if your command contains an %ARGS% variable, and some runs a command from chat without specifying a variable, the command will fail, and no cooldown will be applied. It could also be used for things such as $SPAM %ARGS%, where the command would spam whatever key the chat member specified. To give you an idea how these would be used: If your command was !love, your functions were $CHAT %USER% loves %ARGS%!, and user wootiown typed "!love Dark Souls" into your chat, your bot would output a message to the chat saying "wootiown loves Dark Souls!"
(These variables can be used in commands on game-specific sheets as well!)
%USER% is the user who ran the command from chat. %ARGS% is whatever the chat member types after the command. There are also variables you can use in your functions: Unfortunately we have not yet implemented a way to press multiple keys at once (such as Ctrl+Shift+C) using functions, so you would need to create a custom script for that. So for a command that presses left click and then holds Page Up for a second, you would put $PRESS LButton $HOLD PgUp 1. would do these things in this order: hold the W key for 3 seconds, hit the E key 10 times, type the message "I love this game!", do nothing for 5 seconds, press the G key, then output a message to chat saying "Thank you for coming."įor making commands using keys that aren't letters or numbers, consult AHK's key list. When your command is run, the functions are executed in order from left to right, and you can use any number or combination of variables you need to.Īs an example, $HOLD W 3 $SPAM E 10 $TYPE I love this game! $WAIT 5 $PRESS G $CHAT Thank you for coming. These little things with a dollar sign prefix are called functions, and they're what you put in the "What to Run" column to create your command. $WAIT will do absolutely nothing for the specified number of seconds. $RUN will run the specified file (file must be located in the "UserScripts" folder, more on this later). $CHAT will have your bot output the specified message to your chat. $TYPE will block your input and type the specified message.
$SPAM will press the specified key the specified number of times.$HOLD will block your input and hold the specified key for the specified number of seconds.$PRESS will press the specified key once.The "What to Run" column is where you will put what you want the command to do, using this format: