NarishDoUrden Posted November 12, 2013 Posted November 12, 2013 (edited) expandcollapse popupGlobal $Paused HotKeySet("{PGUP}", "TogglePause") HotKeySet("{ESC}", "Terminate") $Rounds = 0 $NewFightX = Random( 863, 928) $NewFightY = Random( 100, 115) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) $ReviveX = Random( 684, 732) $ReviveY = Random( 179, 194) $BankX = Random( 833, 858) $BankY = Random( 142, 159) $EastX = Random( 1324, 1366) $EastY = Random( 167, 181) $WestX = Random( 1214, 1255) $WestY = Random( 166, 180) $NorthX = Random( 1269, 1311) $NorthY = Random( 141, 155) $SouthX = Random( 1267, 1310) $SouthY = Random( 165, 180) $SleepMOVE = Random( 800, 1000) $SleepFIGHT = Random( 1800, 2100) $StatDexX = Random(695, 726) $StatDexY = Random(197, 335) $StatDexX2 = Random(695, 726) $StatDexY2 = Random(197, 335) Sleep(5000) Do PixelSearch(29, 463, 972, 616, 0x66CCCC) ;;;;;;;;;;;;; Macro Check If Not @error Then MouseClick("Left", 1310, 10, 1, 5) Sleep(1000) MouseClick("Left", 1311, 101, 2, 5) Sleep(500) Exit EndIF PixelSearch(103, 74, 149, 70, 0xD2D0D0) ;;;;;;;;;;;;; Died If Not @error Then Sleep($SleepMOVE) MouseClick("Left", $WestX, $WestY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $WestX, $WestY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $WestX, $WestY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $ReviveX, $ReviveY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $EastX, $EastY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $EastX, $EastY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $EastX, $EastY, 1, 5) Sleep(2000) EndIf PixelSearch(495, 319, 685, 542, 0xD4D0C8) ;;;;;;;;;;;; Leveled If Not @error Then MouseClick("Left", $StatDexX, $StatDexY, 1, 5) Sleep(500) MouseClick("Left", $StatDexX2, $StatDexY2, 1, 5) Sleep($SleepFIGHT) MouseClick("Left", $WestX, $WestY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $BankX, $BankY, 1, 5) Sleep($SleepFIGHT) MouseClick("Left", $EastX, $EastY, 1, 5) Sleep(4000) EndIf PixelSearch(806, 151, 855, 151, 0xFFDB31) ;;;;;;;;;;;; Skip Veteran If Not @error Then MouseClick("Left", $NewFightX, $NewFightY, 1, 5) Sleep($SleepFIGHT) EndIf PixelSearch(809, 151, 855, 151, 0xD098B0) ;;;;;;;;;;;; Skip Fanatic If Not @error Then MouseClick("Left", $NewFightX, $NewFightY, 1, 5) Sleep($SleepFIGHT) EndIf PixelSearch(800, 151, 863, 151, 0x43F0FF) ;;;;;;;;;;;; Skip Illusionist If Not @error Then MouseClick("Left", $NewFightX, $NewFightY, 1, 5) Sleep($SleepFIGHT) EndIf ;PixelSearch(794, 229, 1151, 372, 0xFFC90E) ;;;;;;;;;;;; Skip Saint ;If Not @error Then ;MouseClick("Left", $NewFightX, $NewFightY, 1, 5) ;Sleep($SleepFIGHT) ;EndIf PixelSearch(895, 287, 940, 287, 0xFFDB31) ;;;;;;;;;;;; Skip Veteran If Not @error Then MouseClick("Left", $NewFightX, $NewFightY, 1, 5) Sleep($SleepFIGHT) EndIf PixelSearch(895, 287, 940, 287, 0xD098B0) ;;;;;;;;;;;; Skip Fanatic If Not @error Then MouseClick("Left", $NewFightX, $NewFightY, 1, 5) Sleep($SleepFIGHT) EndIf PixelSearch(880, 287, 943, 287, 0x43F0FF) ;;;;;;;;;;;; Skip Illusionist If Not @error Then MouseClick("Left", $NewFightX, $NewFightY, 1, 5) Sleep($SleepFIGHT) EndIf ;PixelSearch(794, 229, 1151, 372, 0xFFC90E) ;;;;;;;;;;;; Skip Saint ;If Not @error Then ;MouseClick("Left", $NewFightX, $NewFightY, 1, 5) ;Sleep($SleepFIGHT) ;EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf PixelSearch(495, 319, 685, 542, 0xD4D0C8) ;;;;;;;;;;;; Leveled If Not @error Then MouseClick("Left", $StatDexX, $StatDexY, 1, 5) Sleep(500) MouseClick("Left", $StatDexX2, $StatDexY2, 1, 5) Sleep($SleepFIGHT) MouseClick("Left", $WestX, $WestY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $BankX, $BankY, 1, 5) Sleep($SleepFIGHT) MouseClick("Left", $EastX, $EastY, 1, 5) Sleep(4000) EndIf PixelSearch(103, 74, 149, 70, 0xD2D0D0) ;;;;;;;;;;;;; Died If Not @error Then Sleep($SleepMOVE) MouseClick("Left", $WestX, $WestY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $WestX, $WestY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $WestX, $WestY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $ReviveX, $ReviveY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $EastX, $EastY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $EastX, $EastY, 1, 5) Sleep($SleepMOVE) MouseClick("Left", $EastX, $EastY, 1, 5) Sleep(2000) EndIf MouseClick("Left", $NewFightX, $NewFightY, 1, 5) Sleep($SleepFIGHT) $NewFightX = Random( 863, 928) $NewFightY = Random( 100, 115) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) $ReviveX = Random( 684, 732) $ReviveY = Random( 179, 194) $BankX = Random( 833, 858) $BankY = Random( 142, 159) $EastX = Random( 1324, 1366) $EastY = Random( 167, 181) $WestX = Random( 1214, 1255) $WestY = Random( 166, 180) $NorthX = Random( 1269, 1311) $NorthY = Random( 141, 155) $SouthX = Random( 1267, 1310) $SouthY = Random( 165, 180) $SleepMOVE = Random( 800, 1000) $SleepFIGHT = Random( 1800, 2100) $Rounds = $Rounds + 1 Until $Rounds = 9999999999999999999999999999999999999999999999999 Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Closer to the bottom, Line 809 above, MouseClick("Left", $NewFightX, $NewFightY, 1, 5) Sleep($SleepFIGHT) It just ignores, everything else in the script, but it won't do anything if I semi colon or delete it. Any thoughts on how to fix that line to abide by the rest of the script? Code works, but it ignores everything else and I can't figure out how to "tie" it into PixelSearch(608, 124, 686, 139, 0xD4D0C8) ;;;;;;;;;;;;; Attack If Not @error Then MouseClick("Left", $AttackX, $AttackY, 1, 5) Sleep($SleepFIGHT) $AttackX = Random( 608, 686) $AttackY = Random( 124, 139) EndIf Edited November 12, 2013 by NarishDoUrden
michaelslamet Posted November 12, 2013 Posted November 12, 2013 No games automation allowed here. Please read the forum rules
Moderators Melba23 Posted November 12, 2013 Moderators Posted November 12, 2013 NarishDoUrden.michaelslamet is quite right - please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. But welcome to the AutoIt forum - and see you soon with a legitimate question I hope. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts