Code: Select all
full_command_line := DllCall("GetCommandLine", "str")
if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
try
{
if A_IsCompiled
Run *RunAs "%A_ScriptFullPath%" /restart
else
Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
}
ExitApp
}
#NoEnv
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
SetKeyDelay,, 250
global lightColX := 0
global lightColY := 0
global keepLooping := 0
global fpFine := 0
global setHPx := 0
global setHPy := 0
global setFPx := 0
global setFPy := 0
global ashenUsed := 0
global BlueA := 0
global BlueB := 0
global BlueC := 0
global BlueD := 0
checkBars(){
PixelGetColor, hpColor, %setHPx%, %setHPy%, RGB
if !(hpColor = hpFine){
sleep, 250
Send r
sleep, 1000
}
PixelGetColor, fpColor, %setFPx%, %setFPy%, RGB
if !(fpColor = fpFine){
sleep, 250
SetKeyDelay,, 100
Send {Down}
sleep, 100
SetKeyDelay,, 500
Send r
sleep, 200
Send {Down}
sleep, 100
ashenUsed += 1
}
return
}
Numpad0::keepLooping := 0
Numpad1::setBars()
setBars(){
CoordMode, Mouse, Screen
ToolTip, Right Click to set HP Bar spot.`nDo not move mouse after Right Click.
Keywait, RButton, D
MouseGetPos, setHPx, setHPy
sleep, 250
ToolTip, HP Bar set.
ToolTip, Right Click again to set FP Bar spot.`nDo not move mouse after Right Click.
Keywait, RButton, D
MouseGetPos, setFPx, setFPy
sleep, 250
ToolTip, FP Bar set.
sleep, 3000
ToolTip,
}
Numpad9::frfr()
frfr(){
keepLooping := 1
CoordMode, Pixel, Screen
PixelGetColor, hpFine, %setHPx%, %setHPy%, RGB
PixelGetColor, fpFine, %setFPx%, %setFPy%, RGB
while (keepLooping = 1){
Send {Space down}
sleep, 250
Send {w down}
sleep, 3900
Send {w up}
sleep, 250
Send {m down}
sleep, 1000
Send {m up}
}
}
Numpad2::lllll()
lllll(){
CoordMode, Pixel, Screen
keepLooping := 1
Send {Space down}
Send {w down}
sleep, 4300
Send {Space up}
Send {w up}
sleep, 250
Loop
{
SendMode Event
Send {LCtrl}
sleep, 750
if (keepLooping = 0){
break
}
Send {m down}
sleep, 850
if (keepLooping = 0){
break
}
Send {m up}
sleep, 350
if (keepLooping = 0){
break
}
Send q
sleep, 35
Send {a down}
sleep, 375
Send {a up}
if (keepLooping = 0){
break
}
sleep, 1000
Send {w down}
sleep, 500
Send {w up}
if (keepLooping = 0){
break
}
sleep, 5000
Click, down, L
sleep, 250
Click, up, L
sleep, 3500
if (keepLooping = 0){
break
}
Send {w down}
sleep, 650
Send {w up}
if (keepLooping = 0){
break
}
Send {RCtrl down}
sleep, 2000
Send {RCtrl up}
if (keepLooping = 0){
break
}
sleep, 1750
Send f
if (keepLooping = 0){
break
}
sleep, 250
Click, down, R
sleep, 30
Send {m down}
sleep, 750
leftDone := 0
lightColX := 890
lightColY := 386
Send {m up}
sleep, 175
Send {m down}
Loop
{
hexadecFinder()
if (BlueA > 175){
Send {m up}
Send {n up}
Click, up, R
sleep, 250
leftDone := 0
Send {w down}
sleep, 2250
Send {w up}
sleep, 150
SetKeyDelay,, 25
Send f ;Not sure if this one is doing it too, as it doesnt make a difference here.
sleep, 50
Send f ;THIS ONE RIGHT HERE <--- Even with redefining KeyDelay, still gets held too long(?)
SetKeyDelay,, 250
break
}
if (keepLooping = 0){
Send {m up}
Send {n up}
break 2
}
}
}
}
Numpad4::
Send f ;This works perfectly fine, but the one above is somehow "sticking" when sent.
sleep, 250
Send f
hexadecFinder(){
CoordMode, Pixel, Screen
PixelGetColor, color0, 890, 386
BlueA:="0x" SubStr(color0,3,2) ;substr is to get the piece
BlueA:=BlueA+0 ;add 0 is to convert it to the current number format
return
}
; PixelGetColor, color, 800, 481
; Blue:="0x" SubStr(color,3,2) ;substr is to get the piece
; Blue:=Blue+0 ;add 0 is to convert it to the current number format
; Green:="0x" SubStr(color,5,2)
; Green:=Green+0
; Red:="0x" SubStr(color,7,2)
; Red:=Red+0