Jump to content
Sign in to follow this  

I'm stuck on what to do next :(

Recommended Posts


I'm wanting to make a diablo 2 bot for learning purposes.. a den of evil bot. I've started and got to the point where it gets in game.. but i guess now the hardest part comes.. the pathing or the moving.. detecting what map is loaded and how to move from point a to point b.. this is where i was stuck 2 years ago and couldn't figure it out and i gave up lol. I couldn't understand how to do it and maybe I still can't. Maybe i need a different project lol but i'm open to any comments or suggestions or help.

I need a start on how to make my bot move. How to get it to detect what map has been loaded and how to move from the start to the den. I tried searching, i treid reading many other bot topics and i read about setting waypoints and memory reading and all that. But that doesn't work in Diablo 2 does it. Oh well Here is my code.. up to the point it gets into the game.

Dim $UN = IniRead(@ScriptDir & "\Setup.ini","UNPW","Username","Not Found")
Dim $PW = IniRead(@ScriptDir & "\Setup.ini","UNPW","Password","Not Found")
Dim $D2Dir = IniRead(@ScriptDir & "\Setup.ini","D2Dir","Diablo Directory","Not Found")
Dim $Charslot = IniRead(@ScriptDir & "\Setup.ini","Charslot","Slot#","Not Found")
Dim $String = StringSplit(IniRead(@ScriptDir & "\Setup.ini", "Random", "String", "Not Found"), ",")
Dim $Exit = HotKeySet("{ESC}","Stop")
Dim $Gn = GameName()

Func Stop()

Run($D2Dir) ; Opens d2
WinWait("Diablo II") ; Waits for d2 to activate
WinActivate("Diablo II")
WinWaitActive("Diablo II")
Send(50) ; gives cpu time to think
WinMove("Diablo II","",0,0) ; moves d2 window to top left
Sleep(2800) ; waits for it to get to login screen
Send("{TAB}") ; moves to account login input box
Send($UN) ; types username
Send("{TAB}") ; moves to password input box
Send($PW) ; types password
Send("{ENTER}") ; submits un & pw

While 1 ; Will add option to choose different chars later
        Case $Charslot = 1

Func GameName() ; this Function creates a random game name.
    $Name = ""
    $iLength = Random(3, 15, 1)      ; Create a random length between 3 and 15 characters
    For $x = 1 to $iLength           ; <=== x determines which character you are currently at in the string
        $y = Random(1, 62, 1)
        Switch $y
            Case 1 to 10             ; y is between 1 and 10
                $Name &= Chr($y + 47); Numbers 0-9     ;<== y + 47 will equal ASCII codes 48 - 57
            Case 11 to 36            ; y is between 11 and 36
                $Name &= Chr($y + 54); Letters A-Z     ;<== y + 54 will equal ASCII codes 65 - 90
            Case 37 to 62            ; y is between 37 and 62
                $Name &= Chr($y + 60); Letters a-z     ;<== y + 60 will equal ASCII codes 97 - 122
    Return $Name

Send("{ENTER}") ; submits char selection
Sleep(2000) ; waits 2 seconds before clicking create game
MouseClick("left", 595, 485, 1) ; clicks create game.
Send($Gn) ; types game name
Send("{TAB}") ; moves to game pass
Send($Gn) ; types game pass
Send("{ENTER}") ; submits random game name and pass
Sleep(3000) ; waits 3 seconds to enter game

Here is the .ini

Username = UN
Password = PW

Diablo Directory = C:\Program Files\Diablo II\Diablo II.exe -w -ns -skiptobnet

Slot# = 1

Share this post

Link to post
Share on other sites

What will I have to mod? I've spent the past couple hours reading tutorials and finding tools to read mpq's and read a 36 page pdf tutorial.. didn't have anything about changing the color and that's what i need to do isn't it.. I saw a d2 bot work on youtube that made the diablo 2 screen modded black completely and made a path of a blue line the path it has to follow from point a to point b.. is that what i have to do? seems even more complicated to make a d2 pathing bot than a WoW travel bot to me now T_T has anyone here actually made a d2 pathing bot?

Share this post

Link to post
Share on other sites

Has anyone made a d2 pathing bot or done any color modding in diablo 2?

Share this post

Link to post
Share on other sites

Do you need to code it in autoit?

Otherwise redvex is an great gateway program that you can use.

you could google for more info if you want.

Most/best diablo 2 bots are made with autoit to login and create games and redvex to control the character+pickup etc.


Share this post

Link to post
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
Sign in to follow this