View Single Post
Old 11-06-12, 10:05 PM   #3
KNfLrPn
A Kobold Labourer
Join Date: Nov 2012
Posts: 1
This is outdated. Here are two versions that work as of 5.0:

Basically same as above, just fixed:
Code:
/run local o="owner" for i=1,GetNumAuctionItems(o)do local _,_,c,_,_,_,_,_,_,_,_,_,_,b=GetAuctionItemInfo(o,i)if c>0 and b==0 then CancelAuction(i)break end end
Faster version for spamming to cancel ALL auctions. With the previous version, you'll get a lot of "Item not found" errors because after cancelling, it takes a second or so for it to actually drop off the list, and all that time is wasted on trying over and over to cancel it. This version instead cancels a random auction in the list, so you get much fewer errors and overall the auctions cancel much faster.
Code:
/run local o="owner" p=GetNumAuctionItems(o) if(p>0)then local n=math.random(1,p) local _,_,c,_,_,_,_,_,_,_,_,_,_,b=GetAuctionItemInfo(o,n) if((c>0)and(b==0))then CancelAuction(n) end end

Last edited by KNfLrPn : 11-26-12 at 12:57 PM. Reason: fixed bug when there are no auctions
KNfLrPn is offline   Reply With Quote