Jump to content

Den of Evil bot lol


 Share

Recommended Posts

Hey :) I'm really new at this but.. I'm trying to create a den of evil bot to help me learn lol this is what i've got so far..

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.4.9
 Author:       Mysticwonton

 Script Function: Den of Evil Bot
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

Run("C:\Program Files\Diablo II\Diablo II.exe -w","C:\Program Files\Diablo II")
WinWaitActive("Diablo II")
WinMove("Diablo II", "",0,0)
MouseClick("left",115,110)
MouseClick("left",375,375)
Sleep(600)
MouseClick("left",365,365,2,5)
Sleep(500)
Send("Account Name")
Send("{TAB}")
Sleep(500)
Send("Password")
MouseClick("left",375,500)
Sleep(500)
MouseClick("left",200,150,2,5)
Sleep(500)
Mouseclick("left",560,485)
Sleep(500)

So.. this opens up windowed D2 and puts in account name and password and clicks on the char in the first slot and clicks create game.. now how do i get it to make a random game name? and once i get in the game.. How do i even begin to get it to find the den of evil outside? lol any help or replys appeciated.. thanks ;)

Edited by Canasian
Link to comment
Share on other sites

No matter how you do it, if it's going to be fully programmed in autoit that involved a whole ton of PixelGetColor() PixelSearch() and PixelChecksum() calls. Your first priority is probably going to be to figure out which map is currently loaded. The easiest way to do that is to figure out which way the exit is out of town... and therefore, which way the path from the campfire in the rogue encampment is leading (it always changes to lead towards the exit). Then you can program how long to walk because you'll know exactly where the den of evil is (there's only 4 possibilities depending on the map). You'll obviously need some way to detect monsters, and things in your way. That's where the pixel functions come it. This will not be an easy feat, but I invite you to try your best. I'm interested to see what you can come up with.

- Dan [Website]

Link to comment
Share on other sites

If you are gunna learn to do this, Learn pathing also. Like moding certain areas on the floor of Act 1 so your character will know where the wp is. When you get that do it from Cold plains. Also look into Mini Mapping. It can tell what map is being showed by a database of maps and it matches it up.

Link to comment
Share on other sites

MMBot is coded entirely in AutoIt, and last time I checked the source is freely available for download. It's so famous because of it being really the only full bot coded entirely in autoit.

It isn't fully available, but anyone with a hacked decompiler can do it:/

Your going to have to mod Diablo II's floor tiles so that there like Blue, then you follow the Blue to find the Den of Evil.

Link to comment
Share on other sites

some one say me how i make mods?

How i unpack mpq and then packit again?

I tried to edit monsters but no effect...

I usually use HEX editor to edit this stuff so i dont need any decompilators and unpack,

but its damn hard in that way

Link to comment
Share on other sites

@Canasian - Just tested what you have so far, might wanna find another way to activate the bot than "WinWaitActive()" as with the D2 window it doesn't continue the script until you click somewhere in the window. Also you need to add some Sleep() time as shown below:

MouseClick("left",365,365,2,5)    ;Click the Battle.Net button
Sleep(500)                         ;Add more time here as it takes a bit to load the login part
Send("Account Name")              ;Send account name
Send("{TAB}")
Sleep(500)
Send("Password")
MouseClick("left",375,500)
Edited by dandymcgee

- Dan [Website]

Link to comment
Share on other sites

Hey I found this, it contains literately thousands of lines of code, but if you're willing to take the time (and you have a good enough understanding of AutoIt) MMBot's source code might be of interest to you.

mmBOT546source.zip

Phew, that's a lot of code. I was actually interested in how the heck he could find a pixel that uniquely identified uniques. I tried to find one a long time ago and gave up. The colors I picked kept matching my character's skin color. Also, the color for set items was matching anything poisoned <_<

Anyway, thanks.

Link to comment
Share on other sites

Well you'd have to make your own mod for D2 that made squares similar to the ones when you run MMBot. Just edit the text of uniques so that it always shows up as a block of gold (or a color of your choice) and then you'll be able to easily ID it. Of course that's going to take some time. Check out PhrozenKeep http://phrozenkeep.planetdiablo.gamespy.co...ba9ebc8b6949a2d

They have a lot of good stuff related to d2 modding, botting, etc.

Here's a screenshot of the squares shortstop was talking about (hence how the maker of MMBot IDed items):

http://newd2event.net/img/mmbot/RaukBot/5.jpg

Edited by dandymcgee

- Dan [Website]

Link to comment
Share on other sites

Well you'd have to make your own mod for D2 that made squares similar to the ones when you run MMBot. Just edit the text of uniques so that it always shows up as a block of gold (or a color of your choice) and then you'll be able to easily ID it. Of course that's going to take some time. Check out PhrozenKeep http://phrozenkeep.planetdiablo.gamespy.co...ba9ebc8b6949a2d

They have a lot of good stuff related to d2 modding, botting, etc.

Here's a screenshot of the squares shortstop was talking about (hence how the maker of MMBot IDed items):

http://newd2event.net/img/mmbot/RaukBot/5.jpg

Thanks for the links. I'll check it out.

I noticed that the colors he looked for didn't match the default item colors, so that makes sense. Is changing the colors done in the .mpq file, or what? I don't get how he changes the default colors using AutoIt. I guess I'll have to look over that code some more. I thought that wasn't safe because Blizzard could check out your installation to make sure it looked right. I guess not though, if that's what mmbot is doing. I've been trying to do it without editing anything, but I see that is unreliable and/or a lost cause entirely. <_<

Link to comment
Share on other sites

Thanks for the links. I'll check it out.

No Problem!

I noticed that the colors he looked for didn't match the default item colors, so that makes sense. Is changing the colors done in the .mpq file, or what?

I believe you can do it via either a .txt file or a .tbl file. Whether or not you can do it with autoit only... if it's a text file definately, if it's a table file i'm not sure maybe he used fileinclude()? Haven't looked at the code much.

I thought that wasn't safe because Blizzard could check out your installation to make sure it looked right.

Not as far as I know... they can use Warden (a program that runs in memory of the game when you're on Closed Battle.Net when Blizzard decides to turn it on) to check the memory of your game for maphacks, or other thirdparty programs directly affecting Diablo II's memory usage, but autoit just sends input to the game just as a person would do, not via memory, so it's virtually undetectable by B.Net

I've been trying to do it without editing anything, but I see that is unreliable and/or a lost cause entirely.

Yeah, like I said I haven't done much reading of MMBot's source code personally so you'd have to figure out how the author of it makes the colored blocks appear (I'm 99.99% sure he is just adding a .txt or .tbl file to the diablo folder and then running diablo with the -direct -txt parameters).

- Dan [Website]

Link to comment
Share on other sites

I guess the original poster gave up on his den of evil bot :)

I knew Warden could check up on the memory, I just didn't realize it was actually "legal" to change the colors. I guess it makes sense that it is, seeing as there's no harm in it...unless you're writing a bot <_<

-w -ns -direct -txt -title "Diablo II"

(I'm 99.99% sure he is just adding a .txt or .tbl file to the diablo folder and then running diablo with the -direct -txt parameters).

I didn't even know about those parameters. I took a look and he uses a whole bunch, "-w -ns -direct -txt -title "Diablo II"". I'll take a look around, maybe I'll figure out some more interesting stuff.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...