Automatically add things to auction house while botting

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
randomuser01
Posts: 29
Joined: Mon Jul 19, 2010 7:32 pm

Automatically add things to auction house while botting

#1 Post by randomuser01 » Tue Jul 20, 2010 10:26 am

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?

Lorelei
Posts: 5
Joined: Wed Jul 07, 2010 4:11 am

Re: Automatically add things to auction house while botting

#2 Post by Lorelei » Thu Aug 19, 2010 4:04 am

I've been looking for the answer to the same question. Any ideas out there?

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Automatically add things to auction house while botting

#3 Post by MiesterMan » Sun Aug 22, 2010 4:55 am

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.

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Automatically add things to auction house while botting

#4 Post by botje » Tue Aug 23, 2011 4:41 pm

sorry to bump this, but can anyone please make this stuff intoo a userfunction?

Botje

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Automatically add things to auction house while botting

#5 Post by rock5 » Tue Aug 23, 2011 11:20 pm

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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Automatically add things to auction house while botting

#6 Post by botje » Wed Aug 24, 2011 2:04 am

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

S1y
Posts: 23
Joined: Mon Jul 04, 2011 9:43 am

Re: Automatically add things to auction house while botting

#7 Post by S1y » Wed Aug 24, 2011 5:41 am

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 :

Code: Select all

RoMScript("OpenAuction()");
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.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest