#Maccro + WA

29 messages · Page 1 of 1 (latest)

primal comet
#

hi! I have a question, maybe it's more of a WA topic but ill still give a try, I have the WA that give top PI target in the group, is it possible to make a weakaura that would retrieve this command's result and modify my maccro according to it ?

round elk
#

you mean modify the macro mid fight ?

#

it could create a glow on the unitframe though so you'd just need to mouseover cast pi

static osprey
#

I think he means more like at the start of the dungeon

#

from what it looks like in that screenshot there

round elk
#

but does it really make sense just locking on a target once ? as most of the time it is situational to give pi no ?

static osprey
#

99% of people dont care

round elk
#

but if it's your goal to just edit once then yes it works

static osprey
#

and if its a 2min class, then it fits anyways

static osprey
primal comet
primal comet
round elk
#
local macroText = "#showtooltip Power Infusion\n/use Elemental Potion of Ultimate Power\n/cast [@%s,help,nodead][] Power Infusion\n/cast Blood Fury(Racial)\n/cast Void Bolt\n/cast Vampiric Embrace"


local macroIndex = 1
local macroID = EditMacro(macroIndex, nil, nil, string.format(macroText, "playerNameHere"))
#

you just need to get the macroIndex and change the 1 to your id from the macroIndex Variable and then just put the name at "playerNameHere"

primal comet
#

ok ill check tyh

round elk
#

no macro index = macro index

#

get the addon IDTIP

#

or type following in chat /dump GetMacroIndexByName("Your Macro Name Here")

#

IdTip is always great to have though not only for macro Ids

primal comet
#

alright ty

primal comet
#

mh I tried to figure it out but I couldn't, im too noob at it

my macro isn't getting modified, I tried to tweak it a bit but I couldn't figure it out

primal comet
#

local macroText = "#showtooltip Power Infusion\n/use Elemental Potion of Ultimate Power\n/cast [@%s,help,nodead][] Power Infusion\n/cast Blood Fury(Racial)\n/cast Void Bolt\n/cast Vampiric Embrace"


local macroIndex = 20


local function UpdateMacro(playerName)

    EditMacro(macroIndex, nil, nil, string.format(macroText, playerName))
end


local function OnChatMessage(self, event, msg, sender, ...)
    -- Extract the player name from the chat message
    local playerName = string.match(msg, "pi2")
    if playerName then

        UpdateMacro(playerName)
    end
end

local frame = CreateFrame("Frame")

frame:RegisterEvent("CHAT_MSG_PARTY")

frame:SetScript("OnEvent", OnChatMessage)
nova reef
#

Afaik weakauras have disabled the EditMacro function to avoid scams etc

#

I have a secondary macro that i press that swaps my pi macro to whatever my mouseover is, so if you are ok with looking at what your WA outputted and do it manually with mouseover + macro press thats the way

primal comet