Skip to content
DavidBechtPublic

About

AutoLock a WoW Classic Vanilla Addon.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

AutoLock

Priority-based spell rotation addon for Warlocks on TurtleWoW (Vanilla WoW 1.12) Version 1.0.9

alt text

Table of Contents

What is AutoLock?

AutoLock automates your Warlock rotation on TurtleWoW. Instead of manually tracking which dots are active, whether Shadow Trance just procced, or when your cooldowns are ready, you press one button (or keybind a macro) and AutoLock fires the highest-priority spell that is ready to go.

Key highlights:

  • Priority-based — every spell has a number; lowest number fires first.
  • Fully configurable — enable/disable spells, reorder them, and save multiple named configs (e.g. AoE, Single Target, PvP).
  • Smart conditions — spells only fire when their condition is met: Shadow Trance proc active, cooldown ready, target in range, player not moving, HP/mana above a threshold, etc.
  • Curse integration — curses are managed via the Cursive addon and are automatically refreshed only when they fall off.
  • Soul Shard management — optionally auto-deletes shards sitting outside your Soul Bag when your Soul Bag is full.
  • Life Tap automation — optionally casts Life Tap when you run low on mana before a cast.

Requirements

Dependency Required Version Purpose
TurtleWoW (patch 1.12) Yes — Client version the addon targets
Cursive Yes ≥ 3.0.0 Handles curse application and refresh timers
nampower Yes ≥ 2.0.0 Spell queueing and channel control (ChannelStopCastingNextTick)
SuperWoW Yes — Enables buff detection (Shadow Trance, etc.)
English Client Yes — Other languages not supported yet.

Installation

  1. Download or clone this repository into your addons folder:
    TurtleWoW/Interface/AddOns/AutoLock/
    
  2. Make sure Cursive is also installed in Interface/AddOns/Cursive/.
  3. Launch the game. AutoLock loads automatically.
  4. On the very first launch after installing or after a TOC change, do a full game restart (not just /reload) so WoW picks up any new files.

Quick Start

  1. Open the UI: click the Shadow Bolt icon on your minimap, or type /autolock toggle.
  2. Enable the spells you want in your rotation using the checkboxes.
  3. Drag the spells into the order you want using Up / Down.
  4. Make sure your spells are on your action bar (required for range checking).
  5. Bind a key or create a macro /run AutoLock:DoAutoLock() and spam it.

The Main UI

Open with /autolock toggle or the minimap button.

Config Strip

The horizontal icon strip at the top of the window shows all your saved configs.

Interaction Action
Left-click Load this config
Shift + drag Create a macro for this config and place it on the cursor — drag it to an action bar slot
Right-click Edit name and icon
Shift + right-click Delete (with confirmation)

The active config is highlighted in gold. Hovering shows a tooltip with all interactions.

Spell Priority List

Each row in the list represents one spell entry.

Spell Priority List

Column Description
Checkbox Enable or disable this spell in the rotation
Name (type) Spell name and type (cast, curse, trinket, pet)
Prio Current priority number — lower fires first
Refresh (s) Curse only — minimum remaining duration before re-applying (leave 0 to always let Cursive decide)
Cond Opens the per-spell condition editor
Up / Down Move the spell up or down in priority

Use the Show Disabled checkbox at the top-left to show or hide disabled spells. Click Apply to force-refresh the list after making changes.

Changes to the Prio or Refresh fields are saved automatically when you leave the input box.

Conditions

NOT IMPLEMENTED YET. NOT WORKING

Click the Cond button on any spell row to open the condition editor for that spell.

Field Description
Player HP Only cast if player HP% is ≤ or ≥ the threshold
Player Mana Only cast if player Mana% is ≤ or ≥ the threshold
Target HP Only cast if target HP% is ≤ or ≥ the threshold
Combine ALL (AND) — all conditions must pass; ANY (OR) — at least one must pass

Leave a field empty to ignore that condition.

Example: Set Drain Soul to Target HP ≤ 20 so it only fires for the soul shard below 20 %.

Settings Panel

Click the Settings button (bottom of the main window) to open the settings panel.

Setting Default Description
Auto-delete Soul Shards when Soul Bag is full On When your Soul Bag fills up, shards sitting in normal bags are automatically deleted on BAG_UPDATE
Use Life Tap when low on mana On Automatically casts Life Tap when your mana is too low for the next spell in the rotation
Hide spells not in spellbook Off Hides rotation entries whose spell you haven't learned yet

Settings are saved to AutoLockDB.settings and persist between sessions.

Default Spell Rotation

The table below lists every spell entry that ships with AutoLock, sorted by default priority. You can reorder and toggle these freely inside the UI.

Priority Spell Type Enabled Notes
1 Shadow Trance (Shadow Bolt) cast ✅ Only fires when the Shadow Trance proc is active
2 Firebolt (Pet) pet ✅ Only fires if a living pet exists
3 Trinket Slot 1 trinket ❌ Enable manually; fires when trinket is off cooldown
4 Trinket Slot 2 trinket ❌ Enable manually; fires when trinket is off cooldown
6 Curse of Shadow curse ✅ Via Cursive
7 Curse of Agony curse ✅ Via Cursive
8 Corruption curse ✅ Via Cursive
9 Siphon Life curse ✅ Via Cursive; configurable per DS-config whether renewed during Drain Soul channel
10 Curse of Recklessness curse ❌ Situational
11 Curse of Weakness curse ❌ Situational
12 Curse of Tongues curse ❌ Situational
13 Curse of the Elements curse ❌ Situational
15 Curse of Doom curse ❌ Situational
17 Soul Fire cast ❌ Skipped while moving; checks cooldown
18 Immolate curse ❌ Skipped while moving; has post-cast pause to avoid double application
19 Conflagrate cast ❌ Skipped while moving; checks cooldown
20 Death Coil cast ✅ Only fires when off cooldown
21 Shadowburn cast ✅ Only fires when off cooldown
22 Dark Harvest cast ❌ TurtleWoW custom spell; skipped while moving or channeling; has its own Cfg popup
23 Drain Soul cast ✅ Skipped while moving; waits for previous channel to finish; has its own Cfg popup
30 Shadow Bolt (filler) cast ❌ Skipped while moving
32 Searing Pain cast ❌ Skipped while moving
99 Shoot (Wand) cast ❌ Fallback; skipped while already shooting or moving

Drain Soul Config (DS Cfg)

DS Config Window

Click the Cfg button next to Drain Soul in the spell list to open the DS configuration popup.

This lets you choose which dots AutoLock is allowed to renew while Drain Soul is actively channeling. Renewing a curse mid-channel interrupts the channel — uncheck a dot to keep the channel running uninterrupted.

Checkbox Default Effect
Curse of Agony / Curse of Shadow ✅ Allowed to refresh during DS channel
Corruption ✅ Allowed to refresh during DS channel
Siphon Life ✅ Allowed to refresh during DS channel

The popup is draggable.

Dark Harvest Config (DH Cfg)

DH Config Window

Click the Cfg button next to Dark Harvest to open the DH configuration popup.

Checkbox Default Effect
Shadow Vulnerability ❌ Required debuff before DH is cast
Require full dot time ❌ Only cast DH if the selected dots have enough remaining time for full damage (minimum: DH channel duration × 1.3). Sub-checkboxes select which dots are checked:
   Curse of Agony ✅ Check CoA remaining time
   Corruption ✅ Check Corruption remaining time
   Siphon Life ✅ Check Siphon Life remaining time
Allow Nightfall proc during channel ❌ When checked, a Shadow Trance (Nightfall) proc at priority 1 is allowed to fire and interrupt the DH channel
DH interrupts Drain Soul ✅ When unchecked, Dark Harvest will not interrupt an active Drain Soul channel — useful when you want DS to always run to completion before DH fires

The popup is draggable.

Config System

Configs let you save and switch between different priority setups instantly.

Creating a Config

New Config popup

  1. Click New Config at the bottom of the main window.
  2. Type a name (up to 16 characters).
  3. Pick an icon from the grid.
  4. Click OKAY — the current spell priorities and settings are saved to this config.

Switching Configs

Left-click any config icon in the strip at the top. The icon turns gold to indicate the active config.

Action Bar Macros

Shift-drag a config icon onto an action bar slot to create a macro. The macro runs:

/run AutoLock:DoAutoLock("YourConfigName")

This lets you switch configs and fire the rotation in one keypress.

Editing / Deleting

  • Right-click a config icon → rename and change icon.
  • Shift + right-click → delete (confirmation required).

Minimap Button

alt text

A draggable Shadow Bolt icon appears on your minimap.

  • Click — opens/closes the main UI.
  • Drag — reposition the button anywhere around the minimap. Position is saved.

SpellBook Button

AutoLock adds a button to the General tab of your spellbook.

alt text

  • Left-click — fires DoAutoLock() directly.
  • Shift + drag — picks up the AutoLock macro to place on an action bar.

Slash Commands

/autolock toggle    — open or close the main UI
/autolock show      — open the main UI
/autolock hide      — close the main UI

How the Rotation Works

When AutoLock:DoAutoLock() is called (via keybind macro or the spellbook button), it loops through SPELL_PRIORITY from lowest to highest number and fires the first entry whose conditions are all satisfied:

DoAutoLock()
  └─ for each entry in priority order:
       1. Skip if disabled
       2. Skip if this spell just failed due to facing ("Target needs to be in front of you")
          → clears the flag so the next press retries it
       3. Skip if Dark Harvest is still channeling (unless Nightfall proc is allowed via DH Cfg)
       4. Skip if the spell's custom condition() returns false
          (Shadow Trance proc, cooldown, movement, HP/mana thresholds…)
       5. Skip if out of range  (requires the spell to be on an action bar slot)
       6. If mana is too low → cast Life Tap (if enabled in Settings)
          → return false so the spell is skipped this tick
       7. Fire the spell / trinket / pet action → return true (stops the loop)

