vegasmoney
New Member
- Joined
- Jun 7, 2012
- Messages
- 13
- Reaction score
- 2
DB Refresher
2012-07-11 3:44PM /update/ - Working on a new version! It will have more features, some 'bells and whistles', and will be a lot more friendly on the configuration. If you have any feature requests or anything, now is the time to let me know

2012-07-05 8:59PM v1.0 - First public release! Please give feedback and/or feature requests. If you like the script, let me know!
--------------------------------------------------
Info:
I made this script initially for personal use. Since friends have used it and love it, I've decided to share it here. I thought I was the only one, but apparently everyone drastically loses performance on their DB bots the longer time DB/D3 runs without a restart.
This is an AutoIt script. You will need AutoIt to compile and use it. You can get AutoIt @ AutoIt - AutoItScript
Features of the script:
- Restart your DB bots after X hours
- Toggle on/off status display messages
- Ability to specify which monitor status messages display on
- Random timer between stopping and restarting bots (time range is configurable)
- Can specify a different D3 installation for each bot
- (In Testing) After restarting bots the script can resize, position, and/or tile the windows as you like (It's in the code currently, but disabled by default)
- (Coming Soon) Support for 20+ bots, maybe unlimited (Currently the script supports 1 to 3 bots)
- (Coming Soon) Script can change profiles after a restart. Possibly I will add the ability to randomly choose a profile per bot.
This script/app/tool will always be offered in source code, and source code only.
Newbie Help:
Not a programmer? No worries, you can still use DB Refresher! First you need to get AutoIT from the link above and make sure you get the installer that includes "SCiTE". Once AutoIt is installed, you can right click the .au3 file and then click "Edit Script". At the top of the script is the part you want to edit. You will want to start at "CONFIG STARTS HERE" and stop editing/configuring when you see "CONFIG ENDS HERE".
Once you have the script configured to your liking, save it. Next, right click the script (.au3 file) and choose "Compile Script". It will make the script into an .exe file. Now you can run the script by just double clicking it. To stop the script at anytime, you can close it from your taskbar. The icon for the script is a blue circle with a white triangle in it. I might have a friend make a custom icon so it will make it even easier to find for you guys.
If you have any questions, post in the thread.
Source Code:
Code:
;############################################
;# DemonBuddy Refresher [DB Refresher]
;# by vegasmoney (vegasmoney @ DemonBuddy)
;#
;# NOTES: Restarts Diablo 3 bot DemonBuddy
;# every X hours.
;############################################
#RequireAdmin
;##### CONFIG STARTS HERE #####
;On/Off for status display -- Only shows info when it needs to ("1" = ON, "0" = OFF)
$displaytoggle = 1
;Which monitor for status messages to display? ("1" = monitor #1 , "2" = monitor #2)
;If you aren't sure, put "1"
$monitordisplay = 2
;Number of bots (DemonBuddy + D3 clients) you are running.
;(example: "3" would mean 3 DB's and 3 Diablo3's)
$numberofbots = 2
;How many hours to wait between restarts?
$hoursuntilrestart = 4
;Minimum time (in minutes) to wait between stopping DB/D3 and then starting them up again
;(If you are having session lock issues, set this to 5)
$minrestarttime = 3
;Maximum time (in minutes) to wait between stopping DB/D3 and then starting them up again
;(Make sure this is higher than minimum time setting above)
$maxrestarttime = 5
;Path to DB with Demonbuddy.exe (MUST be in quotes)
$dbpathandfile = "E:\_DOWNLOADS\dbuddy\DemonBuddy\Demonbuddy.exe"
;DB Key (MUST be in quotes)
$dbkey = "1A2B3C4D5E6F7G9Hx123"
;Battle.net account (MUST be in quotes)
$bnetaccount01 = "[email protected]"
;Battle.net password (MUST be in quotes)
$bnetpw01 = "mypassword123"
;Path to Diablo 3 with Diablo III.exe (MUST be in quotes)
$d3pathandfile01 = "C:\Program Files (x86)\Diablo III\Diablo III.exe"
;DB Profile to use, include path (MUST be in quotes)
$dbprofile = "E:\_DOWNLOADS\dbuddy\DemonBuddy\_[Barbarian] Sarkoth Farm-Apoc01.xml"
;DB Routine to use, do not include path (MUST be in quotes)
;(examples: "Mammon All-in-One Ver.1.0.0.23" or "Belphegor All-in-One")
$dbroutine = "Mammon All-in-One Ver.1.0.0.23"
;ONLY if you are using more than 1 account/bot, add the extra Bnet user and passwords here
;Use format below (max supported bots currently is 3, will be unlimited in future version)
$bnetaccount02 = "[email protected]"
$bnetpw02 = "mypassword123"
$d3pathandfile02 = "F:\1installed\Diablo III-2\Diablo III.exe"
$bnetaccount03 = "[email protected]"
$bnetpw03 = "mypassword123"
$d3pathandfile03 = "F:\1installed\Diablo III-3\Diablo III.exe"
;##### CONFIG ENDS HERE #####
;-----------------------------------------------------------------------------
;----------------------------- DO NOT EDIT BELOW -----------------------------
;-----------------------------------------------------------------------------
Global $minresttime = $minrestarttime * 60000
Global $maxresttime = $maxrestarttime * 60000
Global $secstorestart = $hoursuntilrestart * 3600000
Global $dbfullparams01 = "-key " & $dbkey & " -bnetaccount " & $bnetaccount01 & " -bnetpassword " & $bnetpw01 & ' -d3path="' & $d3pathandfile01 & '" -profile="' & $dbprofile & '" -routine="' & $dbroutine & '" -autostart -noflash'
Global $dbfullparams02 = "-key " & $dbkey & " -bnetaccount " & $bnetaccount02 & " -bnetpassword " & $bnetpw02 & ' -d3path="' & $d3pathandfile02 & '" -profile="' & $dbprofile & '" -routine="' & $dbroutine & '" -autostart -noflash'
Global $dbfullparams03 = "-key " & $dbkey & " -bnetaccount " & $bnetaccount03 & " -bnetpassword " & $bnetpw03 & ' -d3path="' & $d3pathandfile03 & '" -profile="' & $dbprofile & '" -routine="' & $dbroutine & '" -autostart -noflash'
While 1
TTDisplay()
;asks if user wants an immediate run, this only happens once
$runonstart = MsgBox(36, "DB Refresher", "Run DB Refresh now? (YES = Kill any DB/D3 currently running and restart, NO = Just start the timer until the next restart)", 30)
If $runonstart = 6 Then
If $displaytoggle = 1 Then TTSend("Ending DB and D3 Processes...")
;if user wants immediate run kill db/d3
For $i = 1 To $numberofbots
$DBclose = ProcessClose("Demonbuddy.exe")
Sleep(250)
If $DBclose = 0 Then WinKill("Demonbuddy")
$d3close = ProcessClose("Diablo III.exe")
Sleep(250)
If $d3close = 0 Then WinKill("Diablo III")
Sleep(500)
Next
;wait user inputted time until restart
If $displaytoggle = 1 Then TTSend("Waiting " & $minrestarttime & " to " & $maxrestarttime & " minutes until restart...")
Sleep(Random($minresttime, $maxresttime, 1))
;now restart
If $displaytoggle = 1 Then TTSend("Restarting DB and D3...")
;~For $i = 1 To $numberofbots
If $numberofbots = 1 Then
ShellExecute($dbpathandfile, $dbfullparams01)
Sleep(15000)
ElseIf $numberofbots = 2 Then
ShellExecute($dbpathandfile, $dbfullparams01)
Sleep(15000)
ShellExecute($dbpathandfile, $dbfullparams02)
Sleep(15000)
ElseIf $numberofbots = 3 Then
ShellExecute($dbpathandfile, $dbfullparams01)
Sleep(15000)
ShellExecute($dbpathandfile, $dbfullparams02)
Sleep(15000)
ShellExecute($dbpathandfile, $dbfullparams03)
Sleep(15000)
EndIf
;~Next
EndIf
;Main loop starts here
While 1
If $displaytoggle = 1 Then TTSend("")
;wait X hours (set in config)
Sleep($secstorestart)
;kill db and d3 process(es)
If $displaytoggle = 1 Then TTSend("Ending DB and D3 Processes...")
For $i = 1 To $numberofbots
$DBclose = ProcessClose("Demonbuddy.exe")
Sleep(250)
If $DBclose = 0 Then WinKill("Demonbuddy")
$d3close = ProcessClose("Diablo III.exe")
Sleep(250)
If $d3close = 0 Then WinKill("Diablo III")
Sleep(500)
Next
If $displaytoggle = 1 Then TTSend("Waiting " & $minrestarttime & " to " & $maxrestarttime & " minutes until restart...")
;wait user inputted time until restart
Sleep(Random($minresttime, $maxresttime, 1))
If $displaytoggle = 1 Then TTSend("Restarting DB and D3...")
;now restart
;~For $i = 1 To $numberofbots
If $numberofbots = 1 Then
ShellExecute($dbpathandfile, $dbfullparams01)
Sleep(15000)
ElseIf $numberofbots = 2 Then
ShellExecute($dbpathandfile, $dbfullparams01)
Sleep(15000)
ShellExecute($dbpathandfile, $dbfullparams02)
Sleep(15000)
ElseIf $numberofbots = 3 Then
ShellExecute($dbpathandfile, $dbfullparams01)
Sleep(15000)
ShellExecute($dbpathandfile, $dbfullparams02)
Sleep(15000)
ShellExecute($dbpathandfile, $dbfullparams03)
Sleep(15000)
EndIf
;~Next
WEnd
WEnd
Func TTDisplay()
If $displaytoggle = 1 Then
If $monitordisplay = 1 Then
Global $monitorx = 0
ElseIf $monitordisplay = 2 Then
Global $monitorx = 1920
EndIf
EndIf
EndFunc
Func TTSend($var)
ToolTip($var, $monitorx, 0)
EndFunc
Downloads:
View attachment apt-db_refresher-v1.0.zip
If you like the script, please hit +rep at the bottom left and/or +like at the bottom right of this post!
Last edited: