Quantcast
iDEALS
The video player requires Flash 8 Player or later. Please download the latest Flash Player.
Use AppleScript to Get Ahead in Web-Based Games
Posted 08/15/2008 at 3:25:00am | by Jason Whong

screen shot applescript

Who says crime doesn’t pay? Our final script pickpockets old ladies when we’re not even at our Mac. 

Recently, we’ve gotten into a few Web-based role-playing games that remind us of the ones we used to play on old-school dial-up BBSes. In these games, players choose actions from a menu, sometimes selecting other players as targets for the actions. Before the Web, we played by typing. Now we click links, but the style of play is still the same.

Some of these games have tens of thousands of users, many of whom will log in multiple times per day and grind away repetitively on some basic actions so they can level up faster than you. Fortunately, AppleScript was made for automating repetition, and Safari’s support for AppleScript means that with a modicum of evil genius scripting know-how, your Mac can gain those levels for you while you’re out enjoying real life.

What You Need: Mac OS 10.5, Safari 3, a user account on a Web game, and a copy of the rules for that Web game, if any exist

1. Think Ethics

screen shot facebook app

Rule No. 1 on My Heroes Ability, a popular game on Facebook, expressly prohibits scripting. Looks like we’ll have to pick a different game for this example.

While scripting lets us play evil genius, we’re also going to play an ethical one, because the Web is made up mostly of other people’s servers. If you don’t want to get kicked off, it’s smart to know whether this sort of conduct is prohibited on the Web game before you use a script.

Go to your Web game’s site and look for the rules (they may be under “rules,” “terms of service,” or “acceptable use policy”). Or check out the game developer’s blog or the game’s forums if you don’t find anything on the main site. If the developer has expressed that any form of scripting is cheating, you know not to do it. Though unlikely, a litigious system administrator could ruin your fun if he catches you breaking the rules.

If you don’t see any prohibitions, proceed, but consider how your script will affect the server. Any use of the server, by humans or by scripts, slows it down somewhat. Following the instructions here should minimize the impact on the server. The more humanlike your script behaves, the less likely anyone will notice or care that a script is playing your character. If the rules are changed later to prohibit scripting, stop using AppleScript immediately.

2. Analyze the Game

screen shot website Generic RPG

When we’re logged into Generic RPG (www.thegrpg.com), every time we visit this URL our character attempts to snatch an old lady’s wallet. 

Most Web games we play automatically with AppleScript have one thing in common: They’re really just a set of webpages that use server-side scripts to make changes to a database. When you visit a certain URL, the server runs the script and decides how to update the database, usually in less time than it would’ve taken you to roll a 20-sided die.

Consider what’s really going on inside the server as you play the game in Safari for a session or two. Look closely at the status bar at the top of the window: After a while, you may notice that some beneficial actions are tied to specific URLs on the server. Copy those URLs to your favorite text editor for safekeeping. Look also to see whether you must first visit one page before visiting another.

Many games limit your ability to perform actions. The limits may be spelled out in the game’s instructions, or you may have to experiment to learn them. The idea is not to circumvent the limit; rather, it’s to perform the actions as often as you can within the game rules. Try also to find out how long the game will let you stay logged in without doing anything.

Finally, don’t waste time analyzing the parts of the game that are form-based (meaning, the kind that require you to click a button on the page). Odds are, the game developer is checking whether you’re really submitting a form using the POST method, which AppleScript can’t handle.

COMMENTS: 1
TAGS:  applescript
COMMENTS
avatarWatch movies on your

Watch movies on your PDA
Yes, each movie on our website is available in special «PDA edition».
download online movies

Login or register to post comments