Because only one action fires per call, spam the macro as fast as your GCD allows.

Shadow Trance

AutoLock detects the Shadow Trance buff (requires SuperWoW) and puts a special Shadow Trance (Shadow Bolt) entry at priority 1. It has a short post-cast grace period so it doesn't fire a second Shadow Bolt immediately after the proc bolt lands.

Movement Detection

Spells marked as cast-type check the movement poller (MovementEvents). If the player is moving, those spells are skipped. Instants (curses, Death Coil, etc.) are not blocked by movement.

Range Checking

For cast and curse spells, AutoLock checks range via nampower's IsSpellInRange(name, "target") when available. If nampower is not loaded, it falls back to scanning action bar slots and calling IsActionInRange() — in that case, keep your rotation spells on your action bars.

Dependencies & Startup Warnings

At login, AutoLock prints a coloured status line for each potential issue:

Message Meaning
[Warning] AutoLock uses English spell names. Non-English clients may have issues… Your client locale is not enUS. Spell detection may fail.
[Warning] SuperWoW not detected. Buff-based features … will not work. SuperWoW is missing — Shadow Trance detection is disabled.
[Warning] Cursive not found. Curse spells in the rotation will be skipped. Cursive addon not loaded — all curse-type entries are silently skipped.
[Warning] Nampower not detected. Spell queueing conflicts possible when spam-casting. nampower ≥ 2.0.0 is missing — channel interrupts are slightly delayed (server round-trip instead of frame-accurate) and range/mana/duration checks fall back to tooltip scanning.

Log format: [AutoLock][Level]: message

  • [AutoLock] — warlock purple
  • [Info] — blue
  • [Warning] — yellow
  • [Error] — red

Support

If AutoLock saves you from manually tracking your dots, consider buying the author a coffee! ☕

Click the "Buy me a Coffee – PayPal" button inside the Settings panel to print the link to your chat window, then copy it to your browser.

Changelog

v1.0.9

  • Fix: rotation hang after full curse rotation. When a cast-type spell with priority 10–21 (Death Coil prio=20, Shadowburn prio=21) fired and was held in the nampower queue, subsequent curse applications (prio 6–9) passed the NP guard unblocked — but did not clear the queue flag. Once all four curses were applied, DS (prio=23) and DH (prio=22) were blocked by the guard (23 > 20, 22 > 20) until SPELLCAST_STOP fired at GCD end (~1 s later), causing a visible dead-press hang. Fix: when a curse fires successfully it now explicitly clears _npQueuedThisCast. Previously queued cast-type spells have already been dispatched by nampower by the time all curses are applied.
  • Tests: multi-target rotation suite with clock advancement, refreshtime cycles, and full invariant checking across 79 rotation visits (standard + random configs).
  • Tests: freeze regression suite (freeze_after_curse_rotation) that exercises the exact NP-flag scenario above with pressNP() — a helper that does not reset the flag between presses, mirroring real-game behaviour.

v1.0.8

  • Fix: rotation freeze after Curse of Shadow. After CoS fired, rapid pressing got stuck: the curse condition correctly detected CoS already on the target and returned false, but the nampower queue flag was already set, blocking every spell with a higher priority number. Nothing fired → no SPELLCAST_STOP → flag stuck permanently. Fix: curse-type spells no longer set the nampower queue flag (curses are instant; the flag is only meaningful for queued cast-bar spells).
  • Fix: CoS condition guard. Added a HasCurse("curse of shadow") check to the Curse of Shadow condition. Without it, Cursive:Curse() returned a truthy "handled" response when CoS was already on the target, which AutoLock misread as a successful cast — triggering the freeze described above.
  • Refactor: engine split into separate files. AutoLockEngine.lua now holds all guard logic, channeling state, and TryAction. AutoLockSpells.lua holds the SPELL_PRIORITY table. AutoLockSoulShards.lua holds soul shard management. This makes each concern easier to read and test independently.

v1.0.7

  • Added Require full dot time guard to Dark Harvest: DH only fires if the selected dots have enough time remaining for the full channel to deal damage (configurable per-dot in the DH Cfg popup).
  • Added facing-failure guard: if a spell fails with "Target needs to be in front of you", that spell is skipped on the same press and retried on the next.

v1.0.6

  • Added facing-failure guard as an initial implementation (refined in v1.0.7).

v1.0.5

  • Fixed Malediction compatibility for HasCurse calls: CoS and CoA share the same debuff slot under Malediction; the rotation now correctly treats them as occupying the same slot.

v1.0.4

  • nampower integration: spell queueing via ChannelStopCastingNextTick, direct range/mana/duration queries via nampower APIs, falling back to tooltip scans when nampower is absent.

AutoLock is built for TurtleWoW — the Vanilla 1.12 progressive realm.

About

AutoLock a WoW Classic Vanilla Addon.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages