forked from TekNoLogic/Buffet
-
Notifications
You must be signed in to change notification settings - Fork 9
Custom Macros
HgAlexx edited this page Jun 5, 2026
·
15 revisions
local bests = ...
local food = bests.conjuredFood or bests.food or bests.healthstone or bests.healthPotion
local pot = bests.healthstone or bests.healthPotion
local body = "#showtooltip\n/use "
if bests.bandage then
body = body .. "[mod,target=player] item:" .. bests.bandage .. "; "
end
if pot then
body = body .. "[combat] item:" .. pot .. "; "
end
body = body .. "item:" .. (food or "6948")
return body
local bests = ...
local drink = bests.conjuredDrink or bests.drink or bests.manaPotion
local pot = bests.healthPotion
local body = "#showtooltip\n/use "
if pot then
body = body .. "[combat] item:" .. pot .. "; "
end
body = body .. "item:" .. (drink or "6948")
return body
local bests = ...
local bestfood = bests.conjuredFood or bests.food
local bestdrink = bests.conjuredDrink or bests.drink
local content = {}
table.insert(content, "#showtooltip")
if bestfood then
table.insert(content, "/cast item:" .. bestfood)
end
if bestdrink and bestfood ~= bestdrink then
table.insert(content, "/cast item:" .. bestdrink)
end
return table.concat(content, "\n")
local bests = ...
-- Best food with default to hearthstone
local bestfood = bests.conjuredFood or bests.food or 6948
if C_PvP.IsArena() or C_PvP.IsRatedArena() then
-- Best drink with default to hearthstone
bestfood = bests.conjuredDrink or bests.drink or 6948
end
return "#showtooltip\n/cast item:" .. bestfood
local bests = ...
local content = ""
if bests.bandage then
content = "/castsequence reset=120 Cannibalize, item:" .. bests.bandage
else
content = "/cast Cannibalize"
end
return "#showtooltip\n" .. content
Will get Conjured Mana Strudel
If not found:
- if out of PvP map, will get Honeymint Tea
- if in PvP map, will get Star's Sorrow
If not found, will default to best available conjured drink
If not found, will default to best available drink
If not found, will default to hearthstone
local bests, cache = ...
local itemConjuredManaStrudel = cache and cache[43523] or nil
local itemHoneymintTea = cache and cache[33445] or nil
local itemStarsSorrow = cache and cache[43236] or nil
local isPVPMap = C_PvP.IsPVPMap()
local body = nil
if itemConjuredManaStrudel then
body = "#showtooltip\n/cast item:43523"
elseif itemHoneymintTea and not isPVPMap then
body = "#showtooltip\n/cast item:33445"
elseif itemStarsSorrow and isPVPMap then
body = "#showtooltip\n/cast item:43236"
else
local drink = bests.conjuredDrink or bests.drink or 6948
body = "#showtooltip\n/cast item:" .. (drink)
end
return body
local bests, cache, availables = ...
local id = nil
local items = availables.food
if items then
id = items[#items].itemId
end
return "#showtooltip\n/cast item:" .. (id or 6948)
local bests, cache, availables = ...
local id = nil
local items = availables.drink
if items then
id = items[#items].itemId
end
return "#showtooltip\n/cast item:" .. (id or 6948)
local bests, cache = ...
local hs = bests.healthstone
local pot = bests.healthPotion
local content = ""
if hs and pot then
local hsData = cache and cache[hs] or nil
local potData = cache and cache[pot] or nil
if hsData.health >= potData.health then
content = "/castsequence reset=120 item:" .. hs .. ", item:" .. pot
else
content = "/castsequence reset=120 item:" .. pot .. ", item:" .. hs
end
elseif hs then
content = "/cast item:" .. hs
elseif pot then
content = "/cast item:" .. pot
else
content = "/cast item:6948"
end
return "#showtooltip\n" .. content