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