LuaSlinger»Lazy Rogue

Lazy Rogue

"Lazy Rogue": Sinister Strike/Riposte/Eviscerate Spam Key

Combat rogues can spam this all day. You MUST replace 70, 71, and 72 below with the appropriate slot numbers for Sinister Strike, Eviscerate, and Riposte on your action bar. Use DumpActionBarSlots to figure out what those are.

Updated 2005/10/16: the 1.8 patch changed the way Riposte's cooldown worked, so the previous version of "Lazy Rogue" broke. This is an updated version.

Note: after refining this code within LuaSlinger, I published this as a standalone Addon called LazyRogue. LazyRogue has numerous improvements, so I would recommend using it instead. However this script remains a good example of powerful scripting within LuaSlinger.

-- Lazy Rogue:
-- Cast Eviscerate if possible and 5 points are charged up
-- or, cast Riposte if possible
-- or, cast Sinister Strike if possible
-- or, silently do nothing

local tEviscerate = {71, 35, 5};
local tRiposte = {72, 10, 0};
local tSinisterStrike = {70, 40, 0};

-- make sure sword is equipped (assumes Equip Sword is in Script 2)

local cp = GetComboPoints()

local key, t
for key,t in { tEviscerate, tRiposte, tSinisterStrike } do

  local isUsable, notEnoughMana = IsUsableAction(t[1])
  if (isUsable == 1) then

    local start, duration, enable = GetActionCooldown(t[1])
    if (start == 0) then   -- not in cooldown

      if (IsActionInRange(t[1]) == 1 and
          UnitMana("Player") >= t[2] and 
          cp >= t[3]) then