My settings are Gamma - 1, 1024x768, windowed mode maximized. To use my macro you may need to change all of the coords and colors.
Tool needed for editing:
Whole Code:
Code:
;Macro Start While 1 If WinActivate("CABAL") Then If Not @error Then Sleep (50) EndIf If PixelGetColor(1414, 235) = 0x896021 Then ;Buff Duration Icon Sleep 50 Else Send("4") EndIf = PixelSearch (94, 97, 1267, 699, 0xD9E220, 20, 4) ;Check for Yellow Mob If Not @error Then MouseClick ("Left", , ) Sleep(50) EndIf While PixelGetColor(570, 47) = 0xFE8502 ;Check if Mob is still alive Send("1") Sleep(50) Send("2") Sleep(50) Send("3") Sleep(50) Send("{Space}") Sleep(50) If PixelGetColor(141, 55) = 0x1D1D1D Then ;Check Health Send("6") EndIf WEnd EndIf WEnd
1. Regeneration Buff:
Code:
If PixelGetColor(1414, 235) = 0x896021 Then ;Buff Duration Icon Sleep 50 Else Send("4") EndIf
Check for Yellow Mob:
Code:
= PixelSearch (94, 97, 1267, 699, 0xD9E220, 20, 4) ;Check for Yellow Mob If Not @error Then MouseClick ("Left", , ) Sleep(50) EndIf
Attack Sequence:
Code:
While PixelGetColor(570, 47) = 0xFE8502 ;Check if Mob is still alive Send("1") Sleep(50) Send("2") Sleep(50) Send("3") Sleep(50) Send("{Space}") Sleep(50) If PixelGetColor(141, 55) = 0x1D1D1D Then ;Check Health Send("6") EndIf WEnd
What if I want it to attack orange monsters too?: Just copy/paste the check for yellow mob code and the attack sequence code right under the first attack sequence and before the last "EndIf" and "Wend". Then change the pixel color in the "PixelSearch" command to the mobs orange colored name. Same goes for Red mobs or any other colors.
What if I want to use more attack keys?: In the attack sequence add the code:
Code:
Send("X") Sleep(50)
Thank You everyone on the forum, reading about your stuff has helped me learn more about AutoIt, something I've never used before.
**INFO**: It refuses to let me put $Coord in the code brackets... The "search for yellow mob" should be:
$Coord = PixelSearch (94, 97, 1267, 699, 0xD9E220, 20, 4) ;Check for Yellow Mob
If Not @error Then
MouseClick ("Left", $Coord[0], $Coord[1])