FYI: Attempt at a Proc watching Macro. Result - Interface Action Blocked

Hi All,

I have been right down in the guts of things and here is an attempt at a macro that watches for a Proc then acts. I get asked about these all the time and here is why it wont work.

TL;DR; - The action that updates the step is EXPLICITLY BLOCKED BY Blizzard.


Sequences['DB_Fire'] = {
specID = 63,
author = "John Mets -",
helpTxt = "Talents - 2233111",
proctest="Hot Streak!",
PreMacro = [[
/targetenemy [noharm][dead]
"/castsequence reset=combat Fireball, Fireball, Fireball, Fireball, Fire Blast",
"/cast Combustion",
"/cast Living Bomb",
"/cast Ice floes",
"/cast Pyroblast",

The Underlying on Click code:

local procstep = self:GetAttribute('procstep')
  local proctest = self:GetAttribute('proctest')
  local returnstep = self:GetAttribute('returnstep')
  if not GSisEmpty(proctest) then
    local procname = UnitBuff("player", proctest)
    if not GSisEmpty(procname) then
      print("proc " .. procname)
      self:SetAttribute('returnstep', step) -- This is the line that would fail and abort at.  This function is explicitly blocked within the Macro sandbox.
      self:SetAttribute('step', procstep) 
      step = procstep

  elseif not GSisEmpty(returnstep) then
    self:SetAttribute('step', returnstep)
    self:SetAttribute('returnstep', nil)
    step = returnstep

The step FUnciton in this was watching for Hot Streak and would then change the Step to be 5. Prior to that it would cycle through steps 1-4 and not hit 5 unless Hot Streak. The macro could detect Hot Streak but when it went to change the step to 5 “Interface has been Blocked from an Action”. As soon as you call UnitBuff, you are restricted to read actions only.

Then the only way to increase perfomance is Rage Press or Intelligent Prediction.

1 Like