Jump to content

Help with a diablo II


Recommended Posts

okay here is what i have its for when my bot dies seems it dont have body support im makeing an autoit script so when my char dies it gose and picks my body up here is what i have soo far

$D2path = IniRead(@scriptdir & "\Config.ini","D2","Path","")
$D2params = IniRead(@scriptdir & "\Config.ini","D2","Params","")
$D2win = iniread(@Scriptdir & "\Config.ini","D2","D2window name","")
$Account = iniread(@Scriptdir & "\Config.ini","Bnet","Account","")
$Password = iniread(@Scriptdir & "\Config.ini","Bnet","Password","")
$Char = IniRead(@Scriptdir & "\Config.ini","Bnet", "Char","")
while 1
ProcessClose("Dwwin.exe")
$Process="Vex.exe"

    If ProcessExists($Process) Then
        Do
            Sleep(100)
        Until Not ProcessExists($Process)
        ProcessClose("D2Loader-1.11b.exe")
        ShellExecute($D2path,$D2Params)
        Sleep(200)
        Winmove($d2win,"",0,0)
        sleep(600)
        Mouseclick("Left",101,127)
        Sleep(500)
        MouseClick("Left",384,409)
        Sleep(500)
        Mouseclick("left",324,378)
        Sleep(200)
        Send("{Enter}")
        SLeep(100)
        Mouseclick("Left",416,378)
        sleep(1000)
        Mouseclick("Left",392,364)
        Sleep(200)
        Send("^a")
        Sleep(200)
        Send($Account)
        sleep(200)
        Send("{TAB}")
        Sleep(200)
        Send($Password)
        sleep(200)
        Send("{ENTER}")
        sleep(200)
        If $char = "1" Then
            Send("{Enter}")
        ElseIf $Char = "2" Then
            Send("{Right}")
            Send("{Enter}")
        EndIf
WEnd

I see the problem i just don't know how to fix it its the If in the process's & with the char select but if i put an Endif at the end of the processexist then it just continues the script without vex.exe closing so i'm looking for help to resolve this problem this is the second time i have wrote this script but i don't remember how i did it last time tyvm

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...