战网中国

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

D2BS_kolbot和D2Bot发展历史及三者关系

已有 2017 次阅读2023-2-8 00:48 |个人分类:game

这篇博文我想谈谈我对kolbot的了解。

一、D2BS的发展

很显然D2BS的发展与D2NT有关,D2BS的开发队员应该都是先使用D2NT的,只是由于D2NT的代码并没有开放,因此引发了这批队员们想要搞出自己的bot,于是这批朋友组合起来了。我们先来看看这批队员的组成(如下图)


我们先粗略地看下成员里的分工:
lord2800,Lead developer。因此,他就是D2BS开发小组的头头,等会我们还可以看看这个人的情况。
另外,与Core有关的成员有六人。还有一位是yamb的持有者。剩下的应该是测试成员。大家如果使用kolbot一定知道kolton和noah~,在D2BS开发之始,他们仅仅是个成员,而从上图中可以看出,现在只有noah~还在队伍里活动,其他的至少也有1254天没进来了(截图的时间是早于我写博文的时间的)。
从时间上来看,D2BS的开发是在2009年初,下图即为他们讨论程序中的问题与解决的对话记录。


上图应该是D2BS的第一个bug即所谓的issue#1, 是由lord2800解决的,其时间是2009年1月25日。这也说明D2BS应该早于该时间开发的,考虑到这个时间大约是月底了,而他们在这之前都是D2NT的脚本密切接触者或者直接是编写或改写的,因此,估计他们建立D2BS的内核系统应该1个月的时间够了,因此我才说D2BS开发于2009年初估计相差应该不远。
其它的issue记录如下图


当然到现在该记录已经是几千了。

二、diablo的版本

1.07 版之前,人们都不记得d2版本情况,直到2001初夏,出现了1.07 的patch,具体日期,至少我在网络上还没有查到。从1.08开始,人们记住具体日期了。2009年12月10日出现了1.13版,但前2版即1.13a和1.13b具体日期也是不清楚的,只知1.13c是2010年3月23日发布的。2011年10月27日1.13d发布。
结合d2的版本,因此,大家就明白了D2BS的第一版是用于1.12的,从D2BS各版本的文件修正时间上看,D2BS1.1-D2BS1.1.1都是D2-1.12版的。而其1.1.2,1.2,1.2.1都是D2-1.13c之前的(即为113a或者b的。2021-12-18注:今日再查看具体代码,才知,原来到1.2.1版都是d2-1.12版的,而113a和b的d2是没有正是发行版的,仅有测试版,自然D2BS也就没有与之相应的版本了。),到1.4版实际上就是用于d2 1.13c版本的了。现在D2BS团队提供的三个分支下载中,其中patch-113就是属于D2-113c的,而patch-113d就是D2-113d的,主分支就是D2-1.14d的,因为在D2-1.14a到c过程中,D2BS队伍是没有工作的,所以在2016-2018年那段时间都是在使用所谓的“降版法”来上官方战网的。


三、kolbot之前的D2BS

D2BS开发初期,没有发展专门的javaScript脚本,而是使用其他的脚本,所以,如果你下载有现在还能用的oog1.3.3+D2BS的bot的话,你一定看到其代码部分存在两个文件目录:script-ntbot和YAMB。也即,你既可以使用ntbot的代码也可以使用YAMB的代码。而这时的bot控制系统就是oog,还有一个控制系统叫D2Driver,但是这个控制我从来没有运行起来过(2021-12-12补充说明:经过进一步分析,原来该控制系统需要D2BSLoader的运行文件配合使用,但我没有找到该运行文件相对应的版本是多少。因为,D2BSLoader是D2BS团队检测用的测试程序,其版本包括1.0到1.5版)。oog的内核是VB编写的,D2Driver是C#编写的。


四、kolbot代码的D2BS与D2Bot#

