Code:
; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.0 ; Language: * * * English ; Platform: * * * Win9x / NT ; Author: * * * * A.N.Other <> ; ; Script Function: ; * Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; ---------------------------------------------------------------------------- ; Set up our defaults ; ---------------------------------------------------------------------------- ;AutoItSetOption("MustDeclareVars", 1) AutoItSetOption("MouseCoordMode", 0) AutoItSetOption("PixelCoordMode", 0) ;AutoItSetOption("RunErrorsFatal", 0) ;AutoItSetOption("TrayIconDebug", 1) ;AutoItSetOption("WinTitleMatchMode", 4) ; ---------------------------------------------------------------------------- ; Script Start ; ---------------------------------------------------------------------------- $name = "Acidic WoW" $version = "v0.67" $demo = 1 $maxkills = 10 $kills = 0 $loots = 0 HotKeySet("^!x", "MyExit") * Func MyExit() * Exit EndFunc Func Status($message) * $stats = "" * $stats = $stats & "Life: " & LifeValue() & "%" & @LF * $stats = $stats & "Mana: " & ManaValue() & "%" & @LF * $stats = $stats & @LF * $stats = $stats & "Estimated Kills: " & $kills & @LF * $stats = $stats & "Estimated Loots: " & $loots * If EnemyExists() = 1 Then * * *$stats = $stats & @LF & @LF * * *$stats = $stats & "Enemy Life: " & EnemyLifeValue() & "%" * EndIf * If $demo = 1 Then * * *TrayTip($name & " " & $version & " (DEMO)", $message & @LF & @LF & $stats, 10, 1) * Else * * *TrayTip($name & " " & $version, $message & @LF & @LF & $stats, 10, 1) * EndIf EndFunc Func Test() * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "291.5: " & PixelGetColor(291.5,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "282: " & PixelGetColor(282,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "274: " & PixelGetColor(274,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "265: " & PixelGetColor(265,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "257: " & PixelGetColor(257,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "248: " & PixelGetColor(248,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "240: " & PixelGetColor(240,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "231: " & PixelGetColor(231,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "223: " & PixelGetColor(223,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "214: " & PixelGetColor(214,68)) * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * MsgBox(4096, $name & " " & $version, "206: " & PixelGetColor(206,68)) EndFunc Func LifeValue() * $lifespot = 162 * $lifepercent = 100 * While $lifespot >= 77 * * *If PixelGetColor($lifespot,69) >= 30000 And PixelGetColor($lifespot,69) <= 55000 Then * * * * $life = $lifepercent * * * * ExitLoop * * *EndIf * * *$lifespot = $lifespot - 8.5 * * *$lifepercent = $lifepercent - 10 * * *If $lifepercent <= 0 Then * * * * $life = 0 * * * * ExitLoop * * *EndIf * Wend * Return $life EndFunc Func ManaValue() * $manaspot = 162 * $manapercent = 100 * While $manaspot >= 77 * * *If PixelGetColor($manaspot,79) >= 100 And PixelGetColor($manaspot,79) <= 200 Then * * * * $mana = $manapercent * * * * ExitLoop * * *EndIf * * *$manaspot = $manaspot - 8.5 * * *$manapercent = $manapercent - 10 * * *If $manapercent <= 0 Then * * * * $mana = 0 * * * * ExitLoop * * *EndIf * Wend * Return $mana EndFunc Func EnemyExists() * If PixelGetColor(290,56) >= 10000000 And PixelGetColor(290,56) <= 15000000 Then * * *Return 1 * ElseIf PixelGetColor(290,56) >= 5500000 And PixelGetColor(290,56) <= 7000000 Then * * *Return 1 * Else * * *Return 0 * EndIf EndFunc Func EnemyLifeValue() * $enemylifespot = 291 * $enemylifepercent = 100 * While $enemylifespot >= 206 * * *If PixelGetColor($enemylifespot,68) >= 35000 And PixelGetColor($enemylifespot,68) <= 55000 Then * * * * $enemylife = $enemylifepercent * * * * ExitLoop * * *EndIf * * *$enemylifespot = $enemylifespot - 8.5 * * *$enemylifepercent = $enemylifepercent - 10 * * *If $enemylifepercent <= 0 Then * * * * $enemylife = 0 * * * * ExitLoop * * *EndIf * Wend * Return $enemylife EndFunc Func Loot() * Status("Attempting to loot.") * $didloot = 0 * $x = 50 * $y = 300 * While $y <= 550 * * *If EnemyExists() = 1 And EnemyLifeValue() > 0 Then ExitLoop * * *MouseMove($x, $y, 1) * * *Send("{LSHIFT DOWN}") * * *MouseClick("right") * * *Send("{LSHIFT UP}") * * *If PixelGetColor(34,123) = 0 Then * * * * $didloot = 1 * * * * $loots = $loots + 1 * * * * Status("Loot attempt successful.") * * * * Send("{ESC}") * * *EndIf * * *Sleep(25) * * *$x = $x + 50 * * *If $x = 750 Then * * * * $y = $y + 50 * * * * $x = 50 * * *EndIf * WEnd * If EnemyExists() = 1 Then * * *Send("{ESC}") * EndIf * If $didloot = 0 Then * * *Status("Loot attempt failed.") * EndIf * Send("{HOME 5}{END 2}") * Sleep(1000) EndFunc Func LoadingMagic() * If PixelGetColor(332,569) >= 6500000 And PixelGetColor(332,569) <= 8000000 Then * * *Return 1 * Else * * *Return 0 * EndIf EndFunc Func LocateEnemy() * Status("Locating enemy position.") * $locatecycles = 0 * Send("2") * Sleep(500) * While LoadingMagic() = 0 * * *If EnemyExists() = 0 Then * * * * ExitLoop * * *EndIf * * *Send("{RIGHT DOWN}") * * *Sleep(250) * * *Send("{RIGHT UP}") * * *If EnemyExists() = 0 Then * * * * Send("{TAB}") * * *EndIf * * *Send("2") * * *Sleep(500) * * *$locatecycles = $locatecycles + 1 * * *If $locatecycles = 10 Then * * * * Send("{ESC}") * * * * ExitLoop * * *EndIf * WEnd * Status("Enemy position located.") EndFunc Func AttackEnemy() * Status("Attacking enemy.") * While EnemyExists() = 1 * * *Status("Attacking enemy.") * * *Send("3") * * *Sleep(500) * * *If LoadingMagic() = 0 Then * * * * LocateEnemy() * * *EndIf * * *While LoadingMagic() = 1 * * * * Sleep(250) * * *WEnd * WEnd * Status("Enemy defeated.") * $kills = $kills + 1 * If $kills = $maxkills Then * * *If $demo = 1 Then * * * * MsgBox(4096, $name & " " & $version, "This is a demo version which ends after " & $maxkills & " kills.") * * * * Exit * * *EndIf * EndIf EndFunc Func Move() *;Send("{NUMLOCK}") * Send("{RIGHT DOWN}") * Sleep(500) * Send("{RIGHT UP}") *;Send("{NUMLOCK}") EndFunc While 1 = 1 * WinActivate("World of Warcraft") * WinWaitActive("World of Warcraft") * Move() * If LifeValue() >= 80 Then * * *If ManaValue() >= 80 Then * * * * Status("Looking/Waiting for enemy.") * * * * Send("{TAB}") * * *Else * * * * Status("Waiting for mana to regenerate.") * * *EndIf * Else * * *Status("Waiting for life to regenerate.") * EndIf * Sleep(1000) * If EnemyExists() = 1 Then * * *Status("Enemy detected.") * * *Send("t") * * *Sleep(2000) * * *While EnemyExists() = 1 * * * * LocateEnemy() * * * * AttackEnemy() * * * * Sleep(1000) * * *WEnd * * *Loot() * EndIf Wend Sleep(10000) ; ----------------------------------------------------------------------------