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!"
if I don't understand the motivation behind a project or hobby, I just keep my mouth shut and move on. In this case however, I feel compelled to say this seems like a really dumb waste of time.
Paco: "Hey man, did you beat Diablo 2 yet?"
Dignan: "I dunno, my computer is playing it now..."
Paco: "Oh, so you paid for a game your not playing, and you have to share your computer with a scripting engine?"
Dignan: "Yes, I am stupid, I am a stupid head, a huge stupid headed freak."
Since I wrote the script to that exchange, I took some liberties with Dignans last reply, but you get my general point.
Cloud City Digital: DVD Production at its cheapest/finest
All of my work is automated to do itself.
My oven cleans itself.
Garden Waters itself.
And now my games are all automated to play themselves.
Time to start drinking a glass of wine a day.
Actually, shouldn't you be looking for a machine that will drink it for you? Maybe a garbage disposal with a VBScript engine?
Is there nothing I can do without it being automated?
First Post for Kansas City!
You need an electric monk to believe things for you now.
A waste of time is investing literally hundreds of hours a week on a video game. This is quite the contrary, it gives you the ability to play when you want, with the awesome items/characters, without having to spend the countless hours to build them up yourself.
It's a concept even a non gamer should understand. If you already don't enjoy something, of course anything branched off of it will be of ill regards in your mind. This allows people that still enjoy the game a chance to still play and compete, while being able to fulfill other facets of their life.
This thing has the power to make Diablo2 even less interesting ? How cool...
So... It's like building a segway to run on your treadmill?
Honestly, this is a quite amusing cheat, and one that has plagued MUD, MOO, and RPG developers for years. If you have a game that requires no real thought or interaction, and whose gameplay consists of "hack monster, pick up shiny thing," the real fun can be in teaching a computer to play the thing while you read the paper in the morning.
Quite frankly, this brings Diablo to a whole new plateau of intellectualism that I have never thought the series would achieve. Besides, the program collects shiny things for you. Shiny things!
The ______ Agenda
From here on, I declare all wisecracks about not playing the game to be Redundant. The jokes been made. If you don't understand the fun is programming to beat the game, think about it. If you don't think programming can ever be fun, go back to Fox.
Do you know how tedious finding items is? This is a bot that will do it for you. I've been able to start doing my homework again, as well as other 'real life' tasks. When I want to play I stop the bot and see what it found. Good items: YAAY! No items: oh well... No hours lost to the game! It's brilliant.
Crystal Meth: Would you ingest somthing made from a poisonous gas and an explosive metal? You do it every day -- Salt!
Most of the comments are idiotic. You don't understand the concept of the game. Diablo II is an ITEM based game. The better the ITEM, the more valuable it is. Out of this came an economy. A virtual trade for better items or to sell for cash thru auction houses. Now the bots and scripts were created to get these items out greed for more cash. It was designed to automate repetive runs on boss monsters that yield the best items. Its not unheard of bots making 20,000, 40,000, 100,000+ runs to get the item drops.
Everyones opinion on this seems to be negative, but what is so horrible about it? It has made money for many people involved... For kids that just want to find items, but don't have the time to sit there and do a boring task to get them, they can have the bot play the boring part while they do the fun part. Is there something wrong and horrible with that? Everyone involved has had a great time coding or playing the part of the game they want to... Not every aspect of a video game is meant for everyone, so why force yourself to do the boring part to compete at the fun part? If something could do your job for you (better than you), and all you wanted to do was spend time with your significant other or party, would you take that oppurtunity? For someone who loves a game, it's the same thing.
That's scary.
Diablo2 meets ProgressQuest but with the programmability of Robocode!
I love it! I can't wait to try it.
Can anybody tell me how the JavaScript engine interacts with the game? Do they somehow intercept all player input (key, mouse etc.) and let the script generate those inputs? Or is there some other hackery at work? Docs are brief on this.
Any chance the same ideas could be used for other games? A general game scripting environment? It would free all those everquest addicted people, or at least let them go to the bathroom once in a while.
d2jsp LICENSE
.d2j program or a .d2l library, without regard to the
Version 1.0
This LICENSE is Copyright (c) 2002 by Paul Taulborg. All international
rights reserved. For information related to this license, contact Paul
Taulborg via email at paul@taulb.org.
DEFINITIONS:
1: "SOFTWARE" shall refer to the core d2jsp module, "d2jsp.d2h", and its
source CODE.
2: "SCRIPT" or "SCRIPTS" shall refer to any program code executable by the
d2jsp module, whether a
actual filename or extension, and without regard to authorship.
3: "CODE" shall refer to the source code to the d2jsp core module, excluding
those portions copyrighted by third parties.
AGREEMENT:
By using the SOFTWARE, you agree to the following terms and conditions:
1: You may not sell, license, auction, rent, lease, offer for sale, transfer
for a fee, warranty for a fee, or otherwise attempt to or actually derive a
profit from the distribution of the SOFTWARE or derivative works based on
the SOFTWARE. You may not bundle or aggregate the SOFTWARE or any derivative
work based on the SOFTWARE with any other product or service which is to be
distributed for a fee or offered for a fee.
2: You may distribute copies of the SOFTWARE and works based on the SOFTWARE
without cost to the recipient provided the following conditions are met:
a: You must include a copy this LICENSE without modification;
b: You must include all copyright notices without modification;
c: You must include the full source CODE to the SOFTWARE or work
based on the SOFTWARE;
d: You must not introduce into the SOFTWARE or any derivative work
based on the SOFTWARE any function intended to defeat security
measures or expose private information to third parties;
e: You must clearly mark any modifications to the original SOFTWARE or
its source CODE, showing who made the changes and on what date the
changes were made;
f: You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the SOFTWARE or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this LICENSE; and,
g: You must not impose or attempt to impose any conditions or
restrictions upon the recipient of the SOFTWARE or works based on
the SOFTWARE beyond those imposed by this LICENSE.
3: You may sell, without limitation, all SCRIPTS that you write, and you
retain all copyright and intellectual property rights to such SCRIPTS.
4: You may not copy, modify, sublicense, or distribute the SOFTWARE except as
expressly provided under this LICENSE. Any attempt otherwise to copy, modify,
sublicense or distribute the SOFTWARE is void, and will automatically
terminate your rights under this LICENSE.
5: Nothing other than this LICENSE grants you permission to modify or
distribute the SOFTWARE or its derivative works. These actions are prohibited
by law if you do not accept this LICENSE. Therefore, by modifying or
distributing the SOFTWARE (or any work based on the SOFTWARE), you indicate
your acceptance of this LICENSE to do so, and all its terms and conditions for
copying, distributing or modifying the SOFTWARE or works based on it.
6: If any portion of this LICENSE is held invalid or unenforceable under any
particular circumstance, the remaining portions shall remain binding.
NO WARRANTY
7: BECAUSE THE SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE
SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
8: IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER
SOFTWARES), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
I can't wait until there are bot duels, who can write the cleanest, fastest, most deadly bug free code wins.
If only Blizzard could provide server-side scripting support, we could conquer lag!
This is said only half in jest. First point: for a game designed to be played over the Internet, Diablo II is shockingly lag intolerant. If you're on the same continent as a server, then it's not too bad. If you're stuck on a modem in Australia, whole swathes of skills or gameplay styles just don't work well or at all.
Second point: server side scripts represent a way of dealing with a game at a higher level. Instead of making a click-fest of a game where latency and fast mousing skills count -- such as Warcraft 3 for example -- what about a competetive game where all the twitch aspects are handled by programs at the business end of the game, instead of by hand over a slow internet link? The skill and fun then comes into selection, deployment and generally higher level strategy. Or even into script writing. (Self and friends are working on such a game, but even we aren't holding our breaths for it to become a playable thing. Free time coding and all that.)
PS: It was always more fun writing client robots for LPMUDs than it was to play the MUDs themselves.
All things considered, Diablo 2 is a very simple RPG ... walk around, kill things, pick up stuff, trade stuff, make money, buy stuff ... lather, rinse, and repeat. ... I highly doubt that more complicated RPGs (like Baldur's Gate or NeverWinter Nights) could be so easily automated.
Adding scripting into games is a great idea, but it is (mostly) wasted on first-person games. Where it is really useful is in real-time strategy games (Command and Conquer, Homeworld etc.). A player with prepared "smart" scripts would be able to give high-level orders to his units and have them act with rudimentary intelligence, gaining a real advantage. It would also make the games more realistic.
Sure, most such games allow one to group units and perform rudimentry "smart" actions (such as returning for repair/refuel when damage is high or fuel is low) but that isn't sufficient, especially when handling a large number of units. Everyone who played these games knows the sinking feeling of watching helplessly when some critical units take the most inane course of action... The game then reduces to a glorified ardace game, won by the faster-clicker instead of, well, the better strategy.
Does anyone know of a reasonable scriptable real-time strategy game?
Is their webserver running from this same script engine?
When are they going to have code libraries that write code to write code to play a game?
Reminds me of RealTimeBattle, only not as flexible.
It's a hall of mirrors!
Keep your packets off my GNU/Girlfriend!
Let's rewrite the turing test, buddy ;-)
[Pruneau
They'll need a pk and non-pk version of this bot just to please everyone.
The first Javascript Engine to be incorporated into diablo ii was one written by a programmer at diabloworld. I guess shortly after releasing his engine he pretty much left diablo ii hacking due to personal time conflicts.
njaguar copied the idea of another programmer out of smite. The real credit goes to smoke at diabloworld.
I'm not saying that d2jsp isn't a really good program and a very impressive excersize of reverse engineering... I'm just saying that the idea was copied from somebody else.
Progress Quest is a next generation computer role-playing game. Gamers who have played modern online role-playing games, or almost any computer role-playing game, or who have at any time installed or upgraded their operating system, will find themselves incredibly comfortable with Progress Quest's very familiar gameplay. Progress Quest follows reverently in the footsteps of recent smash hit online worlds, but is careful to streamline the more tedious aspects of those offerings. Players will still have the satisfaction of building their character from a ninety-pound level 1 teenager, to an incredibly puissant, magically imbued warrior, well able to snuff out the lives of a barnload of bugbears without need of so much as a lunch break. Yet, gone are the tedious micromanagement and other frustrations common to that older generation of RPG's.
Progress Quest belongs to a new breed of "fire and forget" RPG's. There is no need to interact with Progress Quest at all; it will make progress with you or without you.
http://www.progressquest.com/
Sounds like you should try playing Progress Quest
Progress Quest belongs to a new breed of "fire and forget" RPG's. There is no need to interact with Progress Quest at all; it will make progress with you or without you.
Progress Quest is a next generation computer role-playing game. Gamers who have played modern online role-playing games, or almost any computer role-playing game, or who have at any time installed or upgraded their operating system, will find themselves incredibly comfortable with Progress Quest's very familiar gameplay. Progress Quest follows reverently in the footsteps of recent smash hit online worlds, but is careful to streamline the more tedious aspects of those offerings. Players will still have the satisfaction of building their character from a ninety-pound level 1 teenager, to an incredibly puissant, magically imbued warrior, well able to snuff out the lives of a barnload of bugbears without need of so much as a lunch break. Yet, gone are the tedious micromanagement and other frustrations common to that older generation of RPG's.
cpeterso
paying an interest in my lad's online activities I got into Neopets in exatly the same way. I spent hours finding which games could be played by html alone (they have a lot of flash games) and ran a bot to monitor the stock market and pick up the free stuff from the donations tree.
likewise once I'd written the code and ran it for a few weeks I took it out of the cron as my interested faded.
I think my pets have starved to death by now
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
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!
Here's what you have to modify in the ini file for it...
---
Accountname=YOURACCOUNTHERE - Obviously your account name goes therePassword=YOURPASSWORDHERE - Same with your passwordAwayMessage=Can't talk now, maybe later - If you want to edit what you want your Away message to say, here is the place.Channel=GonadsAndStrife - The channel your Botter auto-joins. Just keep it that unless you have a clan channel or something special.
---
Sounds like it might be one of those account stealing apps...
Modifying your client breaks your EULA, if you use it and get banned its your own fault.
1. They increase the server load, since Blizzard never intended people to be able to play the game 24/7. In practice, this is often seen as increased game creation queues.
2. The bots decrease the item value and skews the game economy. This would be no problem if players ran the bot on the Open Realms this game has to offer, but since they're usually used on the Closed/"Secure" Realms to harvest items that should normally take a lot of patience to find (and therefore be rare), many legit players not using bots are affected. Simply because the very rare items non bot users have found is suddenly not worth as much anymore in in-game trades. Bots inflate the item values.
What surprises me, is that there are so many bot users that seem to find using the best items this game has to offer as the best part of the game. Personally, I find the process of earning the items through some effort the best part. Without any effort put in the game, I would feel no accomplishment whatsoever and no pride about finally getting some "uber item", but I suppose bot users still do, even if their computer play for them while they sleep.
Beware: In C++, your friends can see your privates!
I love how people want to dictate what is fun to everyone else but when you shit on their opinion of what is fun they get all bent out of shape. If someone likes using a bot to collect shiny things for them so they can build ub3r characters in D2 then so be it. If this is how they get their enjoyment, well then it's none of your concern. In fact I would consider bots useful since they help to add to the legit items in D2 over the duped items in the game. Anyone that has had a nice shiny WindForce dissappear after trading all their own legit gear for one that tunred out to be a duped WF knows how this feels.
slapping a licence agreement on a program whose sole purpose is to violate another programs licence agreement.
You mean like airlines vs. farechase?
Will I retire or break 10K?
I don't belive it would be possible to program anything on conventional computers with known technolgies that another program couldn't be written to automate.
Take a look at a Slashdot story and an article I wrote about the CAPTCHA project.
Will I retire or break 10K?
The pkers, dupers, bots, and excesive lag drove us off of battle.net. Blizzard's refusal to aggressively go after the cheaters was bad enough, but when they accussed the bnetd crowd of piracy, they lost me as a customer. I own two copies of the original Diablo, Warcraft, Starcraft, a few expansion modules, and Diablo 2 and D2X. I didn't even consider their newest game. They won't get another dime from me. They lost a loyal customer.
Yes, we have our own bnetd realm. No, we do not pirate. Every single person on the realm owns the damn game. Blizzard has no right to tell us we can't play it the way we damn well want. We have realm rules, break them and get booted forever. We've only needed to boot two people so far (one for using cheats, the other for being an annoying asshole).
Blizzard says we are pirates because we don't validate the CD serial number. Well, we can't. Blizzard won't tell us how to do that and won't set up some kind of validation server for us to go through. The bnetd development crowd has offered to work with Blizzard. Blizzard refuses to cooperate.
The people running the diabloii.net (and diabloii chat room) are just as bad. They are so busy kissing the Blizzard ass that they alienated their biggest supporters by banning any and all discussion of bnetd.
-- Will program for bandwidth