Custom Macros - HgAlexx/Buffet GitHub Wiki

Old Buffet behavior:

AutoHP

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

AutoMP

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

Both Food and Drink

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")

Best food, or best drink when in Arena (Retail only)

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

Bandage for Undead

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

Dictatortvx Drinks for WotLK

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

Worst item first

food

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)

drink

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)