从上面第一张图中,我们看到了kolton和noah~这两个人,现在的kolbot与这两个人干系极大。首先,是kolton专注于javaScript代码的编写。如果熟悉bot代码的朋友,应该看的出,kolton写的代码风格来源于mbot和YAMB(至少,我喜欢这种代码风格,而不喜欢NTBot的代码风格,例如:现在kolbot代码中的D2BotLead与YAMB的YAMBstarter几乎一模一样)(2022-2-6再补充:今日看d2jsp的scripts代码,发现其他的bot代码都是从d2jsp来的。经过我这段时间在网上搜索,发现真正的bot——不是地图,是从1.09版的d2开始的,d2jsp的0.20版本之前都是测试版——即beta版,而其正式版是0.20版,虽然该版没有看到具体发布时间,但其0.24版却记载了具体的发布时间:Nov 8 2002, 03:34 PM。再看d2的1.09版从2001-8-21发布,到同年的12月5日就更新到1.09d,几乎一月一版。再根据d2jsp从0.20到0.24的修改内容,完全可以肯定,d2jsp就是从1.09d的d2才开始,即d2的正在“强大”的bot时代从此开始,而那些什么kp的bot不算,因为那些不是真正的bot。而d2jsp的autostarter.d2j文件中位置函数就是今天许多bot使用的d2botlead中的,因此,可以这样说,真正强大的d2bot是从d2jsp开始的,尽管它的代码,没有看到公开的,但一定是被d2nt和d2bs这帮大牛们破译或者说从中窥探出根由,从而发展了自己的bot)。kolton看来对D2BS没有自己javaScript脚本很不满意,于是他开始编写自己喜欢风格的代码,与此同时,noah~对bot的控制系统着手编写D2Bot#。从现在的kolbot历史记录来看,最早的kolbot和D2Bot#的发布在2012年2月24日,此时的D2Follow还没有全部完成(not work)就发布了。从2012年初到2014年,是kolbot和D2Bot#的全力发展期,此时的D2正是1.13d时期!

详细的bot介绍,朋友们可以去91d2网站看下面这篇文章:

2022-4-21补充:
今天在网络上看到lord2800写的有关D2JSP的内幕消息,这里他主要描述njaguar如何毁掉了一个社区及bot项目JED的。具体内容,我把它在这里贴出来供有兴趣的朋友阅读。
## History of d2jsp, d2bs, d2botNET, and more by lord2800

Let me tell you a little story about a project called JED and how njaguar ruined a perfectly good community project with his greed... 

It all started one day, when Morgalis announced that her "crack team of coders" (aka smoke) had written a bot platform using the SpiderMonkey javascript engine, called JED. It was posted far and wide, and drew in quite a bit of talent to write scripts to do various botting tasks. [1] All was going well, when an unknown person by the handle of njaguar decided he could do better. He asked Morgalis if he could join the team developing the core of JED, and was denied because no one knew who the hell he was. Undeterred, he found out that it was using SpiderMonkey, and set to work writing his own version, using publicly available source code from Mousepad's maphack. After several days, he had a somewhat working alpha that did little more than run a script and print in the game. That's where, as they say, things got interesting. 

He began a campaign against JED and its manager and creator (Morgalis and smoke, respectively). He promised that d2jsp, his newly named bot, would be open source. He promised that he would listen to the people writing scripts, and never break backwards compatibility unless there was an extremely compelling reason to. He dragged other actually talented coders, such as Syadasti and a few others, to his cause. He started a website, but having no web skills to speak of, he brought in a few people to help: Raeky, HolyCoitus, and a few others. They managed to make the website into something usable, but not very pretty. It started as a wiki, and only lasted as such for a few weeks. Eventually, he licensed and installed IPB (Invision Power Board) on the website. Thus, the birth of d2jsp forums. [2] 

At this time, njaguar finally had a core that was semi-useful (it was capable of simple tasks like running pindleskin, but nothing even remotely complex like running mephisto), but he wasn't satisfied. He pushed Syadasti out of the way, for unknown (to me, anyway) reasons. He became a lot more closed minded, and eventually stopped listening to the coders entirely, making up his own damn mind about how the d2jsp API should function. Eventually, he entirely broke API compatibility. Anyone who complained was banned. Only a handful of people were allowed to know what was going to change beforehand; those he had personally chosen as his "elite" coders (most of them were first-year computer science students at best, and could barely code their way out of a paper bag). 

Now, during this time period, the JED project was in decline. As an attempt to revitalize it, Morgalis had allowed the JED source code to be open sourced, but that failed as well. [3] She tried bringing in other coders to help, but nothing could stop d2jsp's popularity at this point -- not even having a better product. Ultimately, she and everyone else gave up on the project. 

njaguar, however, was on a roll. With the fall of JED, he decided that now was a good time to completely disregard the input of everyone except a few very individuals. He broke the API with impunity. He kicked everyone but himself out of the core development "team", and he claimed "he was waiting for 1.0" before he was going to release the source code. Hindsight tells us that he was planning on monetizing d2jsp from the start. However, since he still didn't have enough control over the botting market (there was another competitor available still -- JED's code was open source), he waited until the next patch. **Before long, people such as mattlant had come up with a solution to the problem of d2jsp path finding. Using bits and pieces of gathered knowledge about how d2 lays out areas, and building on the work of others, mattlant designed a path finder for d2jsp. Almost overnight, it became the single most important bit of code in every single script. And njaguar had not one single thing to do with it.**

Things went well for a time. New features were added, new bots were made, and eventually njaguar decided to take a break from the core to work on the website himself. Of course, he knew nothing about web programming, so instead of learning by playing and then reading up on things like security and such, he jumped head first in and started working on a "forum gold" system. The original system behaved like so: For each post, you got 1 gold; administrators and certain moderators could hand out gold whenever they wanted to whomever they wanted. You could only spend gold on certain "items" that did things like change the display color of your name or change your title. People liked this idea, and soon forum gold became desirable. People were willing to trade in-game items for forum gold, and njaguar didn't even attempt to regulate it. [4] 

Then came patch 1.10. Mousepad, being the only hacker still hanging around who would give njaguar any information (he had chased off everyone else), basically handed njaguar the updated function offsets/ordinals, data structures, and even his protection scheme. This was when njaguar got greedy. He decided that all future versions of d2jsp would be pay-per-use, and used mousepad's system to do it. [5] With that in place, he started completely ignoring everyone but his "elite" coders (who, by now, had all been changed out for "new" coders who still couldn't code their way out of wet paper bags, except now they weren't even CS students). He decided that even though there were a lot of potential coders who were talented, if they didn't pay the Paul Tax, they didn't play. This pissed off a good portion of the remaining semi-talented coders in the community (myself included), and so they left. 

Much of the information from this point on is secondhand information, and I can't guarantee the accuracy and/or timeline placement of all of it. 

Of the coders left, the bulk of the talent was concentrated on mattlant's new project: botOS. It was a full game bot that used object-oriented techniques to abstract away much of the pain in njaguar's API. [6] njaguar didn't seem to take too kindly to the fact that mattlant asked for donations on his work (since he apparently wasn't on the "approved" "elite" coders list), and after some conflicts that I was never made entirely privy to, mattlant decided to pack up and leave. He pulled all his work from d2jsp's website (including botOS and his path finding code) and demanded an immediate cease-and-desist on all coders using his libraries. njaguar, realizing that he had to do something, decided to do what he does best: he asked mousepad for a solution. That's when d2jsp got the crappy pathfinding API it has. Problem seemingly solved, njaguar again turned his sights to what he really wanted: money. He decided to close all the existing (known) loopholes in the forum gold system, and removed everyone but his privilege of giving forum gold. 

With the pesky problem of distribution out of the way, njaguar started giving "rewards" of forum gold to people who "donated" money to him. This continued on for a considerable amount of time, unchecked. At some point in mid-1.10, a group of somewhat experienced coders (Mace, ApacheChief, Glorfindel, myself, Ninjai, and a handful of others) decided to make a d2jsp-like clone, called d2bs. After much trial and error, we got to the point that njaguar was at just before the fall of JED. We didn't expect much, but we got considerably far (given that this was the first major project for most of us); unfortunately, we decided to be too much of a d2jsp clone, and copied its poorly designed API. This also drew the attention of mattlant, who used the base of d2bs to create d2botnet. His was designed in .NET 1.1, however, so the two projects were mostly incompatible. 

After a time, both the d2bs and d2botnet projects faded into obscurity. D2bs because of a lack of interest, and d2botnet because of a lack of time. This left users with only one botting system again: d2jsp. With his stranglehold complete, njaguar decided he'd had enough working on the core, and that it was "good enough" as it was, so new updates became more and more scarce. There were still plenty of bugs in both the bots and the core, but people had little other choice than to use them. Patch 1.11 came along, and with it came Warden. 

