enBoxer/docs/MACROS.md
en 8eb5346d92 Split smart interact shortcut from single Alt+J send
bind: "interact" now resolves to game_binds.interact (Alt+J) only —
a single keystroke. The full ISBoxer-style chain (CTM on -> Alt+J ->
sleep walk_delay_ms -> CTM off) lives at bind: "smart_interact".

Fixes the doubling bug Grok flagged: bind: "interact" previously
expanded into the full chain unconditionally, so the loot_manual and
interact_hold example maps fired ctm_on/ctm_off twice and produced
unwanted sleep delays.

- engine.rs: rename shortcut trigger (was: "interact")
- examples/profile.yaml: loot now uses smart_interact; loot_manual and
  interact_hold keep "interact" as a single Alt+J send
- docs/MACROS.md: heading + shortcut comment
- docs/NOTES.md: trigger name
- Add new test: interact_simple_sends_only_alt_j (1-line single-send)
- Existing smart shortcut tests renamed to bind: smart_interact
- CHANGELOG.md: trigger split note

93/93 cargo test pass; clippy clean.
2026-09-16 05:41:45 +02:00

122 lines
5.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# In-game macros (no addon, retail-shaped)
enBoxer only sends keystrokes. Bind these in WoW on **every** account. **The example profile targets retail (The War Within era, 2026).** Forever is not out yet, so the macro set is whatever current retail uses. If Interact with Target is missing on a client, the loot map will not walk or loot until a later helper (not shipped).
Match keys to `game_binds` in the profile.
## Interact with Target (keybind, no macro needed)
In WoW: **Key Bindings → Targeting → Interact with Target**. Bind it on every account to the same key (the example uses **Alt+J**). enBoxer routes the keystroke to every captured slot — no macro needed.
> Do not bind Interact Target to a mouse button; that is unreliable while enBoxer is routing mouse clicks.
Turn **Auto Loot** on in-game so the corpse is looted when the alts arrive.
## Auto-Interact (the legacy "CTM")
"Click to Move" was removed in Warlords of Draenor (2014). What multibox guides still call CTM is the `autoInteract` CVar: when on, your character walks up to the target and interacts automatically instead of needing a separate walk + interact sequence. enBoxer turns it on for the duration of an interact/loot map and turns it off afterwards.
CVars are not keybindable, so these need to be macros.
**CTM On**`game_binds.ctm_on` (example Shift+F3):
```
/console autoInteract 1
```
**CTM Off**`game_binds.ctm_off` (example Shift+F4):
```
/console autoInteract 0
```
If `/console autoInteract` is rejected (some protected profiles, a SecureCVar-protected client), the equivalent is:
```
/run C_CVar.SetCVar("autoInteract", "1")
```
and `"0"` for off.
## Assist and Follow (per-character macros)
The example profile stores a default key under `game_binds.assist` and `game_binds.follow`, and **overrides them per character** under `characters[].assist_key` and `characters[].follow_key`. The override is what every account actually binds in-game (so swap-to-slot-N retargets the bind automatically).
Pick a different in-game macro **per character** that targets the leader's name. For a Main named Eisheth:
**Assist** — bind to whatever you set on the character:
```
/assist Eisheth
```
**Follow** — bind to whatever you set on the character:
```
/follow Eisheth
```
If you swap leaders, edit the `assist` / `follow` macros on each client to match the new main's name, or just swap which client is the leader.
Built-in keybinds `Targets → Assist Target` / `Follow Target` only assist or follow the **current target**, which is not what multiboxing wants when the alts need to name-target the main. That's why enBoxer ships the per-character macro override.
## Optional, class-dependent (in-game keybinds, no macro)
- **Pet Attack** — Key Bindings → Pet Actions → Attack. Useful for Hunter / Warlock / DK / Demon Hunter. Wire it through enBoxer with `game_binds.pet_attack`.
- **Target Last Target** — Key Bindings → Targeting → Target Last Target. Useful as a "retry" if the first interact was on cooldown. Wire it with `game_binds.target_last`.
Both are pure in-game keybinds; enBoxer just routes the keystroke.
## One loot press (the `loot` map)
1. Target the corpse or NPC on the primary.
2. Press the loot hotkey (example Alt+G). That key is consumed; the primary does not interact unless the map targets `current`.
3. Alts assist, Auto-Interact on, Interact with Target once, walk `walk_delay_ms`, interact or loot, Auto-Interact off.
4. enBoxer's `interact.style` controls how aggressively Auto-Interact stays on: `standard` (on, then off), `auto` (stays on after the press), `hold` (on while the hotkey is down, off on release).
Do not mash. A second interact while they are still pathing is how characters run circles.
If they stop short, raise `walk_delay_ms` (25004000), or use `interact.style: auto` (CTM stays on), or `interact.style: hold`.
## Smart interact shortcut (`bind: smart_interact`)
The example profile's `loot` map (Alt+G) and `interact` map (Alt+I) both use a **smart shortcut**: a single user keypress fires the full chain (CTM on → Interact with Target → sleep `walk_delay_ms` → CTM off). It is what ISBoxer did with a "Mapped Key" — you press one key, the multibox software sends the whole chain.
In enBoxer the shortcut is `bind: smart_interact` in a step:
```yaml
- name: loot
hotkey: "Alt+G"
steps:
- bind: assist
target: others
- bind: smart_interact # <-- smart shortcut
target: others
```
The engine expands that one step at compile time. Driven by `profile.interact`:
| `interact.style` | What happens on the press | CTM after the press |
| ---------------- | ----------------------------------------------------------------------------------------- | --------------------- |
| `standard` | `ctm_on``interact` (`game_binds.interact`) → sleep `walk_delay_ms``ctm_off` | off |
| `auto` | `ctm_on``interact` | stays on (toggle off via `ctm_off` when you want) |
| `hold` | `ctm_on``interact` (Down); put `bind: ctm_off` in `release_steps` to turn it off on release | matches the hotkey down/up |
Walk distance and follower latency are absorbed by `walk_delay_ms` (default 2500 ms). If your alts stop short, raise it (25005000 ms is typical for indoor encounters).
If you need per-step control (different keys, branches, conditional delays), use the manual form:
```yaml
- name: loot_manual
hotkey: "Ctrl+Alt+G"
steps:
- bind: assist
- bind: ctm_on
- bind: interact
- delay_ms: 5000
- bind: ctm_off
```
Both forms are tested in `engine::tests`; see `interact_smart_shortcut_standard_emits_full_sequence`, `…_auto_emits_two_no_tail`, `…_hold_emits_press_only`, and `loot_manual` (which exercises the explicit chain).