In the case each code below makes a function and I would like to place them in a GUI where each one would be linked by a checkbox,
can someone help me ?
below codes:
RUN CODE :
Code: Select all
#persistent
SetTimer, anti_paralyze, 100
anti_paralyze:
IfWinNotActive, Tibia
Return
CoordMode, Pixel, Screen
PixelSearch,,, 1192, 314, 1254, 314, 0xE90404, 0, Fast RGB
If ErrorLevel
Return
Send {f2}
Return
Code: Select all
#SingleInstance, Force
CoordMode, Pixel, Screen ; need this since you are using screen coordinates
Loop
{
If WinActive("Tibia")
{
PixelGetColor, ExuraGran, 1285, 143, RGB
PixelGetColor, ExuraVita, 1270, 143, RGB
If (ExuraGran != 0xDB4F4F And ExuraVita != 0xDB4F4F) ; this assumes neither are found
Send, {-}
Else If (ExuraGran != 0xDB4F4F) ; this assumes the first one is not found
Send, {=}
}
Sleep, 180
}
Return
Code: Select all
#persistent
SetTimer, anti_paralyze, 100
anti_paralyze:
IfWinNotActive, Tibia
Return
CoordMode, Pixel, Screen
PixelSearch,,, 1192, 314, 1254, 314, 0xE90404, 0, Fast RGB
If ErrorLevel
Return
Send {=}
Return
Code: Select all
#IfWinActive, Tibia
Wheeldown::
Send {f5}
return
Code: Select all
#IfWinActive, Tibia
x := 675
y := 299
pgup::
SetMouseDelay, 2
{
mousegetpos, start_x, start_y
send, {ctrl down}
mouseClickDrag, left, %start_x%, %start_y%, %x%, %y%
send, {ctrl up}
send {enter}
mousemove, %start_x%, %start_y%, 0
}
return
Code: Select all
#SingleInstance, Force
CoordMode, Pixel, Screen
Loop
{
If WinActive("Tibia")
{
PixelGetColor, Life70, 1272, 143, RGB
PixelGetColor, RingWorn, 1209, 272, RGB
if (Life70 != 0xDB4F4F && RingWorn != 0x59E7B4) ; life is less than 70% and ring is not worn
Send, {NumpadMult} ; put ring on
PixelGetColor, Life90, 1285, 143, RGB
PixelGetColor, RingWorn, 1209, 272, RGB
if (Life90 = 0xDB4F4F && RingWorn = 0x59E7B4) ; life is at least 90% and ring is worn
Send, {NumpadMult} ; remove ring
}
Sleep, 200
}
Return