Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Sacred seasons grind script.
- ; http://sacredscript.blogspot.com
- ; http://madscripter.wordpress.com
- ; inspired and based on the work of rbrbran277
- ; v0.002 - attacks all in Tsulas and BW A3 - 08/27/2010
- ; v0.003 - put in your own coordinates and it should work on SS and Kong
- ; v0.004 - added UW E4
- ; v0.005 - code cleanup - added UW D2
- ; v0.006 - first attempt at generic dungeon grinder
- ; v0.007 - added UW F4
- ; v0.008 - generic grinder working well - lets try entire arena grind!
- ; v0.009 - cleaning up code - ff arena grind works
- ; v0.010 - SVA arena grind works
- ; v0.011 - changes I made for arena grind didn't work with dungeon grind
- ; fixed
- ; generic grinder didn't work at all
- ; fixed - but only lightly tested
- ; v0.012 - adding BRA grind and making BRA repeat after you die
- ; v0.013 - making SVA repeat after you die (gotta level my alt!)
- ; v0.014 - added FF repeat after you die - I'm not sure why you would want
- ; to do that but oh well - also some code cleanup (09/01/10)
- ; v0.015 - added BWA grind and repeat
- ; v0.016 - added more safeguards against server delay in displaying
- ; battle and exit pads
- ; v0.017 - not sure previous fixes work but adding DFA anyway
- ; v0.018 - added display timer to show how long each iteration took -
- ; good for figuring out how much XP/min you're getting (09/02)
- ; v0.019 - removing some death checks and seeing if it still works -
- ; found a tricky bug that would hang program while walking across map
- ; v0.020 - Trying to calculate XP/Min stats for each grind choice
- ; v0.021 - still getting XP/Min stats
- ; v0.022 - added CWA, UWA,
- ; v0.023 - added WaitForPads to dungeon grinds
- ; v0.024 - adding HP checking to Tsulas
- ; v0.025 - adding HP checking to UW_D2 - no improvement
- ; v0.026 - testing attack speed improvements
- ; v0.027 - tracked down a bug - might be coincidence but I think SS changed
- ; something to try and stop my script - fixed!
- ;
- ; todo - PGA - add silver info, finish checking XP info
- ; retest everything
- ;
- ; Misc documentation:
- ; This is a work in progress - lots of ugly code, commented debugging
- ; code and other nonsense.
- ;
- ; There is currently no way for the script to buff or heal you automatically
- ; so this script works best on dungeons you can finish with only attacks.
- ; But the pause key will pause the script so you can buff/heal/whatever and
- ; then press pause again and the script should resume.
- ;
- ; For arena runs - checking to see if you died occurs in multiple places and
- ; can result in multiple 'you died!' messages once you actually die. It's
- ; not a bug - it's a feature. Comment them out if they annoy you.
- ;
- ; I'm thinking that running arenas is less conspicuous than running a
- ; dungeon over and over. Figuring out which arena gets you the best XP/min
- ; is up to you. But make sure you can finish the first room of the arena
- ; or else the script will bomb. I should fix that - but it's a low
- ; priority right now.
- ;
- ; Script will calculate and display XP/Min that you are getting.
- ; These numbers assume that you are grinding solo - if not, the numbers
- ; are wrong. Also, numbers will be completely wrong if you are using
- ; the generic dungeon grind function.
- ;
- ; There are many ways to slightly increase the speed of this script but I
- ; went for stability instead of speed. It still glitches sometimes but its
- ; also run for over 10 hours unattended - your mileage may vary
- ;
- ; This is an AutoIT3 script
- ; Get AutoIT at http://www.autoitscript.com/autoit3/index.shtml
- ;
- ; How to use this:
- ; 1 - Use AutoIt Window Info to get the coordinates of the top left and
- ; bottom right corners of your SS screen and put them in below in
- ; the topLeft, bottomRight area
- ; 2 - uncomment one of the sections starting at line 214 to run one of the
- ; script functions - Tsulas, Underworld, Arena, etc
- ;
- ; As the script runs, it will pop up a window telling you how many times it
- ; has run that section and how long it took. This is purely informative and
- ; can be commented out if you don't like it.
- Global $topLeft[2]
- Global $bottomRight[2]
- $topLeft[0] = 117
- $topLeft[1] = 150
- $bottomRight[0] = 854
- $bottomRight[1] = 748
- Global $paused
- HotKeySet("{ESC}", "Terminate")
- HotKeySet("{PAUSE}","_pause")
- Func _pause()
- $paused = NOT $paused
- While $paused
- Sleep(100)
- Wend
- EndFunc
- Global $coord[2]
- Global $newCoord[2]
- Global $exitCoord[2]
- Global $arenaCoord[2]
- Global $battleCoord[2]
- Global $genericCoord[2]
- Global $newGenCoord[2]
- Global $waitCoord[2]
- Global $TotalRunCount
- Global $AttackColor1
- Global $AttackColor2
- Global $BlankColor1
- Global $BlankPixel
- Global $xCoord
- Global $yCoord
- Global $AttackLoop
- Global $AttackPixel
- Global $AttackPixelCount
- Global $GrindCheckSum
- Global $oldCheckSum
- Global $BattleCheckSum
- Global $DungeonCheckSum
- Global $DeathCheckSum
- Global $Death
- Global $xPos
- Global $yPos
- Global $healgrind
- Global $checkPixel
- Global $battleCheck
- Global $GenericContinue
- Global $ArenaContinue
- Global $NumberOfBattles
- Global $TsulasHP
- Global $CheckHP
- Global $TotalXP
- Global $EntireXP
- Global $startTime
- Global $entireTime
- Global $timeElapsed
- Global $CheckTimer
- Global $TimerDone
- Global $totalTimeElapsed
- ; FF
- Global $FFCoord[2]
- Global $FFContinue
- Global $NewFFCoord[2]
- ; SVA
- Global $SVACoord[2]
- Global $SVAContinue
- Global $NewSVACoord[2]
- ; BRA
- Global $BRACoord[2]
- Global $BRAContinue
- Global $NewBRACoord[2]
- ; BWA
- Global $BWACoord[2]
- Global $BWAContinue
- Global $NewBWACoord[2]
- ; DFA
- Global $DFACoord[2]
- Global $DFAContinue
- Global $NewDFACoord[2]
- ; CWA
- Global $CWACoord[2]
- Global $CWAContinue
- Global $NewCWACoord[2]
- ; UWA
- Global $UWACoord[2]
- Global $UWAContinue
- Global $NewUWACoord[2]
- ; Death check
- Global $DeathColor
- Global $DeathPixel
- ; FFXP - correct values and checked
- 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 - placement not checked
- Global $SVAXP[97]=[0,72,75,90,40,117,66,76,87,111,156,60,66,90,120,190,99,213,180,50,240,130,190,244,244,50,19,105,150,100,270,330,180,80,205,150,88,149,179,386,501,320,243,510,305,350,225,510,895,380,320,330,570,610,450,900,190,400,900,910,430,1065,520,900,390,745,1500,1950,1530,1100,830,1700,1180,1300,1760,452,2400,800,3075,1950,1100,1315,930,1315,1350,3060,1250,1550,830,1350,2925,4,950,490,1425,980,160]
- ; BWAXP - correct values - placement not checked
- Global $BWAXP[98]=[0,110,110,150,100,70,140,180,200,320,99,80,220,270,100,270,550,1750,825,938,1360,54,397,1375,150,1845,1800,300,180,775,1300,2138,900,1300,830,1200,450,921,2000,475,1350,600,950,998,65,160,465,240,650,490,80,1560,1720,1130,400,1695,500,160,80,1260,1560,480,500,2400,1300,690,2720,1490,1380,500,2235,500,1440,2980,1440,1050,720,1220,500,1490,2160,500,2235,1220,1000,2930,3450,1360,3480,1200,1560,3120,2400,1000,2340,2160,2235,3000]
- ; DFAXP - correct values - placement not checked
- Global $DFAXP[96]=[0,205,300,102,535,305,410,525,494,220,540,700,170,230,190,180,422,430,750,265,500,735,285,740,355,855,975,765,780,1020,745,1410,1175,675,287,305,1600,856,520,825,375,1249,1540,1234,1825,1145,1005,1430,330,725,1665,1360,870,610,1300,970,1310,1290,1285,3260,2875,906,7200,270,1320,1979,2660,1194,3342,1756,2046,4076,7426,992,4450,504,5972,2912,6916,2200,968,5432,6363,1300,3300,3257,1761,5824,7524,4354,6614,7624,12848,3801,11452]
- ; BRAXP - correct values - placement not checked
- Global $BRAXP[90]=[0,905,605,1150,280,3020,950,500,2390,1800,4125,2340,730,3725,465,3014,2016,2634,1920,3008,1560,2218,3240,1500,828,4410,450,1512,3020,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 - incorrect
- Global $CWAXP[90]=[0,905,605,1150,280,3020,950,500,2390,1800,4125,2340,730,3725,465,3014,2016,2634,1920,3008,1560,2218,3240,1500,828,4410,450,1512,3020,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]
- ; UWAXP - incorrect
- Global $UWAXP[90]=[0,905,605,1150,280,3020,950,500,2390,1800,4125,2340,730,3725,465,3014,2016,2634,1920,3008,1560,2218,3240,1500,828,4410,450,1512,3020,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]
- $AttackColor1 = Dec("FFFFFF")
- $AttackColor2 = Dec("FFFEFF")
- $BlankColor1 = Dec("333333")
- $BattleTextColor = 0xFFFFFF
- $PadColor1 = 0xFC4744
- $ExitColor1 = 0xF8F6EA
- $DeathColor = Dec("86A89C")
- $TotalRunCount=0
- $screenWidth = $bottomRight[0] - $topLeft[0]
- $screenHeight = $bottomRight[1] - $topLeft[1]
- $repeatagain = 1
- $entireTime = TimerInit()
- While $repeatagain < 6000
- $startTime = TimerInit()
- $TotalXP=0
- ; ***** UNCOMMENT ONE (AND ONLY ONE) OF THESE TO RUN
- ; These are various functions you can run.
- ; GrindTsulas()
- ; GrindTsulas2()
- ; GrindBW_A3()
- ; GrindUW_E4()
- ; GrindUW_D2()
- ; GrindUW_F4()
- ; Generic()
- ; ArenaFF()
- ; ArenaSVA()
- ; ArenaBWA()
- ; ArenaDFA()
- ArenaBRA()
- ; ArenaCWA()
- ; ArenaUWA()
- $EntireXP = $EntireXP + $TotalXP
- $timeElapsed = TimerDiff($startTime)
- $entireTimeElapsed = TimerDiff($entireTime)
- $TotalRunCount = $TotalRunCount + 1
- MsgBox(8192, "Total Runs " & $TotalRunCount, "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 , 5)
- 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)
- $repeatagain = $repeatagain + 1
- WEnd
- Func AttackGrid($menu)
- ; these settings are working for me - adjust them if you need to
- ; bottom left
- ; (659, 524) - old value
- ; Attack(0.733, 0.626)
- ; (659, 537) - new value
- Attack (0.733, 0.646)
- ; 6th (bottom right) monster - appears so rarely its hard to get
- ; a good fix on its position - this may need to be tweaked
- ; (814, 532)
- Attack(0.943, 0.638)
- ; middle right
- ; (778, 446)
- Attack(0.894, 0.494)
- ; middle left
- ; (611, 432) - old value
- ; Attack(0.668, 0.471)
- ; (611, 437) - new value
- Attack(0.668, 0.480)
- ; top right
- ; (727, 352)
- Attack(0.825, 0.337)
- ; top left
- ; (560, 334) - old value
- ; Attack(0.600, 0.308)
- ; (560, 337) - new value
- Attack (0.600, 0.313)
- EndFunc
- Func Attack($x, $y)
- $xPos = $topLeft[0] + ($screenWidth * $x)
- $yPos = $topLeft[1] + ($screenHeight * $y)
- MouseMove($xPos, $yPos, 0)
- MouseClick("left")
- EndFunc
- Func findAttack()
- ;$xCoord=456
- $xCoord=$topLeft[0]+339
- ;$yCoord=371
- $yCoord=$topLeft[1]+221
- MouseMove($xCoord,($yCoord-40), 1)
- ;For $yCoord = 371 to 489
- For $yCoord = ($topLeft[1]+221) to ($topLeft[1]+339)
- $AttackPixelCount=0
- ; moving the mouse here is not necessary and slows things down
- ; a bit but it makes the script more stable
- ; - and it looks cool - uncomment it and see how it runs for you
- ;MouseMove($xCoord,$yCoord, 1)
- For $AttackLoop = 0 to 9
- $AttackPixel = PixelGetColor($xCoord + $AttackLoop,$yCoord)
- ;If ($AttackPixel = $AttackColor1) or ($AttackPixel = $AttackColor2) Then
- If ($AttackPixel > 16646144) Then
- $AttackPixelCount = $AttackPixelCount + 1
- ;MsgBox(8192, $AttackPixelCount, $AttackPixelCount, 1)
- Else
- $AttackLoop=9
- EndIf
- Next
- If $AttackPixelCount > 9 Then
- MouseMove($xCoord,$yCoord, 1)
- $coord[0]=$xCoord
- $coord[1]=$yCoord
- ;ConsoleWrite("y=" & $yCoord & @CRLF)
- Return ($coord)
- EndIf
- Next
- $coord[0]=1
- $coord[1]=1
- Sleep(500)
- Return ($coord)
- EndFunc
- Func Terminate()
- Exit
- EndFunc
- Func Battle($x, $y)
- ;$BattleCheckSum = PixelChecksum(230,213,250,225) - old
- ;$BattleCheckSum = PixelChecksum(769, 625, 836, 640)
- $BattleCheckSum = PixelChecksum(($topLeft[0]+652),($topLeft[1]+475),($topLeft[0]+719),($topLeft[1]+490))
- MouseMove($x, $y, 3)
- Sleep(1000)
- MouseClick("left")
- While $BattleCheckSum = PixelChecksum(($topLeft[0]+652),($topLeft[1]+475),($topLeft[0]+719),($topLeft[1]+490))
- Sleep(100)
- WEnd
- ; kill all creatures
- ;$BattleCheckSum = PixelCheckSum(186,400,205,414)
- $BattleCheckSum = PixelCheckSum(($topLeft[0]+69),($topLeft[1]+250),($topLeft[0]+88),($topLeft[1]+264))
- While $BattleCheckSum = PixelCheckSum(($topLeft[0]+69),($topLeft[1]+250),($topLeft[0]+88),($topLeft[1]+264))
- $battleCoord = findAttack()
- If $battleCoord[0] > 1 Then
- MouseMove($battleCoord[0], $battleCoord[1], 3)
- ; Attack every possible position.
- Sleep(200)
- MouseClick("left")
- Sleep(200)
- AttackGrid($battleCoord)
- EndIf
- WEnd
- ; fight over - click box
- ; check HP first
- $BlankPixel = PixelGetColor(($topLeft[0]+176), ($topLeft[1]+455))
- ;ConsoleWrite("BlankPixel = " & $BlankPixel & @CRLF & "BlankColor =" & $BlankColor1 & @CRLF)
- ;MouseMove(483, 511, 3)
- MouseMove(($topLeft[0]+366),($topLeft[1]+361),3)
- ; a little pause to see your stats
- Sleep(2000)
- ;$BattleCheckSum = PixelChecksum(186,400,205,414)
- $BattleCheckSum = PixelCheckSum(($topLeft[0]+69),($topLeft[1]+250),($topLeft[0]+88),($topLeft[1]+264))
- MouseClick("left")
- ; another death check
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue=2
- MsgBox(8192, "You died! (battle check)", "You died!", 1)
- Else
- While $BattleCheckSum = PixelCheckSum(($topLeft[0]+69),($topLeft[1]+250),($topLeft[0]+88),($topLeft[1]+264))
- Sleep(100)
- WEnd
- Sleep(500)
- EndIf
- $NumberOfBattles=$NumberOfBattles+1
- EndFunc
- Func DungeonPad($x, $y)
- ; checks for changes in bottom right corner
- MouseMove($x, $y ,3)
- Sleep(100)
- ;$DungeonCheckSum = PixelChecksum(769, 621, 836, 640)
- $DungeonCheckSum = PixelChecksum(($topLeft[0]+652),($topLeft[1]+471),($topLeft[0]+719),($topLeft[1]+490))
- MouseClick("left")
- Sleep(100)
- ;MouseClick("left")
- ;$DungeonCheckSum = PixelChecksum(769, 621, 836, 640)
- While $DungeonCheckSum = PixelChecksum(($topLeft[0]+652),($topLeft[1]+471),($topLeft[0]+719),($topLeft[1]+490))
- Sleep(1000)
- MouseClick("left")
- WEnd
- EndFunc
- Func DungeonPad2($x, $y)
- ; checks for changes in top right corner
- MouseMove($x, $y ,3)
- Sleep(100)
- ;$DungeonCheckSum = PixelChecksum(784, 210, 820, 230)
- $DungeonCheckSum = PixelChecksum(($topLeft[0]+667),($topLeft[1]+60),($topLeft[0]+703),($topLeft[1]+80))
- MouseClick("left")
- Sleep(100)
- MouseClick("left")
- ;$DungeonCheckSum = PixelChecksum(784, 210, 820, 230)
- While $DungeonCheckSum = PixelChecksum(($topLeft[0]+667),($topLeft[1]+60),($topLeft[0]+703),($topLeft[1]+80))
- Sleep(1000)
- MouseClick("left")
- WEnd
- EndFunc
- Func WaitForPads()
- $padwait=1
- While $padwait < 2
- ; death check
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- $padwait=$padwait+1
- MsgBox(8192, "You died! (Padcheck)", "You died!", 1)
- EndIf
- $waitCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- If @error <> 1 Then
- $padwait=$padwait+1
- EndIf
- $waitCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- If @error <> 1 Then
- $padwait=$padwait+1
- EndIf
- Sleep(500)
- WEnd
- EndFunc
- Func GrindTsulas()
- ; start script outside of dungeon
- ;
- ; since it's better to just do the 950 battle over and over again
- ; if you can, this for loop determines how many times you do the
- ; 950 battle before you do both battles - and replenish your hp and sp
- For $healgrind=1 to 9
- ; enter Tsulas
- ;DungeonPad(480, 430)
- DungeonPad(($topLeft[0]+363),($topLeft[1]+280))
- WaitForPads()
- ; enter first battle - bottom - 4 creatures
- ;Battle(389, 557)
- Battle(($topLeft[0]+272),($topLeft[1]+407))
- WaitForPads()
- ; click to exit Tsulas
- ;DungeonPad(676, 316)
- DungeonPad(($topLeft[0]+559),($topLeft[1]+166))
- ; move away from Tsulas
- ;MouseMove(555, 553, 3)
- MouseMove(($topLeft[0]+438),($topLeft[1]+403), 3)
- Sleep(200)
- MouseClick("left")
- Sleep(1000)
- $TotalXP=$TotalXP+950
- Next
- ; enter Tsulas
- ;DungeonPad(480, 430)
- DungeonPad(($topLeft[0]+363),($topLeft[1]+280))
- WaitForPads()
- ; enter first battle - bottom - 4 creatures
- ;Battle(389, 557)
- Battle(($topLeft[0]+272),($topLeft[1]+407))
- WaitForPads()
- ; enter second battle - 4 creatures
- ;Battle(339, 364)
- Battle(($topLeft[0]+222),($topLeft[1]+214))
- WaitForPads()
- ; click to exit Tsulas
- ;DungeonPad(676, 316)
- DungeonPad(($topLeft[0]+559),($topLeft[1]+166))
- ; move away from Tsulas
- ;MouseMove(555, 553, 3)
- MouseMove(($topLeft[0]+438),($topLeft[1]+403), 3)
- Sleep(200)
- MouseClick("left")
- Sleep(1000)
- $TotalXP=$TotalXP+1500
- EndFunc
- Func GrindTsulas2()
- ; start script outside of dungeon
- ;
- ; since it's better to just do the 950 battle over and over again
- ; if you can, this for loop determines how many times you do the
- ; 950 battle before you do both battles - and replenish your hp and sp
- ;
- ; - this version checks your HP for you and continues if greater
- ; than half
- $TsulasHP = 1
- While $TsulasHP = 1
- ; enter Tsulas
- ;DungeonPad(480, 430)
- DungeonPad(($topLeft[0]+363),($topLeft[1]+280))
- WaitForPads()
- ; enter first battle - bottom - 4 creatures
- ;Battle(389, 557)
- Battle(($topLeft[0]+272),($topLeft[1]+407))
- 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]+559),($topLeft[1]+166))
- ; move away from Tsulas
- ;MouseMove(555, 553, 3)
- MouseMove(($topLeft[0]+438),($topLeft[1]+403), 3)
- Sleep(200)
- MouseClick("left")
- Sleep(1000)
- EndIf
- WEnd
- ; enter second battle - 4 creatures
- ;Battle(339, 364)
- Battle(($topLeft[0]+222),($topLeft[1]+214))
- WaitForPads()
- ; click to exit Tsulas
- ;DungeonPad(676, 316)
- DungeonPad(($topLeft[0]+559),($topLeft[1]+166))
- ; move away from Tsulas
- ;MouseMove(555, 553, 3)
- MouseMove(($topLeft[0]+438),($topLeft[1]+403), 3)
- Sleep(200)
- MouseClick("left")
- Sleep(1000)
- $TotalXP=$TotalXP+550
- EndFunc
- Func GrindBW_A3()
- ; start script outside of dungeon
- ;
- ; enter Bleakwoods A3
- ;DungeonPad(601, 398)
- DungeonPad(($topLeft[0]+484),($topLeft[1]+248))
- WaitForPads()
- ; enter first battle - right
- ;Battle(625, 410)
- Battle(($topLeft[0]+508),($topLeft[1]+260))
- WaitForPads()
- ; enter second battle - left
- ;Battle(336, 362)
- Battle(($topLeft[0]+219),($topLeft[1]+212))
- WaitForPads()
- ; click to exit Bleakwoods A3
- ;DungeonPad(720, 554)
- DungeonPad(($topLeft[0]+603),($topLeft[1]+404))
- WaitForPads()
- ; move away from Bleakwoods A3
- ;MouseMove(507, 443, 3)
- MouseMove(($topLeft[0]+390),($topLeft[1]+293),3)
- Sleep(100)
- MouseClick("left")
- Sleep(1000)
- $TotalXP=$TotalXP+1617
- EndFunc
- Func GrindUW_E4()
- ; start script outside of dungeon
- ;
- ; enter Underworld E4
- ;DungeonPad(792, 327)
- DungeonPad(($topLeft[0]+675),($topLeft[1]+177))
- WaitForPads()
- ; enter first battle
- ;Battle(480, 361)
- Battle(($topLeft[0]+363),($topLeft[1]+211))
- WaitForPads()
- ; enter second battle
- ;Battle(600, 350)
- Battle(($topLeft[0]+483),($topLeft[1]+200))
- WaitForPads()
- ; enter third battle
- ;Battle(649, 421)
- Battle(($topLeft[0]+532),($topLeft[1]+271))
- ; exit Underworld E4
- ;DungeonPad(288, 531)
- DungeonPad(($topLeft[0]+171),($topLeft[1]+381))
- ; move away from Underworld E4
- ;MouseMove(631, 312, 3)
- MouseMove(($topLeft[0]+514),($topLeft[1]+162), 3)
- Sleep(100)
- MouseClick("left")
- Sleep(1000)
- $TotalXP=$TotalXP+3710
- EndFunc
- Func GrindUW_D2()
- ; start script outside of dungeon
- ;
- ; enter Underworld D2
- ;DungeonPad(480, 578)
- DungeonPad(($topLeft[0]+363),($topLeft[1]+428))
- WaitForPads()
- ; enter first battle
- ;Battle(506, 494)
- Battle(($topLeft[0]+389),($topLeft[1]+344))
- WaitForPads()
- ; enter second battle
- ;Battle(314, 327)
- Battle(($topLeft[0]+197),($topLeft[1]+177))
- WaitForPads()
- ; enter third battle
- ;Battle(673, 410)
- Battle(($topLeft[0]+556),($topLeft[1]+260))
- ; exit Underworld D2
- ;DungeonPad(168, 614)
- DungeonPad(($topLeft[0]+51),($topLeft[1]+464))
- ; move away from Underworld D2
- ;MouseMove(390, 524, 3)
- MouseMove(($topLeft[0]+273),($topLeft[1]+374), 3)
- Sleep(100)
- MouseClick("left")
- Sleep(1000)
- $TotalXP=$TotalXP+3610
- EndFunc
- Func GrindUW_F4()
- ; start script outside of dungeon
- ;
- ; enter Underworld F4
- ;DungeonPad(768, 482)
- DungeonPad(($topLeft[0]+651), ($topLeft[1]+332))
- WaitForPads()
- ; enter first battle
- ;Battle(505, 350)
- Battle(($topLeft[0]+388), ($topLeft[1]+200))
- WaitForPads()
- ; enter second battle
- ;Battle(625, 434)
- Battle(($topLeft[0]+508), ($topLeft[1]+284))
- WaitForPads()
- ; enter third battle
- ;Battle(577, 458)
- Battle(($topLeft[0]+460), ($topLeft[1]+308))
- ; exit Underworld F4
- ;DungeonPad(288, 529)
- DungeonPad(($topLeft[0]+171), ($topLeft[1]+379))
- ; move away from Underworld F4
- ;MouseMove(651, 456, 3)
- MouseMove(($topLeft[0]+534), ($topLeft[1]+306), 3)
- Sleep(100)
- MouseClick("left")
- Sleep(1000)
- $TotalXP=$TotalXP+4787
- EndFunc
- Func Generic()
- ; start script outside of dungeon
- ;
- ; enter dungeon
- ; Find pad
- $GenericContinue = 1
- $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- If @error=1 Then
- ;MouseMove(544, 537, 3)
- MouseMove(($topLeft[0]+427), ($topLeft[1]+387), 3)
- Sleep(100)
- MouseClick("left")
- Sleep(1000)
- $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- EndIf
- DungeonPad($genericCoord[0], $genericCoord[1])
- WaitForPads()
- ; Find Battle
- While $GenericContinue = 1
- sleep(500)
- $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- $CheckPixel = PixelGetColor($genericCoord[0],$genericCoord[1]+15)
- If $CheckPixel = $BattleTextColor Then
- Battle($genericCoord[0], $genericCoord[1])
- WaitForPads()
- Else
- $newGenCoord[0]=$genericCoord[0]
- $newGenCoord[1]=$genericCoord[1]
- $genericCoord = PixelSearch($topLeft[0],$newGenCoord[1]+1,$bottomRight[0],$bottomRight[1],$PadColor1)
- If @error=1 Then
- $GenericContinue = 2
- Else
- Battle($genericCoord[0], $genericCoord[1])
- WaitForPads()
- EndIf
- EndIf
- WEnd
- ; exit dungeon
- $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- DungeonPad($genericCoord[0], $genericCoord[1])
- ; move away from dungeon
- ; how to make this work?
- ; find coords of pad and try 50 left and right?
- ; ^ not done yet
- ;MouseMove(284, 551, 3)
- MouseMove(($topLeft[0]+167), ($topLeft[1]+451), 3)
- Sleep(100)
- MouseClick("left")
- Sleep(1000)
- $TotalXP=$TotalXP+1
- EndFunc
- Func ArenaFF()
- ; 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!
- ; IMPORTANT - you need to be able to survive through the first room!
- ;
- ; first room
- $NumberOfBattles=0
- $FFContinue = 1
- ; First room - find and do all three battles
- While $FFContinue = 1
- WaitForPads()
- $FFCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- $CheckPixel = PixelGetColor($FFCoord[0],$FFCoord[1]+15)
- If $CheckPixel = $BattleTextColor Then
- Battle($FFCoord[0], $FFCoord[1])
- $TotalXP=$TotalXP+$FFXP[$NumberOfBattles]
- Else
- $newFFCoord[0]=$FFCoord[0]
- $newFFCoord[1]=$FFCoord[1]
- $FFCoord = PixelSearch($topLeft[0]+1,$newFFCoord[1]+1,$bottomRight[0],$bottomRight[1],$PadColor1)
- If @error=1 Then
- $FFContinue = 2
- Else
- Battle($FFCoord[0], $FFCoord[1])
- $TotalXP=$TotalXP+$FFXP[$NumberOfBattles]
- EndIf
- EndIf
- WEnd
- ; first room - go to exit pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[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
- MouseMove(($topLeft[0]+368), ($topLeft[1]+253), 3)
- MouseClick("left")
- sleep(500)
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$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],$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- $TotalXP=$TotalXP+$FFXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$FFXP[$NumberOfBattles]
- ; starting from Shikaakwa - return to FF
- ;DungeonPad(335, 288)
- DungeonPad(($topLeft[0]+218),($topLeft[1]+138))
- ;DungeonPad(481, 238)
- DungeonPad(($topLeft[0]+364),($topLeft[1]+88))
- ;DungeonPad(168, 252)
- DungeonPad(($topLeft[0]+51),($topLeft[1]+102))
- ;DungeonPad(480, 234)
- DungeonPad(($topLeft[0]+363),($topLeft[1]+84))
- ;DungeonPad(313, 413)
- DungeonPad(($topLeft[0]+196),($topLeft[1]+263))
- ;DungeonPad(192, 240)
- DungeonPad(($topLeft[0]+75),($topLeft[1]+90))
- EndFunc
- Func ArenaSVA()
- ; 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!
- ; IMPORTANT - you need to be able to survive through the first room!
- ;
- ; first room
- $NumberOfBattles=0
- $SVAContinue = 1
- ; First room - find and do all two battles
- While $SVAContinue = 1
- WaitForPads()
- $SVACoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- $CheckPixel = PixelGetColor($SVACoord[0],$SVACoord[1]+15)
- If $CheckPixel = $BattleTextColor Then
- Battle($SVACoord[0], $SVACoord[1])
- $TotalXP=$TotalXP+$SVAXP[$NumberOfBattles]
- Else
- $newSVACoord[0]=$SVACoord[0]
- $newSVACoord[1]=$SVACoord[1]
- $SVACoord = PixelSearch($topLeft[0]+1,$newSVACoord[1]+1,$bottomRight[0],$bottomRight[1],$PadColor1)
- If @error=1 Then
- $SVAContinue = 2
- Else
- Battle($SVACoord[0], $SVACoord[1])
- $TotalXP=$TotalXP+$SVAXP[$NumberOfBattles]
- EndIf
- EndIf
- WEnd
- ; first room - go to exit pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[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
- MouseMove(($topLeft[0]+368), ($topLeft[1]+253), 3)
- MouseClick("left")
- sleep(500)
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$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],$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- $TotalXP=$TotalXP+$SVAXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$SVAXP[$NumberOfBattles]
- ; starting from Shikaakwa - return to SVA
- ;DungeonPad(335, 288)
- DungeonPad(($topLeft[0]+218),($topLeft[1]+138))
- ;DungeonPad(362, 612)
- DungeonPad(($topLeft[0]+245),($topLeft[1]+462))
- ;DungeonPad(816, 384)
- DungeonPad(($topLeft[0]+699),($topLeft[1]+234))
- ;DungeonPad(817, 287)
- DungeonPad(($topLeft[0]+700),($topLeft[1]+137))
- ;DungeonPad(433, 527)
- DungeonPad(($topLeft[0]+316),($topLeft[1]+377))
- ;DungeonPad(192, 241)
- DungeonPad(($topLeft[0]+75),($topLeft[1]+91))
- EndFunc
- Func ArenaBRA()
- ; 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!
- ; IMPORTANT - you need to be able to survive through the first room!
- ;
- ; I just read that BRA 7th floor has 2 rooms with no battles
- ; This might bomb this script
- ;
- ; first room
- $NumberOfBattles=0
- $BRAContinue = 1
- ; First room - find and do all two battles
- While $BRAContinue = 1
- WaitForPads()
- $BRACoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- $CheckPixel = PixelGetColor($BRACoord[0],$BRACoord[1]+15)
- If $CheckPixel = $BattleTextColor Then
- Battle($BRACoord[0], $BRACoord[1])
- $TotalXP=$TotalXP+$BRAXP[$NumberOfBattles]
- Else
- $newBRACoord[0]=$BRACoord[0]
- $newBRACoord[1]=$BRACoord[1]
- $BRACoord = PixelSearch($topLeft[0]+1,$newBRACoord[1]+1,$bottomRight[0],$bottomRight[1],$PadColor1)
- If @error=1 Then
- $BRAContinue = 2
- Else
- Battle($BRACoord[0], $BRACoord[1])
- $TotalXP=$TotalXP+$BRAXP[$NumberOfBattles]
- EndIf
- EndIf
- WEnd
- ; first room - go to exit pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[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
- MouseMove(($topLeft[0]+368), ($topLeft[1]+253), 3)
- MouseClick("left")
- sleep(500)
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$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],$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- $TotalXP=$TotalXP+$BRAXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$BRAXP[$NumberOfBattles]
- ; starting from Shikaakwa - return to BRA
- ;DungeonPad(816, 576)
- DungeonPad2(($topLeft[0]+699),($topLeft[1]+426))
- ;DungeonPad(697, 612)
- DungeonPad2(($topLeft[0]+580),($topLeft[1]+462))
- ;DungeonPad(816, 600)
- DungeonPad2(($topLeft[0]+699),($topLeft[1]+450))
- ;DungeonPad(816, 407)
- DungeonPad(($topLeft[0]+699),($topLeft[1]+257))
- ;DungeonPad(815, 287)
- DungeonPad(($topLeft[0]+698),($topLeft[1]+137))
- ;DungeonPad(817, 431)
- DungeonPad(($topLeft[0]+700),($topLeft[1]+281))
- ;DungeonPad(265, 323)
- DungeonPad(($topLeft[0]+148),($topLeft[1]+173))
- ;DungeonPad(192, 240)
- DungeonPad(($topLeft[0]+75),($topLeft[1]+90))
- EndFunc
- Func ArenaBWA()
- ; 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!
- ; IMPORTANT - you need to be able to survive through the first room!
- ;
- ; first room
- $NumberOfBattles=0
- $BWAContinue = 1
- ; First room - find and do all two battles
- While $BWAContinue = 1
- WaitForPads()
- $BWACoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- $CheckPixel = PixelGetColor($BWACoord[0],$BWACoord[1]+15)
- If $CheckPixel = $BattleTextColor Then
- Battle($BWACoord[0], $BWACoord[1])
- $TotalXP=$TotalXP+$BWAXP[$NumberOfBattles]
- Else
- $newBWACoord[0]=$BWACoord[0]
- $newBWACoord[1]=$BWACoord[1]
- $BWACoord = PixelSearch($topLeft[0]+1,$newBWACoord[1]+1,$bottomRight[0],$bottomRight[1],$PadColor1)
- If @error=1 Then
- $BWAContinue = 2
- Else
- Battle($BWACoord[0], $BWACoord[1])
- $TotalXP=$TotalXP+$BWAXP[$NumberOfBattles]
- EndIf
- EndIf
- WEnd
- ; first room - go to exit pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[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
- MouseMove(($topLeft[0]+368), ($topLeft[1]+253), 3)
- MouseClick("left")
- sleep(500)
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$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],$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- $TotalXP=$TotalXP+$BWAXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$BWAXP[$NumberOfBattles]
- ; starting from Shikaakwa - return to BWA
- ;DungeonPad(432, 239)
- DungeonPad(($topLeft[0]+315),($topLeft[1]+89))
- ;DungeonPad(457, 250)
- DungeonPad(($topLeft[0]+340),($topLeft[1]+100))
- ;DungeonPad(624, 238)
- DungeonPad(($topLeft[0]+507),($topLeft[1]+88))
- ;DungeonPad(527, 238)
- DungeonPad(($topLeft[0]+410),($topLeft[1]+88))
- ;DungeonPad(528, 239)
- DungeonPad(($topLeft[0]+411),($topLeft[1]+89))
- ;DungeonPad(527, 238)
- DungeonPad(($topLeft[0]+410),($topLeft[1]+88))
- ;DungeonPad(527, 239)
- DungeonPad(($topLeft[0]+410),($topLeft[1]+89))
- ;DungeonPad(768, 239)
- DungeonPad(($topLeft[0]+651),($topLeft[1]+89))
- ;DungeonPad(432, 239)
- DungeonPad(($topLeft[0]+315),($topLeft[1]+89))
- ;DungeonPad(481, 239)
- DungeonPad(($topLeft[0]+364),($topLeft[1]+89))
- ;DungeonPad(384, 238)
- DungeonPad(($topLeft[0]+267),($topLeft[1]+88))
- ;DungeonPad(409, 467)
- DungeonPad(($topLeft[0]+292),($topLeft[1]+317))
- ;DungeonPad(192, 238)
- DungeonPad(($topLeft[0]+75),($topLeft[1]+88))
- EndFunc
- Func ArenaDFA()
- ; 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!
- ; IMPORTANT - you need to be able to survive through the first room!
- ;
- ; first room
- $NumberOfBattles=0
- $DFAContinue = 1
- ; First room - find and do all two battles
- While $DFAContinue = 1
- WaitForPads()
- $DFACoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$PadColor1)
- $CheckPixel = PixelGetColor($DFACoord[0],$DFACoord[1]+15)
- If $CheckPixel = $BattleTextColor Then
- Battle($DFACoord[0], $DFACoord[1])
- $TotalXP=$TotalXP+$DFAXP[$NumberOfBattles]
- Else
- $newDFACoord[0]=$DFACoord[0]
- $newDFACoord[1]=$DFACoord[1]
- $DFACoord = PixelSearch($topLeft[0]+1,$newDFACoord[1]+1,$bottomRight[0],$bottomRight[1],$PadColor1)
- If @error=1 Then
- $DFAContinue = 2
- Else
- Battle($DFACoord[0], $DFACoord[1])
- $TotalXP=$TotalXP+$DFAXP[$NumberOfBattles]
- EndIf
- EndIf
- WEnd
- ; first room - go to exit pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[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
- MouseMove(($topLeft[0]+368), ($topLeft[1]+253), 3)
- MouseClick("left")
- sleep(500)
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$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],$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- $TotalXP=$TotalXP+$DFAXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$DFAXP[$NumberOfBattles]
- ; starting from Shikaakwa - return to DFA
- ;DungeonPad(816, 576) - Shik to A4
- DungeonPad2(($topLeft[0]+699),($topLeft[1]+426))
- ;DungeonPad(697, 612) - A4 to B4
- DungeonPad2(($topLeft[0]+580),($topLeft[1]+462))
- ;DungeonPad(816, 600) - B4 to C4
- DungeonPad2(($topLeft[0]+699),($topLeft[1]+450))
- ;DungeonPad(816, 407) - C4 to D4
- DungeonPad(($topLeft[0]+699),($topLeft[1]+257))
- ;DungeonPad(815, 287)
- DungeonPad(($topLeft[0]+698),($topLeft[1]+137))
- ;DungeonPad(608, 587)
- DungeonPad(($topLeft[0]+491),($topLeft[1]+437))
- ;DungeonPad(502, 608)
- DungeonPad(($topLeft[0]+385),($topLeft[1]+458))
- ;DungeonPad(503, 608)
- DungeonPad(($topLeft[0]+386),($topLeft[1]+458))
- ;DungeonPad(550, 608)
- DungeonPad(($topLeft[0]+433),($topLeft[1]+458))
- ;DungeonPad(310, 609)
- DungeonPad(($topLeft[0]+193),($topLeft[1]+459))
- ;DungeonPad(815, 453)
- DungeonPad(($topLeft[0]+698),($topLeft[1]+303))
- ;DungeonPad(814, 380)
- DungeonPad(($topLeft[0]+697),($topLeft[1]+230))
- ;DungeonPad(815, 548)
- DungeonPad2(($topLeft[0]+698),($topLeft[1]+398))
- ;DungeonPad(815, 379)
- DungeonPad(($topLeft[0]+698),($topLeft[1]+229))
- ;DungeonPad(822, 548)
- DungeonPad2(($topLeft[0]+705),($topLeft[1]+398))
- ;DungeonPad(455, 368)
- DungeonPad(($topLeft[0]+338),($topLeft[1]+218))
- ;DungeonPad(192, 241)
- DungeonPad(($topLeft[0]+75),($topLeft[1]+91))
- 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!
- ;
- $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
- ; **** This section may need some work
- MouseMove(($topLeft[0]+368), ($topLeft[1]+253), 3)
- MouseClick("left")
- sleep(500)
- MouseMove(($topLeft[0]+383), ($topLeft[1]+310), 3)
- MouseClick("left")
- sleep(500)
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$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],$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- $TotalXP=$TotalXP+$CWAXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$CWAXP[$NumberOfBattles]
- ; starting from Shikaakwa - return to CWA
- ;DungeonPad(432, 241)
- DungeonPad(($topLeft[0]+315),($topLeft[1]+91))
- ;DungeonPad(458, 252)
- DungeonPad(($topLeft[0]+341),($topLeft[1]+102))
- ;DungeonPad2(142, 531)
- DungeonPad2(($topLeft[0]+25),($topLeft[1]+381))
- ;DungeonPad2(143, 361)
- DungeonPad2(($topLeft[0]+26),($topLeft[1]+211))
- ;DungeonPad2(144, 506)
- DungeonPad2(($topLeft[0]+27),($topLeft[1]+356))
- ;DungeonPad(576, 243)
- DungeonPad(($topLeft[0]+459),($topLeft[1]+93))
- ;DungeonPad(312, 447)
- DungeonPad(($topLeft[0]+195),($topLeft[1]+297))
- ;DungeonPad(168, 398)
- DungeonPad(($topLeft[0]+51),($topLeft[1]+248))
- 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
- $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
- ; **** This section may need some work
- MouseMove(($topLeft[0]+368), ($topLeft[1]+253), 3)
- MouseClick("left")
- sleep(500)
- MouseMove(($topLeft[0]+383), ($topLeft[1]+310), 3)
- MouseClick("left")
- sleep(500)
- ; find white pad
- WaitForPads()
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$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],$PadColor1)
- If @error=1 Then
- $battleCheck = 2
- Else
- Battle($arenaCoord[0], $arenaCoord[1])
- $TotalXP=$TotalXP+$UWAXP[$NumberOfBattles]
- EndIf
- Wend
- WaitForPads()
- ; death check
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
- Else
- $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1],$ExitColor1)
- If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
- $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1],$ExitColor1)
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- Else
- DungeonPad($arenaCoord[0],$arenaCoord[1])
- EndIf
- EndIf
- ; might need to check more than once
- ;$DeathPixel = PixelGetColor(682, 208)
- $DeathPixel = PixelGetColor(($topLeft[0]+565), ($topLeft[1]+58))
- If ($DeathPixel = $DeathColor) Then
- $continue = 2
- MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
- EndIf
- WEnd
- ; died - remove last battle XP
- $TotalXP=$TotalXP-$UWAXP[$NumberOfBattles]
- ; starting from Shikaakwa - return to UWA
- ;DungeonPad2(816, 577)
- DungeonPad2(($topLeft[0]+699),($topLeft[1]+427))
- ;DungeonPad2(696, 614)
- DungeonPad2(($topLeft[0]+579),($topLeft[1]+464))
- ;DungeonPad2(816, 600)
- DungeonPad2(($topLeft[0]+699),($topLeft[1]+450))
- ;DungeonPad(816, 410)
- DungeonPad(($topLeft[0]+699),($topLeft[1]+260))
- ;DungeonPad(815, 289)
- DungeonPad(($topLeft[0]+698),($topLeft[1]+139))
- ;DungeonPad(816, 434)
- DungeonPad(($topLeft[0]+699),($topLeft[1]+284))
- ;DungeonPad(816, 362)
- DungeonPad(($topLeft[0]+699),($topLeft[1]+212))
- ;DungeonPad(288, 242)
- DungeonPad(($topLeft[0]+171),($topLeft[1]+92))
- ;DungeonPad(816, 313)
- DungeonPad(($topLeft[0]+699),($topLeft[1]+163))
- ;DungeonPad(649, 229)
- DungeonPad(($topLeft[0]+532),($topLeft[1]+79))
- ;DungeonPad(144, 523)
- DungeonPad(($topLeft[0]+27),($topLeft[1]+373))
- ;DungeonPad(144, 498)
- DungeonPad(($topLeft[0]+27),($topLeft[1]+348))
- ;DungeonPad(143, 547)
- DungeonPad2(($topLeft[0]+26),($topLeft[1]+397))
- ;DungeonPad(144, 404)
- DungeonPad(($topLeft[0]+27),($topLeft[1]+254))
- ;DungeonPad2(600, 607)
- DungeonPad2(($topLeft[0]+483),($topLeft[1]+457))
- ;DungeonPad(144, 427)
- DungeonPad(($topLeft[0]+27),($topLeft[1]+277))
- ;DungeonPad(384, 235)
- DungeonPad(($topLeft[0]+267),($topLeft[1]+85))
- ;DungeonPad(143, 458)
- DungeonPad(($topLeft[0]+26),($topLeft[1]+308))
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement