Author | Message | Time |
---|---|---|
Spilled[DW] | Hi, im trying to learn how to create a Diablo II Pindle Bot. How would i go about creating this to run my character through pindle runs using Diablo II Loader? Is the game ran in a sub window? If so how would i control the character and what messages would i send the sub window? Any help or tutorial would be much appreciated I am interested in learning this. Thanks in advance. | April 27, 2005, 5:54 PM |
Myndfyr | What is "Pindle"? | April 27, 2005, 7:07 PM |
HdxBmx27 | Pindel is a spacific monster in D2, that is always at a spacific place, and he drops good itls, and give decent EXP. This guy just wants to get items w/o doing the actuall playing. And i assume he heard about AutoIT, that would be a decent lang. to make a "bot" like that in. ~-~(HDX)~-~ | April 27, 2005, 7:28 PM |
Spilled[DW] | How would i go about making such a program as this in the language that im currently using? Any help is appreciated thanks in advance. | April 27, 2005, 8:06 PM |
Yegg | What language are you using? I'm assuming it is Visual Basic 6? | April 27, 2005, 8:11 PM |
KkBlazekK | http://www.hiddensoft.com/AutoIt/ I think this is what hdx was talking about. Its a really simple scripting language. edit: http://www.hiddensoft.com/AutoIt/diablo.php Hehe :P | April 27, 2005, 8:12 PM |
Spilled[DW] | Yes, the current language im using is VB6 and im pretty sure it possible to make this program in VB6. What im asking is how would i get the controls of the character in VB6 and go about controlling his movements to do pindle/meph/andy runs whichever i decide to make it for. Thanks in advance all. | April 27, 2005, 8:17 PM |
iago | It's easy! - Make the standard connection to Diablo II - Also connect to the realm server - Log in with the appropriate character - Tell Battle.net that you're creating a game - Tell Battle.net that you're entering a game - Decompress the incoming packets - Find the appropriate information to move to the right location - Send game packets that'll get you to that location - Find the appropriate information about the monsters from the decompressed packets - Send the information to attack those monsters - Find the info about the dropped items - Send the info to pick them up Now, if you narrow your question down to any of those steps, you might get more help. | April 27, 2005, 8:26 PM |
Spilled[DW] | Actually i was more planning this bot to be exterior and get the handles on Diablo II Loader and run it from there, Somewhat like jhj bot worked. Ideas? | April 27, 2005, 8:30 PM |
Yegg | You want this bot to control mouse movements and click action? Maybe even some keyboard events? So it would work like your "basic advanced" macro? | April 27, 2005, 8:35 PM |
Spilled[DW] | jhj bot in no way moves your mouse, but moves your guy without mousemovement. How would i do this? | April 27, 2005, 8:37 PM |
Yegg | Apparently that bot is sending packets to the game server, and it is sending packets through a socket that has established a connection to the game server. Do what iago suggested. There are some open source diablo game bots on bnetweb.com and zeroforce.net. | April 27, 2005, 8:40 PM |
LivedKrad | This is news to me, how are the packets compressed iago? I was comparing the packet format for D2GS (in-game) to a packet I logged while in the game. Seemed uncompressed to me, however I could be completely wrong and need to be enlightened by your infinite knowledge. P.S.- I think I may have found the answer to our question regarding the murder rate of America. | April 27, 2005, 9:04 PM |
iago | [quote author=LivedKrad link=topic=11404.msg110178#msg110178 date=1114635888] This is news to me, how are the packets compressed iago? I was comparing the packet format for D2GS (in-game) to a packet I logged while in the game. Seemed uncompressed to me, however I could be completely wrong and need to be enlightened by your infinite knowledge. [/quote] The Server -> Client are compressed with some kind of Huffman compression algorithm. Besides that, it seems like the "bot" probably injects a .dll and takes over certain events, and makes false function calls. Assuming that's true, doing it in VB isn't possible. VB is too high-level, you don't have the kind of control you get with C. | April 27, 2005, 10:22 PM |
Yegg | Are you sure that a language such as VB6 has a task that it cannot handle? Especially those kind of dll files. I think it could handle it. | April 27, 2005, 11:13 PM |
iago | If you can find a way to insert inline assembly language into a VB program, and to define functions in such a way that they don't have any hidden lead-in/lead-out code, then you can do it in VB. That's not impossible, I know somebody who's done something like that, but you wouldn't get very far. Of course, you CAN use a .dll to do it, assuming the .dll is written in C; although VB still isn't doing it, C is :P | April 27, 2005, 11:16 PM |
Yegg | Of course that's too much work, but my point was just that it is possible. Maybe not the best way to go though. | April 27, 2005, 11:22 PM |
iago | I don't know of any way of doing it without hacking VB, though. So if you call that possible, then I guess... | April 28, 2005, 2:37 AM |
LivedKrad | I tried in the pass to do my own implementation of the Huffman algorithm, so why can't one just "craft" packets in a third party program and send them? Is this because the D2 client creates a special version of the algorithm thus it must be sent within the actual client? | April 28, 2005, 2:58 AM |
Myndfyr | [quote author=LivedKrad link=topic=11404.msg110242#msg110242 date=1114657088] I tried in the pass to do my own implementation of the Huffman algorithm, so why can't one just "craft" packets in a third party program and send them? Is this because the D2 client creates a special version of the algorithm thus it must be sent within the actual client? [/quote] If you did an accurate reversal and implementation of the Huffman algo found in D2, you'd be allright to send packets from a third party client. | April 28, 2005, 3:25 AM |
Spilled[DW] | Hrmm.. i c so basically vb would not be the language to do a project like this in. Thanks for all your help everyone much appreciated. | April 28, 2005, 3:45 PM |
OnlyMeat | [quote author=iago link=topic=11404.msg110239#msg110239 date=1114655820] I don't know of any way of doing it without hacking VB, though. So if you call that possible, then I guess... [/quote] You could use RealBasic. That supports threads, inline asm etc. It's possible to write completely automated bots without using the diablo client, i created such a program which does pindle and travincal boss runs (well the scripts do the runs and the program provides the object model). Of course injecting code into the real client is much easier as d2 then does all the work for you. It's simply a matter of calling functions and reading the relevant memory locations. | April 28, 2005, 8:43 PM |
Yegg | I wouldn't suggest RealBasic, I would suggest a scripting language. Like Python, Pascal, Perl, etc. The three P's. | April 28, 2005, 9:01 PM |
Myndfyr | [quote author=Yegg link=topic=11404.msg110301#msg110301 date=1114722090] I wouldn't suggest RealBasic, I would suggest a scripting language. Like Python, Pascal, Perl, etc. The three P's. [/quote] In that same vein, I understand Python makes injection quite easy. It might be a good route to look into. $t0rm (Banana fanna fo fanna) would be a good resource in that realm. | April 28, 2005, 9:51 PM |
OnlyMeat | [quote author=Yegg link=topic=11404.msg110301#msg110301 date=1114722090] I wouldn't suggest RealBasic, I would suggest a scripting language. Like Python, Pascal, Perl, etc. The three P's. [/quote] Using a scripting language for injecting code into another process is just horrible. Especially when you have the option of using a natively compiled language with inline asm, threading, synchronization objects etc. | April 28, 2005, 11:01 PM |
LivedKrad | OnlyMeat: Do you mind if I could have a "stripped down version" of this "clientless D2 bot" source? I've always suspected you could craft the correct packets to do what you wanted, (seeing as how that's how everything is done in game right down to clicking on an item), however I want to go more in-depth into how it's done. From iago's and MyndFyre's posts it would seem that the algorithm used deviates from its original form, thus making the Blizzard made client having to be used. Anything you could provide me would be helpful, especially in VB6. (Other sources are welcome though). | April 30, 2005, 3:14 PM |
OnlyMeat | [quote author=LivedKrad link=topic=11404.msg110559#msg110559 date=1114874048] OnlyMeat: Do you mind if I could have a "stripped down version" of this "clientless D2 bot" source? I've always suspected you could craft the correct packets to do what you wanted, (seeing as how that's how everything is done in game right down to clicking on an item), however I want to go more in-depth into how it's done. From iago's and MyndFyre's posts it would seem that the algorithm used deviates from its original form, thus making the Blizzard made client having to be used. Anything you could provide me would be helpful, especially in VB6. (Other sources are welcome though). [/quote] First question: No, creating a fully functional clientless bot is no trivial task, it takes time to locate and reverse the core routines and implement all the event handling correctly from scratch, so im not simply going to give the code away. However i would say, constructing outgoing packets is actually quite simple. For example sending a chat message in game:- [code] void CD2GameBot::ChatMessage(LPCSTR lpMessage) { CD2GSPacket Packet; Packet << (USHORT)0x00 // NULL << lpMessage // Msg << (BYTE)0x00 // Terminator << (USHORT)0x00; // NULL m_xD2GameServer.SendPacket(Packet,PKT_D2GS_OUT_CHATMESSAGE); } [/code] So by that token, creating a bot that creates/joins a game and sends some simple messages is trivial (like the spam bots you see). Automating game play is much more complex. | April 30, 2005, 10:00 PM |