Сообщение от
nepreklonen
А теперь сделай макрос чтоб ваще кнопку не нажимать
Надо облегчить невыносимо сложный геймплей арканмага
Не вопрос, пожалуйста, гарантированные 7к дпс в палку, переключатель на правом ctrl/alt
Создаем макрос:
PHP код:
/use ротациянаарканмага
Остальное в аддон:
PHP код:
do
local tumbler,stacks
local abl=GetSpellInfo(42897)
local am=GetSpellInfo(42846)
local prok=GetSpellInfo(44401)
local function hasEnoughMana(spellName)
return not select(2, IsUsableSpell(spellName))
end
local rotation = function(force)
if not tumbler or UnitCastingInfo("player") or UnitChannelInfo("player") then
return
end
if (force or UnitThreatSituation("player","target") or (UnitCanAttack("player", "target") and UnitIsPlayer("target"))) then
stacks=select(4,UnitDebuff("player",abl))
if stacks and stacks==4 and UnitAura("player",prok) and hasEnoughMana(am) then
RunMacroText("/use "..am)
print("/use "..am)
elseif hasEnoughMana(abl) then
RunMacroText("/use "..abl)
print("/use "..abl)
end
end
end
local f=CreateFrame("frame")
f:RegisterEvent("EXECUTE_CHAT_LINE")
f:RegisterEvent("MODIFIER_STATE_CHANGED")
f:SetScript("onevent",function(_,event,...)
if event == "EXECUTE_CHAT_LINE" and arg1 == "/use ротациянаарканмага") then
print(event)
rotation(true)
elseif event == "MODIFIER_STATE_CHANGED" and arg2==1 and (arg1 == "RALT" or arg1 == "RCTRL") then
if not tumbler then
tumbler=1
print("tumbler",tumbler)
else
tumbler=nil
print("tumbler",tumbler)
end
end
end)
f:SetScript("onupdate",function()
rotation()
end)
end
- - - Updated - - -
Сообщение от
Ronnie
Не влезает в макрос
Близы нелюди, хорошо хоть в аддоны все влезает. Должно влезть если убрать проверки на каст и чанел
PHP код:
/run local r=RunMacroText local g=GetSpellInfo local p="player" local abl=g(42897) local am=g(42846) if UnitCastingInfo(p) or UnitChannelInfo(p) then return end local s=select(4,UnitDebuff(p,abl)) if s and s==4 and UnitAura(p,am) then r("/use "..am) else r("/use "..abl) end