What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Open Auction House Bot

lypnn

New Member
Joined
Jul 15, 2012
Messages
131
Reaction score
4
Open Auction House

Open Auction House

This is an open source auction house plugin written as alternative to the paid auction house sniper plugin.

The bot/plugin will bid up to the amount you defined with the maxprice parameter of the buyFromAuctionHouse method. Additionally you can tweak the 3 variables on top of the plugin to change the bidding behavior (overbidamount, waitSecondsForAuctionEnd, msToBidBeforeAuctionEnd).

After pasting the code to the plugin editor you need to add a line, calling the buyFromAuctionHouse method, for every item you want to go through.
version 2.3
Code:
using System;
using System.Drawing;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;

namespace OpenAuctionHouse
{
    public class OpenAuctionHouse : Core
    {
        private int overbidamount = 40; // attempt to bid 40c above current bid
        private int waitSecondsForAuctionEnd = 180; // if a bid item is at < 3 minutes wait for it to end
        private int msToBidBeforeAuctionEnd = 5000; // wait until timeleft = 5 seconds until bidding myself

        private Random r = new Random();
        public static string GetPluginAuthor()
        {
            return "lypnn";
        }

        public static string GetPluginVersion()
        {
            return "2.3.0.0";
        }

        public static string GetPluginDescription()
        {
            return "Open Auction House";
        }

        //Call on plugin start
        public void PluginRun()
        {
            try
            {
                Log(DateTime.Now.ToShortTimeString() + " > ----- Open Auction House started -----");

                while (true)
                {
                    buyFromAuctionHouse("Lotus", 80, 2); //  80 copper per item, minimum amount 2
                    buyFromAuctionHouse("Azalea", 50, 2); // 50 copper per item, minimum amount 2     

                    // add more items here
                }
            }
            catch (Exception e)
            {
                if (e.GetType() != typeof(System.Threading.ThreadAbortException))
                {
                    Log(DateTime.Now.ToShortTimeString() +" ERROR " +GetLastError().ToString() +" " +e.GetType().ToString() +" " +e.StackTrace);
                    Log(e.Message);
                }
            }
        }

        //Call on plugin stop
        public void PluginStop()
        {
            Log(DateTime.Now.ToShortTimeString() + " > ----- Open Auction House stopped -----");
        }

        ////////// no variables to edit below this line /////////////

        //buyout an auction house item
        public void buyFromAuctionHouse(string mySearchText, int maxprice, int minamount) // maxprice per item in copper, 1g = 1 00 00 copper
        {
            AuctionRequestParams req = new AuctionRequestParams(AuctionCategory.Off, 0, 0, mySearchText, false, ItemGrade.Common, AuctionSortType.Time, SortOrder.Asc);
            int pip; // per item price
            bool bidreturn;

            List<AuctionItem> items = getAuctionBuyList(req, 0);
            if(items != null)
            {
            foreach (AuctionItem item in items)
            {
                if (!item.item.name.Equals(mySearchText)) // auctionitem item name must match the searchText
                    continue;

                if (Convert.ToInt32(item.time) > waitSecondsForAuctionEnd)
                {
                    pip = (int)item.buyBackPrice / item.item.count;

                    if (item.item.count < minamount || item.buyBackPrice == 0 || pip > maxprice)
                        continue;

                    if (me.goldCount >= item.buyBackPrice)
                    {
                        Thread.Sleep(100 + r.Next(150));
                        bidreturn = item.MakeAuctionBid(item.buyBackPrice);
                        Thread.Sleep(1000 + r.Next(500));
                        if (bidreturn)
                            Log(DateTime.Now.ToShortTimeString() + " > Attempting to BUYOUT " + item.item.count + " " + item.item.name + " with per item price " + pip.ToString() + " ... succeeded !");
                        else
                            Log(DateTime.Now.ToShortTimeString() + " > Attempting to BUYOUT " + item.item.count + " " + item.item.name + " with per item price " + pip.ToString() + " ... failed.");
                    }
                    else
                        Log(DateTime.Now.ToShortTimeString() + " > not enough gold to buyout " + item.item.count + " " + item.item.name + " for " + item.buyBackPrice);
                }
                else // auction items time is nearly over, check if we want to bid on it
                {
                    pip = (item.bidMoney != 0 ? item.bidMoney : item.sellPrice) / item.item.count;
                    if (pip + overbidamount <= maxprice && item.item.count >= minamount) // check if this is an item below maxprice
                    {
                        bidOnAuctionHouse(req, item.uniqId, maxprice);
                        break;
                    }
                }
            }
            }
            else
            {
                Log(DateTime.Now.ToShortTimeString() + " > " +GetLastError().ToString() +" Error ... will try again");
            }
            Thread.Sleep(2000 + r.Next(3000)); // Random sleep 2-5s
        }
        public void bidOnAuctionHouse(AuctionRequestParams req, ulong itemId, int maxprice)
        {
            int pip; // per item price
            int myBidAmount;
            int sleepTime;
            bool bidreturn;

            List<AuctionItem> items = getAuctionBuyList(req, 9);
            foreach (AuctionItem item in items)
            {
                if (item.uniqId == itemId)
                {
                    pip = (item.bidMoney != 0 ? item.bidMoney : item.sellPrice) / item.item.count;
                    if (pip + overbidamount <= maxprice)
                    {
                        sleepTime = Convert.ToInt32(item.time) * 1000 - Convert.ToInt32(r.Next(500)) - msToBidBeforeAuctionEnd;
                        Log(DateTime.Now.ToShortTimeString() + " > waiting " + ((int)sleepTime / 1000).ToString() + " seconds to attempt a last-second-bid on " + item.item.count + " " + item.item.name + " (current bid price per item: " + pip + " maxprice: " +maxprice +")");
                        if (sleepTime > 100)
                            Thread.Sleep(sleepTime);
                        break;
                    }
                    else
                        return; // the item has become too expensive
                }
            }

            items = getAuctionBuyList(req, 9);
            foreach (AuctionItem item in items)
            {
                if (item.uniqId == itemId)
                {
                    pip = (item.bidMoney != 0 ? item.bidMoney : item.sellPrice) / item.item.count;
                    if (pip + overbidamount <= maxprice)
                    {
                        myBidAmount = (item.bidMoney != 0 ? item.bidMoney : item.sellPrice) + overbidamount;
                        if (me.goldCount >= myBidAmount)
                        {
                            bidreturn = item.MakeAuctionBid(myBidAmount);
                            Thread.Sleep(1000 + r.Next(500));
                            if (bidreturn)
                                Log(DateTime.Now.ToShortTimeString() + " > Successfully sent a BID on " + item.item.count + " " + item.item.name + " with " + myBidAmount + " (pip: " + (myBidAmount/item.item.count) + ")");
                            else
                                Log(DateTime.Now.ToShortTimeString() + " > Failed to send a BID on " + item.item.count + " " + item.item.name + " with " + myBidAmount + " (pip: " +(myBidAmount/item.item.count) +")");
                        }
                        else
                            Log(DateTime.Now.ToShortTimeString() + " > not enough gold to bid on " + item.item.count + " " + item.item.name + " with " + myBidAmount);
                    }
                    else
                        return; // the item has become too expensive
                }
            }
        }
    }
}

log
Code:
19.10. v2.3 ResponseTimout fix after AB update
 7.10. v2.2 fixed bidding sellPrice and other bugs
 1.10. v2.1 bugfix release
30. 9. v2   major release with bidding support
29. 9. v1   initial release with buyout support

Donate with Paypal
 
Last edited:
This is not good people. Please shut down all auction threads. This is completely insane. This will destroy auction houses, economies, and will attract shit tons of attention to the forum.
 
11 people snagged it, say goodbye to profits. Oh lord.
 
I gotta agree that it's a bad idea but these will and are popping up everywhere, not just on the buddy forums.

