Page 1 of 1
Automatically add things to auction house while botting
Posted: Tue Jul 20, 2010 10:26 am
by randomuser01
As you may (or may not) know, you can "rent" a portable auction house, portable mailbox and portable bankbox. It costs a couple diamonds and allows you to open them anywhere in the world during the rental period.
Let me preface this with saying that I play on a pvp server.
My idea is to automatically put certain items that I loot into the auction house.
Here are two API functions I've found:
API:OpenAuction (opens the auction window)
API:CreateAuctionItem (fills in the starting bid, buyout amount and length of auction)
The only piece of the puzzle that I am missing is how do I move a specific item from my bag into the auction window? Can I call a specific item_id? Or can I move items by what bagslot they are in?
Any help with creating this code?
Re: Automatically add things to auction house while botting
Posted: Thu Aug 19, 2010 4:04 am
by Lorelei
I've been looking for the answer to the same question. Any ideas out there?
Re: Automatically add things to auction house while botting
Posted: Sun Aug 22, 2010 4:55 am
by MiesterMan
I wouldn't waste diamonds on something like that (I play on pvp servers too) but I'm curious how you determine if the items you looted are bound or not (after you reach Savage Lands you start looting bound greens and blues)? But streamline is really helpful for this. If you have streamline installed you can remove the metakey check on line 457 of streamline.lua and use the Streamline.BagItemButton_OnClick() function to set auctions. Though this method uses your already set pricing method (or just sets it to the average, I forget). Otherwise you can just take the code from that section of streamline and mod it to do what you want.
Code: Select all
-- Sell items on AH
function auctionIt(_BadID)
if AuctionFrame:IsVisible() or (AA_AuctionFrame and AA_AuctionFrame:IsVisible()) then
PickupBagItem(GetBagItemInfo(_BagID))
ClickAuctionItemButton()
local callback = function() AuctionSellCreateButton_OnClick() end
return true
else
return false
end
end
Make your own function in your own manual addon from the above code and call it to set the auctions. Also in the onLoad section of your profile put:
Code: Select all
local auctionItems = {"Item 1", "Item 2", "Item 3"}
function sendAuction(npcName)
player:target_NPC(npcName);
yrest(2000);
RomScript("ChoiceOption(1);");
yrest(2000);
aucIndex = 1;
while auctionItems[aucIndex] do
inventory:update();
for slot,item in pairs( inventory.BagSlot ) do
if item.Id == auctionItems[aucIndex] or item.Name == aucItems[aucIndex] then
RomScript("auctionIt("..toString(inventory.Bagslot)..");");
yrest(5000);
end;
end;
end
end
Please note I'm currently not in a situation to test these so I can't confirm everything in them is correct. If someone feels like error-checking and correcting these please do.
Edit: Added sendAuction argument and select the npc and open auction.
Re: Automatically add things to auction house while botting
Posted: Tue Aug 23, 2011 4:41 pm
by botje
sorry to bump this, but can anyone please make this stuff intoo a userfunction?
Botje
Re: Automatically add things to auction house while botting
Posted: Tue Aug 23, 2011 11:20 pm
by rock5
I, personally, never wanted to automate this because there are too many decisions to be made to correctly price the items and a simple function that just adds items at a set, probably discounted price, would severely piss a lot of people off.
I recommend, if you want to clear your inventory of auctionable items while botting, is to mail them to another character. Then at a latter date you can log in with that character, collect your mail, work out a good price and then sell them all.
Re: Automatically add things to auction house while botting
Posted: Wed Aug 24, 2011 2:04 am
by botje
well, thing is, i use AAH, think most of us do, and i have set it to avarage price, so whenever i would auction it, it would use
same price anyway, so that should work just fine.
just cant get my head around this stuff >.<
Botje
Re: Automatically add things to auction house while botting
Posted: Wed Aug 24, 2011 5:41 am
by S1y
Hi
i managed to get it working

first you need to target auction person :
Code: Select all
player:target_NPC("Auction House Clerk");
then i got a script to check for number of items that i want to sell ( its feeded from a table ) then you open an auction interface :
pick up an item :
Code: Select all
RoMScript("PickupBagItem("..toslot.BagId..")"); yrest (500);
place it in the auction window :
Code: Select all
RoMScript("ClickAuctionItemButton()"); yrest (500);
and finally send it :
Code: Select all
sendMacro("CreateAuctionItem(\""..tostring(4).."\", \""..t[vv][2].."\", \""..tostring(1).."\", \""..t[vv][3].."\")");yrest (1000);
you can read a bit more about the crateauctionitem function on rom wiki page - wanted to post url but it says its a spam :/ so here is a nutshell version of it -> ( CreateAuctionItem(AUCTION_DURATION_SELECTED, price, moneyMode, buyout); )
Thanks
There are few things you need to think about - as cheking for maximum auctions
Code: Select all
max_auctions = (RoMScript("GetAuctionNumSellItems()"));
and checking for stacked items - so it wont sell 99 items for the price of 1.
Have to agree with Rock5 its quite personal use - and will need to be adjusted every time at every occasion.