![Цитата](images/wow-circle/misc/quote_icon.png)
Сообщение от
decemberx
я же про задержку между каждыми тремя покупками говорю.
таймеры именно для этого. то есть, запустил макрос/скрипт он покупает три вещи, потом ждет пару сек и покупает еще 3. и это происходит столько раз сколько указывается в аргументе макроса/скрипта.
если это получится то можно влегкую подправить аддон.
а у тебя тоже самое что
ну я так понял.
А ну тогда:
PHP код:
local buy
do
local lastByu, count, try = GetTime(), 1, 1
local hanlde = setmetatable({}, {
__call = function(self)
if GetTime()-lastByu < .5 then
-- print("Покупать нельзя будет мут")
else
for i = 1, 3 do
local bid = select(9, GetAuctionItemInfo("list", i))
if bid > 0 then
PlaceAuctionBid("list", i, bid)
end
end
lastByu = GetTime()
count = count + 1
end
end
}
)
local updated = false
local f = CreateFrame"frame"
local OnUpdate = function(self, elps)
if count > tonumber(try) then
print("Покупка завершена")
self:SetScript("OnUpdate", nil)
updated, count = false, 1
else
return hanlde()
end
end
buy = function(...)
try = ...
if not updated then
f:SetScript("OnUpdate", OnUpdate)
updated = true
else
print("Покупка уже выполняется")
end
end
end
SlashCmdList["PLACEAUCTIONBID"] = function(...) return buy(...) end
SLASH_PLACEAUCTIONBID1 = "/plaseauc"
И покупать макросом /plaseauc 3 , т.е 3 раза скупает по 3 лота.