I've made a script for Autoit3 if anyone wants to use it. I suck at accessing windows in the background so its alt-tab all the way.
The resolution is 1600x900, but is easily chenged by yourselves. I will include code for getting positions and color to make it work...
You must also run this LUA once to get rid of the "do you really want to forfeit" question.
Code:
/run PetBattleFrame.BottomFrame.ForfeitButton:SetScript("OnClick", function() C_PetBattles.ForfeitGame() end)
Both windows must be windowed and maximised (not fullscreen).
Bring up both pet menues.
Start the script from Autoit3 or complile it and start.
Make sure you switch between your wow-instances with alt-tab.
Start on your boosting account (the one not levelling up) and press F8 to start the "bot".
It check pixelcolor for the "find battle" button, the "accept" button for the pvp match, it checks the pixel for the first 25 pet selection and the pixel for the forfeit flag.
Here is the script. Feel free to change it.
Code:
HotKeySet("{F9}", "ExitProg")
HotKeySet("{F8}", "StartStop")
Func ExitProg()
Exit 0;;Exits the program
EndFunc
$On = False
#Find button X, Y, Color
$FB_X=702
$FB_Y=722
$FB_C=6685443
#Accept button X & Y
$AB_X=750
$AB_Y=330
$AB_C=5964033
#First Pet X & Y
$FP_X=656
$FP_Y=768
$FP_C=10844490
#Forfeit flag X & Y
$FF_X=882
$FF_Y=870
$FF_C=3223848
While 1
While $On = True
$var = 1
sleep(500)
While $var <> $FB_C
sleep(1000)
$var = PixelGetColor($FB_X, $FB_Y)
#MsgBox(0, "x, y & color is", $FB_X & "," & $FB_Y & "," & $var)
WEnd
MouseClick("left",$FB_X, $FB_Y,1)
sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
sleep(4000)
MouseClick("left",$FB_X, $FB_Y,1)
sleep(500)
While $var <> $AB_C
sleep(1000)
$var = PixelGetColor($AB_X, $AB_Y)
WEnd
MouseClick("left",$AB_X, $AB_Y,1)
sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
sleep(1000)
MouseClick("left",$AB_X, $AB_Y,1)
sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
sleep(2000)
While $var <> $FP_C
sleep(1000)
$var = PixelGetColor($FP_X, $FP_Y)
WEnd
MouseClick("left",$FP_X, $FP_Y,1)
sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
sleep(500)
While $var <> $FF_C
sleep(1000)
$var = PixelGetColor($FF_X,$FF_Y)
WEnd
MouseClick("left",$FF_X,$FF_Y,1)
sleep(5000)
WEnd
Sleep(100)
WEnd
Func StartStop()
If $On = False Then
$On = True
Else
$On = False
EndIf
EndFunc
Use this script to get mouse positions for changing the script.
Just press F9 when hovering over the position you want coords for. Change the main script afterwards.
Code:
HotKeySet("{F9}", "ExitProg")
Func ExitProg()
Local $pos = MouseGetPos()
Local $var = PixelGetColor($pos[0], $pos[1])
MsgBox(0, "x, y & is", $pos[0] & "," & $pos[1])
Exit 0;;Exits the program
EndFunc
while 1
sleep(500)
WEnd
Finally use this to get the color of your newly changed position in the script. Change variable names to fit the position you are looking for. See the main scrips for an example in the beginning. delete the "#" to see it in action.
Code:
MsgBox(0, "x, y & color is", $FB_X & "," & $FB_Y & "," & $var)