Slashdot Mirror


Diablo II JavaScript Parser Automates D2 Gameplay

mikegogulski writes "d2jsp is an embedded implementation of a JavaScript engine for executing user program code (scripts) inside Diablo II. d2jsp can be used to make Diablo II do almost anything that can be done in the game by a human player, and some things (such as knowing the immunities of monsters four screens away) that cannot. d2jsp has an installed base in the tens of thousands, an active user community of over 6500, and hundreds of active projects in its script database. Work progresses toward the Holy Grail of Diablo II hack development, the Complete Diablo Bot, which will eventually enable the entire game to be played automatically without human intervention. All Your RPG Are Belong To Us!"

4 of 108 comments (clear)

  1. Re:How does it work? by njaguar · · Score: 3, Informative

    In theory, this would be possible for any game.
    How it works is, let's say you want to move.

    script: move(x,y);

    This would move your player as if you clicked those coordinates on the screen yourself (though other stuff is involved, it's game x y, which is not actual screen coordinates at all, so requires other things as well). d2jsp calls the function that "clicking" would, but does NOT use keypress or mouseclick events. It calls the functions as though the game itself were calling them.
    In short, it requires lots of reverse engineering, as you can imagine. "Move" is about as simple of a function as one could imagine, other than "print", which again hijacks the print function inside Diablo II. d2jsp (in the latest version I am working on) can literally do almost *everything* that a player sitting there could. It's no longer a matter of can't. :)

    Of course, a picture is always worth a thousand words, so getting someone to demo you a script in action would probably answer all of your questions. That, and of course looking at the scripts themselves.

  2. Re:Non gamers, unite! by schmink182 · · Score: 2, Informative
    A waste of time is investing literally hundreds of hours a week on a video game.

    Not to be picky, but there are 168 hours in a week. Unless there's some time machine involved, I'm not sure how you'd go about getting "hundreds of hours" of gameplay in that time.

  3. Re:d2jsp license by njaguar · · Score: 2, Informative

    Once again, d2jsp also works in single player mode, or on bnetd servers (which, for those that have been on a mountain top the past year or so is an emulator of battle.net).

    In neither case does it violate any user agreement, or laws.

  4. History repeats itself... by WWWWolf · · Score: 2, Informative

    First there was Rogue, then someone wrote Rogomatic. Then someone wrote a limited but cool-looking clone of Rogue called Diablo II, and someone wrote d2jsp. History repeats itself!