;AoW Auto-Profit | ;Made by Elementalcreeds/Ehex/LiftCity | ;Sources: http://www.autohotkey.com/ | ; http://www.autohotkey.com/docs/ | ; http://www.autohotkey.com/board | ;---------------------------------------------| ; TODO: | ; More options | ; Money limit | ; Faster searching? (lol) | ; Multiple page searching? | ;---------------------------------------------| ;msgbox startup MsgBox, WARNING:`nI, LiftCity, am not responsible for your money while using this program. `nThere is a slight chance it could mess up and spend too much money.`nFeel free to ask me questions about usage/programming. Enjoy! ;gui Gui, Add, Button, x10 y10 gStart, Start Gui, Add, Button, x155 y10 gStop, Stop Gui, Add, Text, x10 y75, Instructions: Gui, Add, Text, x10 y95, Start/Stop will buy 'items' Gui, Add, Text, x10 y115, Press PAGE UP to pause/unpause Gui, show, h150 w200 center, AoW A-P ;vars #NoEnv #MaxThreads 10 #MaxThreadsPerHotkey 10 SendMode Input StringVar = ThisIsAString LoopTog := false GameWinHandle = Age of Wushu Launch-BlueDragon CoordMode mouse, screen LightVar = 1 DarkVar = 1 SearchComplete = 0 ;end of script exec return Start: { ;MsgBox % "Your var: " . StringVar . "." ;loop toggle LoopTog := true Sleep, 5 ;window WinWait, %GameWinHandle%, IfWinNotActive, %GameWinHandle%, , WinActivate, %GameWinHandle%, WinWaitActive, %GameWinHandle%, winmove, %GameWinHandle%,, 0, 0, 1440,900 ;main if LoopTog = 1 { StartSub: ;trade center ControlSend, , v, %GameWinHandle% Sleep, 500 MouseMove, 372, 280, 25 MouseClick, Left Sleep, 500 MouseMove, 550, 249, 25 MouseClick, Left Sleep, 500 Send, Pawn Ticket Sleep, 850 MouseMove, 557, 268, 25 MouseClick, Left Sleep, 500 MouseMove, 706, 246, 25 MouseClick, Left Sleep, 1000 ;Starting our first search Function TrayTip, Info, Starting first search ,,1 LPicSearch() ;FUNC RETURN; ;Now we have to restart and go back to our starting sub. ControlSend, , v, %GameWinHandle% Sleep, 250 Goto, StartSub } LPicSearch() { loop { ImageSearch, FoundX, FoundY , 0, 0, A_ScreenWidth, A_ScreenHeight, *32 %A_WorkingDir%\p\Light\%LightVar%wL.png if errorlevel = 0 { ;move to item MouseMove, FoundX, FoundY, 25 MouseGetPos, mclick1X, mclick1Y ;lets get our mouse ;click checking if (FoundX = mclick1X and FoundY = mclick1Y) { ;click the found item MouseClick, Left sleep,50 SearchComplete = 1 ;some old var. ;Purchase MouseMove, 1092, 710, 25 ;purchase MouseClick, Left sleep, 500 MouseMove, 806, 437, 25 ;max ammount MouseClick, Left sleep, 500 MouseMove, 731, 521, 25 ;confirm MouseClick, Left sleep, 250 return } }else { LightVar++ sleep, 100 ;Search Limit If LightVar >= 9 { TrayTip, Info, Failed first search,,1 SearchComplete = 1 DPicSearch() Break } } } return } DPicSearch() { loop { ImageSearch, FoundX2, FoundY2, 0, 0, A_ScreenWidth, A_ScreenHeight, *32 %A_WorkingDir%\p\Dark\%DarkVar%wD.png if errorlevel = 0 { MouseMove, FoundX2, FoundY2, 25 MouseGetPos, mclick2X, mclick2Y ;lets get our mouse if (FoundX2 = mclick2X and FoundY2 = mclick2Y) { MouseClick, Left sleep,50 SearchComplete = 2 MouseMove, 1092, 710, 25 MouseClick, Left sleep, 500 MouseMove, 806, 437, 25 ;max ammount MouseClick, Left sleep, 500 MouseMove, 731, 521, 25 MouseClick, Left sleep, 250 return } }else { DarkVar++ sleep, 100 If DarkVar >= 9 { TrayTip, Info, Failed Both searches, Restarting,,1 sleep, 50 SearchComplete = 2 SearchComplete = 0 Return Break } } } return } ;end of Start Button } return ;stop toggle Stop: { LoopTog := false } return ;force stop on PgUP ~PgUp:: { Pause LoopTog := false } GuiClose: GuiEscape: ExitApp return