PDA

View Full Version : Single item auction sniper



Coolguy
06-01-2015, 07:55 PM
Thought i'd release the main function for my auction sniper program :P Full program: [Only registered and activated users can see links]

It's very basic and only does the min increment but feel free to add any other features you want and upload it as your own, enjoy :)



public static void display()
{

string strhtml;
bool auctionClosed=false;
string currentText="a";
string postData;

Console.WriteLine("at auctions page");

strhtml = Account.Get("[Only registered and activated users can see links]" + id, "[Only registered and activated users can see links]");

postData = GetBetween(strhtml, "name=\"_ref_ck\" value=\"", "\"><INPUT type=\"text\" na");

while (auctionClosed == false)
{

strhtml = Account.Get("[Only registered and activated users can see links]" + id, "[Only registered and activated users can see links]" + id);
currentText = GetBetween(strhtml, "name=\"amount\" value=\"", "\" si");


Console.WriteLine("Pausing for " + timeDelay + " seconds");
Thread.Sleep(timeDelay*1000);
Console.WriteLine("current bid = " + currentText);

strhtml = Account.Post("[Only registered and activated users can see links]", "auction_id=" + id + "&_ref_ck=" + postData + "&amount=" + currentText, "[Only registered and activated users can see links]" + id);
Account.Get("[Only registered and activated users can see links]" + id, "[Only registered and activated users can see links]");

if (strhtml.Contains("BID SUCCESSFUL"))
{
Console.WriteLine("Sucessful bid, refreshing bid list!");
auctionClosed = false;


}
else if (strhtml.Contains("are safe"))
{
Console.WriteLine("Items are safe message, refreshing!");
auctionClosed = false;

}

else if (strhtml.Contains("Sorry, you are not allowed to"))
{
Console.WriteLine("You are top bid, refreshing");
auctionClosed = false;

}

else if (strhtml.Contains("You must wait a few more seconds"))
{
Console.WriteLine("Need to wait, trying again!");
auctionClosed = false;

}
else if (strhtml.Contains("The current asking price for this item"))
{
Console.WriteLine("Bid unsuccesful, trying again!");
auctionClosed = false;


}
else if (strhtml.Contains("You don't have enough money"))
{
Console.WriteLine("You don't have enough on hand to bid on this auction, ending bidding!");
Console.ReadKey();
auctionClosed = true;

}

else if (strhtml.Contains("losed"))
{
Console.WriteLine("Auction closed");

strhtml = Account.Get("[Only registered and activated users can see links]" + id, "[Only registered and activated users can see links]");

if (strhtml.Contains("<B>When?</B></TD></TR><TR><TD align=\"center\"><A href=\"randomfriend.phtml?user=" + user))
{
Console.WriteLine("Auction won!");
Console.ReadKey();
auctionClosed = true;

}
else
{
Console.WriteLine("Sorry, you didn't win this time!");
Console.ReadKey();
auctionClosed = true;
}

}
else
{
Console.WriteLine("Unknown error, please restart the program!");

Console.ReadKey();

auctionClosed = true;

}

}

}