Roughly a year ago, before there was an eBay-style auction system, I created an autonomous script to 'snipe' auctions. I wanted to see if it could be done, and it was successful. The concept was to create a script that could be left activated without any human interaction and snipe a rare item with the price that the user sets. This would be beneficial for a user if an auction ended during the middle of the night and wanted to bid on the item without increasing the price for others to see. Thus, the sniping part. Ideally, I made the script so a user could load up 4 tabs (the first being the auction that ended first and the last tab the auction that ended last) and be able to have the script run for every tab, one after another. This was possible, and done.
Because of an unorthodox method of programming code that I used (to be un-named), the requirements for running this auction sniper script was very specific to my computer's settings. For example, specific distances of mouse movements had to be made as this was the prime method of the automation. Thus, mouse movements on one screen resolution like mine (1280x1024) will vary a lot to another person's monitor resolution. In addition, Firefox 2.0 was used and the auction must be pre-loaded into another tab and focused before the script begins. Again, this would be ideal for an over-night auction sniping by leaving your computer running all night with this window open. Bot checks do not occur in auctions, and thus, I didn't need to write any additional code to do that. Thank goodness... ;)
The following is roughly a flow-chart of steps of the entire script:
- The script grabs the name of the tab, which determines what item we are bidding on.
- If the tab name contains a rare item, for which the name exists in the script (such as Amulet of Might or Elven Gloves), a user-selected price (also embedded in the script before it is executed), is set.
- If no tab name is found with the pre-embedded rare names, the tab is closed, returning you to your last tab, and the script exits.
- If there is an item selected, the entire auction page's content is copy/pasted into a variable.
- If the contents of the variable do not contain the exact words "Ends in", we know that the auction has already ended. The script then exits.
- If the auction page does not contain "Buy", the auction is not a "Buy Now" auction, and the script functions exactly as a "normal auction" would with regular bids.
- If the above is not found, the script considers the auction page to be a "Buy Now" auction, and edits to mouse movements are made change the distance of the clicks to be successful.
- Once in one of these modes, the script will randomly choose a value to wait between 20 seconds and 4 minutes before doing anything.
- Once the wait is over, the page is refreshed, updating the auction stats. The script grabs what the value is in the text-box that you would have to bid. If this value exceeds the price you set in the beginning of the code, the script closes the tab and restarts the script.
- If this price value is under the price you set in the beginning of the code, we know that you will be placing a bid.
- The script checks to see if SNK3R is already winning the bid. If SNK3R is in the lead, the page is refreshed after a random time of 1.5 seconds to 6.0 seconds. Then, entire cycle starts over with price checking (and waiting the random amount of time before checking again).
- If SNK3R is not in the lead a bid with the next highest price is made. After your bid, you are taken to the auction page, and the script starts all over with price checking and to see if SNK3R is the highest bidder.
I want to bid on a Morgul-Hammer. I set my "maximum price" as $2,050,000. I find an auction that someone is selling a MH, put it in a new tab, and turn on the script, then go to bed. The script begins. It checks the price. Is the next bid that I make under my maximum price? If not, close the tab and restart script from beginning. If so, check to see if I'm the highest bidder. If I am the highest bidder, wait a random time between 1 and 6 seconds, then refresh the auction page, and the script will start over. If I am not the highest bidder, place the next highest bid. Go back to check until the auction ends.
Ethics of Script:
Before you get your panties in a bunch, there are ethics. Yes, I created and tested the entire script. Yes, it means I used an automated method to bid on auctions, but, I was at the computer every time the script ran to ensure no problems, and used my own personal money to fund my script. Thus, no profit came out of all of this. The only thing I can think that was "unfair" was raising the price of a few items a little to see if it worked. And given the following items (see next section) the prices I used were bargains to get the item for at that particular time.
My Exact Script:
The items I had in the auction sniper (and maximum prices to be used with them) were: Amulet of Might at $1,000,000, Amulet of Invisibility at $1,000,000, Assassin Crossbow at $100,000, Enforcer Crossbow at $200,000, Elven Boots at $800,000, Elven Gloves at $700,000, Elven Cloaks at $850,000, Alatar Gloves at $1,000,000, Rune of Enlightenment at $1,000,000, Cloak of the Istari at $1,050,000, Mithril Chain Mail at $900,000, Displacement Boots at $1,505,000, Cornuthaum at $2,000,000, Trollskin Armor at $600,000, Mage Shield at $1,050,000, Morgul-Hammer at $2,050,000, Vorpal Blade at $1,250,000, Elven Long Bow at $1,151,000, Tulkas' Gauntlets at $700,000, and Shadow Cloak at $50,000.
Why Did I Post This?
I felt the need to let the community know what is possible with automated scripts. This started out just as a project just to see if it was possible. As you can tell, it was, and if gotten into the wrong hands, this possibly could have been detrimental to our auction system and community, and some users could have had an extreme advantage by winning auctions in the middle of the night for great prices. Seriously, who wants to see bot checks on the auctions pages?
Why Did I Use Random Times?
I wanted my script to be as well-hidden as possible from "regular" user interaction with auctions. Therefore, I felt the need to make all wait times for the script to act random with a different random timing. Random timing of 20 seconds to 4 minutes was used before the auction page was refreshed and a random time of 1.5 seconds to 6.0 seconds was used for the time it takes to get back to the auction page with a successful bid. These randomizations were used to try my best to "fake" the system (if anyone ever did check for someone using a bot in auctions) in order to pretend I was a human by using random values. Obviously, the Admins are smarter than that, and would have checked for patterns.
Comments? Questions? Suggestions on improving the code (that is obviously out-of-date and useless due to our eBay-style auctions)?