Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;The Scipt Begins !!!
- Global $topLeft[2]
- Global $bottomRight[2]
- Global $pause
- AutoItSetOption("pause")
- HotKeySet("{ESC}", "Terminate")
- HotKeySet("{PAUSE}","pause")
- HotKeySet("{Tab}","Sleep_")
- HotKeySet("{F6}","At3")
- $Pause = 1
- Func _pause()
- $Pause = $Pause * -1
- EndFunc
- Func pause()
- While $Pause = -1
- Sleep(500)
- Wend
- EndFunc
- Global $coord[2]
- Global $coord2[2]
- Global $exitCoord[2]
- Global $ArenaCoord[2]
- Global $battleCoord[2]
- Global $genericCoord[2]
- Global $GenericEntrance[2]
- Global $newGenCoord[2]
- Global $waitCoord[2]
- Global $TotalRunCount
- Global $AttackColor1
- Global $AttackColor2
- Global $BlankColor1
- Global $BlankPixel
- ; checks HP for Tsulas2 grind - about 66%
- Global $BlankPixel2
- ; checks HP for NewbGrind - about 90%
- Global $BlankPixel3
- ; checks HP for NewbGrind - about 99%
- Global $xCoord
- Global $yCoord
- Global $AttackLoop
- Global $AttackPixel
- Global $AttackPixelCount
- Global $BattleCheckSum
- Global $DungeonCheckSum
- Global $xPos
- Global $yPos
- Global $checkPixel
- Global $battleCheck
- Global $GenericContinue
- Global $ArenaContinue
- Global $NumberOfBattles
- Global $TsulasHP
- Global $TotalXP
- Global $EntireXP
- Global $startTime
- Global $entireTime
- Global $timeElapsed
- Global $CheckTimer
- ; CWA
- Global $CWACoord[2]
- Global $CWAContinue
- Global $NewCWACoord[2]
- ; UWA
- Global $UWACoord[2]
- Global $UWAContinue
- Global $NewUWACoord[2]
- ; Death check
- Global $DeathColor
- Global $DeathPixel
- Global $ArenaXP[10][100]
- ; FF, SVA, BWA, DFA, BRA, CWA, UWA, PGA, BI3
- Global $ArenaNumberOfBattles[10]=[0,96,96,97,94,89,22,33,87,33]
- ; FFXP - correct values and placement
- Global $FFXP[97]=[0,21,1,11,14,4,40,12,20,24,44,150,12,28,17,150,151,2,10,24,10,10,182,36,158,42,3,15,37,27,44,15,300,152,23,38,27,19,39,160,24,22,199,13,29,47,15,24,12,311,28,33,25,20,39,18,45,60,72,51,60,200,56,210,150,80,80,66,66,440,120,105,60,110,147,40,105,150,360,95,155,180,120,160,120,66,150,132,190,74,32,100,110,70,76,126,540]
- ; SVAXP - correct values and placement
- Global $SVAXP[97]=[0,72,75,90,40,117,66,76,87,111,156,66,90,60,120,190,99,213,180,50,240,130,190,244,224,50,105,150,19,100,270,330,180,80,205,150,88,149,179,386,501,320,243,510,305,350,225,510,895,380,320,330,570,450,610,190,400,900,900,910,430,1065,520,900,390,745,1500,1530,1950,1100,1700,830,1180,1300,1760,452,2400,800,3075,1950,1100,1315,930,1350,3060,1315,1250,1550,830,1350,2925,4,950,490,980,1425,160]
- ; BWAXP - correct values and placement
- Global $BWAXP[98]=[0,110,110,150,140,70,100,180,200,320,99,80,220,100,270,270,550,1750,825,938,1360,54,397,1375,150,1845,1800,180,775,300,1300,2138,900,1300,830,1200,450,921,475,2000,600,950,1350,998,65,160,465,240,650,490,80,1560,1720,1130,400,1695,500,160,80,1260,1560,500,480,2400,1300,690,2720,1490,1380,500,2235,500,1440,2980,1050,1440,720,1220,500,1490,2160,1220,2235,500,1000,3450,2930,1360,3480,1200,1560,3120,2400,1000,2340,2160,2235,3000]
- ; DFAXP - correct values and placement
- Global $DFAXP[95]=[0,300,205,102,305,535,410,525,494,220,540,700,170,230,190,180,422,430,265,500,750,735,285,740,355,855,975,765,780,745,1020,1410,1175,675,287,305,1600,520,856,375,825,1249,1540,1234,1825,1005,1145,1430,330,725,1665,1360,1300,870,610,970,1310,1290,1285,3260,2875,906,7200,270,1979,2660,1320,3342,1194,1756,2046,4076,7426,992,4450,504,5972,2912,6916,2200,5432,968,6363,1300,3300,3257,1761,5824,7524,4354,6614,12848,7624,3801,11452]
- ; BRAXP - correct values - placement checked to here ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
- Global $BRAXP[90]=[0,905,605,1150,280,3020,950,500,2390,1800,4125,730,3725,2340,465,3014,2016,2634,1920,3008,1560,2218,3240,1500,828,4410,1512,3020,450,1756,360,1844,2994,992,1560,2040,1386,500,3588,1630,1331,700,585,4278,1264,3584,7155,2528,306,2235,3534,4002,3792,5724,3400,3792,90,4416,270,3830,4293,2862,1996,6075,5924,6140,2862,4342,1245,5602,8476,2994,1242,5528,9204,7119,3764,15056,5500,4308,2307,10596,15518,11292,11340,6000,12132,5184,9030,6792]
- ; CWAXP - correct values - placement not checked
- Global $CWAXP[23]=[0,1800,1800,1800,6350,5950,5850,7000,6700,6200,6700,7500,7850,7250,8000,12500,12500,15500,13333,13333,4444,9222,3472]
- ; UWAXP - correct values - placement not checked
- Global $UWAXP[34]=[0,2373,2373,2373,2373,2373,2373,2373,2373,2373,2373,7573,10400,13000,13000,15600,7573,10606,9574,10606,11514,6807,11200,11200,12432,8433,14000,16800,19000,25000,26400,14000,9464,36032]
- ; PGAXP - correct values - placement not checked
- Global $PGAXP[88]=[0,4800,3800,7884,8164,5210,7064,6400,2000,7000,10898,11146,7350,2600,5950,8850,9100,10100,8900,6900,11264,8100,6400,7500,8500,6273,5824,5996,6160,9900,11250,13400,13400,13600,8800,6650,8973,7673,13400,13110,16044,15664,8776,13368,13408,12465,14514,9941,10785,15947,12114,12233,14467,7885,20406,17318,14383,12088,15320,18066,15905,13379,13138,15980,14033,13300,16550,18227,15021,15236,11643,14526,13879,14537,19600,17707,18637,17386,25338,30117,12956,17530,15747,30888,32238,45038,56138,62138]
- Global $guiExit
- Global $ArenaExit[15]=[0, 225, 90, 130, 401, 417, 186, 586, 126, 705, 185, 705, 450, 633, 102]
- Global $ArenaRoomCount
- Global $BuffCoords[43]=[0, 86, 219, 86, 240, 86, 263, 86, 287, 86, 308, 86, 331, 233, 219, 233, 240, 233, 263, 233, 287, 233, 308, 233, 331, 379, 219, 379, 240, 379, 263, 379, 287, 379, 308, 379, 331, 526, 219, 526, 240, 526, 263]
- Global $grind_choice
- Global $battleTextFind[2]
- Global $BattleFound
- $AttackColor1 = Dec("FFFFFF")
- $AttackColor2 = Dec("FFFEFF")
- $BlankColor1 = Dec("333333")
- $BattleTextColor = 0xFFFFFF
- $PadColor1 = 0xFC4744
- $PadColor2 = 0xFD4743
- $PadColor3 = 0xFB4744
- $ExitColor1 = 0xF8F6EA
- $DeathColor = Dec("86A89C")
- $UWEXitColor1 = 0x6DFCF6
- Opt("WinTitleMatchMode", 2)
- ;IE7/8
- WinActivate("[CLASS:IEFrame]", "")
- ;Firefox3
- WinActivate("CLASS:MozillaUIWindowClass]", "")
- ;Firefox4
- WinActivate("[CLASS:MozillaWindowClass]", "")
- ;Opera
- WinActivate("[CLASS:aPluginWinClass]", "")
- ;Opera
- WinActivate("[CLASS:OperaWindowClass]", "")
- ;Chrome
- WinActivate("[CLASS:Chrome_WidgetWin_0]", "")
- WinGetPos(" [CLASS:NativeWindowClass] ", "")
- ; fixed coordes... you can edit if you want to do so
- $topLeft[0] = 10
- $topLeft[1] = 87
- $bottomRight[0] = $topLeft[0] + 739
- $bottomRight[1] = $topLeft[1] + 599
- ;populate XP values
- For $xloop = 1 to 96
- $ArenaXP[1][$xloop]=$FFXP[$xloop]
- Next
- For $xloop = 1 to 96
- $ArenaXP[2][$xloop]=$SVAXP[$xloop]
- Next
- For $xloop = 1 to 97
- $ArenaXP[3][$xloop]=$BWAXP[$xloop]
- Next
- For $xloop = 1 to 94
- $ArenaXP[4][$xloop]=$DFAXP[$xloop]
- Next
- For $xloop = 1 to 89
- $ArenaXP[5][$xloop]=$BRAXP[$xloop]
- Next
- For $xloop = 1 to 22
- $ArenaXP[6][$xloop]=$CWAXP[$xloop]
- Next
- For $xloop = 1 to 33
- $ArenaXP[7][$xloop]=$UWAXP[$xloop]
- Next
- For $xloop = 1 to 87
- $ArenaXP[8][$xloop]=$PGAXP[$xloop]
- Next
- $TotalRunCount=0
- $screenWidth = $bottomRight[0] - $topLeft[0]
- $screenHeight = $bottomRight[1] - $topLeft[1]
- $repeatagain = 1
- ; GUI starts here
- #include <GUIConstantsEx.au3>
- #include <EditConstants.au3>
- #include <ButtonConstants.au3>
- GUICreate("Sacred Seasons Bot", 800, 600)
- Opt("GUIResizeMode", 1)
- Opt("GUICloseOnESC", 1)
- GUICtrlCreateLabel("Top Left", 10, 10)
- $InputSize1 = GUICtrlCreateInput($topLeft[0], 10, 25, 100, 20)
- GUICtrlCreateLabel("Top Left", 140, 10)
- $InputSize2 = GUICtrlCreateInput($topLeft[1], 140, 25, 100, 20)
- GUICtrlCreateLabel("Bottom Right", 10, 50)
- $InputSize3 = GUICtrlCreateInput($bottomRight[0], 10, 65, 100, 20)
- GUICtrlCreateLabel("Bottom Right", 140, 50)
- $InputSize4 = GUICtrlCreateInput($bottomRight[1], 140, 65, 100, 20)
- GUICtrlCreateLabel("Window width", 10, 90)
- $InputSize5 = GUICtrlCreateInput($screenWidth, 10, 105, 100, 20, $ES_READONLY)
- GUICtrlCreateLabel("Window height", 140, 90)
- $InputSize6 = GUICtrlCreateInput($screenHeight, 140, 105, 100, 20, $ES_READONLY)
- GUICtrlCreateLabel("The above coordinates are what the script found automatically. If the values are zero or blank, you need to enter the values yourself using AutoIT Window Info." & @CRLF & "The width should be 740 and the height should be 600. (Automatically finding the coordinates should work in all browsers - IE7, IE8, Firefox 3, and Firefox 4, Opera, and Chrome. If it doesn't work - please let me know.)", 10, 145, 260, 120)
- GUICtrlCreateLabel("Make sure that Sacred Seasons is underneath this window, the coordinates are correct, select a section to grind and press continue.", 200, 510, 400, 40)
- $ContinueButton1 = GUICtrlCreateButton("Continue", 300, 550, 100)
- GUICtrlCreateGroup("Select a option to grind:", 310, 10, 480, 250)
- $choice_1 = GUICtrlCreateRadio("Newbie Grind", 330, 25, 210, 20)
- $choice_2 = GUICtrlCreateRadio("Mummas only", 330, 45, 210, 20)
- $choice_3 = GUICtrlCreateRadio("Dunes F1", 330, 65, 210, 20)
- $choice_4 = GUICtrlCreateRadio("Dunes A5 (Snappers/Scorpions)", 330, 105, 210, 20)
- $choice_5 = GUICtrlCreateRadio("Underworld D2 (Worm/Octogum/Frogs)", 330, 125, 210, 20)
- $choice_6 = GUICtrlCreateRadio("Underworld F4 (Charlotte / Choppers)", 330, 145, 210, 20)
- $choice_7 = GUICtrlCreateRadio("Dunes E3 (Mumma)", 330, 165, 240, 20)
- $choice_8 = GUICtrlCreateRadio("Underworld A5(Elementals)", 330, 185, 210, 20)
- $choice_9 = GUICtrlCreateRadio("Underworld C2", 330, 205, 210, 20)
- $choice_10 = GUICtrlCreateRadio("Generic", 330, 225, 210, 20)
- $choice_11 = GUICtrlCreateRadio("Arena - FF", 600, 25, 180, 20)
- $choice_12 = GUICtrlCreateRadio("Arena - SVA", 600, 45, 180, 20)
- $choice_13 = GUICtrlCreateRadio("Arena - BWA", 600, 65, 180, 20)
- $choice_14 = GUICtrlCreateRadio("Arena - DFA", 600, 85, 180, 20)
- $choice_15 = GUICtrlCreateRadio("Arena - BRA", 600, 105, 180, 20)
- $choice_16 = GUICtrlCreateRadio("Arena - CWA", 600, 125, 180, 20)
- $choice_17 = GUICtrlCreateRadio("Arena - UWA", 600, 145, 180, 20)
- $choice_18 = GUICtrlCreateRadio("Dunes D3 (Scrabs)", 330, 85, 240, 20)
- $choice_text = GUICtrlCreateLabel("", 310, 270, 450, 60)
- $grind_choice = 0
- $BuffBox = GUICtrlCreateCheckbox("Check to use buff at start of battle", 10, 325, 200, 20)
- GUICtrlCreateLabel("Buff Spell to use first in battle (1 - 21) ", 55, 355)
- $BuffSpell1 = GUICtrlCreateInput("", 10, 350, 40, 20)
- GUICtrlCreateLabel("Maximum times to cast spell", 55, 380)
- $BuffCast1 = GUICtrlCreateInput("1", 10, 375, 40, 20)
- $AttackBox = GUICtrlCreateCheckbox("Check to use attack at start of battle", 260, 325, 200, 20)
- GUICtrlCreateLabel("Attack Spell to use first in battle (1 - 21) ", 305, 355)
- $AttackSpell1 = GUICtrlCreateInput("", 260, 350, 40, 20)
- GUICtrlCreateLabel("Maximum times to cast spell", 305, 380)
- $AttackCast1 = GUICtrlCreateInput("1", 260, 375, 40, 20)
- $HealBox = GUICtrlCreateCheckbox("Check to use healing spell when HP is low", 510, 325, 250, 20)
- GUICtrlCreateLabel("Healing spell to use in battle (1 - 21) ", 555, 355)
- $HealSpell1 = GUICtrlCreateInput("", 510, 350, 40, 20)
- GUICtrlCreateLabel("Cast spell when HP falls below %", 555, 380)
- $HealHPCast1 = GUICtrlCreateInput("33", 510, 375, 40, 20)
- GUICtrlCreateLabel("Only cast when SP is above %", 555, 405)
- $HealSPCast1 = GUICtrlCreateInput("33", 510, 400, 40, 20)
- $TurboBox = GUICtrlCreateCheckBox("Check to use 'turbo' mode - can speed up script but may affect stability", 10, 450, 400, 20)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- GUISetState(@SW_SHOW)
- While $guiExit <> 1
- $msg = GUIGetMsg()
- If $msg = $GUI_EVENT_CLOSE Then
- Exit
- EndIF
- If $msg = $InputSize1 Then
- $topLeft[0] = GUICtrlRead($InputSize1)
- $screenWidth = $bottomRight[0] - $topLeft[0]
- $screenHeight = $bottomRight[1] - $topLeft[1]
- GUICtrlSetData($InputSize5, $screenWidth)
- EndIf
- If $msg = $InputSize2 Then
- $topLeft[1] = GUICtrlRead($InputSize2)
- $screenWidth = $bottomRight[0] - $topLeft[0]
- $screenHeight = $bottomRight[1] - $topLeft[1]
- GUICtrlSetData($InputSize6, $screenHeight)
- EndIf
- If $msg = $InputSize3 Then
- $bottomRight[0] = GUICtrlRead($InputSize3)
- $screenWidth = $bottomRight[0] - $topLeft[0]
- $screenHeight = $bottomRight[1] - $topLeft[1]
- GUICtrlSetData($InputSize5, $screenWidth)
- EndIf
- If $msg = $InputSize4 Then
- $bottomRight[1] = GUICtrlRead($InputSize4)
- $screenWidth = $bottomRight[0] - $topLeft[0]
- $screenHeight = $bottomRight[1] - $topLeft[1]
- GUICtrlSetData($InputSize6, $screenHeight)
- EndIf
- If $msg = $choice_1 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=1
- EndIf
- If $msg = $choice_2 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=2
- EndIf
- If $msg = $choice_3 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=3
- EndIf
- If $msg = $choice_4 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=4
- EndIf
- If $msg = $choice_5 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=5
- EndIf
- If $msg = $choice_6 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=6
- EndIf
- If $msg = $choice_7 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=7
- EndIf
- If $msg = $choice_8 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=8
- EndIf
- If $msg = $choice_9 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=9
- EndIf
- If $msg = $choice_10 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=10
- EndIf
- If $msg = $choice_11 Then
- GUICtrlSetData($choice_text, "Arena - FF. Move your character to the first room in the arena with battles (not the lobby). Your character must be able to complete the battles in the first room without dying or the script will fail. If your character dies after that, it will return to the arena and start it again.")
- $grind_choice=11
- EndIf
- If $msg = $choice_12 Then
- GUICtrlSetData($choice_text, "Arena - SVA. Move your character to the first room in the arena with battles (not the lobby). Your character must be able to complete the battles in the first room without dying or the script will fail. If your character dies after that, it will return to the arena and start it again.")
- $grind_choice=12
- EndIf
- If $msg = $choice_13 Then
- GUICtrlSetData($choice_text, "Arena - BWA. Move your character to the first room in the arena with battles (not the lobby). Your character must be able to complete the battles in the first room without dying or the script will fail. If your character dies after that, it will return to the arena and start it again.")
- $grind_choice=13
- EndIf
- If $msg = $choice_14 Then
- GUICtrlSetData($choice_text, "Arena - DFA. Move your character to the first room in the arena with battles (not the lobby). Your character must be able to complete the battles in the first room without dying or the script will fail. If your character dies after that, it will return to the arena and start it again.")
- $grind_choice=14
- EndIf
- If $msg = $choice_15 Then
- GUICtrlSetData($choice_text, "Arena - BRA. Move your character to the first room in the arena with battles (not the lobby). Your character must be able to complete the battles in the first room without dying or the script will fail. If your character dies after that, it will return to the arena and start it again. (The script will probably hang if you reach the 7th floor rooms with no battles.)")
- $grind_choice=15
- EndIf
- If $msg = $choice_16 Then
- GUICtrlSetData($choice_text, "Arena - CWA. Move your character to the first room in the arena with battles (not the lobby). Your character DOES NOT need to be able to complete the battles in the first room without dying. If your character dies, it will return to the arena and start it again.")
- $grind_choice=16
- EndIf
- If $msg = $choice_17 Then
- GUICtrlSetData($choice_text, "Arena - UWA. Move your character to the first room in the arena with battles (not the lobby). Your character DOES NOT need to be able to complete the battles in the first room without dying. If your character dies, it will return to the arena and start it again.")
- $grind_choice=17
- EndIf
- If $msg = $choice_18 Then
- GUICtrlSetData($choice_text, "")
- $grind_choice=18
- EndIf
- ; If $msg = $choice_19 Then
- ; GUICtrlSetData($choice_text, "Arena - PGA. Move your character to the first room in the arena with battles (not the lobby). Your character must be able to complete the battles in the first room without dying or the script will fail. If your character dies after that, it will return to the arena and start it again.")
- ; $grind_choice=19
- ; EndIf
- If ($msg = $ContinueButton1) AND ($grind_choice <> 0) Then
- ; check if buff is checked
- $BuffCheck = BitAnd(GUICtrlRead($BuffBox),$GUI_CHECKED)
- If $BuffCheck = 1 Then
- ; check to make sure spell # is between 1 - 21
- $BuffSpellNumber = GUICtrlRead($BuffSpell1)
- $guiExit = 1
- ; check if attack is checked
- $AttackCheck = BitAnd(GUICtrlRead($AttackBox),$GUI_CHECKED)
- If $AttackCheck = 1 Then
- ; check to make sure spell # is between 1 - 21
- $AttackSpellNumber = GUICtrlRead($AttackSpell1)
- If ($AttackSpellNumber > 0) AND ($AttackSpellNumber < 22) Then
- $guiExit = 1
- Else
- ; need to display some sort of error - NOT DONE YET
- $BuffDisplayError = 1
- EndIf
- Else
- $guiExit = 1
- EndIf
- ; check if heal is checked
- $HealCheck = BitAnd(GUICtrlRead($HealBox),$GUI_CHECKED)
- If $HealCheck = 1 Then
- ; check to make sure spell # is between 1 - 21
- $HealSpellNumber = GUICtrlRead($HealSpell1)
- If ($HealSpellNumber > 0) AND ($HealSpellNumber < 22) Then
- $guiExit = 1
- Else
- ; need to display some sort of error - NOT DONE YET
- $BuffDisplayError = 1
- EndIf
- ; check that HP level is between 1 - 100
- $HealHPCast = GUICtrlRead($HealHPCast1)
- If ($HealHPCast > 0) AND ($HealHPCast < 100) Then
- $guiExit = 1
- Else
- ; need to display some sort of error - NOT DONE YET
- $BuffDisplayError = 1
- EndIf
- ; check that SP level is between 1 - 100
- $HealSPCast = GUICtrlRead($HealSPCast1)
- If ($HealSPCast > 0) AND ($HealSPCast < 100) Then
- $guiExit = 1
- Else
- ; need to display some sort of error - NOT DONE YET
- $BuffDisplayError = 1
- EndIf
- Else
- $guiExit = 1
- EndIf
- EndIf
- Sleep(50)
- EndIf
- WEnd
- GUISetState(@SW_HIDE)
- ; 0 if not checked, 1 if checked
- $BuffCheck = BitAnd(GUICtrlRead($BuffBox),$GUI_CHECKED)
- $AttackCheck = BitAnd(GUICtrlRead($AttackBox),$GUI_CHECKED)
- $HealCheck = BitAnd(GUICtrlRead($HealBox),$GUI_CHECKED)
- $TurboCheck = BitAnd(GUICtrlRead($TurboBox),$GUI_CHECKED)
- $BuffMaxCast = GUICtrlRead($BuffCast1)
- $AttackMaxCast = GUICtrlRead($AttackCast1)
- $HealHPCast = GUICtrlRead($HealHPCast1)
- $HealSPCast = GUICtrlRead($HealSPCast1)
- $HealHPCoord = int ((($topLeft[0] + (139 * ($HealHPCast * .01))) + 88))
- $HealSPCoord = int ((($topLeft[0] + (139 * ($HealSPCast * .01))) + 245))
- ;IE7/8
- WinActivate("[CLASS:IEFrame]", "")
- ;Firefox3
- WinActivate("CLASS:MozillaUIWindowClass]", "")
- ;Firefox4
- WinActivate("[CLASS:MozillaWindowClass]", "")
- ;Opera
- WinActivate("[CLASS:aPluginWinClass]", "")
- ;Opera
- WinActivate("[CLASS:OperaWindowClass]", "")
- ;Chrome
- WinActivate("[CLASS:Chrome_WidgetWin_0]", "")
- $entireTime = TimerInit()
- While $repeatagain < 6000
- $startTime = TimerInit()
- $TotalXP=0
- ; for casting spells only a certain number of times
- $BuffRemain = $BuffMaxCast
- $AttackRemain = $AttackMaxCast
- If $grind_choice=1 Then
- NewbGrind()
- EndIf
- If $grind_choice=2 Then
- GrindDD_86()
- EndIf
- If $grind_choice=3 Then
- GrindDD_F1()
- EndIf
- If $grind_choice=4 Then
- GrindDD_A5()
- EndIf
- If $grind_choice=5 Then
- GrindUW_D2()
- EndIf
- If $grind_choice=6 Then
- GrindUW_F4()
- EndIf
- If $grind_choice=7 Then
- GrindDD_E3()
- EndIf
- If $grind_choice=8 Then
- Generic()
- EndIf
- If $grind_choice=9 Then
- GrindUW_C2()
- EndIf
- If $grind_choice=10 Then
- Generic()
- EndIf
- If $grind_choice=11 Then
- $ArenaNumber = 1
- ArenaGrind2()
- EndIf
- If $grind_choice=12 Then
- $ArenaNumber = 2
- ArenaGrind2()
- EndIf
- If $grind_choice=13 Then
- $ArenaNumber = 3
- ArenaGrind2()
- EndIf
- If $grind_choice=14 Then
- $ArenaNumber = 4
- ArenaGrind2()
- EndIf
- If $grind_choice=15 Then
- $ArenaNumber = 5
- ArenaGrind2()
- EndIf
- If $grind_choice=16 Then
- $ArenaNumber = 6
- ArenaCWA()
- EndIf
- If $grind_choice=17 Then
- $ArenaNumber = 7
- ArenaUWA()
- EndIf
- If $grind_choice=18 Then
- GrindDD_D3()
- EndIf
- If $grind_choice=19 Then
- $ArenaNumber = 8
- ArenaGrind2()
- EndIf
- $EntireXP = $EntireXP + $TotalXP
- $timeElapsed = TimerDiff($startTime)
- $entireTimeElapsed = TimerDiff($entireTime)
- $TotalRunCount = $TotalRunCount + 1
- ;ConsoleWrite("Total Runs=" & $TotalRunCount & @CRLF & "Run Time=" & int($timeElapsed/1000) & " seconds" & @CRLF & "Run XP/Min=" & int($TotalXP / ($timeElapsed / 60000)) & @CRLF & "Total Run Time=" & int($entireTimeElapsed / 1000) & @CRLF & "Total XP/Min=" & int($EntireXP / ($entireTimeElapsed / 60000)) & @CRLF)
- ;ConsoleWrite("TotalXP=" & $TotalXP & @CRLF)
- ;ConsoleWrite("EntireXP=" & $EntireXP & @CRLF & @CRLF)
- MsgBox(160, "Total Runs " & $TotalRunCount, "Total Runs=" & $TotalRunCount & @CRLF & "Run Time=" & int($timeElapsed/1000) & " seconds" & @CRLF & "Run XP/Min=" & int($TotalXP / ($timeElapsed / 60000)) & @CRLF & @CRLF & "Total Run Time=" & int($entireTimeElapsed/1000) & @CRLF & "Total XP/Min=" & int($EntireXP / ($entireTimeElapsed / 60000)) & @CRLF & @CRLF & "TotalXP=" & $TotalXP & @CRLF & "EntireXP=" & $EntireXP & @CRLF, 1)
- $repeatagain = $repeatagain + 1
- WEnd
- Func AttackGrid()
- ; top left
- Attack(449, 190)
- ; middle left
- Attack (500, 290)
- ; bottom left
- Attack (548, 390)
- ; bottom right
- Attack (703, 385)
- ; middle right
- Attack (667, 300)
- ; top right
- Attack (616, 205)
- ;additional
- ;Attack (667, 330)
- ;additioanl;Attack (616, 225)
- EndFunc
- Func Attack($x, $y)
- MouseMove(($topLeft[0]+$x), ($topLeft[1]+$y), 0)
- MouseClick("left")
- EndFunc
- Func findAttack2()
- $coord2 = PixelSearch($topLeft[0]+333, $topLeft[1]+200, $topLeft[0]+338, $topLeft[1]+343, $AttackColor1, 10)
- If @error=1 Then
- $coord[0]=1
- $coord[1]=1
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- Return ($coord)
- EndIf
- ; search again in case it found pixels in mid-search
- Sleep(300)
- $coord2 = PixelSearch($topLeft[0]+333, $topLeft[1]+200, $topLeft[0]+338, $topLeft[1]+343, $AttackColor1, 10)
- If @error=1 Then
- $coord[0]=1
- $coord[1]=1
- Return ($coord)
- EndIf
- $coord[0] = $topLeft[0] + 345
- $coord[1] = $coord2[1] + 30
- Return($coord)
- EndFunc
- Func Terminate()
- Exit
- EndFunc
- Func DungeonPad($x, $y)
- ; checks for changes in bottom right corner
- MouseMove($x, $y ,1)
- Sleep(100)
- $DungeonCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+474),($topLeft[0]+725),($topLeft[1]+493))
- MouseClick("left")
- Sleep(100)
- While CharClickCheck() = 1
- MouseMove($x, $y, 3)
- Sleep(100)
- MouseClick("left")
- Sleep(100)
- WEnd
- While $DungeonCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+474),($topLeft[0]+725),($topLeft[1]+493))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- EndFunc
- Func DungeonPad2($x, $y)
- ; checks for changes in top right corner
- MouseMove($x, $y ,2)
- Sleep(100)
- $DungeonCheckSum = PixelChecksum(($topLeft[0]+384),($topLeft[1]+216),($topLeft[0]+673),($topLeft[1]+63),($topLeft[0]+709),($topLeft[1]+83))
- MouseClick("left")
- Sleep(100)
- While CharClickCheck() = 1
- MouseMove($x, $y, 3)
- Sleep(100)
- MouseClick("left")
- Sleep(100)
- WEnd
- While $DungeonCheckSum = PixelChecksum(($topLeft[0]+384),($topLeft[1]+216), ($topLeft[0]+673),($topLeft[1]+63), ($topLeft[0]+709),($topLeft[1]+83))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- EndFunc
- Func WaitForPads()
- $padwait=1
- While $padwait < 2
- ; death check
- If (DeathCheck() = 1) Then
- $continue = 2
- $padwait=$padwait+1
- MsgBox(8192, "You died! (Padcheck)", "You died!", 1)
- EndIf
- ; 117 avoids the non play area, 177 avoids entrance in arenas
- ; these should probably be 117?
- ; UW needs to be 117 for DD_E3
- $waitCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-177,$ExitColor1, 5)
- If @error <> 1 Then
- $padwait=$padwait+1
- EndIf
- $waitCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-177,$PadColor1, 5)
- If @error <> 1 Then
- $padwait=$padwait+1
- EndIf
- $waitCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-117,$UWExitColor1, 5)
- If @error <> 1 Then
- $padwait=$padwait+1
- EndIf
- If $TurboCheck = 0 Then
- Sleep(500)
- Else
- Sleep(50)
- EndIf
- WEnd
- EndFunc
- Func GrindTsulas2()
- $TsulasHP = 1
- While $TsulasHP = 1
- ; enter Tsulas
- DungeonPad(($topLeft[0]+369),($topLeft[1]+283))
- WaitForPads()
- ; enter first battle - bottom - 4 creatures
- Battle(($topLeft[0]+278),($topLeft[1]+410))
- WaitForPads()
- $TotalXP=$TotalXP+950
- ;$BlankPixel = PixelGetColor(($topLeft[0]+176), ($topLeft[1]+455))
- If ($BlankPixel = $BlankColor1) Then
- $TsulasHP = 2
- Else
- ; click to exit Tsulas
- ;DungeonPad(676, 316)
- DungeonPad(($topLeft[0]+565),($topLeft[1]+169))
- ; move away from Tsulas
- CharMove(($topLeft[0]+444),($topLeft[1]+406))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- EndIf
- WEnd
- ; enter second battle - 4 creatures
- Battle(($topLeft[0]+228),($topLeft[1]+217))
- WaitForPads()
- ; click to exit Tsulas
- DungeonPad(($topLeft[0]+565),($topLeft[1]+169))
- ; move away from Tsulas
- CharMove(($topLeft[0]+444),($topLeft[1]+406))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+550
- EndFunc
- Func GrindDD_86()
- ; enter Bleakwoods A3
- DungeonPad(($topLeft[0]+228),($topLeft[1]+286))
- WaitForPads()
- ; enter first battle - right
- Battle(($topLeft[0]+228),($topLeft[1]+240))
- WaitForPads()
- ; enter second battle - left
- Battle(($topLeft[0]+419),($topLeft[1]+165))
- WaitForPads()
- Battle(($topLeft[0]+563),($topLeft[1]+263))
- WaitForPads()
- ; click to exit Bleakwoods A3
- DungeonPad(($topLeft[0]+204),($topLeft[1]+396))
- WaitForPads()
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- EndFunc
- Func GrindUW_C2()
- ; enter Underworld C2
- DungeonPad(($topLeft[0]+537), ($topLeft[1]+156))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+130), ($topLeft[1]+336))
- WaitForPads()
- ; enter third battle
- Battle(($topLeft[0]+488), ($topLeft[1]+155))
- WaitForPads()
- ; enter second battle
- Battle(($topLeft[0]+201), ($topLeft[1]+179))
- WaitForPads()
- ; exit Underworld C2
- DungeonPad(($topLeft[0]+57), ($topLeft[1]+467))
- ; move away from Underworld C2
- CharMove(($topLeft[0]+395), ($topLeft[1]+177))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+2280
- EndFunc
- Func GrindUW_D2()
- ; enter Underworld D2
- DungeonPad(($topLeft[0]+369),($topLeft[1]+431))
- WaitForPads()
- ; enter third battle
- Battle2(($topLeft[0]+562),($topLeft[1]+263))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+395),($topLeft[1]+347))
- WaitForPads()
- ; enter second battle
- Battle(($topLeft[0]+203),($topLeft[1]+180))
- WaitForPads()
- ; exit Underworld D2
- DungeonPad(($topLeft[0]+57),($topLeft[1]+467))
- ; move away from Underworld D2
- CharMove(($topLeft[0]+269),($topLeft[1]+366))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+3610
- EndFunc
- Func GrindUW_F4()
- ; enter Underworld F4
- DungeonPad(($topLeft[0]+657), ($topLeft[1]+335))
- WaitForPads()
- ; enter first battle
- Battle2(($topLeft[0]+394), ($topLeft[1]+203))
- WaitForPads()
- ; enter second battle
- Battle(($topLeft[0]+514), ($topLeft[1]+287))
- WaitForPads()
- ; enter third battle
- Battle(($topLeft[0]+466), ($topLeft[1]+311))
- WaitForPads()
- ; exit Underworld F4
- DungeonPad(($topLeft[0]+177), ($topLeft[1]+382))
- ; move away from Underworld F4
- CharMove(($topLeft[0]+573), ($topLeft[1]+375))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+4787
- EndFunc
- Func Generic()
- ; enter dungeon
- ; Find pad
- $GenericContinue = 1
- $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
- If @error=1 Then
- MouseMove(($topLeft[0]+433), ($topLeft[1]+390), 1)
- If $TurboCheck = 0 Then
- Sleep(100)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
- EndIf
- $GenericEntrance[0] = $genericCoord[0]
- $GenericEntrance[1] = $genericCoord[1]
- DungeonPad($genericCoord[0]+3, $genericCoord[1]+13)
- WaitForPads()
- ; Find Battle
- While $GenericContinue = 1
- sleep(500)
- $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
- $CheckPixel = PixelSearch($genericCoord[0], $genericCoord[1]+39, $genericCoord[0],$genericCoord[1]+38,0xFFFFFF, 5)
- If @error = 0 Then
- Battle($genericCoord[0]+3, $genericCoord[1]+13)
- WaitForPads()
- Else
- $newGenCoord[0]=$genericCoord[0]
- $newGenCoord[1]=$genericCoord[1]
- $genericCoord = PixelSearch($topLeft[0],$newGenCoord[1]+40,$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
- If @error=1 Then
- $GenericContinue = 2
- Else
- Battle($genericCoord[0]+3, $genericCoord[1]+13)
- WaitForPads()
- EndIf
- EndIf
- WEnd
- ; exit dungeon
- $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
- DungeonPad($genericCoord[0]+3, $genericCoord[1]+13)
- WaitForPads()
- ; move away from dungeon
- CharMove(($GenericEntrance[0]+50), ($GenericEntrance[1]))
- CharMove(($GenericEntrance[0]), ($GenericEntrance[1]-50))
- CharMove(($GenericEntrance[0]-50), ($GenericEntrance[1]))
- CharMove(($GenericEntrance[0]-50), ($GenericEntrance[1]+50))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+1
- EndFunc
- Func ArenaCWA()
- ; start script in arena in first room with battles (not in lobby)
- ; if you die, you will return to the arena and start over
- ; if you make it through, you need to stop the script!
- ; this one is different so you do NOT need to be able to
- ; survive through the first room!
- ;
- ; ability to repeat this arena not working yet
- $continue = 1
- ; Find Battle
- While $continue = 1
- ; **** This section may need some work
- CharMove(($topLeft[0]+374), ($topLeft[1]+256))
- CharMove(($topLeft[0]+389), ($topLeft[1]+313))
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
- If @error=1 Then
- $exitCoord[0] = $topLeft[0]
- $exitCoord[1] = $topLeft[1]
- Else
- $exitCoord[0]=$arenaCoord[0]
- $exitCoord[1]=$arenaCoord[1]
- EndIf
- $battleCheck = 1
- While $battleCheck = 1
- ; next search for battle pads
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- WaitForPads()
- $TotalXP=$TotalXP+$CWAXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- If (DeathCheck() = 1) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- If (DeathCheck() = 1) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$CWAXP[$NumberOfBattles]
- ReturnToArena()
- EndFunc
- Func ArenaUWA()
- ; start script in arena in first room with battles (not in lobby)
- ; if you die, you will return to the arena and start over
- ; if you make it through, you need to stop the script!
- ; this one is different so you do NOT need to be able to
- ; survive through the first room!
- ;
- ; first room
- ; ability to repeat this arena not working yet
- $continue = 1
- ; Find Battle
- While $continue = 1
- ; **** This section may need some work
- CharMove(($topLeft[0]+374), ($topLeft[1]+256))
- CharMove(($topLeft[0]+389), ($topLeft[1]+313))
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
- If @error=1 Then
- $exitCoord[0] = $topLeft[0]
- $exitCoord[1] = $topLeft[1]
- Else
- $exitCoord[0]=$arenaCoord[0]
- $exitCoord[1]=$arenaCoord[1]
- EndIf
- $battleCheck = 1
- While $battleCheck = 1
- ; next search for battle pads
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- WaitForPads()
- $TotalXP=$TotalXP+$UWAXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- If (DeathCheck() = 1) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- If (DeathCheck() = 1) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$UWAXP[$NumberOfBattles]
- ReturnToArena()
- EndFunc
- Func NewbGrind()
- ; start script in Shikaakwa
- ;
- DungeonPad2(($topLeft[0]+706),($topLeft[1]+432))
- ;go to A3
- DungeonPad2(($topLeft[0]+154),($topLeft[1]+106))
- ;go to A2
- DungeonPad2(($topLeft[0]+226),($topLeft[1]+95))
- ; grind A2 until HP is 100% when done
- $NewbHP=2
- While $NewbHP > 1
- $NewbHP = 1
- ; enter Bellroot A2
- DungeonPad(($topLeft[0]+201),($topLeft[1]+372))
- WaitForPads()
- ; enter first battle - left
- Battle(($topLeft[0]+178),($topLeft[1]+336))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 2nd battle - middle
- Battle(($topLeft[0]+297),($topLeft[1]+227))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 3rd battle - right
- Battle(($topLeft[0]+513),($topLeft[1]+287))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; click to exit A2
- DungeonPad(($topLeft[0]+609),($topLeft[1]+408))
- ; move away from A2
- CharMove(($topLeft[0]+431),($topLeft[1]+361))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- ; go to A1
- DungeonPad2(($topLeft[0]+417),($topLeft[1]+95))
- ; grind A1 until HP is 100% when done
- $NewbHP=2
- While $NewbHP > 1
- $NewbHP = 1
- ; enter Bellroot A1
- DungeonPad(($topLeft[0]+585),($topLeft[1]+181))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+250),($topLeft[1]+276))
- WaitForPads()
- If ($BlankPixel2 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 2nd battle
- Battle(($topLeft[0]+465),($topLeft[1]+264))
- WaitForPads()
- If ($BlankPixel2 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 3rd battle
- Battle(($topLeft[0]+442),($topLeft[1]+348))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; click to exit A1
- DungeonPad(($topLeft[0]+177),($topLeft[1]+408))
- ; move away from A1
- CharMove(($topLeft[0]+684),($topLeft[1]+172))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- ; go to B2
- DungeonPad2(($topLeft[0]+585),($topLeft[1]+467))
- DungeonPad2(($topLeft[0]+704),($topLeft[1]+383))
- ; grind B2 until HP is 100% when done
- $NewbHP = 2
- While $NewbHP > 1
- $NewbHP = 1
- ; grind 2nd battle until HP is low
- $RepeatB2 = 1
- While $RepeatB2 = 1
- ; enter Bellroot B2
- DungeonPad(($topLeft[0]+418),($topLeft[1]+358))
- WaitForPads()
- ; enter 2nd battle
- Battle(($topLeft[0]+466),($topLeft[1]+264))
- WaitForPads()
- If ($BlankPixel3 <> $BlankColor1) Then
- $RepeatB2 = 2
- Else
- If ($BlankPixel = $BlankColor1) Then
- $RepeatB2 = 2
- Else
- ; click to exit B2
- DungeonPad(($topLeft[0]+177),($topLeft[1]+407))
- ; move away from B2
- CharMove(($topLeft[0]+525),($topLeft[1]+322))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- EndIf
- EndIf
- WEnd
- ; enter first battle
- Battle(($topLeft[0]+226),($topLeft[1]+312))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 3rd battle
- Battle(($topLeft[0]+442),($topLeft[1]+347))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; click to exit B2
- DungeonPad(($topLeft[0]+177),($topLeft[1]+407))
- ; move away from B2
- CharMove(($topLeft[0]+525),($topLeft[1]+322))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- ;return to Shik
- DungeonPad(($topLeft[0]+33),($topLeft[1]+262))
- DungeonPad(($topLeft[0]+346),($topLeft[1]+467))
- DungeonPad(($topLeft[0]+346),($topLeft[1]+467))
- DungeonPad(($topLeft[0]+32),($topLeft[1]+455))
- ; go to Summerville
- DungeonPad(($topLeft[0]+226),($topLeft[1]+142))
- DungeonPad(($topLeft[0]+249),($topLeft[1]+466))
- DungeonPad(($topLeft[0]+34),($topLeft[1]+334))
- ; grind D1 until HP is 100% when done
- $NewbHP=2
- While $NewbHP > 1
- $NewbHP = 1
- ; enter Summerville D1
- DungeonPad(($topLeft[0]+514),($topLeft[1]+240))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+297),($topLeft[1]+251))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 2nd battle
- Battle(($topLeft[0]+514),($topLeft[1]+216))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 3rd battle
- Battle(($topLeft[0]+442),($topLeft[1]+324))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; click to exit D1
- DungeonPad(($topLeft[0]+225),($topLeft[1]+382))
- ; move away from D1
- CharMove(($topLeft[0]+447),($topLeft[1]+324))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- ; go to C4
- DungeonPad(($topLeft[0]+394),($topLeft[1]+466))
- DungeonPad(($topLeft[0]+538),($topLeft[1]+467))
- DungeonPad(($topLeft[0]+346),($topLeft[1]+468))
- DungeonPad(($topLeft[0]+33),($topLeft[1]+334))
- ; grind C4 until HP is 100% when done
- $NewbHP=2
- While $NewbHP > 1
- $NewbHP = 1
- ; enter Summerville C4
- DungeonPad(($topLeft[0]+298),($topLeft[1]+323))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+274),($topLeft[1]+264))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 2nd battle
- Battle(($topLeft[0]+441),($topLeft[1]+204))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; click to exit C4
- DungeonPad(($topLeft[0]+177),($topLeft[1]+407))
- ; move away from C4
- CharMove(($topLeft[0]+173),($topLeft[1]+296))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- ; go to West Hills E1
- DungeonPad2(($topLeft[0]+273),($topLeft[1]+97))
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+240))
- DungeonPad2(($topLeft[0]+321),($topLeft[1]+95))
- DungeonPad2(($topLeft[0]+369),($topLeft[1]+95))
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+215))
- DungeonPad2(($topLeft[0]+321),($topLeft[1]+95))
- DungeonPad2(($topLeft[0]+370),($topLeft[1]+95))
- DungeonPad2(($topLeft[0]+57),($topLeft[1]+106))
- DungeonPad2(($topLeft[0]+33),($topLeft[1]+234))
- DungeonPad(($topLeft[0]+129),($topLeft[1]+89))
- DungeonPad2(($topLeft[0]+369),($topLeft[1]+90))
- DungeonPad2(($topLeft[0]+465),($topLeft[1]+89))
- DungeonPad2(($topLeft[0]+369),($topLeft[1]+90))
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+379))
- ; grind E1 until HP is 100% when done
- $NewbHP=2
- While $NewbHP > 1
- $NewbHP = 1
- ; enter West Hills E1
- DungeonPad(($topLeft[0]+416),($topLeft[1]+312))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+250),($topLeft[1]+203))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 2nd battle
- Battle(($topLeft[0]+608),($topLeft[1]+263))
- WaitForPads()
- If ($BlankPixel3 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; click to exit E1
- DungeonPad(($topLeft[0]+201),($topLeft[1]+396))
- ; move away from E1
- CharMove(($topLeft[0]+305),($topLeft[1]+310))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- ; go to bleakwoods H3
- DungeonPad2(($topLeft[0]+34),($topLeft[1]+330))
- DungeonPad2(($topLeft[0]+585),($topLeft[1]+463))
- DungeonPad2(($topLeft[0]+153),($topLeft[1]+462))
- DungeonPad2(($topLeft[0]+393),($topLeft[1]+463))
- DungeonPad2(($topLeft[0]+81),($topLeft[1]+450))
- DungeonPad(($topLeft[0]+706),($topLeft[1]+209))
- DungeonPad2(($topLeft[0]+704),($topLeft[1]+330))
- DungeonPad(($topLeft[0]+705),($topLeft[1]+312))
- DungeonPad(($topLeft[0]+345),($topLeft[1]+106))
- DungeonPad(($topLeft[0]+514),($topLeft[1]+94))
- DungeonPad(($topLeft[0]+416),($topLeft[1]+95))
- DungeonPad(($topLeft[0]+416),($topLeft[1]+95))
- DungeonPad(($topLeft[0]+416),($topLeft[1]+95))
- DungeonPad(($topLeft[0]+416),($topLeft[1]+95))
- DungeonPad(($topLeft[0]+657),($topLeft[1]+94))
- DungeonPad(($topLeft[0]+33),($topLeft[1]+383))
- DungeonPad(($topLeft[0]+369),($topLeft[1]+96))
- ; grind H3 until HP is 80% when done
- $NewbHP=2
- While $NewbHP > 1
- $NewbHP = 1
- ; enter Bleakwoods H3
- DungeonPad(($topLeft[0]+177),($topLeft[1]+359))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+225),($topLeft[1]+286))
- WaitForPads()
- If ($BlankPixel2 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 2nd battle
- Battle(($topLeft[0]+441),($topLeft[1]+203))
- WaitForPads()
- If ($BlankPixel2 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; enter 3rd battle
- Battle(($topLeft[0]+394),($topLeft[1]+395))
- WaitForPads()
- If ($BlankPixel2 = $BlankColor1) Then
- $NewbHP = $NewbHP + 1
- EndIf
- ; click to exit H3
- DungeonPad(($topLeft[0]+176),($topLeft[1]+407))
- ; move away from H3
- CharMove(($topLeft[0]+269),($topLeft[1]+423))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- WEnd
- ; go to Tsulas
- DungeonPad(($topLeft[0]+346),($topLeft[1]+467))
- DungeonPad(($topLeft[0]+33),($topLeft[1]+384))
- DungeonPad(($topLeft[0]+32),($topLeft[1]+382))
- DungeonPad(($topLeft[0]+33),($topLeft[1]+407))
- DungeonPad(($topLeft[0]+154),($topLeft[1]+275))
- ; this should start Tsulas grind
- $grind_choice=2
- EndFunc
- Func GrindDD_E3()
- ; enter Underworld A4
- DungeonPad(($topLeft[0]+442), ($topLeft[1]+420))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+129), ($topLeft[1]+336))
- WaitForPads()
- ; enter second battle
- Battle(($topLeft[0]+393), ($topLeft[1]+348))
- WaitForPads()
- ; enter third battle
- Battle(($topLeft[0]+201), ($topLeft[1]+178))
- WaitForPads()
- ; enter fourth battle
- Battle(($topLeft[0]+561), ($topLeft[1]+264))
- WaitForPads()
- ; enter fifth battle
- Battle(($topLeft[0]+489), ($topLeft[1]+156))
- WaitForPads()
- ; exit Underworld A4
- DungeonPad(($topLeft[0]+57), ($topLeft[1]+468))
- ; move away from Underworld A4
- CharMove (($topLeft[0]+413), ($topLeft[1]+347))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+10470
- EndFunc
- Func GrindDD_A5()
- ; enter Underworld C2
- DungeonPad(($topLeft[0]+371), ($topLeft[1]+261))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+299), ($topLeft[1]+177))
- WaitForPads()
- ; enter second battle
- Battle2(($topLeft[0]+419), ($topLeft[1]+165))
- WaitForPads()
- ; enter third battle
- Battle(($topLeft[0]+538), ($topLeft[1]+153))
- Sleep(1000)
- ; exit Underworld C2
- DungeonPad(($topLeft[0]+203), ($topLeft[1]+441))
- WaitForPads()
- ; move away from Underworld C2
- CharMove(($topLeft[0]+423), ($topLeft[1]+338))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+2280
- EndFunc
- Func GrindDD_D3()
- ; enter Dunes D3
- DungeonPad(($topLeft[0]+299), ($topLeft[1]+372))
- WaitForPads()
- ; enter first battle
- Battle(($topLeft[0]+250), ($topLeft[1]+251))
- WaitForPads()
- ; enter second battle
- Battle(($topLeft[0]+418), ($topLeft[1]+167))
- WaitForPads()
- ; enter third battle
- Battle(($topLeft[0]+562), ($topLeft[1]+264))
- WaitForPads()
- ; exit Dunes D3
- DungeonPad(($topLeft[0]+202), ($topLeft[1]+395))
- ; move away from Dunes D3
- CharMove(($topLeft[0]+238), ($topLeft[1]+431))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+9370
- EndFunc
- Func DeathCheck()
- $DeathYes=0
- $DeathNo=0
- ;$chimneycheck = 0xE2D6C3
- $chimneycheck = PixelGetColor($topLeft[0]+267, $topLeft[1]+311)
- If $chimneycheck < 0xB00000 Then
- Return(0)
- EndIf
- For $DeathX = 267 to 277
- For $DeathY = 311 to 321
- $chimneycheck2 = PixelGetColor($topLeft[0]+$DeathX, $topLeft[1]+$DeathY)
- If $chimneycheck2 = $chimneycheck Then
- $DeathYes=$DeathYes+1
- Else
- $DeathNo=$DeathNo+1
- ; not chimney - not dead - return 0
- If $DeathNo > 10 Then
- Return(0)
- EndIf
- EndIf
- Next
- Next
- ; thats the chimney - they dead
- Return(1)
- EndFunc
- Func ArenaGrind2()
- ; start script in arena in first room with battles (not in lobby)
- ; if you die, you will return to the arena and start over
- $NumberOfBattles=0
- $ArenaContinue = 1
- $RoomsCleared = 0
- $ArenaRoomCount = 1
- $continue = 1
- ; Find Battle
- While $continue = 1
- ; need to move away from pad first - maybe not necessary?
- ; 09/01 - I decided this is necessary again
- ; 11/06 - good delay while we wait for pads
- MouseMove(($topLeft[0]+374), ($topLeft[1]+256), 1)
- MouseClick("left")
- sleep(500)
- ; click on character check
- While CharClickCheck() = 1
- MouseMove(($topLeft[0]+374), ($topLeft[1]+256), 1)
- Sleep(100)
- MouseClick("left")
- Sleep(100)
- WEnd
- ; find white pad
- WaitForPads()
- $battleCheck = 1
- While $battleCheck = 1
- ; next search for battle pads
- WaitForPads()
- ; need this code so it doesn't think 7-7 exit is a battle
- If $NumberOfBattles < $ArenaNumberOfBattles[$ArenaNumber] Then
- ; -177 avoids the non play area and the entrance at the start of an arena
- $ArenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-177,$PadColor2, 5)
- If @error=1 Then
- ; for battle pad server delay - lets check twice
- Sleep(500)
- EndIf
- $ArenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-177,$PadColor2, 5)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($ArenaCoord[0]+3, $ArenaCoord[1]+13)
- WaitForPads()
- $TotalXP=$TotalXP+$ArenaXP[$ArenaNumber][$NumberOfBattles]
- EndIf
- Else
- $battleCheck = 2
- EndIf
- Wend
- WaitForPads()
- ; keep count of rooms cleared - when arena is done - exit and repeat
- $RoomsCleared = $RoomsCleared + 1
- If $RoomsCleared = 49 Then
- ; find exit
- DungeonPad(($ArenaExit[$ArenaRoomCount])+$topLeft[0],($ArenaExit[$ArenaRoomCount+1])+$topLeft[1])
- CharMove(($topLeft[0]+320), ($topLeft[1]+239))
- If $TurboCheck = 0 Then
- Sleep(2000)
- Else
- Sleep(20)
- EndIf
- DungeonPad(($topLeft[0]+82),($topLeft[1]+97))
- Return
- EndIf
- ; death check
- If (DeathCheck() = 1) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- ; find exit
- DungeonPad(($ArenaExit[$ArenaRoomCount])+$topLeft[0],($ArenaExit[$ArenaRoomCount+1])+$topLeft[1])
- $ArenaRoomCount = $ArenaRoomCount + 2
- If $ArenaRoomCount = 15 Then
- $ArenaRoomCount = 1
- EndIf
- EndIf
- ; might need to check more than once
- If (DeathCheck() = 1) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$ArenaXP[$ArenaNumber][$NumberOfBattles]
- ReturnToArena()
- EndFunc
- Func ReturnToArena()
- If $ArenaNumber = 1 Then
- ; starting from Shikaakwa - return to FF
- DungeonPad(($topLeft[0]+224),($topLeft[1]+141))
- DungeonPad(($topLeft[0]+370),($topLeft[1]+91))
- DungeonPad(($topLeft[0]+57),($topLeft[1]+105))
- DungeonPad(($topLeft[0]+369),($topLeft[1]+87))
- DungeonPad(($topLeft[0]+202),($topLeft[1]+266))
- DungeonPad(($topLeft[0]+81),($topLeft[1]+93))
- EndIf
- If $ArenaNumber = 2 Then
- ; starting from Shikaakwa - return to SVA
- DungeonPad(($topLeft[0]+224),($topLeft[1]+141))
- DungeonPad(($topLeft[0]+251),($topLeft[1]+465))
- DungeonPad(($topLeft[0]+705),($topLeft[1]+237))
- DungeonPad(($topLeft[0]+706),($topLeft[1]+140))
- DungeonPad(($topLeft[0]+322),($topLeft[1]+380))
- DungeonPad(($topLeft[0]+81),($topLeft[1]+94))
- EndIf
- If $ArenaNumber = 3 Then
- ; starting from Shikaakwa - return to BWA
- DungeonPad(($topLeft[0]+321),($topLeft[1]+92))
- DungeonPad(($topLeft[0]+346),($topLeft[1]+103))
- DungeonPad(($topLeft[0]+513),($topLeft[1]+91))
- DungeonPad(($topLeft[0]+416),($topLeft[1]+91))
- DungeonPad(($topLeft[0]+417),($topLeft[1]+92))
- DungeonPad(($topLeft[0]+416),($topLeft[1]+91))
- DungeonPad(($topLeft[0]+416),($topLeft[1]+92))
- DungeonPad(($topLeft[0]+657),($topLeft[1]+92))
- DungeonPad(($topLeft[0]+321),($topLeft[1]+92))
- DungeonPad(($topLeft[0]+370),($topLeft[1]+92))
- DungeonPad(($topLeft[0]+273),($topLeft[1]+91))
- DungeonPad(($topLeft[0]+298),($topLeft[1]+320))
- DungeonPad(($topLeft[0]+81),($topLeft[1]+91))
- EndIf
- If $ArenaNumber = 4 Then
- ; starting from Shikaakwa - return to DFA
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+429))
- DungeonPad2(($topLeft[0]+586),($topLeft[1]+465))
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+453))
- DungeonPad(($topLeft[0]+705),($topLeft[1]+260))
- DungeonPad(($topLeft[0]+704),($topLeft[1]+140))
- DungeonPad(($topLeft[0]+497),($topLeft[1]+440))
- DungeonPad(($topLeft[0]+391),($topLeft[1]+461))
- DungeonPad(($topLeft[0]+392),($topLeft[1]+461))
- DungeonPad(($topLeft[0]+439),($topLeft[1]+461))
- DungeonPad(($topLeft[0]+199),($topLeft[1]+462))
- DungeonPad(($topLeft[0]+704),($topLeft[1]+306))
- DungeonPad(($topLeft[0]+703),($topLeft[1]+233))
- DungeonPad2(($topLeft[0]+704),($topLeft[1]+401))
- DungeonPad(($topLeft[0]+704),($topLeft[1]+232))
- DungeonPad2(($topLeft[0]+711),($topLeft[1]+401))
- DungeonPad(($topLeft[0]+344),($topLeft[1]+221))
- DungeonPad(($topLeft[0]+81),($topLeft[1]+94))
- EndIf
- If $ArenaNumber = 5 Then
- ; starting from Shikaakwa - return to BRA
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+429))
- DungeonPad2(($topLeft[0]+586),($topLeft[1]+465))
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+453))
- DungeonPad(($topLeft[0]+705),($topLeft[1]+260))
- DungeonPad(($topLeft[0]+704),($topLeft[1]+140))
- DungeonPad(($topLeft[0]+706),($topLeft[1]+284))
- DungeonPad(($topLeft[0]+154),($topLeft[1]+176))
- DungeonPad(($topLeft[0]+81),($topLeft[1]+93))
- EndIf
- If $ArenaNumber = 6 Then
- ; starting from Shikaakwa - return to CWA
- DungeonPad(($topLeft[0]+321),($topLeft[1]+94))
- DungeonPad(($topLeft[0]+347),($topLeft[1]+105))
- DungeonPad2(($topLeft[0]+31),($topLeft[1]+384))
- DungeonPad2(($topLeft[0]+32),($topLeft[1]+214))
- DungeonPad2(($topLeft[0]+33),($topLeft[1]+359))
- DungeonPad(($topLeft[0]+465),($topLeft[1]+96))
- DungeonPad(($topLeft[0]+201),($topLeft[1]+300))
- DungeonPad(($topLeft[0]+57),($topLeft[1]+251))
- EndIf
- If $ArenaNumber = 7 Then
- ; starting from Shikaakwa - return to UWA
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+430))
- DungeonPad2(($topLeft[0]+585),($topLeft[1]+467))
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+453))
- DungeonPad(($topLeft[0]+705),($topLeft[1]+263))
- DungeonPad(($topLeft[0]+704),($topLeft[1]+142))
- DungeonPad(($topLeft[0]+705),($topLeft[1]+287))
- DungeonPad(($topLeft[0]+705),($topLeft[1]+215))
- DungeonPad(($topLeft[0]+177),($topLeft[1]+95))
- DungeonPad(($topLeft[0]+705),($topLeft[1]+166))
- DungeonPad(($topLeft[0]+538),($topLeft[1]+82))
- DungeonPad(($topLeft[0]+33),($topLeft[1]+376))
- DungeonPad(($topLeft[0]+33),($topLeft[1]+351))
- DungeonPad2(($topLeft[0]+32),($topLeft[1]+400))
- DungeonPad(($topLeft[0]+33),($topLeft[1]+257))
- DungeonPad2(($topLeft[0]+489),($topLeft[1]+460))
- DungeonPad(($topLeft[0]+33),($topLeft[1]+280))
- DungeonPad(($topLeft[0]+273),($topLeft[1]+88))
- DungeonPad(($topLeft[0]+32),($topLeft[1]+311))
- EndIf
- If $ArenaNumber = 8 Then
- ; starting from Shikaakwa - return to PGA
- ; 137, 121
- ; dungeonpad - bottom right
- ; dungeonpad2 - top right
- ;DungeonPad2(458, 216)
- ;DungeonPad2(482, 228)
- ;DungeonPad2(841, 578)
- ;DungeonPad2(457, 216)
- ;DungeonPad2(842, 505)
- ;DungeonPad2(601, 217)
- ;DungeonPad2(338, 276)
- ;DungeonPad2(842, 407)
- ;DungeonPad2(842, 384)
- ;DungeonPad2(841, 504)
- ;DungeonPad2(506, 216)
- ;DungeonPad2(554, 217)
- ;DungeonPad2(697, 217)
- ;DungeonPad2(602, 216)
- ;DungeonPad2(506, 217)
- ;DungeonPad2(171, 385)
- ;DungeonPad2(482, 589)
- ;DungeonPad2(530, 324)
- EndIf
- EndFunc
- Func CharClickCheck()
- ; if character box is found, clicks on cancel, returns 1
- ; if no box found, returns 0
- $cccCount = 0
- For $cccx = 40 to 90
- For $cccy = 297 to 337
- $ClickCheck = PixelGetColor($topLeft[0]+$cccx, $topLeft[1]+$cccy)
- If $ClickCheck < 15728640 Then
- $cccCount = $cccCount + 1
- If $cccCount > 5 Then
- Return (0)
- ;$cccy = 454
- ;$cccx = 98
- EndIf
- EndIf
- Next
- Next
- ; Click to cancel window
- MouseMove ($topLeft[0]+318,$topLeft[1]+95,1)
- MouseClick("left")
- Return (1)
- EndFunc
- Func CharMove($x, $y)
- ; clicks on a non-pad area
- ; checks for character click check
- MouseMove($x, $y, 3)
- If $TurboCheck = 0 Then
- Sleep(100)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- While CharClickCheck() = 1
- MouseMove($x, $y, 3)
- Sleep(100)
- MouseClick("left")
- Sleep(100)
- WEnd
- EndFunc
- Func Sleep_()
- Sleep(5000)
- EndFunc
- Func ChatActivate()
- MouseMove(($topLeft[0]+415), ($topLeft[1]+588), 0)
- Sleep(100)
- MouseClick("Left")
- Sleep(100)
- EndFunc
- Func GrindDD_F1()
- ; enter Dunes F1
- DungeonPad(($topLeft[0]+370),($topLeft[1]+119))
- WaitForPads()
- ; enter first battle - right
- Battle(($topLeft[0]+466),($topLeft[1]+261))
- WaitForPads()
- ; enter second battle - left
- Battle(($topLeft[0]+323),($topLeft[1]+262))
- WaitForPads()
- ; enter last battle - up
- Battle(($topLeft[0]+419),($topLeft[1]+190))
- Sleep(500)
- ; click to exit Dunes F1
- DungeonPad(($topLeft[0]+202), ($topLeft[1]+444))
- WaitForPads()
- ; move away from Dunes F1
- CharMove(($topLeft[0]+302),($topLeft[1]+152))
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- $TotalXP=$TotalXP+1617
- EndFunc
- $AT = 17
- Func At3()
- MouseMove($battleCoord[0], $battleCoord[1], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on astral travel 3 / skill of choice
- Sleep(50)
- MouseMove($topLeft[0]+$BuffCoords[(($AT*2)-1)],$topLeft[1]+$BuffCoords[(($AT*2))], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on character
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseMove($topLeft[0]+213, $topLeft[1]+200, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on cancel (if not enough sp)
- MouseMove($topLeft[0]+368, $topLeft[1]+415, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- EndFunc
- Func Battle2($x, $y)
- ; first - make sure pad is there
- $padwait = 0
- While $padwait = 0
- $waitCoord = PixelSearch($x - 10,$y - 10,$x + 10,$y + 10,$PadColor1, 5)
- If @error <> 1 Then
- $padwait=1
- EndIf
- Sleep(100)
- WEnd
- ; get section to check for screen change
- $BattleCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+478),($topLeft[0]+725),($topLeft[1]+493))
- ; now enter battle
- MouseMove($x, $y, 1)
- ; this helps with lag stability - 11/06
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(100)
- Else
- Sleep(10)
- EndIf
- ; click on character check
- While CharClickCheck() = 1
- MouseMove($x, $y ,3)
- If $TurboCheck = 0 Then
- Sleep(100)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(100)
- EndIf
- WEnd
- ; if battle hasn't started after 3 seconds, maybe battle pad
- ; wasn't clicked - click it again
- $EnterBattleCheck = 0
- While $BattleCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+478),($topLeft[0]+725),($topLeft[1]+493))
- Sleep(100)
- $EnterBattleCheck = $EnterBattleCheck + 1
- If $EnterBattleCheck > 40 Then
- ; search for pad in vicinity of where you previously clicked
- $BattleCheckCoord = PixelSearch($x-50,$y-40,$x+5,$y+5,$PadColor2, 5)
- ;Battle($ArenaCoord[0]+3, $ArenaCoord[1]+13)
- MouseMove($BattleCheckCoord[0]+3, $BattleCheckCoord[1]+13, 3)
- Sleep(100)
- MouseClick("left")
- Sleep(500)
- EndIf
- WEnd
- ; this section checks to see if you immediately exit a battle
- ; for multiplayer - the battle is already over
- ; sleep is necessary so we skip screen change to blank
- Sleep(1000)
- If $BattleCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+478),($topLeft[0]+725),($topLeft[1]+493)) Then
- $NumberOfBattles=$NumberOfBattles+1
- Return
- EndIf
- ; kill all creatures
- ;$BattleCheckSum = PixelCheckSum(186,400,205,414)
- $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- ChatActivate()
- $AttackPanic1Time = TimerInit()
- ; $BattleIsDone - set to 1 if BattleCheckSum confirms battle is over
- $BattleIsDone = 0
- ;While $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- While $BattleIsDone = 0
- ; first check for healing
- ; check for health below HealHPCoord
- If ($HealCheck = 1) Then
- $HealCheckPixel = PixelGetColor(($HealHPCoord), ($topLeft[1]+458))
- $SpellCheckPixel = PixelGetColor(($HealSPCoord), ($topLeft[1]+458))
- If $HealCheckPixel = $BlankColor1 Then
- If $SpellCheckPixel <> $BlankColor1 Then
- ; do findattack2 until battlecoord > 1
- $battleCoord[0] = 1
- While $battleCoord[0] = 1
- $battleCoord = findAttack2()
- WEnd
- $battleCoord[1] = $battleCoord[1] + 22
- ; click on skill
- MouseMove($battleCoord[0], $battleCoord[1], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on heal skill of choice
- If $TurboCheck = 0 Then
- Sleep(500)
- Else
- Sleep(50)
- EndIf
- MouseMove($topLeft[0]+$BuffCoords[(($HealSpellNumber*2)-1)],$topLeft[1]+$BuffCoords[(($HealSpellNumber*2))], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on character
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseMove($topLeft[0]+213, $topLeft[1]+200, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; getting lag problems so lets click twice
- Sleep (100)
- MouseClick("left")
- ; click on cancel (if not enough sp)
- MouseMove($topLeft[0]+368, $topLeft[1]+415, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- ; end heal
- EndIf
- EndIf
- EndIf
- ; then do attack
- $battleCoord = findAttack2()
- If $battleCoord[0] > 1 Then
- MouseMove($battleCoord[0], $battleCoord[1], 0)
- Sleep(20)
- MouseClick("Left")
- AttackGrid()
- MouseMove($battleCoord[0], $battleCoord[1], 0)
- $AttackPanic1Time = TimerInit()
- EndIf
- $AttackPanic2Time = TimerDiff($AttackPanic1Time)
- If $AttackPanic2Time > 12000 Then
- ; first - click on cancel
- MouseMove($topLeft[0]+368, $topLeft[1]+415, 1)
- Sleep(200)
- MouseClick("left")
- ; then attack again
- AttackGrid()
- $AttackPanic1Time = TimerInit()
- EndIf
- ;$BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- If $BattleCheckSum <> PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267)) Then
- Sleep(500)
- If $BattleCheckSum <> PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267)) Then
- $BattleIsDone=1
- EndIf
- EndIf
- WEnd
- ; fight over - click box
- ; check HP first
- $BlankPixel = PixelGetColor(($topLeft[0]+182), ($topLeft[1]+458))
- $BlankPixel2 = PixelGetColor(($topLeft[0]+216), ($topLeft[1]+458))
- $BlankPixel3 = PixelGetColor(($topLeft[0]+226), ($topLeft[1]+458))
- MouseMove(($topLeft[0]+372),($topLeft[1]+364),1)
- ; a little pause to see your stats
- If $TurboCheck = 0 Then
- Sleep(2000)
- EndIf
- $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- MouseClick("left")
- ; another death check
- If (DeathCheck() = 1) Then
- $continue=2
- ;MsgBox(8192, "You died! (battle check)", "You died!", 1)
- Else
- While $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- Sleep(100)
- WEnd
- ; this helps with lag stability - 11/06
- If $TurboCheck = 0 Then
- Sleep(500)
- Else
- Sleep(50)
- EndIf
- EndIf
- $NumberOfBattles=$NumberOfBattles+1
- EndFunc
- Func Battle($x, $y)
- ; first - make sure pad is there
- $padwait = 0
- While $padwait = 0
- $waitCoord = PixelSearch($x - 10,$y - 10,$x + 10,$y + 10,$PadColor1, 5)
- If @error <> 1 Then
- $padwait=1
- EndIf
- Sleep(100)
- WEnd
- ; get section to check for screen change
- $BattleCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+478),($topLeft[0]+725),($topLeft[1]+493))
- ; now enter battle
- MouseMove($x, $y, 1)
- ; this helps with lag stability - 11/06
- If $TurboCheck = 0 Then
- Sleep(1000)
- Else
- Sleep(50)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(100)
- Else
- Sleep(10)
- EndIf
- ; click on character check
- While CharClickCheck() = 1
- MouseMove($x, $y ,3)
- If $TurboCheck = 0 Then
- Sleep(100)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(100)
- EndIf
- WEnd
- ; if battle hasn't started after 3 seconds, maybe battle pad
- ; wasn't clicked - click it again
- $EnterBattleCheck = 0
- While $BattleCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+478),($topLeft[0]+725),($topLeft[1]+493))
- Sleep(100)
- $EnterBattleCheck = $EnterBattleCheck + 1
- If $EnterBattleCheck > 40 Then
- ; search for pad in vicinity of where you previously clicked
- $BattleCheckCoord = PixelSearch($x-50,$y-40,$x+5,$y+5,$PadColor2, 5)
- ;Battle($ArenaCoord[0]+3, $ArenaCoord[1]+13)
- MouseMove($BattleCheckCoord[0]+3, $BattleCheckCoord[1]+13, 3)
- Sleep(100)
- MouseClick("left")
- Sleep(500)
- EndIf
- WEnd
- ; this section checks to see if you immediately exit a battle
- ; for multiplayer - the battle is already over
- ; sleep is necessary so we skip screen change to blank
- Sleep(1000)
- If $BattleCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+478),($topLeft[0]+725),($topLeft[1]+493)) Then
- $NumberOfBattles=$NumberOfBattles+1
- Return
- EndIf
- ; kill all creatures
- ;$BattleCheckSum = PixelCheckSum(186,400,205,414)
- $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- ChatActivate()
- ; buff spells
- $BuffRemain = $BuffRemain - 1
- If ($BuffCheck = 1) AND ($BuffRemain >= 0) Then
- ; do findattack2 until battlecoord > 1
- $battleCoord[0] = 1
- While $battleCoord[0] = 1
- $battleCoord = findAttack2()
- WEnd
- $battleCoord[1] = $battleCoord[1] + 22
- ; click on skill
- MouseMove($battleCoord[0], $battleCoord[1], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on astral travel 3 / skill of choice
- If $TurboCheck = 0 Then
- Sleep(500)
- Else
- Sleep(50)
- EndIf
- MouseMove($topLeft[0]+$BuffCoords[(($BuffSpellNumber*2)-1)],$topLeft[1]+$BuffCoords[(($BuffSpellNumber*2))], 1)
- If @error Then
- Sleep(5000)
- EndIf
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on character
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseMove($topLeft[0]+213, $topLeft[1]+200, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on cancel (if not enough sp)
- MouseMove($topLeft[0]+368, $topLeft[1]+415, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- ; end buff
- EndIf
- ; attack spells
- $AttackRemain = $AttackRemain - 1
- If ($AttackCheck = 1) AND ($AttackRemain >= 0) Then
- ; do findattack2 until battlecoord > 1
- $battleCoord[0] = 1
- While $battleCoord[0] = 1
- $battleCoord = findAttack2()
- WEnd
- $battleCoord[1] = $battleCoord[1] + 22
- ; click on skill
- MouseMove($battleCoord[0], $battleCoord[1], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on attack skill of choice
- If $TurboCheck = 0 Then
- Sleep(500)
- Else
- Sleep(50)
- EndIf
- MouseMove($topLeft[0]+$BuffCoords[(($AttackSpellNumber*2)-1)],$topLeft[1]+$BuffCoords[(($AttackSpellNumber*2))], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on enemies
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- AttackGrid()
- ; click on cancel (if not enough sp)
- MouseMove($topLeft[0]+368, $topLeft[1]+415, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- ; end buff
- EndIf
- $AttackPanic1Time = TimerInit()
- ; $BattleIsDone - set to 1 if BattleCheckSum confirms battle is over
- $BattleIsDone = 0
- ;While $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- While $BattleIsDone = 0
- ; first check for healing
- ; check for health below HealHPCoord
- If ($HealCheck = 1) Then
- $HealCheckPixel = PixelGetColor(($HealHPCoord), ($topLeft[1]+458))
- $SpellCheckPixel = PixelGetColor(($HealSPCoord), ($topLeft[1]+458))
- If $HealCheckPixel = $BlankColor1 Then
- If $SpellCheckPixel <> $BlankColor1 Then
- ; do findattack2 until battlecoord > 1
- $battleCoord[0] = 1
- While $battleCoord[0] = 1
- $battleCoord = findAttack2()
- WEnd
- $battleCoord[1] = $battleCoord[1] + 22
- ; click on skill
- MouseMove($battleCoord[0], $battleCoord[1], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on heal skill of choice
- If $TurboCheck = 0 Then
- Sleep(500)
- Else
- Sleep(50)
- EndIf
- MouseMove($topLeft[0]+$BuffCoords[(($HealSpellNumber*2)-1)],$topLeft[1]+$BuffCoords[(($HealSpellNumber*2))], 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; click on character
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseMove($topLeft[0]+213, $topLeft[1]+200, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- ; getting lag problems so lets click twice
- Sleep (100)
- MouseClick("left")
- ; click on cancel (if not enough sp)
- MouseMove($topLeft[0]+368, $topLeft[1]+415, 1)
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- MouseClick("left")
- If $TurboCheck = 0 Then
- Sleep(200)
- Else
- Sleep(20)
- EndIf
- ; end heal
- EndIf
- EndIf
- EndIf
- ; then do attack
- $battleCoord = findAttack2()
- If $battleCoord[0] > 1 Then
- MouseMove($battleCoord[0], $battleCoord[1], 0)
- Sleep(20)
- MouseClick("Left")
- AttackGrid()
- MouseMove($battleCoord[0], $battleCoord[1], 0)
- $AttackPanic1Time = TimerInit()
- EndIf
- $AttackPanic2Time = TimerDiff($AttackPanic1Time)
- If $AttackPanic2Time > 12000 Then
- ; first - click on cancel
- MouseMove($topLeft[0]+368, $topLeft[1]+415, 1)
- Sleep(200)
- MouseClick("left")
- ; then attack again
- AttackGrid()
- $AttackPanic1Time = TimerInit()
- EndIf
- ;$BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- If $BattleCheckSum <> PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267)) Then
- Sleep(500)
- If $BattleCheckSum <> PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267)) Then
- $BattleIsDone=1
- EndIf
- EndIf
- WEnd
- ; fight over - click box
- ; check HP first
- $BlankPixel = PixelGetColor(($topLeft[0]+182), ($topLeft[1]+458))
- $BlankPixel2 = PixelGetColor(($topLeft[0]+216), ($topLeft[1]+458))
- $BlankPixel3 = PixelGetColor(($topLeft[0]+226), ($topLeft[1]+458))
- MouseMove(($topLeft[0]+372),($topLeft[1]+364),1)
- ; a little pause to see your stats
- If $TurboCheck = 0 Then
- Sleep(2000)
- EndIf
- $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- MouseClick("left")
- ; another death check
- If (DeathCheck() = 1) Then
- $continue=2
- ;MsgBox(8192, "You died! (battle check)", "You died!", 1)
- Else
- While $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
- Sleep(100)
- WEnd
- ; this helps with lag stability - 11/06
- If $TurboCheck = 0 Then
- Sleep(500)
- Else
- Sleep(50)
- EndIf
- EndIf
- $NumberOfBattles=$NumberOfBattles+1
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement