I play ally side, using the same resolution and have found that these changes improve the performance of this excellent bot.
I'm on a lower population battlegroup, and found myself AFK'ing and DC'ing if I left the bot unattended.
Code:
;Join function - detects enter battle button and joins BG
Func Join()
ToolTip("Waiting for BG to start", 0, 0) ; displays tooltip in top left corner
while 1=1
$coord = PixelSearch(450, 150, 800, 230, 0xE01308, 100) ;searches for color of join battleground button within 100 variations
If Not @error Then
MouseMove ($coord[0], $coord[1]) ;move to area coordinates for join button
ToolTip("Joining BG", 0, 0) ; displays tooltip in top left corner
Sleep(Random(2015,2270))
MouseClick ("left")
ToolTip("Waiting for BG to load for 10 seconds...", 0, 0) ; displays tooltip in top left corner
Sleep (10000)
BG() ; call combat loop
EndIf
ToolTip("No Enter Battle button located, checking again in 5 seconds...", 0, 0) ; displays tooltip in top left corner
Sleep(Random(1010,2020))
Send ("{SPACE}")
Sleep (5000)
Join()
WEnd
EndFunc
Adding a jump when checking for the join battle eliminates the afk issue.
This is my AV nav code for ally side, works 9/10 times to get out of the cave.
Code:
;AV NAV CODE
If $bgnum = 1 Then
Send ("{w down}")
sleep (1500)
Send ("{W up}")
sleep (500)
Send ("{e down}")
sleep (250)
Send ("{e up}")
sleep (500)
Send ("{w down}")
sleep (3000)
Send ("{W up}")
sleep (500)
Send ("{e down}")
sleep (25)
Send ("{e up}")
sleep (500)
Send ("{w down}")
sleep (5000)
Send ("{W up}")
sleep (500)
Send ("{NUMLOCK}")
Sleep (9000)
Send ("{NUMLOCK}")
ToolTip("Waiting for 1:45 before continuing Nav procedure...)", 0, 0) ; displays tooltip in top left corner
sleep (95000)
ToolTip("Commencing Nav routine...", 0, 0) ; displays tooltip in top left corner
Send ("{NUMLOCK}")
Sleep (7000)
Send ("{w down}")
sleep (10000)
Send ("{w up}")
sleep (25000)
Send ("{NUMLOCK}")
ToolTip("Nav routine complete...", 0, 0) ; displays tooltip in top left corner
sleep (2000)
These coordinates work a lot better for leaving the battleground than what are in the original code (for me, I still suggest coding your own coordinates, if you look through the thread it's very simple and takes 30 seconds).
Code:
$coord = PixelSearch(608, 643, 715, 649, 0x670000, 10) ;searches for color of leave battleground button within 10 variations
If Not @error Then
MouseMove ($coord[0], $coord[1]) ;move to area coordinates for leave battleground button
ToolTip("BG has ended, re-starting queing process in 10 seconds", 0, 0) ; displays tooltip in top left corner
sleep (2000)
MouseClick ("left")
sleep (8000)
Queue() ; call combat loop
EndIf
And finally, I changed the time for auto-requeue to 30 minutes, as 40 seemed a bit long to me. (you can change the value to whatever works best for you, the number in bold is number of seconds to wait before auto-requeue, so 2400 = 40 min, 1200 = 20 min etc.).
Code:
if $recount = 1800 Then ; Counts to 30 minutes and restarts the Queue - for long BGs/if you've been kicked
This bot now works flawlessly for me, Thanks to Z for making and updating this excellent piece of work, and I hope these changes help those who are struggling.