I have perfect internet but Hearthstone still disconnects from time to time, closes then stops the bot. I've made a simple script to prevent this.
However there are many limitations. If Hearthstone does not close, then the script cannot tell if the bot is stopped. Also, it is VERY intrusive, so it WILL interrupt what you're doing. I suggest only to run this while you're not on the computer.
Be sure to run as admin or it will not work. I've only tested this on my laptop, running 1280 x 768 resolution. I'm not sure how this will change how the script is gonna work on other res.
Keep Battle.net OPEN. It's only 100 mb of memory and barely any cpu.
I was planning to add a sleep function when the bot auto stops but it's going to take a little bit more effort. I'm in school so my time is very limited. Feel free to modify it to your own will!
#SingleInstance Force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
InputBox bot,, Enter the bots task name (first 4 letters is usually enough)
While true
{
IfWinNotExist Hearthstone
{
WinActivate Battle.net
Click 300,650
Sleep 15000
WinActivate %bot%
Sleep 200
MouseClick, left, 210, 150
}
Sleep 10000 ;check every 10 seconds
}
If for some reason you don't have AHK (get it!), I can post a .exe file so you guys can run it with virus scans but I'm hoping that won't be necessary.