I never bot for real life profit so i never touch plugs like this but I'm afraid I see the appeal to people looking for some fast cash, be it in-game or real wallet.
There is nothing we can do besides waiting for/creating labor plugins so we don't have to pay for overpriced items on AH.
And hope AA goes a bit more F2P/bot friendly when it comes to labor points.
 
too-much-salt-concept-also-1.jpg
 
If you do decide to take donations, or charge, I will donate and pay, but be firm in your pricing, dont hike it twice in 24 hours.

Thank you for this work, and effort. I will support you.
 
5 minutes ago I received a PM telling me that SystemShock updated his paid plugin to include bidding support. Looking into his thread I find a shiny new banner claiming he supports bidding but the feature list below still does not say anything about that.

Can anyone else confirm that he released a ninja update with bidding support and most important, when he did that (yesterday or today). Its important for the coding challenge I accepted.
 
5 minutes ago I received a PM telling me that SystemShock updated his paid plugin to include bidding support. Looking into his thread I find a shiny new banner claiming he supports bidding but the feature list below still does not say anything about that.

Can anyone else confirm that he released a ninja update with bidding support and most important, when he did that (yesterday or today). Its important for the coding challenge I accepted.

Why confirm it, just challenge your self and do everything. That's the true challenge!
 
Why confirm it, just challenge your self and do everything. That's the true challenge!

I got confirmation in PM. The new version of Open Auction House is already finished and now in testing stage.
 
I got confirmation in PM. The new version of Open Auction House is already finished and now in testing stage.

Right?

So finish yours is what I am saying why wait for someone to finish his I don't get it lol. Just to offer something of equal value out of spite or what? Why not just construct your own and make people happy that want to use it.
 
Thank you for the plugin! You should put up a donate link so we can support your hard work.
 
Why not just construct your own and make people happy that want to use it.

I tried to explain that in the opening post. However, the new version is now up in the first post.

Since there are a few people asking for a donation link already. I can only accept bitcoin:
https://blockchain.info/address/18EVPPG1Xe5fGTW5gNyoaos6Fp8FcARq7m

Everyone who does not know bitcoin cannot donate, instead just do yourself a favor and take a few minutes to inform yourself about the greatest human invention since decades. The blockchain technology behind bitcoin removes the need for a trusted third party in human communications and contracts.
reXBT.com - Andreas M. Antonopoulos - L.A. Bitcoin Meetup - "The Network Effect" - Part 2 of 8 - YouTube
Bitcoin 101 - What is Bitcoin? - YouTube
 
Man, AH bots are the thing that should remain private... since we have a framework which you can use.. but if there is a SEMI-private one for just 15 bucks... I am okay with this version. lol.
 
I introduced buyFromAuctionHouse("apex", 550000, 1);
it bought "clear fire lunagem apex"
 
thanks for your work.. i made a quite a bit of money off of this :) i appreciate it so much :), better then having ot pay that 15euro.. 20$ :(
 
I introduced buyFromAuctionHouse("apex", 550000, 1);
it bought "clear fire lunagem apex"

this is a limitation of the archeage auction house where you cannot search for apex without also having the lunagems returned in the list. Although the AuctionRequestParams Constructor parameter suggests you can set aucCompleteMatch to true, it did not work in my test. However, in the new Version 2.1 which is now released I fixed that with a workaround.

Changes in 2.1
- Fixed a bug where the minimum amount would not work when bidding at an item in the last seconds
- Fixed a bug where the plugin would crash when the calculated sleepTime was negative
- The searchText in buyFromAuctionHouse now has to match the auctionitem name 1:1
 
NVM about that i got it to work, what are good items to make money off of
 
Last edited:
NVM about that i got it to work, what are good items to make money off of
Dude, you got already an open source AH bot, you really asking what item you need to bet on? What you think will happen if a bunch of people use the same AH bot and bet on the same items?
Profit is gone and the use of on AH is totally gone...
I advice you to seek your own items to make profit on because the "most obvious" items are already being sniped away. Same goes for the dumplings items which is even more sad...
 
Back
Top