Reply
Thread Tools Display Modes
Unread 11-21-10, 05:41 PM   #1
cerement
A Murloc Raider
 
cerement's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 9
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
cerement is offline   Reply With Quote
Unread 11-21-10, 07:20 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,554
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.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

Seerah is offline   Reply With Quote
Unread 11-06-12, 11: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 01:57 PM. Reason: fixed bug when there are no auctions
KNfLrPn is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Sequential Cancel All Auctions Macro

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off