22 lines
515 B
Lua
22 lines
515 B
Lua
--TRADE_SHOW
|
|
function()
|
|
if UnitName("target") == "Melna" then
|
|
local items = 0
|
|
for i = 0, 4 do
|
|
for j = 1, GetContainerNumSlots(i) do
|
|
local link = select(7, GetContainerItemInfo(i, j))
|
|
if link then
|
|
local type = select(7, GetItemInfo(link))
|
|
if (type == "Cooking" or type == "Cloth") and items < 6 then
|
|
UseContainerItem(i, j)
|
|
items = items + 1
|
|
elseif items >= 6 then
|
|
AcceptTrade()
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
AcceptTrade()
|
|
end
|
|
end |