Code:
Gui, Add, Checkbox, vhp x10 y10, HP
Gui, Add, DropDownList, vhpf w50 x50 y10, F1|F2|F3|F4|F5|F6|F7|F8|F9|F10
Gui, Add, DropDownList, vhpp w50 x120 y10, 25|50|75
Gui, Add, Checkbox, vmp x10 y40, MP
Gui, Add, DropDownList, vmpf w50 x50 y40, F1|F2|F3|F4|F5|F6|F7|F8|F9|F10
Gui, Add, DropDownList, vmpp w50 x120 y40, 25|50|75
Gui, Add, Checkbox, vxp1 x10 y70, XP1
Gui, Add, DropDownList, vxp1f w50 x50 y70, F1|F2|F3|F4|F5|F6|F7|F8|F9|F10
Gui, Add, Checkbox, vxp2 x10 y100, XP2
Gui, Add, DropDownList, vxp2f w50 x50 y100, F1|F2|F3|F4|F5|F6|F7|F8|F9|F10
Gui, Add, Button, gok x10 w180,OK
Gui, show, w200 h150, Name
return
ok:
WinActivate, [C
WinWaitActive, [C
if hpp=20
hpp=746
else if hpp=50
hpp=725
else if hpp=80
hpp=700
PixelGetColor, hphex, 36, %hpp%
if mpp=20
mpp=746
else if mpp=50
mpp=725
else if mpp=80
mpp=700
PixelGetColor, mphex, 53, %mpp%
Gui, submit
if hp=1
settimer, hphp, 1000
if mp=1
settimer, mpmp, 2000
if (xp1=1 or xp2=1)
settimer, xpxp, 10000
settimer, check, 1000
return
xpxp:
if xp1=1
send {%xp1f%}
sleep 1000
if xp2=1
send {%xp2f%}
return
hphp:
PixelSearch, , , 35, %hpp%, 37, %hpp%, %hphex%, 10, Fast
if ErrorLevel
{
send {%hpf%}
sleep 2000
}
return
mpmp:
PixelSearch, , , 53, %mpp%, 50,%mpp%, %mphex%, 40, Fast
if ErrorLevel
{
send {%mpf%}
sleep 2000
}
return
check:
WinWaitNotActive, [C
tooltip, client not active,1,1
pause
return