WoWInterface

WoWInterface (http://www.wowinterface.com/forums/index.php)
-   Tutorials & Other Helpful Info. (http://www.wowinterface.com/forums/forumdisplay.php?f=12)
-   -   Sequential Cancel All Auctions Macro (http://www.wowinterface.com/forums/showthread.php?t=36927)

cerement 11-21-10 04:41 PM

Sequential Cancel All Auctions Macro
 
Updated an unknown developer's old "Cancel All Auctions" macro (basically by just adding in a "break"). Obeys the requirements of one-hardware-action-per-cancel, doesn't cancel auctions with bids (or try to cancel already sold auctions), doesn't require any specific auction addon, *does NOT check for underbids*. Open up your auction tab and just keep punching the macro 'til they're all canceled. Enjoy.

Code:

/run local o="owner" p=GetNumAuctionItems(o) for i=1,p do local _,_,c,_,_,_,_,_,_,b,_,_=GetAuctionItemInfo(o,i) if((c>0)and(b==0))then CancelAuction(i) break end end

Seerah 11-21-10 06:20 PM

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
Shortened it a little bit for you. :)

KNfLrPn 11-06-12 10:05 PM

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


All times are GMT -6. The time now is 08:14 AM.

vBulletin © 2014, Jelsoft Enterprises Ltd
©2012 ZAM Network LLC