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

Open Auction House Bot

Is there any way to make the bot sort by Time Left instead of looking through many pages of things it's not gonna bid on? So like search for azaleas, sort by time left, if nothing is under x amount of time, skip to next item and repeat.

just an idea that i thought would help.
 
It does sort by time left. It searches the subsequent pages for a buyout that meets the target price as well.
 
How do i make it bid on moonpoint, in the last second?
And how to set the max bid it will do?
 
Last edited:
I cant make it bid, just buyout, what i am doing wrong?
Using this 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 = 1000; // 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("Weapon Regrade Scroll", 158880, 1); // 15 gold 88 silver 80 copper per item, minimum amount 1
buyFromAuctionHouse("Armor Regrade Scroll", 250000, 1); // 25 gold 00 silver 0 copper per item, minimum amount 1
buyFromAuctionHouse("Moonpoint", 180000, 1); // 18 gold 00 silver 00 copper per item, minimum amount 1
buyFromAuctionHouse("Moonlight Archeum Crystal", 100000, 1); // 10 gold 00 silver 00 copper per item, minimum amount 1
buyFromAuctionHouse("Sunlight Archeum Crystal", 158880, 1); // 15 gold 88 silver 80 copper per item, minimum amount 1
// 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
}
}
}
}
}
 
overbidamount, waitSecondsForAuctionEnd, msToBidBeforeAuctionEnd

How do I get it to look for bids only cause atm it isn't bidding on items I set to buy. Even when they have 1-2mins left
 
"10:19 AM > Attempting to BUYOUT 73 Raw Stone with per item price 152 ... failed."

This happens a bit?
 
"10:19 AM > Attempting to BUYOUT 73 Raw Stone with per item price 152 ... failed."
This happens a bit?

Most likely that means you where just too slow with buying out.

overbidamount, waitSecondsForAuctionEnd, msToBidBeforeAuctionEnd
How do I get it to look for bids only cause atm it isn't bidding on items I set to buy. Even when they have 1-2mins left

For only bidding you have to change this line:
List<AuctionItem> items = getAuctionBuyList(req, 0);
to:
List<AuctionItem> items = getAuctionBuyList(req, 9);
 
hello thabks for your plugin!

can you make a change that allows you to only bid items in your bid history and set the max bid and sniper to the last second?
thanks!
 
error CS0246: The type or namespace name 'Random' could not be found (are you missing a using directive or an assembly reference?)
When compiling , anyone knows what to do ?
 
Great plugin, but i think there should be a maximum buyout value, so you dont waste all your money on 1 stack of items.
 
But the whole point of this is to use it to flip, so if you wasted all your money all you got to do is sell what you just bought to get the money back until you have enough money you shouldn't be using this for any other means. Have money first then do what you gotta do with the plug in
 
Man an GUI interface would do wonders for setting this bot up >_< cant seem to get it too bid on anything except lotus and Azalea's also dont really know how to set the amount i want it to bid too and the buyout amount >_<
 
Well.... this script could be usefull but actually it sucks ass.
I wanted to buy "Raw Chicken".
It did it but it did also buy "Raw Stone" for fucking 400 Gold!
and i didnt configure it to do so at all.

You better save your money somehow before you start using this.
 
Last edited:
After patch i get often this message: ResponseTimeout Error ... will try again
I don´t know why
 
Back
Top