├── Attack.bmp ├── Rebuke.bmp ├── Resync.bmp ├── Exorcism.bmp ├── Judgement.bmp ├── bobber_try4.bmp ├── AquireTarget.bmp ├── ArcaneTorrent.bmp ├── FistofJustice.bmp ├── HandofPurity.bmp ├── SacredShield.bmp ├── CrusaderStrike.bmp ├── DivineProtection.bmp ├── HammerOfJustice.bmp ├── TemplarVerdict.bmp ├── WaitingForCombat.bmp ├── KickBot ├── MouseInfo_x32.exe ├── _Setup_1_Addon.jpg ├── SendBackKeys_x32.exe ├── SendBackKeys_x64.exe ├── _Setup_4_KeyBinds.jpg ├── GenerateRandomAddonName.exe ├── _Setup_4_KeyBinds_advanced.jpg ├── _setup_3_start_SendBackKeys.jpg ├── _Setup_2_Addon_middle_reposition.jpg ├── _Setup_5_Optional_if_error_reposition.jpg ├── KickBot.toc ├── Compile.bat ├── readme.txt ├── GenerateRandomAddonName.au3 ├── MouseInfo.au3 ├── SendBackKeys.au3 ├── KickBot.xml └── KickBot.lua ├── Release └── ImageSearchDLL.dll ├── NextBestSpell.toc ├── JustSpam12345.au3 ├── readme.txt ├── TakeScreenshots.au3 ├── FishingBot.au3 ├── TranslateActions.au3 └── NextBestSpell.lua /Attack.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/Attack.bmp -------------------------------------------------------------------------------- /Rebuke.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/Rebuke.bmp -------------------------------------------------------------------------------- /Resync.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/Resync.bmp -------------------------------------------------------------------------------- /Exorcism.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/Exorcism.bmp -------------------------------------------------------------------------------- /Judgement.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/Judgement.bmp -------------------------------------------------------------------------------- /bobber_try4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/bobber_try4.bmp -------------------------------------------------------------------------------- /AquireTarget.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/AquireTarget.bmp -------------------------------------------------------------------------------- /ArcaneTorrent.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/ArcaneTorrent.bmp -------------------------------------------------------------------------------- /FistofJustice.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/FistofJustice.bmp -------------------------------------------------------------------------------- /HandofPurity.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/HandofPurity.bmp -------------------------------------------------------------------------------- /SacredShield.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/SacredShield.bmp -------------------------------------------------------------------------------- /CrusaderStrike.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/CrusaderStrike.bmp -------------------------------------------------------------------------------- /DivineProtection.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/DivineProtection.bmp -------------------------------------------------------------------------------- /HammerOfJustice.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/HammerOfJustice.bmp -------------------------------------------------------------------------------- /TemplarVerdict.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/TemplarVerdict.bmp -------------------------------------------------------------------------------- /WaitingForCombat.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/WaitingForCombat.bmp -------------------------------------------------------------------------------- /KickBot/MouseInfo_x32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/MouseInfo_x32.exe -------------------------------------------------------------------------------- /KickBot/_Setup_1_Addon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/_Setup_1_Addon.jpg -------------------------------------------------------------------------------- /Release/ImageSearchDLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/Release/ImageSearchDLL.dll -------------------------------------------------------------------------------- /KickBot/SendBackKeys_x32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/SendBackKeys_x32.exe -------------------------------------------------------------------------------- /KickBot/SendBackKeys_x64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/SendBackKeys_x64.exe -------------------------------------------------------------------------------- /KickBot/_Setup_4_KeyBinds.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/_Setup_4_KeyBinds.jpg -------------------------------------------------------------------------------- /KickBot/GenerateRandomAddonName.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/GenerateRandomAddonName.exe -------------------------------------------------------------------------------- /KickBot/_Setup_4_KeyBinds_advanced.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/_Setup_4_KeyBinds_advanced.jpg -------------------------------------------------------------------------------- /KickBot/_setup_3_start_SendBackKeys.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/_setup_3_start_SendBackKeys.jpg -------------------------------------------------------------------------------- /KickBot/_Setup_2_Addon_middle_reposition.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/_Setup_2_Addon_middle_reposition.jpg -------------------------------------------------------------------------------- /KickBot/_Setup_5_Optional_if_error_reposition.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tudi/WowRetriHelperBot/HEAD/KickBot/_Setup_5_Optional_if_error_reposition.jpg -------------------------------------------------------------------------------- /NextBestSpell.toc: -------------------------------------------------------------------------------- 1 | ## Interface: 60000 2 | ## Title: NextBestSpell 3 | ## Version: 1.0.0 4 | ## Notes: Auto update your macros to cast the next best spell 5 | ## Author: Tudi 6 | ## SavedVariablesPerCharacter: NextBestSpellSavedMacros 7 | NextBestSpell.lua -------------------------------------------------------------------------------- /KickBot/KickBot.toc: -------------------------------------------------------------------------------- 1 | ## Interface: 60000 2 | ## Title: KickBot 3 | ## Author: Tudi 4 | ## Version: 4.0.1 5 | ## Notes: Watch your target / focustarget / arenatarget and cast spells accordingly 6 | ## DefaultState: Enabled 7 | ## LoadOnDemand: 0 8 | ## SavedVariablesPerCharacter: SpellNameKeyBinds 9 | KickBot.lua 10 | KickBot.xml 11 | -------------------------------------------------------------------------------- /KickBot/Compile.bat: -------------------------------------------------------------------------------- 1 | "c:/Program Files (x86)/AutoIt3/Aut2Exe/Aut2exe.exe" /in MouseInfo.au3 /out MouseInfo_x32.exe 2 | REM "c:/Program Files (x86)/AutoIt3/Aut2Exe/Aut2exe.exe" /in MouseInfo.au3 /out MouseInfo_x64.exe /x64 3 | "c:/Program Files (x86)/AutoIt3/Aut2Exe/Aut2exe.exe" /in GenerateRandomAddonName.au3 /out GenerateRandomAddonName.exe 4 | "c:/Program Files (x86)/AutoIt3/Aut2Exe/Aut2exe.exe" /in SendBackKeys.au3 /out SendBackKeys_x32.exe /comp 4 5 | "c:/Program Files (x86)/AutoIt3/Aut2Exe/Aut2exe.exe" /in SendBackKeys.au3 /out SendBackKeys_x64.exe /comp 4 /x64 -------------------------------------------------------------------------------- /JustSpam12345.au3: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | Global $fPaused = 1 4 | global $ActivationKey = "q" 5 | global $hDLL = DllOpen("user32.dll") 6 | 7 | HotKeySet("=", "Terminate") 8 | Func Terminate() 9 | DllClose($hDLL) 10 | Exit 11 | EndFunc 12 | 13 | HotKeySet( $ActivationKey, "Togglespamrandomstuff") 14 | 15 | While 1 16 | while( $fPaused == 0 ) 17 | Sleep(1000) 18 | wend 19 | Sleep( 100 ) 20 | WEnd 21 | 22 | Func Togglespamrandomstuff() 23 | $fPaused = 1 - $fPaused 24 | while( _IsPressed( "51", $hDLL ) ) 25 | Send("12345") 26 | Sleep( 500 ) 27 | wend 28 | EndFunc 29 | 30 | DllClose($hDLL) 31 | 32 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | this project has 2 components : 2 | 1) addon for wow that will show a window that will periodically tell you what to do 3 | 2) autoit script that can "read text" and take actions accordingly 4 | 5 | Requirements : 6 | - wow running in win32 mode ( it's called wow.exe in task manager not wow-64.exe ) -noautolaunch64bit 7 | - autoit 8 | - VS2008 runtime libraries 9 | - images are made for a specific resolution. In case you have different resolution you most probably need to remake images. 10 | 11 | Install : 12 | - copy files into ?????\World of Warcraft\Interface\AddOns\NextBestSpell\ 13 | - make sure you have the "NextBestSpell" addon enabled 14 | - after login .. character ingame.... start "TranslateActions.au3" 15 | 16 | How to check if it is working : 17 | - "NextBestSpell" addon should write different text based on your spell cooldowns / positioning 18 | - "TranslateActions.au3" should be able to find those "text" images and send button push actions accordingly 19 | 20 | 21 | Setup : 22 | This is only required if default setup is not working for you 23 | - login ingame 24 | - make sure "NextBestSpell" addon is running. There should be a gray background text window saying "waiting for combat" 25 | - start addon demo mode by typing ingame chat message : "/nbs demo". If you did it right than the "textwindow" should cycle available text messages 26 | - open "TakeScreenshots.au3" 27 | - make sure $IsFirstRun = 1 28 | - start "TakeScreenshots.au3" 29 | - alt tab back to game so it can take 1 screenshot of your whole game window. Image name is probably "Screenshot_0000_2000_2000.bmp" 30 | - open "paint" and cut out something that looks like provided "Resync.bmp". Make sure edges only contain the "gray color" + "you included the dot" 31 | - save your new "Resync.bmp" as 24bit color bmp 32 | - $IsFirstRun = 0 33 | - start "TakeScreenshots.au3" 34 | - alt tab back to game, wait for "TakeScreenshots.au3" to say he is done taking screenshots 35 | - rename the images so TranslateActions.au3 can load them 36 | - edit "TranslateActions.au3" to map images to your keybinds -------------------------------------------------------------------------------- /TakeScreenshots.au3: -------------------------------------------------------------------------------- 1 | ; In case you did not do it yet : set $IsFirstRun = 1, take a full screenshot of your ingame wow so you can regenerate "Resync.bmp" 2 | ; If you have a valid "Resync.bmp" than set $IsFirstRun = 0 and generate images you will search later 3 | $IsFirstRun = 0 4 | 5 | ;The minimum pixel count for image width so you can search for images without confusing them. Maybe even 2 characters are enough if you do not have too many actions ? 6 | $ImagePixelCount = 49 7 | 8 | global $MB_SYSTEMMODAL = 4096 9 | 10 | ; wait until you alt+tab to wow window 11 | WinWaitActive( "World of Warcraft" ) 12 | 13 | ; these can be static. Declared them just because i was experimenting with stuff 14 | $SkipSearchOnColor = 0x01000000 15 | $colorTolerance = 0 16 | $ColorToleranceFaultsAccepted = 0 17 | $ExitAfterNMatchesFound = 1 18 | 19 | $dllhandle = DllOpen( "release/ImageSearchDLL.dll" ) 20 | ;$dllhandle = DllOpen( "debug/ImageSearchDLL.dll" ) 21 | 22 | DllCall( $dllhandle,"str","TakeScreenshot","int",0,"int",0,"int",2000,"int",2000) 23 | if( $IsFirstRun <> 0 ) then 24 | MsgBox( $MB_SYSTEMMODAL, "", "Saving is slow. Wait a sec" ) 25 | DllCall( $dllhandle,"str","SaveScreenshot") 26 | MsgBox( $MB_SYSTEMMODAL, "", "Screenshot saved. Cut out the new 'Resync.bmp'" ) 27 | endif 28 | 29 | if( $IsFirstRun <> 1 ) then 30 | 31 | global $EndX = 0 32 | global $EndY = 0 33 | $result = DllCall( $dllhandle,"str","GetImageSize","str","Resync.bmp") 34 | $array = StringSplit($result[0],"|") 35 | $EndX = Int(Number($array[1])) 36 | $EndY = Int(Number($array[2])) 37 | ;MsgBox( $MB_SYSTEMMODAL, "", "TextSize " & $EndX & " " & $EndY ) 38 | 39 | ; where is our output textbox ? 40 | global $StartX = 0 41 | global $StartY = 0 42 | $result = DllCall( $dllhandle,"str","ImageSearchOnScreenshot","str","Resync.bmp","int",$SkipSearchOnColor,"int",$colorTolerance,"int",$ColorToleranceFaultsAccepted,"int",$ExitAfterNMatchesFound) 43 | HandleResult( $result ) 44 | 45 | if( $StartX <> 0 and $StartY <> 0 ) then 46 | ;Start taking screenshots 47 | $EndX = $ImagePixelCount 48 | $ScreenshotsRemaining = 18 49 | while( $ScreenshotsRemaining >= 0 ) 50 | ;MsgBox( $MB_SYSTEMMODAL, "", "Compare region" & $StartX & "," & $StartY & " " & $EndX & "," & $EndY & " " ) 51 | DllCall( $dllhandle,"str","TakeScreenshot","int",$StartX,"int",$StartY,"int",$StartX + $EndX,"int",$StartY + $EndY) 52 | $result = DllCall( $dllhandle,"str","IsAnythingChanced","int", 0,"int", 0,"int",$EndX,"int",$EndY) 53 | $array = StringSplit( $result[0], "|" ) 54 | $resCount = Number( $array[1] ) 55 | ; MsgBox( $MB_SYSTEMMODAL, "", "Could not find sync location! " & $result[0] & " " & $resCount & " " & $array[0] & " " & $array[1] & " " & $array[2] & " " & $array[3] ) 56 | if( $resCount > 0 ) then 57 | DllCall( $dllhandle,"str","SaveScreenshot") 58 | $ScreenshotsRemaining = $ScreenshotsRemaining - 1 59 | ; MsgBox( $MB_SYSTEMMODAL, "", "found sync location! " & $resCount ) 60 | endif 61 | wend 62 | MsgBox( $MB_SYSTEMMODAL, "", "Finished taking screenshots. You need to assign them in TranslateActions.au3" ) 63 | endif 64 | endif 65 | 66 | DllClose( $dllhandle ) 67 | 68 | func HandleResult( $result ) 69 | ; MsgBox( $MB_SYSTEMMODAL, "", "result " & $result ) 70 | $array = StringSplit($result[0],"|") 71 | $resCount = Number( $array[1] ) 72 | if( $resCount > 0 ) then 73 | $StartX = Int(Number($array[2])) 74 | $StartY = Int(Number($array[3])) 75 | ; MouseMove( $StartX, $StartY ); 76 | MsgBox( $MB_SYSTEMMODAL, "", "found at " & $StartX & " " & $StartY ) 77 | else 78 | MsgBox( $MB_SYSTEMMODAL, "", "Could not find sync location! " ) 79 | endif 80 | endfunc 81 | 82 | 83 | -------------------------------------------------------------------------------- /FishingBot.au3: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | HotKeySet("]", "ToggleRunScript" ) 4 | HotKeySet("o", "ExitScript" ) 5 | 6 | global $ScriptIsRunning = 1 7 | global $ScriptIsPaused = 1 8 | global $MB_SYSTEMMODAL = 4096 9 | 10 | ;global $dllhandle = DllOpen ( "debug/ImageSearchDLL.dll" ) 11 | global $dllhandle = DllOpen ( "release/ImageSearchDLL.dll" ) 12 | 13 | while $ScriptIsRunning == 1 14 | Sleep( 100 ) 15 | wend 16 | 17 | DllClose ( $dllhandle ) 18 | 19 | func ExitScript() 20 | $ScriptIsRunning = 0 21 | endfunc 22 | 23 | func ToggleRunScript() 24 | $ScriptIsPaused = 1 - $ScriptIsPaused 25 | if( $ScriptIsPaused == 0 ) then 26 | ContinuesFishing() 27 | endif 28 | endfunc 29 | 30 | func ContinuesFishing() 31 | local $MaxSAD = 0; 32 | while( $ScriptIsPaused == 0 and $ScriptIsRunning == 1 ) 33 | ; Cast fishing 34 | Send( 1 ) 35 | local $Timeout = _Date_Time_GetTickCount( ) + 20 * 1000; 36 | ; wait for spawn animation 37 | Sleep( 3000 ) 38 | ;check where bober landed 39 | Local $bobberNow[3] = [ 0, 0, 0 ] 40 | Local $bobberAtStart = GetBoberLocation( $bobberNow ) 41 | ; MsgBox( $MB_SYSTEMMODAL, "", "found at " & $bobberAtStart[0] & " " & $bobberAtStart[1] ) 42 | local $MaxDiffY = 0 43 | local $MaxDiffx = 0 44 | while( _Date_Time_GetTickCount( ) < $Timeout and $ScriptIsRunning == 1 ) 45 | 46 | Local $bobberNow = GetBoberLocation( $bobberAtStart ) 47 | 48 | MouseMove( $bobberNow[0], $bobberNow[1] ) 49 | 50 | local $diffNowy = $bobberNow[1] - $bobberAtStart[1] 51 | local $diffNowx = $bobberNow[0] - $bobberAtStart[0] 52 | 53 | if( $diffNowy > $MaxDiffY ) then 54 | $MaxDiffY = $diffNowy 55 | endif 56 | if( $diffNowx > $MaxDiffX ) then 57 | $MaxDiffX = $diffNowx 58 | endif 59 | 60 | if( $diffNowx < 0 ) then 61 | $diffNowx = -$diffNowx; 62 | endif 63 | if( $diffNowy < 0 ) then 64 | $diffNowy = -$diffNowy; 65 | endif 66 | 67 | local $SADNow = $bobberNow[2] 68 | if( $SADNow > $MaxSAD ) then 69 | $MaxSAD = $SADNow 70 | endif 71 | 72 | ;this SAD could be only for me, that is why i multiply it by X 73 | ; if( $SADNow < 6206 * 2 and ( $diffNowy > 7 or $diffNowx > 7 ) ) then 74 | if( $diffNowy > 7 or $diffNowx > 7 ) then 75 | ; MsgBox( $MB_SYSTEMMODAL, "", "Got a big diff. Max x diff " & $MaxDiffX & " y " & $MaxDiffY ) 76 | Sleep( 2000 ) 77 | MouseClick( 'left', $bobberAtStart[0], $bobberAtStart[1], 1) 78 | $Timeout = 0xFFFFFFFF 79 | endif 80 | wend 81 | wend 82 | MsgBox( $MB_SYSTEMMODAL, "", "Max sad " & $MaxSAD ) 83 | MsgBox( $MB_SYSTEMMODAL, "", "Fishing session ended" ) 84 | endfunc 85 | 86 | func GetBoberLocation( $PreviousLocation ) 87 | Local $bobberASearch[3] 88 | Local $result[3] 89 | 90 | if( $PreviousLocation[0] == 0 ) then 91 | DllCall( $dllhandle,"NONE","TakeScreenshot","int",370,"int",153,"int",1380,"int",616 ) 92 | else 93 | DllCall( $dllhandle,"NONE","TakeScreenshot", "int", $PreviousLocation[0] - 10, "int", $PreviousLocation[1] - 10, "int", $PreviousLocation[0] + 10, "int", $PreviousLocation[1] + 10 ) 94 | endif 95 | $result = DllCall( $dllhandle,"str","ImageSearchOnScreenshotBest","str","bobber_try4.bmp" ) 96 | $array = StringSplit($result[0],"|") 97 | $resCount = Number( $array[1] ) 98 | if( $resCount > 0 ) then 99 | $bobberASearch[0]=Int(Number($array[2])) 100 | $bobberASearch[1]=Int(Number($array[3])) 101 | $bobberASearch[2]=Int(Number($array[4])) 102 | ; MsgBox( $MB_SYSTEMMODAL, "", "found at " & $bobberASearch[0] & " " & $bobberASearch[1] & " result was " & $result[0]) 103 | ; MouseMove( $bobberASearch[0], $bobberASearch[1] ); 104 | ; else 105 | ; MsgBox( $MB_SYSTEMMODAL, "", "res count " & $resCount & " from result str " & $result[0] ) 106 | endif 107 | 108 | return $bobberASearch; 109 | endfunc 110 | 111 | func GetRGB( $r, $g, $b ) 112 | return $b * 65536 + $g * 256 + $r; 113 | endfunc -------------------------------------------------------------------------------- /KickBot/readme.txt: -------------------------------------------------------------------------------- 1 | This project has 2 components : 2 | 1) LUA addon for wow that will show a window that will periodically tell you what to do 3 | 2) autoit script that can "read info"(pixel color) and take actions accordingly 4 | 5 | Install : 6 | - copy files into ?????\World of Warcraft\Interface\AddOns\KickBot\ 7 | - make sure you have the "KickBot" addon enabled 8 | - Optional : rename :kickbot to something else. You can use GenerateRandomAddonName.au3 to generate a somewhat random name for the addon 9 | 10 | Setup : 11 | - log ingame 12 | - position the small greenish box ( that is in the middle of the screen ) somewhere where it does not bother you. It's not covered by other window. You will not later move this window 13 | - the lower part of the box is a button. Click on it and adjust the keys that should be automatically pressed to cast a spell 14 | - Optional, if "SendBackKeys.au3" can not automatically find the greenish box correctly : 15 | - start "MouseInfo.au3" and get the location( aprox middle ) of the grey box 16 | - edit SendBackKeys.au3. Set proper $LuaFramePosX and $LuaFramePosY 17 | - Optional : 18 | - edit KickBot.lua for advanced setup regarding latency compensation + burst only interrupts + spell blacklists + spell whitelists.... 19 | 20 | How to check if it is working : 21 | - The greenish box should change it's color when the AU3 file should do something 22 | - AU3 file should send keys presses to the client when greenish box changes color 23 | 24 | Possible bugs : 25 | - it's not interrupting anything : Check SpellCastAllowLatency + SecondsUntilSpellCastEndToInterruptStart to be smaller than the spell you want to interrupt. Check SecondsUntilSpellCastEndToInterruptEnd to be small enough. 26 | - it's interrupting even instant cast spells : Check SecondsUntilSpellCastEndToInterruptStart to be larger than 1 second 27 | - SendBackKeys.au3 can not find the LUA window : make sure that greenish box is not covered by some other wow window. It does not have any other overlays on it 28 | - SendBackKeys.au3 finds bad greenish pixel : manually set $LuaFramePosX, $LuaFramePosY variables 29 | 30 | 31 | Q : What wow version can i use it ? 32 | A : I tested on 4.3.4. In theory it should work on 3.x, 5.x, 6.x also. Might need to change the "KickBot.toc" for it 33 | 34 | Q : I can not see the addon in my addon list. 35 | A : You might need to put correct interface version in KickBot.toc file. Wotlk : 30000, Cataclysm 40000, MOP 50000, WOD 60000 36 | 37 | Q : Can it be detected by blizzard ? 38 | A : In theory this uses same method as for example mouse with macro. If you get banned you should make a complaint ticket. Ofc if start abusing the bot by interrupting instant cast spells than you might get in trouble 39 | 40 | Q : Anything you recommend to not get reported by other players? 41 | A : Add a random factor to it. Do not use it always at the same cast bar position and maybe do not interrupt every same spell... 42 | 43 | Q : Can i use it to interrupt focus target casts ? 44 | A : Yes. Make an apropriate macro for it. /cast @focus manlykick 45 | 46 | Q : Can i improve it to become a PQR bot ? 47 | A : This was initially a PQR bot, i nerfed it to a kickbot 48 | 49 | Q : Is there a way to run this bot without autoit installed ? 50 | A : Yes, you can use the compiled exe. It's the same as the autoit version 51 | 52 | Q : My interrupt spell is missing from a list, how do i add it ? 53 | A : Edit "KickBot.lua" and add your spell there. Example row : RegisterKickerSpell( "Rebuke", '8', '-', '=', '', '', '', '' ) 54 | 55 | Q : Can i use advanced scripting in AU3 ? 56 | A : Yes, you can try to do fancy stuff like send multiple keys. Example : target your focus target, cast a spell, target arena1 target cast another spell, retarget first target. All done by sending a list of key combinations for 1 single LUA feedback 57 | 58 | Q : How do i disable spell casting on focus target ? 59 | A : You can clear ingame castbar for that keybind. Or you can edit RegisterKickerSpell and remove the keybind there 60 | 61 | Q : How do i add a spell to the whitelist ? 62 | A : Edit "KickBot.lua". Variable "SpellNamesCanInterruptOnPlayers" contains the list of spells that the bot can interrupt IF AllowAnyPlayerSpellInterrupt = 0. Each spell name should be surounded by "[]" 63 | 64 | Q : How do i add a spell to the blacklist ? 65 | A : Edit "KickBot.lua". Variable "SpellNamesCanNotInterrupt" contains the list of spells that the bot can NOT interrupt. Each spell name should be surounded by "[]" -------------------------------------------------------------------------------- /KickBot/GenerateRandomAddonName.au3: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | ; Work on these files 4 | local $CoreFileNames = StringSplit( "SendBackKeys_x32.exe,SendBackKeys_x64.exe,KickBot.lua,KickBot.toc,KickBot.xml", ',' ) 5 | local $CanDeleteFileNames = StringSplit( "SendBackKeys.au3,_Setup_4_KeyBinds_advanced.jpg,MouseInfo_x32.exe,GenerateRandomAddonName.au3,readme.txt,Compile.bat,_Setup_1_Addon.jpg,_Setup_2_Addon_middle_reposition.jpg,_setup_3_start_SendBackKeys.jpg,_Setup_4_KeyBinds.jpg,_Setup_5_Optional_if_error_reposition.jpg,MouseInfo.au3", ',' ) 6 | ; create backup directory 7 | DirCreate( "BackupFiles" ) 8 | 9 | ;move core files to backup dir 10 | for $i = 1 to ubound( $CoreFileNames ) - 1 11 | FileMove( $CoreFileNames[ $i ], "BackupFiles/" & $CoreFileNames[ $i ], 1 ) 12 | next 13 | ;move core files to backup dir 14 | for $i = 1 to ubound( $CanDeleteFileNames ) - 1 15 | FileMove( $CanDeleteFileNames[ $i ], "BackupFiles/" & $CanDeleteFileNames[ $i ], 1 ) 16 | next 17 | ; cleanup random generated old addons 18 | local $OldGeneratedRandomFiles; 19 | $OldGeneratedRandomFiles = _FileListToArray ( "./", "*.lua", 1 ) 20 | for $i = 1 to ubound( $OldGeneratedRandomFiles ) - 1 21 | FileDelete( $OldGeneratedRandomFiles[ $i ] ) 22 | next 23 | $OldGeneratedRandomFiles = _FileListToArray ( "./", "*.xml", 1 ) 24 | for $i = 1 to ubound( $OldGeneratedRandomFiles ) - 1 25 | FileDelete( $OldGeneratedRandomFiles[ $i ] ) 26 | next 27 | $OldGeneratedRandomFiles = _FileListToArray ( "./", "*.toc", 1 ) 28 | for $i = 1 to ubound( $OldGeneratedRandomFiles ) - 1 29 | FileDelete( $OldGeneratedRandomFiles[ $i ] ) 30 | next 31 | $OldGeneratedRandomFiles = _FileListToArray ( "./", "*.exe", 1 ) 32 | for $i = 1 to ubound( $OldGeneratedRandomFiles ) - 1 33 | FileDelete( $OldGeneratedRandomFiles[ $i ] ) 34 | next 35 | $OldGeneratedRandomFiles = _FileListToArray ( "./", "*.au3", 1 ) 36 | for $i = 1 to ubound( $OldGeneratedRandomFiles ) - 1 37 | FileDelete( $OldGeneratedRandomFiles[ $i ] ) 38 | next 39 | 40 | ;Pick a random addon name 41 | local $AddonNames = StringSplit( "DeadlyBossMods,Recount,MasterPlan,GarrisonMissionManager,SkadaDamageMeter,BigWigsBossmods,Bartender4,ElvUI,Altoholic,Auctionator,Bagnon,Mapster,MiksScrollingBattleText,Postal,OmniCC,Omen,Postal,AddonControlPanel,AutoRepair,TrashCan,GnomishVendorShrinker,BadBoy,MBB,VanasKoS,TargetPercent,WorldBossStatus,HabeebIt,TradeForwarder,BossesKilled,InspectFix,StrataFix,BlizzBugsSuck,CalendarKeyboardFixer", ',' ) 42 | local $NrOfNames = ubound( $AddonNames ) - 1 43 | local $MyNewName = $AddonNames[ Random( 1, $NrOfNames ) ] & "Old" 44 | 45 | ;create the new addon directory name 46 | DirCreate( "../" & $MyNewName ) 47 | 48 | ;Copy back the files but put new Name 49 | local $NewFileNameList = "" 50 | for $i = 1 to ubound( $CoreFileNames ) - 1 51 | local $NewFileNameParts 52 | if( StringInStr( $CoreFileNames[ $i ], '_', 0 ) == 0 ) then 53 | $NewFileNameParts = StringSplit( $CoreFileNames[ $i ], '.' ) 54 | else 55 | $NewFileNameParts = StringSplit( $CoreFileNames[ $i ], '_' ) 56 | endif 57 | local $NewFileName = $MyNewName & "." & $NewFileNameParts[2] 58 | FileCopy( "BackupFiles/" & $CoreFileNames[ $i ], "../" & $MyNewName & "/" & $NewFileName ) 59 | next 60 | 61 | ; Randomize LUA file so blizzard addon report tool would not hash it correctly 62 | local $LUAFile = FileOpen ( "../" & $MyNewName & "/" & $MyNewName & ".lua", 1 ) 63 | FileWriteLine( $LUAFile, @CRLF & @CRLF & "local MyNewAddonNameIs = " & chr(34) & $MyNewName & chr(34) ) 64 | FileClose( $LUAFile ) 65 | 66 | ; Randomize XML file so blizzard addon report tool would not hash it correctly 67 | local $XMLFile = FileOpen ( "../" & $MyNewName & "/" & $MyNewName & ".xml", 1 ) 68 | FileWriteLine( $XMLFile, @CRLF & @CRLF & " ") 69 | FileClose( $XMLFile ) 70 | 71 | ; Generate new TOC file 72 | _ReplaceStringInFile( "../" & $MyNewName & "/" & $MyNewName & ".toc", "## Title: KickBot", "## Title: " & $MyNewName ) 73 | _ReplaceStringInFile( "../" & $MyNewName & "/" & $MyNewName & ".toc", "KickBot.lua", $MyNewName & ".lua" ) 74 | _ReplaceStringInFile( "../" & $MyNewName & "/" & $MyNewName & ".toc", "KickBot.xml", $MyNewName & ".xml" ) 75 | 76 | ; Replace variable names 77 | _ReplaceStringInFile( "../" & $MyNewName & "/" & $MyNewName & ".xml", "KickBot", $MyNewName ) 78 | _ReplaceStringInFile( "../" & $MyNewName & "/" & $MyNewName & ".lua", "KickBot", $MyNewName ) 79 | _ReplaceStringInFile( "../" & $MyNewName & "/" & $MyNewName & ".toc", "KickBot", $MyNewName ) 80 | 81 | MsgBox( 4096, "", "New addon name is " & $MyNewName & ". It's in new directory not this one" ) 82 | -------------------------------------------------------------------------------- /KickBot/MouseInfo.au3: -------------------------------------------------------------------------------- 1 | ; ~~ Mouse Hook ~~ 2 | ;For more info, Visit: http://msdn.microsoft.com/en-us/library/ms644986(VS.85).aspx 3 | ;Include GUI Consts 4 | #include 5 | ;for $GUI_EVENT_CLOSE 6 | #Include 7 | ;for HIWORD 8 | ;These constants found in the helpfile under Windows Message Codes 9 | Global Const $WM_MOUSEMOVE = 0x0200 ;mouse move 10 | Global Const $WM_MOUSEWHEEL = 0x020A ;wheel up/down 11 | Global Const $WM_LBUTTONDBLCLK = 0x0203 ;left button 12 | Global Const $WM_LBUTTONDOWN = 0x0201 13 | Global Const $WM_LBUTTONUP = 0x0202 14 | Global Const $WM_RBUTTONDBLCLK = 0x0206 ;right button 15 | Global Const $WM_RBUTTONDOWN = 0x0204 16 | Global Const $WM_RBUTTONUP = 0x0205 17 | Global Const $WM_MBUTTONDBLCLK = 0x0209 ;wheel clicks 18 | Global Const $WM_MBUTTONDOWN = 0x0207 19 | Global Const $WM_MBUTTONUP = 0x0208 ;Consts/structs from msdn 20 | Global Const $MSLLHOOKSTRUCT = $tagPOINT & ";dword mouseData;dword flags;dword time;ulong_ptr dwExtraInfo" 21 | ;~ Global Const $WH_MOUSE_LL = 14 ;already declared 22 | ;~ Global Const $tagPOINT = "int X;int Y" ;already declared 23 | ;Create GUI 24 | $GUI = GUICreate("Mouse Hook", 178, 224, @DesktopWidth-178, 0) ;Top-Left corner 25 | $_Event = GUICtrlCreateLabel("Event: ", 8, 8, 158, 17) 26 | $_XYpos = GUICtrlCreateLabel("X= Y=", 8, 32, 157, 17) 27 | $_MData = GUICtrlCreateLabel("Mouse Data: ", 8, 56, 165, 17) 28 | $_Flags = GUICtrlCreateLabel("Flags: ", 8, 80, 168, 17) 29 | $_Timestamp = GUICtrlCreateLabel("Timestamp: ", 8, 104, 162, 17) 30 | $_Extra = GUICtrlCreateLabel("Extra Info: ", 8, 128, 167, 17) 31 | $_Pixel = GUICtrlCreateLabel("Pixel: ", 8, 152, 167, 17) 32 | $_PixelPos = GUICtrlCreateLabel("Mark: ", 8, 176, 167, 17) 33 | $_PixelAtPos = GUICtrlCreateLabel("Pixel At Mark: ", 8, 200, 167, 17) 34 | GUISetState() 35 | WinSetOnTop($GUI, "", 1) ;make GUI stay on top of other windows 36 | 37 | global $MonitoredMousePos = MouseGetPos() 38 | HotKeySet("-", "RegisterMonitoredPixelPos") 39 | 40 | Func RegisterMonitoredPixelPos() 41 | $MonitoredMousePos = MouseGetPos() 42 | EndFunc 43 | 44 | ;Register callback 45 | $hKey_Proc = DllCallbackRegister("_Mouse_Proc", "int", "int;ptr;ptr") 46 | $hM_Module = DllCall("kernel32.dll", "hwnd", "GetModuleHandle", "ptr", 0) 47 | $hM_Hook = DllCall("user32.dll", "hwnd", "SetWindowsHookEx", "int", $WH_MOUSE_LL, "ptr", DllCallbackGetPtr($hKey_Proc), "hwnd", $hM_Module[0], "dword", 0) 48 | 49 | While 1 50 | If $GUI_EVENT_CLOSE = GUIGetMsg() Then Exit ;idle until exit is pressed 51 | WEnd 52 | 53 | Func _Mouse_Proc($nCode, $wParam, $lParam) ;function called for mouse events.. 54 | ;define local vars 55 | Local $info, $ptx, $pty, $mouseData, $flags, $time, $dwExtraInfo 56 | Local $xevent = "Unknown", $xmouseData = "" 57 | If $nCode < 0 Then ;recommended, see http://msdn.microsoft.com/en-us/library/ms644986(VS.85).aspx 58 | $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], "int", $nCode, "ptr", $wParam, "ptr", $lParam) ;recommended 59 | Return $ret[0] 60 | EndIf 61 | $info = DllStructCreate($MSLLHOOKSTRUCT, $lParam) ;used to get all data in the struct ($lParam is the ptr) 62 | $ptx = DllStructGetData($info, 1) ;see notes below.. 63 | $pty = DllStructGetData($info, 2) 64 | $mouseData = DllStructGetData($info, 3) 65 | $flags = DllStructGetData($info, 4) 66 | $time = DllStructGetData($info, 5) 67 | $dwExtraInfo = DllStructGetData($info, 6) 68 | ; $ptx = Mouse x position 69 | ; $pty = Mouse y position 70 | ; $mouseData = can specify click states, and wheel directions 71 | ; $flags = Specifies the event-injected flag 72 | ; $time = Specifies the time stamp for this message 73 | ; $dwExtraInfo = Specifies extra information associated with the message. 74 | ;Find which event happened 75 | Select 76 | Case $wParam = $WM_MOUSEMOVE 77 | $xevent = "Mouse Move" 78 | Case $wParam = $WM_MOUSEWHEEL 79 | $xevent = "Mouse Wheel" 80 | If _WinAPI_HiWord($mouseData) > 0 Then 81 | $xmouseData = "Wheel Forward" 82 | Else 83 | $xmouseData = "Wheel Backward" 84 | EndIf 85 | Case $wParam = $WM_LBUTTONDBLCLK 86 | $xevent = "Double Left Click" 87 | Case $wParam = $WM_LBUTTONDOWN 88 | $xevent = "Left Down" 89 | Case $wParam = $WM_LBUTTONUP 90 | $xevent = "Left Up" 91 | Case $wParam = $WM_RBUTTONDBLCLK 92 | $xevent = "Double Right Click" 93 | Case $wParam = $WM_RBUTTONDOWN 94 | $xevent = "Right Down" 95 | Case $wParam = $WM_RBUTTONUP 96 | $xevent = "Right Up" 97 | Case $wParam = $WM_MBUTTONDBLCLK 98 | $xevent = "Double Wheel Click" 99 | Case $wParam = $WM_MBUTTONDOWN 100 | $xevent = "Wheel Down" 101 | Case $wParam = $WM_MBUTTONUP 102 | $xevent = "Wheel Up" 103 | EndSelect 104 | ; Set GUI control data.. 105 | GUICtrlSetData($_Event, "Event: " & $xevent) 106 | GUICtrlSetData($_XYpos, "X=" & $ptx & " Y=" & $pty) 107 | 108 | GUICtrlSetData($_Pixel, "Pixel: " & PixelGetColor( $ptx, $pty ) & " " & Hex( PixelGetColor( $ptx, $pty ), 6 ) ) 109 | GUICtrlSetData($_PixelPos, "MonitoredPos: " & $MonitoredMousePos[0] & " " & $MonitoredMousePos[1] ) 110 | GUICtrlSetData($_PixelAtPos, "Pixel at mark: " & PixelGetColor( $MonitoredMousePos[0], $MonitoredMousePos[1] ) & " " & Hex( PixelGetColor( $MonitoredMousePos[0], $MonitoredMousePos[1] ), 6 ) ) 111 | 112 | If $xmouseData <> "" Then 113 | GUICtrlSetData($_MData, "Mouse Data: " & $xmouseData) 114 | Else 115 | GUICtrlSetData($_MData, "Mouse Data: " & $mouseData) 116 | EndIf 117 | GUICtrlSetData($_Flags, "Flags: " & $flags) 118 | GUICtrlSetData($_Timestamp, "Timestamp: " & $time) 119 | GUICtrlSetData($_Extra, "Extra Info: " & $dwExtraInfo) ;This is recommended instead of Return 0 120 | $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], "int", $nCode, "ptr", $wParam, "ptr", $lParam) 121 | Return $ret[0] 122 | EndFunc ;==>_Mouse_Proc 123 | 124 | Func OnAutoItExit() 125 | DllCall("user32.dll", "int", "UnhookWindowsHookEx", "hwnd", $hM_Hook[0]) 126 | $hM_Hook[0] = 0 127 | DllCallbackFree($hKey_Proc) 128 | $hKey_Proc = 0 129 | EndFunc ;==>OnAutoItExit -------------------------------------------------------------------------------- /KickBot/SendBackKeys.au3: -------------------------------------------------------------------------------- 1 | Opt('MustDeclareVars', 1) 2 | 3 | ; this is required to not try to casts spells 1000 times per second while silenced :( 4 | global $MaxFPS = 4 5 | ; Resend same key interval. In case of a latency spike, you get "spell not ready yet" than this will force AU3 to send the same key after ex 200ms 6 | global $ResendSameKeyInterval = 500 7 | ; Due to latency, when wow client wants to do something, it takes time until server replies. Do not spam multiple interrupt spells due to latency 8 | ; This is actually a bad setting. You might want to set it to 0. In my case i need it 9 | global $ForcedSpellCastCooldown = 500 10 | 11 | ; Keyboard shortcut to kill this script 12 | HotKeySet("[", "Terminate") 13 | ; do not take any actions unles script is set to run 14 | HotKeySet("\", "TogglePause") 15 | 16 | global $LuaFramePosX = -1 17 | global $LuaFramePosy = -1 18 | global $RGBStep = 4 19 | global $FirstValidRGB = 1 * $RGBStep 20 | global $ExpectedLUAIdleValue = 0x0010FF80 21 | 22 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 23 | ; Anything below should be working without any changes. If not.....it's bad 24 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 25 | #include 26 | #include 27 | 28 | global $ScriptIsRunning = 1 29 | global $ScriptIsPaused = 0 30 | 31 | Func Terminate() 32 | $ScriptIsRunning = 0 33 | EndFunc 34 | 35 | Func TogglePause() 36 | $ScriptIsPaused = 1 - $ScriptIsPaused 37 | EndFunc 38 | 39 | ; wait until you alt+tab to wow window 40 | WinWaitActive( "World of Warcraft" ) 41 | 42 | ; Debugging. Can delete this 43 | if( IsDeclared( "MB_SYSTEMMODAL" ) <> 1 ) then 44 | global $MB_SYSTEMMODAL = 4096 45 | endif 46 | 47 | ; probably did not set manually a value 48 | if( $LuaFramePosX == -1 ) then 49 | TryToGuessLocation() 50 | endif 51 | 52 | ; Debugging. Can delete this 53 | if( PixelGetColor( $LuaFramePosX, $LuaFramePosY ) <> $ExpectedLUAIdleValue ) then 54 | MsgBox( $MB_SYSTEMMODAL, "", "KickBot Lua frame has an unexpected value. Manually set $LuaFramePosX and $LuaFramePosY" ) 55 | exit 56 | endif 57 | 58 | global $FrameHandleDuration = 1000 / $MaxFPS 59 | global $SendKey = "" 60 | 61 | ;MsgBox( $MB_SYSTEMMODAL, "", " but1 " & $KeyToAllowScriptToTakeActionsHex & " but 2 " & $KeyToAllowScriptToTakeActionsHex2 ) 62 | 63 | local $PrevValue = 0 64 | ;loop until the end of days 65 | local $LastActionCheckStamp = _Date_Time_GetTickCount( ) 66 | ;monitor when we sent out last key 67 | local $LastForceSendStamp = _Date_Time_GetTickCount( ) 68 | ; monitor the interval of key spams 69 | local $LastKeySendStamp = _Date_Time_GetTickCount( ) 70 | ; monitor that part of the screen and check if something changed. If it did, than we take actions 71 | while( $ScriptIsRunning == 1 ) 72 | local $TickNow = _Date_Time_GetTickCount( ) 73 | 74 | ; get the color of our LUA frame 75 | local $LuaColor = PixelGetColor( $LuaFramePosX, $LuaFramePosY ) 76 | 77 | ; do not spam same keys 78 | if( $PrevValue <> $LuaColor ) then 79 | local $ColorB = Mod( $LuaColor, 256 ) 80 | local $ColorG = Mod( Int( $LuaColor / 256 ), 256 ) 81 | local $ColorR = Mod( Int( $LuaColor / 65536 ), 256 ) 82 | local $SpellNameIndex = Int( ( $ColorG - $FirstValidRGB ) / $RGBStep ) 83 | local $TargetIndex = Int( ( $ColorR - $FirstValidRGB ) / $RGBStep ) 84 | local $SendKeyOrd = Int( $ColorB ) 85 | 86 | if( WinActive( "World of Warcraft" ) ) then 87 | ; Debugging. Can delete this 88 | ; MsgBox( $MB_SYSTEMMODAL, "", "change detected " & $ColorR & " " & $ColorG & " " & $ColorB ) 89 | ; Send( "{ENTER}" & " RGB " & $ColorR & " " & $ColorG & " " & $ColorB & " with index " & $SpellNameIndex & " " & $TargetIndex & " " & $SendKeyOrd & " {ENTER}" ) 90 | EventImageFound( $SpellNameIndex, $TargetIndex, $SendKeyOrd ) 91 | endif 92 | 93 | $PrevValue = $LuaColor 94 | endif 95 | 96 | ; if for some reason "key" was lost ( ex : spell cooldown ) than resend the same key after X ms 97 | if( $SendKey <> "" and $LastForceSendStamp + $ResendSameKeyInterval < $TickNow ) then 98 | MySendKey( $SendKey ) 99 | ; Send( "{ENTER}" & "resend " & $SendKey & " = " & asc( $SendKey ) & " {ENTER}" ) 100 | endif 101 | 102 | ;this is required to not overspam unusable actions 103 | local $TickAtEnd = _Date_Time_GetTickCount( ) 104 | local $DeltaTime = $TickAtEnd - $TickNow 105 | if( $DeltaTime < $FrameHandleDuration ) then 106 | Sleep( $FrameHandleDuration - $DeltaTime ) 107 | endif 108 | wend 109 | 110 | func MySendKey( $key ) 111 | if( $ScriptIsPaused <> 0 ) then 112 | return 113 | endif 114 | 115 | local $TickNow = _Date_Time_GetTickCount( ) 116 | 117 | ; do not cast multiple interrupt spells because the private server did not yet sent us the interrupt cast packet. Wait a bit 118 | if( $LastKeySendStamp + $ForcedSpellCastCooldown > $TickNow ) then 119 | return 120 | endif 121 | 122 | ; send the key as expected to the client 123 | if( WinActive( "World of Warcraft" ) ) then 124 | ; you could script send key if you are using UTF-8 character keyboard. That ? you might see below is a cyrilic character 125 | ; I never tested this code, but according to autoit documentation it should be something similar 126 | ; if( $key == '?' ) then 127 | ; ControlSend( "World of Warcraft", "", "", "this is my UTF-8 char override" ) 128 | ; else 129 | Send( $key ) 130 | ; endif 131 | endif 132 | 133 | ; we sent a key, no need to send it again for a while 134 | $LastKeySendStamp = $TickNow 135 | $LastForceSendStamp = $TickNow 136 | endfunc 137 | 138 | func EventImageFound( $SpellNameIndex, $TargetIndex, $SendKeyFromLUA ) 139 | $SendKey = "" 140 | ; Send( "{ENTER}" & "1 target index " & $TargetIndex & " name index " & $SpellNameIndex & " key " & $SendKeyFromLUA & " key " & chr( $SendKeyFromLUA ) & " {ENTER}" ) 141 | if( $ScriptIsPaused <> 0 ) then 142 | return 143 | endif 144 | 145 | if( $SendKeyFromLUA <=0 and( $TargetIndex > 6 or $SpellNameIndex < 0 or $SpellNameIndex >= 20 ) ) then 146 | return 147 | endif 148 | 149 | if( $SendKeyFromLUA <> 0 and $SendKeyFromLUA <> Mod( $ExpectedLUAIdleValue, 256 ) ) then 150 | $SendKey = chr( $SendKeyFromLUA ) 151 | endif 152 | 153 | if( $SendKey <> "" ) then 154 | MySendKey( $SendKey ) 155 | ; Send( "{ENTER}" & "2 target index " & $TargetIndex & " name index " & $SpellNameIndex & " key " & $SendKey & " keylua " & $SendKeyFromLUA & " {ENTER}" ) 156 | endif 157 | endfunc 158 | 159 | Func TryToGuessLocation() 160 | ; MsgBox( $MB_SYSTEMMODAL, "", "Location of KickBot Lua frame is not defined. Trying to search for it" ) 161 | Local $set = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, $ExpectedLUAIdleValue, 0 ) 162 | If Not @error Then 163 | $LuaFramePosX = $set[0] + 8 164 | $LuaFramePosY = $set[1] + 8 165 | MouseMove( $LuaFramePosX, $LuaFramePosY ) 166 | MsgBox( $MB_SYSTEMMODAL, "", "Location of KickBot Lua frame found at : " & $LuaFramePosX & " " & $LuaFramePosY ) 167 | endif 168 | endfunc 169 | -------------------------------------------------------------------------------- /TranslateActions.au3: -------------------------------------------------------------------------------- 1 | Opt('MustDeclareVars', 1) 2 | 3 | ; you want to set this the same value as you used in "TakeScreenshots.au3" 4 | global $ImagePixelCount = 49 5 | ; this is required to not try to casts spells 1000 times per second while silenced :( 6 | global $MaxFPS = 4 7 | 8 | ; Keyboard shortcut to kill this script 9 | HotKeySet("[", "Terminate") 10 | ; do not take any actions unles script is set to run 11 | HotKeySet("\", "TogglePause") 12 | 13 | global $MonitoredImages[17] 14 | global $SendKeyForImage[17] 15 | $MonitoredImages[0] = "TemplarVerdict.bmp" 16 | $SendKeyForImage[0] = "1" 17 | $MonitoredImages[1] = "HammerOfJustice.bmp" 18 | $SendKeyForImage[1] = "2" 19 | $MonitoredImages[2] = "CrusaderStrike.bmp" 20 | $SendKeyForImage[2] = "3" 21 | $MonitoredImages[3] = "Exorcism.bmp" 22 | $SendKeyForImage[3] = "4" 23 | $MonitoredImages[4] = "Judgement.bmp" 24 | $SendKeyForImage[4] = "5" 25 | $MonitoredImages[5] = "FistofJustice.bmp" 26 | $SendKeyForImage[5] = "6" 27 | $MonitoredImages[6] = "Rebuke.bmp" 28 | $SendKeyForImage[6] = "7" 29 | $MonitoredImages[7] = "ArcaneTorrent.bmp" 30 | $SendKeyForImage[7] = "8" 31 | $MonitoredImages[8] = "AquireTarget.bmp" 32 | $SendKeyForImage[8] = "9" 33 | $MonitoredImages[9] = "SacredShield.bmp" 34 | $SendKeyForImage[9] = "0" 35 | $MonitoredImages[10] = "HandofPurity.bmp" 36 | $SendKeyForImage[10] = "-" 37 | $MonitoredImages[11] = "DivineProtection.bmp" 38 | $SendKeyForImage[11] = "=" 39 | $MonitoredImages[12] = "FlashOfLight.bmp" 40 | $SendKeyForImage[12] = "{F5}" 41 | $MonitoredImages[13] = "LayOnHands.bmp" 42 | $SendKeyForImage[13] = "{F6}" 43 | $MonitoredImages[14] = "HandOfProtection.bmp" 44 | $SendKeyForImage[14] = "{F7}" 45 | $MonitoredImages[15] = "DivineShield.bmp" 46 | $SendKeyForImage[15] = "{F8}" 47 | $MonitoredImages[16] = "DivineStorm.bmp" 48 | $SendKeyForImage[16] = '{F9}' 49 | ;$MonitoredImages[8] = "Attack.bmp" 50 | ;$SendKeyForImage[8] = "9" ;do nothing, LUA is waiting for cooldowns 51 | ;$MonitoredImages[13] = "WaitingForCombat.bmp" 52 | 53 | func EventImageFound( $ImageIndex ) 54 | ; MsgBox( $MB_SYSTEMMODAL, "", "found img " & $MonitoredImages[ $ImageIndex ] & " at index " & $ImageIndex ) 55 | if( $ScriptIsPaused <> 0 ) then 56 | return 57 | endif 58 | 59 | Send( $SendKeyForImage[ $ImageIndex ] ); 60 | endfunc 61 | 62 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 63 | ; Anything below should be working without any changes. If not.....it's bad 64 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 65 | #include 66 | #include 67 | 68 | global $ScriptIsRunning = 1 69 | global $ScriptIsPaused = 0 70 | 71 | Func Terminate() 72 | $ScriptIsRunning = 0 73 | EndFunc 74 | 75 | Func TogglePause() 76 | $ScriptIsPaused = 1 - $ScriptIsPaused 77 | EndFunc 78 | 79 | global $dllhandle = DllOpen( "release/ImageSearchDLL.dll" ) 80 | ;global $dllhandle = DllOpen( "debug/ImageSearchDLL.dll" ) 81 | global $KeyDLL = DllOpen("user32.dll") 82 | 83 | ; wait until you alt+tab to wow window 84 | WinWaitActive( "World of Warcraft" ) 85 | 86 | ; these can be static. Declared them just because i was experimenting with stuff 87 | global $MB_SYSTEMMODAL = 4096 88 | global $SkipSearchOnColor = 0x01000000 89 | global $colorTolerance = 0 90 | global $ColorToleranceFaultsAccepted = 0 91 | global $ExitAfterNMatchesFound = 1 92 | 93 | global $FrameHandleDuration = 1000 / $MaxFPS 94 | 95 | ; only monitor the part of the window where our addon is putting out text 96 | FindAndSetNBSWindowPosition() 97 | ;MsgBox( $MB_SYSTEMMODAL, "", " but1 " & $KeyToAllowScriptToTakeActionsHex & " but 2 " & $KeyToAllowScriptToTakeActionsHex2 ) 98 | 99 | ;loop until the end of days 100 | if( $StartX <> 0 and $StartY <> 0 ) then 101 | local $LastActionCheckStamp = _Date_Time_GetTickCount( ) 102 | ; monitor that part of the screen and check if something changed. If it did, than we take actions 103 | while( $ScriptIsRunning == 1 ) 104 | local $TickNow = _Date_Time_GetTickCount( ) 105 | 106 | ; continuesly take screenshots 107 | DllCall( $dllhandle,"str","TakeScreenshot","int",$StartX,"int",$StartY,"int",$StartX + $EndX + 1,"int",$StartY + $EndY + 1) 108 | ; quick check if we need to check for specific actions 109 | local $result = DllCall( $dllhandle,"str","IsAnythingChanced","int", 0,"int", 0,"int",$EndX,"int",$EndY) 110 | if( GetResCount( $result ) > 0 or $TickNow - $LastActionCheckStamp > 1000 ) then 111 | ; MsgBox( $MB_SYSTEMMODAL, "", "change detected" ) 112 | InvestigateNextActionToBeTaken() 113 | ; this is required in case we get CC and can't press the "action" when it was signaled 114 | $LastActionCheckStamp = $TickNow 115 | endif 116 | 117 | ;this is required to not overspam unusable actions 118 | local $TickAtEnd = _Date_Time_GetTickCount( ) 119 | local $DeltaTime = $TickAtEnd - $TickNow 120 | if( $DeltaTime < $FrameHandleDuration ) then 121 | Sleep( $FrameHandleDuration - $DeltaTime ) 122 | endif 123 | wend 124 | endif 125 | 126 | DllClose( $dllhandle ) 127 | DllClose( $KeyDLL ) 128 | 129 | func InvestigateNextActionToBeTaken() 130 | local $Index = 0 131 | local $iMax = UBound( $MonitoredImages ) 132 | while( $Index < $iMax ) 133 | ; MsgBox( $MB_SYSTEMMODAL, "", "Check img " & $MonitoredImages[ $Index ] ) 134 | local $result = DllCall( $dllhandle,"str","ImageSearchOnScreenshot","str",$MonitoredImages[ $Index ],"int",$SkipSearchOnColor,"int",$colorTolerance,"int",$ColorToleranceFaultsAccepted,"int",$ExitAfterNMatchesFound) 135 | if( GetResCount( $result ) > 0 ) then 136 | EventImageFound( $Index ) 137 | $Index = 666 138 | endif 139 | $Index = $Index + 1 140 | wend 141 | endfunc 142 | 143 | func FindAndSetNBSWindowPosition() 144 | global $StartX = 0 145 | global $StartY = 0 146 | global $EndX = 0 147 | global $EndY = 0 148 | global $dllhandle 149 | DllCall( $dllhandle,"str","TakeScreenshot","int",0,"int",0,"int",2000,"int",2000) 150 | local $result = DllCall( $dllhandle, "str","ImageSearchOnScreenshot","str","Resync.bmp","int",$SkipSearchOnColor,"int",$colorTolerance,"int",$ColorToleranceFaultsAccepted,"int",$ExitAfterNMatchesFound) 151 | local $array = StringSplit( $result[0], "|" ) 152 | local $resCount = Number( $array[1] ) 153 | if( $resCount > 0 ) then 154 | $StartX = Int(Number($array[2])) 155 | $StartY = Int(Number($array[3])) 156 | $result = DllCall( $dllhandle,"str","GetImageSize","str","Resync.bmp") 157 | $array = StringSplit($result[0],"|") 158 | $EndX = Int(Number($array[1])) 159 | $EndY = Int(Number($array[2])) 160 | ; number of pixels should be small as possible to avoid CPU overload 161 | $EndX = $ImagePixelCount 162 | MsgBox( $MB_SYSTEMMODAL, "", "found Resync.bmp at " & $StartX & " " & $StartY ) 163 | ; MsgBox( $MB_SYSTEMMODAL, "", "search width & height " & $EndX & " " & $EndY ) 164 | else 165 | MsgBox( $MB_SYSTEMMODAL, "", "Could not find sync location! Make sure Resync.bmp is generated for this WOW resolution " ) 166 | endif 167 | endfunc 168 | 169 | func GetResCount( $result ) 170 | if( IsArray( $result ) ) Then 171 | local $array = StringSplit( $result[0], "|" ) 172 | local $resCount = Number( $array[1] ) 173 | return $resCount 174 | endif 175 | return 0 176 | endfunc -------------------------------------------------------------------------------- /KickBot/KickBot.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |