Macros
Macros allow you to bind multiple commands to a single key press.
Overview
Macros send game commands when you press a key:
# In keybinds.toml
[keybinds."f1"]
macro = "attack target"
[keybinds."ctrl+1"]
macro = "prep 101;cast"
Basic Macros
Single Command
[keybinds."f1"]
macro = "attack target"
Press F1 → Sends “attack target” to game
Multiple Commands
Separate commands with semicolons:
[keybinds."f2"]
macro = "stance offensive;attack target"
Press F2 → Sends both commands in sequence
Command Sequences
Combat Sequence
[keybinds."f5"]
macro = "stance offensive;attack target;stance defensive"
Spell Casting
[keybinds."ctrl+1"]
macro = "prep 101;cast"
[keybinds."ctrl+2"]
macro = "prep 103;cast target"
[keybinds."ctrl+3"]
macro = "incant 107"
Movement
[keybinds."numpad8"]
macro = "go north"
[keybinds."numpad2"]
macro = "go south"
[keybinds."numpad4"]
macro = "go west"
[keybinds."numpad6"]
macro = "go east"
[keybinds."numpad5"]
macro = "out"
Delays
Add delays between commands (in milliseconds):
[keybinds."f5"]
macro = "prep 101;{500};cast"
# Wait 500ms between prep and cast
Delay Syntax
macro = "command1;{1000};command2"
# {1000} = 1 second delay
Example: Careful Spellcasting
[keybinds."f6"]
macro = "prep 901;{2000};cast target"
# Prep spell, wait 2 seconds for mana, cast
Variables
Input Prompt
[keybinds."ctrl+g"]
macro = "go $input"
Press Ctrl+G → Prompts for direction → Sends “go ”
Target Variable
[keybinds."f1"]
macro = "attack $target"
Uses current target if set, or prompts.
Last Target
[keybinds."f2"]
macro = "attack $lasttarget"
Attacks the last targeted creature.
Conditional Macros
With Input Check
[keybinds."f5"]
macro = "$input:prep $input;cast"
# Only executes if input provided
Multiple Inputs
[keybinds."f6"]
macro = "give $input1 to $input2"
# Prompts for two inputs
Common Macro Patterns
Quick Attacks
[keybinds."f1"]
macro = "attack target"
[keybinds."f2"]
macro = "attack left target"
[keybinds."f3"]
macro = "attack right target"
[keybinds."f4"]
macro = "feint target"
Defensive Moves
[keybinds."f5"]
macro = "stance defensive"
[keybinds."f6"]
macro = "hide"
[keybinds."f7"]
macro = "evade"
Stance Cycling
[keybinds."ctrl+up"]
macro = "stance offensive"
[keybinds."ctrl+down"]
macro = "stance defensive"
[keybinds."ctrl+left"]
macro = "stance neutral"
Looting
[keybinds."ctrl+l"]
macro = "search;loot"
[keybinds."ctrl+shift+l"]
macro = "search;loot;skin"
Information
[keybinds."i"]
macro = "inventory"
[keybinds."ctrl+i"]
macro = "inventory full"
[keybinds."ctrl+e"]
macro = "experience"
[keybinds."ctrl+w"]
macro = "wealth"
Healing
# Empath healing
[keybinds."ctrl+h"]
macro = "transfer $target"
# Herb usage
[keybinds."ctrl+1"]
macro = "get acantha from my herb pouch;eat my acantha"
[keybinds."ctrl+2"]
macro = "get basal from my herb pouch;eat my basal"
Social
[keybinds."ctrl+s"]
macro = "smile"
[keybinds."ctrl+b"]
macro = "bow"
[keybinds."ctrl+w"]
macro = "wave"
[keybinds."ctrl+g"]
macro = "greet $target"
Macro Organization
By Activity
# === COMBAT ===
[keybinds."f1"]
macro = "attack target"
[keybinds."f2"]
macro = "stance defensive"
# === SPELLS ===
[keybinds."ctrl+1"]
macro = "prep 101;cast"
# === MOVEMENT ===
[keybinds."numpad8"]
macro = "go north"
# === SOCIAL ===
[keybinds."ctrl+s"]
macro = "smile"
By Profession
Create character-specific keybinds:
~/.two-face/characters/Warrior/keybinds.toml
~/.two-face/characters/Wizard/keybinds.toml
Advanced Macros
Complex Combat Routine
[keybinds."f10"]
macro = "stance offensive;{100};attack target;{500};stance defensive"
Merchant Interaction
[keybinds."ctrl+m"]
macro = "order $input;buy"
Container Management
[keybinds."ctrl+p"]
macro = "put $input in my backpack"
[keybinds."ctrl+shift+p"]
macro = "get $input from my backpack"
Troubleshooting
Macro Not Executing
- Check key format is correct
- Verify keybinds.toml syntax
- Run
.reload keybinds - Check for key conflicts
Commands Out of Order
Add delays:
macro = "command1;{500};command2"
Input Prompt Not Appearing
- Check
$inputsyntax - Verify focus is on game
- Check for conflicting keybinds
Multiple Commands Failing
Some games have command limits:
- Add delays between commands
- Break into separate macros
- Check game’s command queue limit
Best Practices
- Keep macros simple - Complex macros are harder to debug
- Add delays when needed - Prevents command flooding
- Test in safe areas - Verify before combat use
- Document your macros - Add comments to keybinds.toml
- Use consistent keys - Group related macros logically
See Also
- Keybind Actions - All keybind options
- Keybinds Configuration - Full reference
- Cmdlists - Context menu commands