When 1.11 came out finally, Blizzard had decided to introduce a new protection scheme called Warden. It ran as a separate, downloadable piece of code, meaning that Blizzard could change their protection scheme any time they pleased. Mousepad, as usual, gave njaguar his code, but had decided he wanted to keep his Warden protection updates to himself, for some unknown reason. After d2jsp was quickly marked as a bannable program, njaguar took the money he made and ran. He claimed that d2jsp was for single player use only, and how dare those users run it on battle.net where it was against the TOS! He acted as if he'd been in the right the whole time, and it was those pesky users who were the ones ***ing everything up. In other words, njaguar pushed the blame onto everyone but him. 

This is where I get back into the picture, and this information is firsthand again. 

This is when d2jsp shifted focus into the site it is today. With d2jsp (the bot) basically gone, njaguar sells forum gold for money. He barely does any actual work to speak of, except to make appearances and pretend he's some sort of rock star whom everyone should look up to. It was later in patch 1.11b that an up-and-coming hacker named Sheppard decided to revive d2bs. After updating the function offsets/ordinals/structs, he took it upon himself to take the project under his wing and continue it. Given that d2bs is licensed under the GPL, he has managed to raise a talented community of scripters (and the community has actual talent, not pretend talent like d2jsp had) under the promise that d2bs will always and forever be open source. They can make any changes to the API that they deem necessary, and they can even fork the project to create their own work, if they desire. These are all things that njaguar promised, but never delivered on. 

Unfortunately, patch 1.12 is out, and d2bs is currently down for the count, but Sheppard is hard at work, fixing it as best as possible. He decided that the current code was nearly unmaintainable, and is in the process of rewriting the entire thing, which is part of what's keeping it from being updated as of yet. 

How has njaguar responded to all of this? He hasn't updated, and won't be updating, d2jsp to meet the new patch. So all the people who paid for it (I don't care if it was called a donation, it's still payment in every legal sense) are now screwed for using it. They can't use it on battle.net, because it results in a ban (when Warden is turned on). They can't use it with the new 1.12 feature (no cd required to play), because it's not updated. They're basically screwed, and njaguar won't do a thing for them. 

Now tell me, would you respect a man who sold you a defective product? 

[1] I even wrote a few scripts for JED. I unfortunately don't have them any more, but I distinctly remember having a pindle script, a leechbot, and had invented the now-unfortunately-all-too-common method of storing the configuration parameters inside of the script, instead of in a separate file. 

[2] As an interesting sidenote, njaguar wasn't even registered for his own website's forums for quite some time. In fact, I have an older account than he does. 

[3] For the interested, here's the SF.net project.page for JED. As you'll notice, by that time, quite a few others had committed code to it, including such famed people as Dan_Goon and bootyjuice. Also, if you notice, JED uses d2hackit! as its loading system. Almost all good hacks (the only major exception is mousepad's maphack) used d2hackit! at that point, including d2jsp. 

[4] Originally, forum gold was supposed to be simply a toy to play with. It wasn't until later that njaguar saw the real potential of it and started abusing his position as head administrator and made it into what it is today. 

[5] Notice the recurring trend here? There isn't a single bit of real work that njaguar has done so far. As I recall, he even had Raeky and HolyCoitus helping him code the forum gold system. 

[6] Interestingly, the botOS source code seems to still be available.


五、D2BS、kolbot与D2Bot#的关系

要知道,D2BS是内核,即所谓的黑客部分是其也!D2Bot#是控制部分,起到的是inject和通讯作用!即把D2BS虎克到游戏上,同时把bot的各种状态通过指令联系起来。而kolbot这个JavaScript的是怎么起作用的,大家就必须了解SpiderMonkey这个js引擎!我写过一系列的关于spidermonkey的博文,如果朋友有兴趣,也可以看一眼,这系列博文地址是:











实际上,kolbot中每个指令,在D2BS内核中都有一个C++函数与之对应!所以,kolbot脚本代码,就是在js语言的基础上,用C++语言编写的D2BS中的各种命令去指挥bot完成相应的任务!


六、最后看看lord2800这个人

这是他的简历:


而他的主要干的一件事中就有D2BS


从他的博文中可以看到,在2018年,他还在玩d2,不过是通过网络的方式,估计是使用的IRC方式,这方面我不熟悉,也不敢乱写,有兴趣的朋友可以直接用lord2800这个ID去搜索!


好了,这个小博文就写到这里,希望有兴趣的朋友喜欢!

路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

Archiver|手机版|小黑屋|BattleCN ( 陕ICP备05006600号 )

GMT+8, 2024-4-20 03:07 , Processed in 0.062846 second(s), 16 queries .

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

返回顶部