Advertisement
Guest User

Sacred Seasons 1 bot grind script v0.933

a guest
Nov 26th, 2010
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 69.81 KB | None | 0 0
  1. ; Sacred seasons bot / grind script v0.933 (11/26/2010)
  2. ; http://madscripter.wordpress.com
  3. ; v0.002 - attacks all in Tsulas and BW A3 - 08/27/2010
  4. ; v0.003 - put in your own coordinates and it should work on SS and Kong
  5. ; v0.004 - added UW E4
  6. ; v0.005 - code cleanup - added UW D2
  7. ; v0.006 - first attempt at generic dungeon grinder
  8. ; v0.007 - added UW F4
  9. ; v0.008 - generic grinder working well - lets try entire arena grind!
  10. ; v0.009 - cleaning up code - ff arena grind works
  11. ; v0.010 - SVA arena grind works
  12. ; v0.011 - changes I made for arena grind didn't work with dungeon grind
  13. ; fixed
  14. ; generic grinder didn't work at all
  15. ; fixed - but only lightly tested
  16. ; v0.012 - adding BRA grind and making BRA repeat after you die
  17. ; v0.013 - making SVA repeat after you die (gotta level my alt!)
  18. ; v0.014 - added FF repeat after you die - I'm not sure why you would want
  19. ; to do that but oh well - also some code cleanup (09/01/10)
  20. ; v0.015 - added BWA grind and repeat
  21. ; v0.016 - added more safeguards against server delay in displaying
  22. ; battle and exit pads
  23. ; v0.017 - not sure previous fixes work but adding DFA anyway
  24. ; v0.018 - added display timer to show how long each iteration took -
  25. ; good for figuring out how much XP/min you're getting (09/02)
  26. ; v0.019 - removing some death checks and seeing if it still works -
  27. ; found a tricky bug that would hang program while walking across map
  28. ; v0.020 - Trying to calculate XP/Min stats for each grind choice
  29. ; v0.021 - still getting XP/Min stats
  30. ; v0.022 - added CWA, UWA,
  31. ; v0.023 - added WaitForPads to dungeon grinds
  32. ; v0.024 - adding HP checking to Tsulas
  33. ; v0.025 - adding HP checking to UW_D2 - no improvement
  34. ; v0.026 - testing attack speed improvements
  35. ; v0.027 - tracked down a bug - might be coincidence but I think SS changed
  36. ; something to try and stop my script - fixed!
  37. ; v0.900 - automatically finds window coordinates
  38. ; v0.901 - starting work on GUI
  39. ; v0.902 - displays window coordinates - allows update
  40. ; v0.903 - fixing 902
  41. ; v0.904 - updated coordinates - testing
  42. ; v0.905 - redoing all coordinates
  43. ; v0.906 - more GUI work
  44. ; v0.907 - fixing window coordinates
  45. ; v0.908 - redoing find battle menu code
  46. ; v0.909 - adding low level character grind - not working well yet
  47. ; v0.910 - Adding UW A3, B4, A4
  48. ; v0.911 - making Arena grinds repeat when finished
  49. ; v0.912 - small update to newbie grind
  50. ; v0.913 - bugfixes to arena grind (only on DFA) - redid death check
  51. ; redid battle icon find and exit find
  52. ; v0.914 - testing new death check on BRA
  53. ; v0.915 - minor change in waitforpads - less color sensitive
  54. ; v0.916 - minor update to stats display
  55. ; v0.917 - additional checks so it will never click below the game area
  56. ; added -119 to $bottomRight[1]
  57. ; v0.918 - replacing deathcheck in all arenas
  58. ; v0.919 - fixing arena grinds repeat
  59. ; v0.920 - putting DFA fixes in all arenas
  60. ; v0.921 - rewrite/consolidation of arena code
  61. ; v0.922 - updating newbie grind
  62. ; v0.923 - redoing arena room exits
  63. ; v0.924 - undoing some 923 changes
  64. ; v0.925 - newbie grind update - repeating one battle in BR A2
  65. ; v0.926 - fixing generic
  66. ; v0.927 - I broke waitforpads - hopefully fixed it now
  67. ; v0.928 - Oops - I broke arena repeat - this should fix it
  68. ; v0.928 - cataloging battle coordinates
  69. ; v0.929 - adding Underworld C2
  70. ; v0.930 - arena exits only worked on ss site, fixed
  71. ; v0.931 - one line change in findattack2
  72. ; v0.932 - trying to add astral travel III buff, fixed error in UW_C2
  73. ; v0.933 - updating GUI - trying to add buffs
  74. ;
  75. ;
  76. ; todo - PGA - add silver info, finish checking XP info
  77. ; retest everything
  78. ; CWA and UWA might not be working right now - (11/06/10)
  79. ; - will examine more later
  80. ;
  81. ; Misc documentation:
  82. ; This is a work in progress - lots of ugly code, commented debugging
  83. ; code and other nonsense.
  84. ;
  85. ; There is currently no way for the script to buff or heal you automatically
  86. ; so this script works best on dungeons you can finish with only attacks.
  87. ; But the pause key will pause the script so you can buff/heal/whatever and
  88. ; then press pause again and the script should resume.
  89. ;
  90. ; For arena runs - checking to see if you died occurs in multiple places and
  91. ; can result in multiple 'you died!' messages once you actually die. It's
  92. ; not a bug - it's a feature. Comment them out if they annoy you.
  93. ;
  94. ; I'm thinking that running arenas is less conspicuous than running a
  95. ; dungeon over and over. Figuring out which arena gets you the best XP/min
  96. ; is up to you. But make sure you can finish the first room of the arena
  97. ; or else the script will bomb. I should fix that - but it's a low
  98. ; priority right now.
  99. ;
  100. ; Script will calculate and display XP/Min that you are getting.
  101. ; These numbers assume that you are grinding solo - if not, the numbers
  102. ; are wrong. Also, numbers will be completely wrong if you are using
  103. ; the generic dungeon grind function.
  104. ;
  105. ; There are many ways to slightly increase the speed of this script but I
  106. ; went for stability instead of speed. It still glitches sometimes but its
  107. ; also run for over 10 hours unattended - your mileage may vary
  108. ;
  109. ; This is an AutoIT3 script
  110. ; Get AutoIT at http://www.autoitscript.com/autoit3/index.shtml
  111. ;
  112. ; As the script runs, it will pop up a window telling you how many times it
  113. ; has run that section and how long it took. This is purely informative and
  114. ; can be commented out if you don't like it.
  115.  
  116. Global $topLeft[2]
  117. Global $bottomRight[2]
  118.  
  119. Global $paused
  120. HotKeySet("{ESC}", "Terminate")
  121. HotKeySet("{PAUSE}","_pause")
  122.  
  123. Func _pause()
  124. $paused = NOT $paused
  125. While $paused
  126. Sleep(100)
  127. Wend
  128. EndFunc
  129.  
  130. Global $coord[2]
  131. Global $coord2[2]
  132. Global $exitCoord[2]
  133. Global $newArenaCoord[2]
  134. Global $ArenaCoord[2]
  135. Global $battleCoord[2]
  136. Global $genericCoord[2]
  137. Global $GenericEntrance[2]
  138. Global $newGenCoord[2]
  139. Global $waitCoord[2]
  140. Global $TotalRunCount
  141. Global $AttackColor1
  142. Global $AttackColor2
  143. Global $BlankColor1
  144. Global $BlankPixel
  145. ; checks HP for Tsulas2 grind - about 66%
  146. Global $BlankPixel2
  147. ; checks HP for NewbGrind - about 90%
  148. Global $BlankPixel3
  149. ; checks HP for NewbGrind - about 99%
  150. Global $xCoord
  151. Global $yCoord
  152. Global $AttackLoop
  153. Global $AttackPixel
  154. Global $AttackPixelCount
  155. Global $BattleCheckSum
  156. Global $DungeonCheckSum
  157. Global $xPos
  158. Global $yPos
  159. Global $checkPixel
  160. Global $battleCheck
  161. Global $GenericContinue
  162. Global $ArenaContinue
  163. Global $NumberOfBattles
  164. Global $TsulasHP
  165. Global $TotalXP
  166. Global $EntireXP
  167. Global $startTime
  168. Global $entireTime
  169. Global $timeElapsed
  170. Global $CheckTimer
  171. ; CWA
  172. Global $CWACoord[2]
  173. Global $CWAContinue
  174. Global $NewCWACoord[2]
  175. ; UWA
  176. Global $UWACoord[2]
  177. Global $UWAContinue
  178. Global $NewUWACoord[2]
  179. ; Death check
  180. Global $DeathColor
  181. Global $DeathPixel
  182.  
  183. Global $ArenaXP[10][100]
  184.  
  185. Global $ArenaNumberOfBattles[10]=[0,96,96,97,94,89,22,33,87,33]
  186. ; FFXP - correct values and checked
  187. 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]
  188. ; SVAXP - correct values - placement not checked
  189. 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]
  190. ; BWAXP - correct values - placement not checked
  191. 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]
  192. ; DFAXP - correct values - placement not checked
  193. 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]
  194. ; BRAXP - correct values - placement not checked
  195. 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]
  196. ; CWAXP - incorrect
  197. 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]
  198. ; UWAXP - incorrect
  199. 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]
  200. Global $guiExit
  201.  
  202. Global $ArenaExit[15]=[0, 225, 90, 130, 401, 417, 186, 586, 126, 705, 185, 705, 450, 633, 102]
  203. Global $ArenaRoomCount
  204. 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]
  205.  
  206. Global $grind_choice
  207.  
  208. Global $battleTextFind[2]
  209. Global $BattleFound
  210. $AttackColor1 = Dec("FFFFFF")
  211. $AttackColor2 = Dec("FFFEFF")
  212. $BlankColor1 = Dec("333333")
  213. $BattleTextColor = 0xFFFFFF
  214. $PadColor1 = 0xFC4744
  215. $PadColor2 = 0xFD4743
  216. $ExitColor1 = 0xF8F6EA
  217. $DeathColor = Dec("86A89C")
  218. $UWEXitColor1 = 0x6DFCF6
  219.  
  220. Opt("WinTitleMatchMode", 2)
  221.  
  222. ; get offsets for coordinates
  223. $win01 = WinGetPos("Sacred Seasons")
  224. If @error=1 Then
  225. $win01 = WinGetPos("Mozilla Firefox")
  226. EndIf
  227. $winclient = WinGetClientSize("Sacred Seasons")
  228. If @error=1 Then
  229. $winclient = WinGetClientSize("Mozilla Firefox")
  230. EndIf
  231. $border = ($win01[2] - $winclient[0])/2
  232. $titleoffset = $win01[3] - $winclient[1] - $border
  233.  
  234.  
  235. ; check in IE7/8
  236. $pos = ControlGetPos("[CLASS:IEFrame]", "", "MacromediaFlashPlayerActiveX1")
  237. If @error <> 1 Then
  238. $topLeft[0] = $pos[0] + $win01[0] + $border
  239. $topLeft[1] = $pos[1] + $win01[1] + $titleoffset
  240. $bottomRight[0] = $topLeft[0] + 740
  241. $bottomRight[1] = $topLeft[1] + 600
  242. ;MsgBox(0, "Window Stats: IE", "POS: " & $pos[0] & "," & $pos[1] & " SIZE: " & $pos[2] & "," & $pos[3] )
  243. EndIf
  244.  
  245. ; check in Firefox 3
  246. $pos = ControlGetPos("[CLASS:MozillaUIWindowClass]", "", "GeckoPluginWindow1")
  247. If @error <> 1 Then
  248. $topLeft[0] = $pos[0] + $win01[0] + $border
  249. $topLeft[1] = $pos[1] + $win01[1] + $titleoffset
  250. $bottomRight[0] = $topLeft[0] + 740
  251. $bottomRight[1] = $topLeft[1] + 600
  252. ;MsgBox(0, "Window Stats: Firefox3", "POS: " & $pos[0] & "," & $pos[1] & " SIZE: " & $pos[2] & "," & $pos[3] )
  253. EndIf
  254.  
  255. ; check in Firefox 4
  256. $pos = ControlGetPos("[CLASS:MozillaWindowClass]", "", "GeckoPluginWindow1")
  257. If @error <> 1 Then
  258. $topLeft[0] = $pos[0] + $win01[0] + $border
  259. $topLeft[1] = $pos[1] + $win01[1] + $titleoffset
  260. $bottomRight[0] = $topLeft[0] + 740
  261. $bottomRight[1] = $topLeft[1] + 600
  262. ;MsgBox(0, "Window Stats: Firefox4", "POS: " & $pos[0] & "," & $pos[1] & " SIZE: " & $pos[2] & "," & $pos[3] )
  263. EndIf
  264.  
  265. ;populate XP values
  266. For $xloop = 1 to 96
  267. $ArenaXP[1][$xloop]=$FFXP[$xloop]
  268. Next
  269.  
  270. For $xloop = 1 to 96
  271. $ArenaXP[2][$xloop]=$SVAXP[$xloop]
  272. Next
  273.  
  274. For $xloop = 1 to 97
  275. $ArenaXP[3][$xloop]=$BWAXP[$xloop]
  276. Next
  277.  
  278. For $xloop = 1 to 95
  279. $ArenaXP[4][$xloop]=$DFAXP[$xloop]
  280. Next
  281.  
  282. For $xloop = 1 to 89
  283. $ArenaXP[5][$xloop]=$BRAXP[$xloop]
  284. Next
  285.  
  286. For $xloop = 1 to 89
  287. $ArenaXP[6][$xloop]=$CWAXP[$xloop]
  288. Next
  289.  
  290. For $xloop = 1 to 89
  291. $ArenaXP[7][$xloop]=$UWAXP[$xloop]
  292. Next
  293.  
  294.  
  295.  
  296. $TotalRunCount=0
  297.  
  298. $screenWidth = $bottomRight[0] - $topLeft[0]
  299. $screenHeight = $bottomRight[1] - $topLeft[1]
  300.  
  301. $repeatagain = 1
  302.  
  303. $entireTime = TimerInit()
  304.  
  305.  
  306. ; GUI starts here
  307. #include <GUIConstantsEx.au3>
  308. #include <EditConstants.au3>
  309.  
  310. GUICreate("Sacred Seasons bot / grind script - http://madscripter.wordpress.com", 800, 600)
  311.  
  312. GUICtrlCreateLabel("Top Left", 10, 10)
  313. $InputSize1 = GUICtrlCreateInput($topLeft[0], 10, 25, 100, 20)
  314. GUICtrlCreateLabel("Top Left", 140, 10)
  315. $InputSize2 = GUICtrlCreateInput($topLeft[1], 140, 25, 100, 20)
  316. GUICtrlCreateLabel("Bottom Right", 10, 50)
  317. $InputSize3 = GUICtrlCreateInput($bottomRight[0], 10, 65, 100, 20)
  318. GUICtrlCreateLabel("Bottom Right", 140, 50)
  319. $InputSize4 = GUICtrlCreateInput($bottomRight[1], 140, 65, 100, 20)
  320. GUICtrlCreateLabel("Window width", 10, 90)
  321. $InputSize5 = GUICtrlCreateInput($screenWidth, 10, 105, 100, 20, $ES_READONLY)
  322. GUICtrlCreateLabel("Window height", 140, 90)
  323. $InputSize6 = GUICtrlCreateInput($screenHeight, 140, 105, 100, 20, $ES_READONLY)
  324.  
  325. GUICtrlCreateLabel("The above coordinates are what the script found automatically. If the values are zero, 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 IE7, IE8, Firefox 3, and Firefox 4. It currently doesn't work in Opera or Chrome but I'm working on it.)", 10, 145, 250, 120)
  326.  
  327. 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)
  328.  
  329. $ContinueButton1 = GUICtrlCreateButton("Continue", 300, 550, 100)
  330.  
  331. GUICtrlCreateGroup("Select a section to grind:", 310, 10, 480, 250)
  332.  
  333. $choice_1 = GUICtrlCreateRadio("Newbie Grind", 330, 25, 210, 20)
  334. $choice_2 = GUICtrlCreateRadio("Bleakwoods D4 (Tsulas)", 330, 45, 210, 20)
  335. $choice_3 = GUICtrlCreateRadio("Bleakwoods A3 (Flo)", 330, 65, 210, 20)
  336. $choice_18 = GUICtrlCreateRadio("Underworld C2 (Octogum / Water Worm)", 330, 85, 240, 20)
  337. $choice_4 = GUICtrlCreateRadio("Underworld E4 (Hector / Choppers)", 330, 105, 210, 20)
  338. $choice_5 = GUICtrlCreateRadio("Underworld D2 (Worm/Octogum/Frogs)", 330, 125, 210, 20)
  339. $choice_6 = GUICtrlCreateRadio("Underworld F4 (Charlotte / Choppers)", 330, 145, 210, 20)
  340. $choice_7 = GUICtrlCreateRadio("Underworld A3 (Green Dragons / Bubblers)", 330, 165, 240, 20)
  341. $choice_8 = GUICtrlCreateRadio("Underworld B4 (Skeletons / Pirates)", 330, 185, 210, 20)
  342. $choice_9 = GUICtrlCreateRadio("Underworld A4 (Elementals)", 330, 205, 210, 20)
  343. $choice_10 = GUICtrlCreateRadio("Generic", 330, 225, 210, 20)
  344. $choice_11 = GUICtrlCreateRadio("Arena - FF", 600, 25, 180, 20)
  345. $choice_12 = GUICtrlCreateRadio("Arena - SVA", 600, 45, 180, 20)
  346. $choice_13 = GUICtrlCreateRadio("Arena - BWA", 600, 65, 180, 20)
  347. $choice_14 = GUICtrlCreateRadio("Arena - DFA", 600, 85, 180, 20)
  348. $choice_15 = GUICtrlCreateRadio("Arena - BRA", 600, 105, 180, 20)
  349. $choice_16 = GUICtrlCreateRadio("Arena - CWA", 600, 125, 180, 20)
  350. $choice_17 = GUICtrlCreateRadio("Arena - UWA", 600, 145, 180, 20)
  351.  
  352. $choice_text = GUICtrlCreateLabel("", 310, 270, 450, 100)
  353.  
  354. $grind_choice = 0
  355.  
  356. $BuffBox = GUICtrlCreateCheckbox("Check to use buff before battle", 10, 340, 400, 20)
  357.  
  358. GUICtrlCreateLabel("Spell to use first in battle (1 - 21) ", 40, 370)
  359. $BuffSpell1 = GUICtrlCreateInput("", 10, 365, 25, 20)
  360.  
  361. GUICtrlCreateGroup("", -99, -99, 1, 1)
  362.  
  363. GUISetState(@SW_SHOW)
  364.  
  365. While $guiExit <> 1
  366. $msg = GUIGetMsg()
  367. If $msg = $GUI_EVENT_CLOSE Then
  368. Exit
  369. EndIF
  370. If $msg = $InputSize1 Then
  371. $topLeft[0] = GUICtrlRead($InputSize1)
  372. $screenWidth = $bottomRight[0] - $topLeft[0]
  373. $screenHeight = $bottomRight[1] - $topLeft[1]
  374. GUICtrlSetData($InputSize5, $screenWidth)
  375. EndIf
  376. If $msg = $InputSize2 Then
  377. $topLeft[1] = GUICtrlRead($InputSize2)
  378. $screenWidth = $bottomRight[0] - $topLeft[0]
  379. $screenHeight = $bottomRight[1] - $topLeft[1]
  380. GUICtrlSetData($InputSize6, $screenHeight)
  381. EndIf
  382. If $msg = $InputSize3 Then
  383. $bottomRight[0] = GUICtrlRead($InputSize3)
  384. $screenWidth = $bottomRight[0] - $topLeft[0]
  385. $screenHeight = $bottomRight[1] - $topLeft[1]
  386. GUICtrlSetData($InputSize5, $screenWidth)
  387. EndIf
  388. If $msg = $InputSize4 Then
  389. $bottomRight[1] = GUICtrlRead($InputSize4)
  390. $screenWidth = $bottomRight[0] - $topLeft[0]
  391. $screenHeight = $bottomRight[1] - $topLeft[1]
  392. GUICtrlSetData($InputSize6, $screenHeight)
  393. EndIf
  394. If $msg = $choice_1 Then
  395. GUICtrlSetData($choice_text, "Takes a low level character through increasingly harder dungeons. Good for level 1 alts. Start with your character in Shikaakwa by Jona. Only lightly tested - please give me suggestions on how to improve this.")
  396. $grind_choice=1
  397. EndIf
  398. If $msg = $choice_2 Then
  399. GUICtrlSetData($choice_text, "Move your character to Bleakwoods D4 (Tsulas) away from the entrance. Your character must be able to complete both battles once without dying or the script will fail.")
  400. $grind_choice=2
  401. EndIf
  402. If $msg = $choice_3 Then
  403. GUICtrlSetData($choice_text, "Move your character to Bleakwoods A3 (Flo) away from the entrance. Your character must be able to complete the battles without dying or the script will fail.")
  404. $grind_choice=3
  405. EndIf
  406. If $msg = $choice_4 Then
  407. GUICtrlSetData($choice_text, "Move your character to Underworld E4 (Hector / Choppers) away from the entrance. Your character must be able to complete the battles without dying or the script will fail.")
  408. $grind_choice=4
  409. EndIf
  410. If $msg = $choice_5 Then
  411. GUICtrlSetData($choice_text, "Move your character to Underworld D2 (Worms / Octogums / Frogs) away from the entrance. Your character must be able to complete the battles without dying or the script will fail.")
  412. $grind_choice=5
  413. EndIf
  414. If $msg = $choice_6 Then
  415. GUICtrlSetData($choice_text, "Move your character to Underworld F4 (Charlotte / Choppers) away from the entrance. Your character must be able to complete the battles without dying or the script will fail.")
  416. $grind_choice=6
  417. EndIf
  418. If $msg = $choice_7 Then
  419. GUICtrlSetData($choice_text, "Move your character to Underworld A3 (Octogums / Green Dragons / Bubblers) away from the entrance. Your character must be able to complete the battles without dying or the script will fail.")
  420. $grind_choice=7
  421. EndIf
  422. If $msg = $choice_8 Then
  423. GUICtrlSetData($choice_text, "Move your character to Underworld B4 (William / Skeletons / Pirates) away from the entrance. Your character must be able to complete the battles without dying or the script will fail.")
  424. $grind_choice=8
  425. EndIf
  426. If $msg = $choice_9 Then
  427. GUICtrlSetData($choice_text, "Move your character to Underworld A4 (Elementals) away from the entrance. Your character must be able to complete the battles without dying or the script will fail.")
  428. $grind_choice=9
  429. EndIf
  430. If $msg = $choice_10 Then
  431. GUICtrlSetData($choice_text, "Generic grinder. Move your character near any dungeon entrance. This routine is only lightly tested and may not work on all dungeons. Your character must be able to complete the battles without dying or the script will fail.")
  432. $grind_choice=10
  433. EndIf
  434. If $msg = $choice_11 Then
  435. 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.")
  436. $grind_choice=11
  437. EndIf
  438. If $msg = $choice_12 Then
  439. 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.")
  440. $grind_choice=12
  441. EndIf
  442. If $msg = $choice_13 Then
  443. 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.")
  444. $grind_choice=13
  445. EndIf
  446. If $msg = $choice_14 Then
  447. 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.")
  448. $grind_choice=14
  449. EndIf
  450. If $msg = $choice_15 Then
  451. 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.)")
  452. $grind_choice=15
  453. EndIf
  454. If $msg = $choice_16 Then
  455. 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.")
  456. $grind_choice=16
  457. EndIf
  458. If $msg = $choice_17 Then
  459. 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.")
  460. $grind_choice=17
  461. EndIf
  462. If $msg = $choice_18 Then
  463. GUICtrlSetData($choice_text, "Move your character to Underworld C2 (Octogums / Water Worms) away from the entrance. Your character must be able to complete the battles without dying or the script will fail.")
  464. $grind_choice=18
  465. EndIf
  466. If ($msg = $ContinueButton1) AND ($grind_choice <> 0) Then
  467. ; check if buff is checked
  468. $BuffCheck = BitAnd(GUICtrlRead($BuffBox),$GUI_CHECKED)
  469. If $BuffCheck = 1 Then
  470. ; check to make sure spell # is between 1 - 21
  471. $BuffSpellNumber = GUICtrlRead($BuffSpell1)
  472. If ($BuffSpellNumber > 0) AND ($BuffSpellNumber < 22) Then
  473. $guiExit = 1
  474. Else
  475. ; need to display some sort of error - NOT DONE YET
  476. $BuffDisplayError = 1
  477. EndIf
  478. Else
  479. $guiExit = 1
  480. EndIf
  481. EndIf
  482. Sleep(50)
  483. WEnd
  484.  
  485. GUISetState(@SW_HIDE)
  486.  
  487. ; 0 if not checked, 1 if checked
  488. $BuffCheck = BitAnd(GUICtrlRead($BuffBox),$GUI_CHECKED)
  489.  
  490. WinActivate ("[CLASS:IEFrame]", "")
  491. WinActivate ("[CLASS:MozillaUIWindowClass]", "")
  492. WinActivate ("[CLASS:MozillaWindowClass]", "")
  493.  
  494.  
  495.  
  496. While $repeatagain < 6000
  497. $startTime = TimerInit()
  498. $TotalXP=0
  499. If $grind_choice=1 Then
  500. NewbGrind()
  501. EndIf
  502. If $grind_choice=2 Then
  503. GrindTsulas2()
  504. EndIf
  505. If $grind_choice=3 Then
  506. GrindBW_A3()
  507. EndIf
  508. If $grind_choice=4 Then
  509. GrindUW_E4()
  510. EndIf
  511. If $grind_choice=5 Then
  512. GrindUW_D2()
  513. EndIf
  514. If $grind_choice=6 Then
  515. GrindUW_F4()
  516. EndIf
  517. If $grind_choice=7 Then
  518. GrindUW_A3()
  519. EndIf
  520. If $grind_choice=8 Then
  521. GrindUW_B4()
  522. EndIf
  523. If $grind_choice=9 Then
  524. GrindUW_A4()
  525. EndIf
  526. If $grind_choice=10 Then
  527. Generic()
  528. EndIf
  529. If $grind_choice=11 Then
  530. $ArenaNumber = 1
  531. ArenaGrind2()
  532. EndIf
  533. If $grind_choice=12 Then
  534. $ArenaNumber = 2
  535. ArenaGrind2()
  536. EndIf
  537. If $grind_choice=13 Then
  538. $ArenaNumber = 3
  539. ArenaGrind2()
  540. EndIf
  541. If $grind_choice=14 Then
  542. $ArenaNumber = 4
  543. ArenaGrind2()
  544. EndIf
  545. If $grind_choice=15 Then
  546. $ArenaNumber = 5
  547. ArenaGrind2()
  548. EndIf
  549. If $grind_choice=16 Then
  550. $ArenaNumber = 6
  551. ArenaCWA()
  552. EndIf
  553. If $grind_choice=17 Then
  554. $ArenaNumber = 7
  555. ArenaUWA()
  556. EndIf
  557. If $grind_choice=18 Then
  558. GrindUW_C2()
  559. EndIf
  560.  
  561.  
  562. $EntireXP = $EntireXP + $TotalXP
  563. $timeElapsed = TimerDiff($startTime)
  564. $entireTimeElapsed = TimerDiff($entireTime)
  565. $TotalRunCount = $TotalRunCount + 1
  566. MsgBox(8192, "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, 5)
  567. ;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)
  568. ;ConsoleWrite("TotalXP=" & $TotalXP & @CRLF)
  569. ;ConsoleWrite("EntireXP=" & $EntireXP & @CRLF & @CRLF)
  570.  
  571. $repeatagain = $repeatagain + 1
  572. WEnd
  573.  
  574.  
  575. Func AttackGrid($menu)
  576. ; bottom left
  577. ; (659, 537) - new value
  578. Attack (0.741, 0.650)
  579.  
  580. ; bottom right
  581. ; (814, 532)
  582. Attack(0.950, 0.642)
  583.  
  584. ; middle right
  585. ; (778, 446)
  586. Attack(0.902, 0.500)
  587.  
  588. ; middle left
  589. ; (611, 437) - new value
  590. Attack(0.676, 0.483)
  591.  
  592. ; top right
  593. ; (727, 352)
  594. Attack(0.833, 0.342)
  595.  
  596. ; top left
  597. ; (560, 337) - new value
  598. Attack (0.607, 0.317)
  599.  
  600. EndFunc
  601.  
  602. Func Attack($x, $y)
  603. $xPos = $topLeft[0] + ($screenWidth * $x)
  604. $yPos = $topLeft[1] + ($screenHeight * $y)
  605. MouseMove($xPos, $yPos, 0)
  606. MouseClick("left")
  607. EndFunc
  608.  
  609. Func findAttack()
  610. ;$xCoord=456
  611. $xCoord=$topLeft[0]+345
  612. ;$yCoord=371
  613. $yCoord=$topLeft[1]+224
  614. MouseMove($xCoord,($yCoord-40), 1)
  615. ;For $yCoord = 371 to 489
  616. For $yCoord = ($topLeft[1]+224) to ($topLeft[1]+342)
  617. $AttackPixelCount=0
  618. ; moving the mouse here is not necessary and slows things down
  619. ; a bit but it makes the script more stable
  620. ; - and it looks cool - uncomment it and see how it runs for you
  621. ;MouseMove($xCoord,$yCoord, 1)
  622. For $AttackLoop = 0 to 9
  623. $AttackPixel = PixelGetColor($xCoord + $AttackLoop,$yCoord)
  624. If ($AttackPixel > 16646144) Then
  625. $AttackPixelCount = $AttackPixelCount + 1
  626. Else
  627. $AttackLoop=9
  628. EndIf
  629. Next
  630. If $AttackPixelCount > 9 Then
  631. MouseMove($xCoord,$yCoord, 1)
  632. $coord[0]=$xCoord
  633. $coord[1]=$yCoord
  634. Return ($coord)
  635. EndIf
  636. Next
  637. $coord[0]=1
  638. $coord[1]=1
  639. Sleep(500)
  640. Return ($coord)
  641. EndFunc
  642.  
  643. Func findAttack2()
  644.  
  645. $coord2 = PixelSearch($topLeft[0]+333, $topLeft[1]+200, $topLeft[0]+338, $topLeft[1]+343, $AttackColor1, 10)
  646. If @error=1 Then
  647. $coord[0]=1
  648. $coord[1]=1
  649. Sleep(200)
  650. Return ($coord)
  651. EndIf
  652. ; I'm not sure why this line is here....
  653. ;$coord2 = PixelSearch($topLeft[0]+333, $topLeft[1]+200, $topLeft[0]+338, $topLeft[1]+343, $AttackColor1, 6)
  654. $coord[0] = $topLeft[0] + 345
  655. $coord[1] = $coord2[1] + 30
  656. Return($coord)
  657. EndFunc
  658.  
  659. Func Terminate()
  660. Exit
  661. EndFunc
  662.  
  663. Func Battle($x, $y)
  664. ;$BattleCheckSum = PixelChecksum(230,213,250,225) - old
  665. ;$BattleCheckSum = PixelChecksum(769, 625, 836, 640)
  666. $BattleCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+478),($topLeft[0]+725),($topLeft[1]+493))
  667. MouseMove($x, $y, 3)
  668. ; is this long sleep still necessary? - 10/31
  669. ; this helps with lag stability - 11/06
  670. Sleep(1000)
  671. MouseClick("left")
  672. While $BattleCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+478),($topLeft[0]+725),($topLeft[1]+493))
  673. Sleep(100)
  674. WEnd
  675. ; kill all creatures
  676. ;$BattleCheckSum = PixelCheckSum(186,400,205,414)
  677. $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
  678.  
  679. If $BuffCheck = 1 Then
  680. ; first - do astral travel buff
  681. ; do findattack2 until battlecoord > 1
  682. ; click on skill
  683. ; click on astral travel 2
  684. ; -- later, try clicking on 3, then 2
  685. ; click on character
  686. ; resume battle
  687.  
  688. ; do findattack2 until battlecoord > 1
  689. $battleCoord[0] = 1
  690. While $battleCoord[0] = 1
  691. $battleCoord = findAttack2()
  692. WEnd
  693. $battleCoord[1] = $battleCoord[1] + 22
  694. ; click on skill
  695. MouseMove($battleCoord[0], $battleCoord[1], 3)
  696. Sleep(200)
  697. MouseClick("left")
  698. ; click on astral travel 3 / skill of choice
  699. Sleep(500)
  700. ;MouseMove(551, 359, 3)
  701. MouseMove($topLeft[0]+$BuffCoords[(($BuffSpellNumber*2)-1)],$topLeft[1]+$BuffCoords[(($BuffSpellNumber*2))], 3)
  702. Sleep(200)
  703. MouseClick("left")
  704. ; click on character
  705. Sleep(200)
  706. MouseMove($topLeft[0]+233, $topLeft[1]+190, 3)
  707. Sleep(200)
  708. MouseClick("left")
  709. ; click on cancel (if not enough sp)
  710. MouseMove($topLeft[0]+368, $topLeft[1]+415, 3)
  711. Sleep(200)
  712. MouseClick("left")
  713. Sleep(200)
  714.  
  715. ; end buff
  716. EndIf
  717.  
  718. While $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
  719. $battleCoord = findAttack2()
  720. If $battleCoord[0] > 1 Then
  721. MouseMove($battleCoord[0], $battleCoord[1], 3)
  722. ; Attack every possible position.
  723. Sleep(200)
  724. MouseClick("left")
  725. Sleep(200)
  726. AttackGrid($battleCoord)
  727. EndIf
  728. WEnd
  729. ; fight over - click box
  730. ; check HP first
  731. $BlankPixel = PixelGetColor(($topLeft[0]+182), ($topLeft[1]+458))
  732. $BlankPixel2 = PixelGetColor(($topLeft[0]+216), ($topLeft[1]+458))
  733. $BlankPixel3 = PixelGetColor(($topLeft[0]+226), ($topLeft[1]+458))
  734. ;MouseMove(483, 511, 3)
  735. MouseMove(($topLeft[0]+372),($topLeft[1]+364),3)
  736. ; a little pause to see your stats
  737. Sleep(2000)
  738. ;$BattleCheckSum = PixelChecksum(186,400,205,414)
  739. $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
  740. MouseClick("left")
  741. ; another death check
  742. If (DeathCheck() = 1) Then
  743. $continue=2
  744. MsgBox(8192, "You died! (battle check)", "You died!", 1)
  745. Else
  746. While $BattleCheckSum = PixelCheckSum(($topLeft[0]+75),($topLeft[1]+253),($topLeft[0]+94),($topLeft[1]+267))
  747. Sleep(100)
  748. WEnd
  749. ; is this still necessary? - 10/31
  750. ; this helps with lag stability - 11/06
  751. Sleep(500)
  752. EndIf
  753. $NumberOfBattles=$NumberOfBattles+1
  754. EndFunc
  755.  
  756. Func DungeonPad($x, $y)
  757. ; checks for changes in bottom right corner
  758. MouseMove($x, $y ,3)
  759. Sleep(100)
  760. ;$DungeonCheckSum = PixelChecksum(769, 621, 836, 640)
  761. $DungeonCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+474),($topLeft[0]+725),($topLeft[1]+493))
  762. MouseClick("left")
  763. Sleep(100)
  764. ;$DungeonCheckSum = PixelChecksum(769, 621, 836, 640)
  765. While $DungeonCheckSum = PixelChecksum(($topLeft[0]+658),($topLeft[1]+474),($topLeft[0]+725),($topLeft[1]+493))
  766. Sleep(1000)
  767. ; is this additional click necessary? 11/10
  768. ;MouseClick("left")
  769. WEnd
  770. EndFunc
  771.  
  772. Func DungeonPad2($x, $y)
  773. ; checks for changes in top right corner
  774. MouseMove($x, $y ,3)
  775. Sleep(100)
  776. ;$DungeonCheckSum = PixelChecksum(784, 210, 820, 230)
  777. $DungeonCheckSum = PixelChecksum(($topLeft[0]+673),($topLeft[1]+63),($topLeft[0]+709),($topLeft[1]+83))
  778. MouseClick("left")
  779. Sleep(100)
  780. ;$DungeonCheckSum = PixelChecksum(784, 210, 820, 230)
  781. While $DungeonCheckSum = PixelChecksum(($topLeft[0]+673),($topLeft[1]+63),($topLeft[0]+709),($topLeft[1]+83))
  782. Sleep(1000)
  783. ;MouseClick("left")
  784. WEnd
  785. EndFunc
  786.  
  787. Func WaitForPads()
  788. $padwait=1
  789. While $padwait < 2
  790. ; death check
  791. If (DeathCheck() = 1) Then
  792. $continue = 2
  793. $padwait=$padwait+1
  794. MsgBox(8192, "You died! (Padcheck)", "You died!", 1)
  795. EndIf
  796. ; 117 avoids the non play area, 177 avoids entrance in arenas
  797. ; these should probably be 117?
  798. ; UW needs to be 117 for UW_A3
  799. $waitCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-177,$ExitColor1, 5)
  800. If @error <> 1 Then
  801. $padwait=$padwait+1
  802. EndIf
  803.  
  804. $waitCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-177,$PadColor1, 5)
  805. If @error <> 1 Then
  806. $padwait=$padwait+1
  807. EndIf
  808. $waitCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-117,$UWExitColor1, 5)
  809. If @error <> 1 Then
  810. $padwait=$padwait+1
  811. EndIf
  812. Sleep(500)
  813. WEnd
  814.  
  815. EndFunc
  816.  
  817. Func GrindTsulas2()
  818. ; start script outside of dungeon
  819. ;
  820. ; since it's better to just do the 950 battle over and over again
  821. ; if you can, this for loop determines how many times you do the
  822. ; 950 battle before you do both battles - and replenish your hp and sp
  823. ;
  824. ; - this version checks your HP for you and continues if greater
  825. ; than half
  826. $TsulasHP = 1
  827. While $TsulasHP = 1
  828. ; enter Tsulas
  829. ;DungeonPad(480, 430)
  830. DungeonPad(($topLeft[0]+369),($topLeft[1]+283))
  831. WaitForPads()
  832.  
  833. ; enter first battle - bottom - 4 creatures
  834. ;Battle(389, 557)
  835. Battle(($topLeft[0]+278),($topLeft[1]+410))
  836. WaitForPads()
  837. $TotalXP=$TotalXP+950
  838.  
  839. ;$BlankPixel = PixelGetColor(($topLeft[0]+176), ($topLeft[1]+455))
  840. If ($BlankPixel = $BlankColor1) Then
  841. $TsulasHP = 2
  842. Else
  843. ; click to exit Tsulas
  844. ;DungeonPad(676, 316)
  845. DungeonPad(($topLeft[0]+565),($topLeft[1]+169))
  846.  
  847. ; move away from Tsulas
  848. ;MouseMove(555, 553, 3)
  849. MouseMove(($topLeft[0]+444),($topLeft[1]+406), 3)
  850. Sleep(200)
  851. MouseClick("left")
  852. Sleep(1000)
  853. EndIf
  854. WEnd
  855.  
  856. ; enter second battle - 4 creatures
  857. ;Battle(339, 364)
  858. Battle(($topLeft[0]+228),($topLeft[1]+217))
  859. WaitForPads()
  860.  
  861. ; click to exit Tsulas
  862. ;DungeonPad(676, 316)
  863. DungeonPad(($topLeft[0]+565),($topLeft[1]+169))
  864.  
  865. ; move away from Tsulas
  866. ;MouseMove(555, 553, 3)
  867. MouseMove(($topLeft[0]+444),($topLeft[1]+406), 3)
  868. Sleep(200)
  869. MouseClick("left")
  870. Sleep(1000)
  871. $TotalXP=$TotalXP+550
  872. EndFunc
  873.  
  874. Func GrindBW_A3()
  875. ; start script outside of dungeon
  876. ;
  877. ; enter Bleakwoods A3
  878. ;DungeonPad(601, 398)
  879. DungeonPad(($topLeft[0]+490),($topLeft[1]+251))
  880. WaitForPads()
  881.  
  882. ; enter first battle - right
  883. ;Battle(625, 410)
  884. Battle(($topLeft[0]+514),($topLeft[1]+263))
  885. WaitForPads()
  886.  
  887. ; enter second battle - left
  888. ;Battle(336, 362)
  889. Battle(($topLeft[0]+225),($topLeft[1]+215))
  890. WaitForPads()
  891.  
  892. ; click to exit Bleakwoods A3
  893. ;DungeonPad(720, 554)
  894. DungeonPad(($topLeft[0]+609),($topLeft[1]+407))
  895. WaitForPads()
  896.  
  897. ; move away from Bleakwoods A3
  898. ;MouseMove(507, 443, 3)
  899. MouseMove(($topLeft[0]+396),($topLeft[1]+296),3)
  900. Sleep(100)
  901. MouseClick("left")
  902. Sleep(1000)
  903. $TotalXP=$TotalXP+1617
  904. EndFunc
  905.  
  906. Func GrindUW_E4()
  907. ; start script outside of dungeon
  908. ;
  909. ; enter Underworld E4
  910. ;DungeonPad(792, 327)
  911. DungeonPad(($topLeft[0]+681),($topLeft[1]+180))
  912. WaitForPads()
  913.  
  914. ; enter first battle
  915. ;Battle(480, 361)
  916. Battle(($topLeft[0]+369),($topLeft[1]+214))
  917. WaitForPads()
  918.  
  919. ; enter second battle
  920. ;Battle(600, 350)
  921. Battle(($topLeft[0]+489),($topLeft[1]+203))
  922. WaitForPads()
  923.  
  924. ; enter third battle
  925. ;Battle(649, 421)
  926. Battle(($topLeft[0]+538),($topLeft[1]+274))
  927. WaitForPads()
  928.  
  929. ; exit Underworld E4
  930. ;DungeonPad(288, 531)
  931. DungeonPad(($topLeft[0]+177),($topLeft[1]+384))
  932.  
  933. ; move away from Underworld E4
  934. ;MouseMove(631, 312, 3)
  935. MouseMove(($topLeft[0]+520),($topLeft[1]+165), 3)
  936. Sleep(100)
  937. MouseClick("left")
  938. Sleep(1000)
  939. $TotalXP=$TotalXP+3710
  940. EndFunc
  941.  
  942. Func GrindUW_D2()
  943. ; start script outside of dungeon
  944. ;
  945. ; enter Underworld D2
  946. ;DungeonPad(480, 578)
  947. DungeonPad(($topLeft[0]+369),($topLeft[1]+431))
  948. WaitForPads()
  949.  
  950. ; enter third battle
  951. ;Battle(673, 410)
  952. Battle(($topLeft[0]+562),($topLeft[1]+263))
  953. WaitForPads()
  954.  
  955. ; enter first battle
  956. ;Battle(506, 494)
  957. Battle(($topLeft[0]+395),($topLeft[1]+347))
  958. WaitForPads()
  959.  
  960. ; enter second battle
  961. ;Battle(314, 327)
  962. Battle(($topLeft[0]+203),($topLeft[1]+180))
  963. WaitForPads()
  964.  
  965. ; exit Underworld D2
  966. ;DungeonPad(168, 614)
  967. DungeonPad(($topLeft[0]+57),($topLeft[1]+467))
  968.  
  969. ; move away from Underworld D2
  970. ;MouseMove(390, 524, 3)
  971. MouseMove(($topLeft[0]+279),($topLeft[1]+377), 3)
  972. Sleep(100)
  973. MouseClick("left")
  974. Sleep(1000)
  975. $TotalXP=$TotalXP+3610
  976. EndFunc
  977.  
  978. Func GrindUW_F4()
  979. ; start script outside of dungeon
  980. ;
  981. ; enter Underworld F4
  982. ;DungeonPad(768, 482)
  983. DungeonPad(($topLeft[0]+657), ($topLeft[1]+335))
  984. WaitForPads()
  985.  
  986. ; enter first battle
  987. ;Battle(505, 350)
  988. Battle(($topLeft[0]+394), ($topLeft[1]+203))
  989. WaitForPads()
  990.  
  991. ; enter second battle
  992. ;Battle(625, 434)
  993. Battle(($topLeft[0]+514), ($topLeft[1]+287))
  994. WaitForPads()
  995.  
  996. ; enter third battle
  997. ;Battle(577, 458)
  998. Battle(($topLeft[0]+466), ($topLeft[1]+311))
  999. WaitForPads()
  1000.  
  1001. ; exit Underworld F4
  1002. ;DungeonPad(288, 529)
  1003. DungeonPad(($topLeft[0]+177), ($topLeft[1]+382))
  1004.  
  1005. ; move away from Underworld F4
  1006. ;MouseMove(651, 456, 3)
  1007. MouseMove(($topLeft[0]+540), ($topLeft[1]+309), 3)
  1008. Sleep(100)
  1009. MouseClick("left")
  1010. Sleep(1000)
  1011. $TotalXP=$TotalXP+4787
  1012. EndFunc
  1013.  
  1014. Func Generic()
  1015. ; start script outside of dungeon
  1016. ;
  1017. ; enter dungeon
  1018. ; Find pad
  1019. $GenericContinue = 1
  1020. $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
  1021. If @error=1 Then
  1022. ;MouseMove(544, 537, 3)
  1023. MouseMove(($topLeft[0]+433), ($topLeft[1]+390), 3)
  1024. Sleep(100)
  1025. MouseClick("left")
  1026. Sleep(1000)
  1027. $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
  1028. EndIf
  1029. $GenericEntrance[0] = $genericCoord[0]
  1030. $GenericEntrance[1] = $genericCoord[1]
  1031.  
  1032. DungeonPad($genericCoord[0]+3, $genericCoord[1]+13)
  1033. WaitForPads()
  1034.  
  1035. ; Find Battle
  1036. While $GenericContinue = 1
  1037. sleep(500)
  1038. $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
  1039. $CheckPixel = PixelSearch($genericCoord[0],$genericCoord[1]+29,$genericCoord[0],$genericCoord[1]+38,0xFFFFFF, 5)
  1040. If @error = 0 Then
  1041. Battle($genericCoord[0]+3, $genericCoord[1]+13)
  1042. WaitForPads()
  1043. Else
  1044. $newGenCoord[0]=$genericCoord[0]
  1045. $newGenCoord[1]=$genericCoord[1]
  1046. $genericCoord = PixelSearch($topLeft[0],$newGenCoord[1]+40,$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
  1047. If @error=1 Then
  1048. $GenericContinue = 2
  1049. Else
  1050. Battle($genericCoord[0]+3, $genericCoord[1]+13)
  1051. WaitForPads()
  1052. EndIf
  1053. EndIf
  1054. WEnd
  1055.  
  1056. ; exit dungeon
  1057. $genericCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
  1058. DungeonPad($genericCoord[0]+3, $genericCoord[1]+13)
  1059.  
  1060. WaitForPads()
  1061. ; move away from dungeon
  1062. ; how to make this work?
  1063. ; find coords of pad and try 50 left and right?
  1064. ; ^ not done yet
  1065.  
  1066. ;MouseMove(284, 551, 3)
  1067. MouseMove(($GenericEntrance[0]+50), ($GenericEntrance[1]), 3)
  1068. Sleep(100)
  1069. MouseClick("left")
  1070. MouseMove(($GenericEntrance[0]), ($GenericEntrance[1]-50), 3)
  1071. Sleep(100)
  1072. MouseClick("left")
  1073. MouseMove(($GenericEntrance[0]-50), ($GenericEntrance[1]), 3)
  1074. Sleep(100)
  1075. MouseClick("left")
  1076. MouseMove(($GenericEntrance[0]-50), ($GenericEntrance[1]+50), 3)
  1077. Sleep(100)
  1078. MouseClick("left")
  1079. Sleep(1000)
  1080. $TotalXP=$TotalXP+1
  1081. EndFunc
  1082.  
  1083. Func ArenaCWA()
  1084. ; start script in arena in first room with battles (not in lobby)
  1085. ; if you die, you will return to the arena and start over
  1086. ; if you make it through, you need to stop the script!
  1087. ; this one is different so you do NOT need to be able to
  1088. ; survive through the first room!
  1089. ;
  1090.  
  1091. ; ability to repeat this arena not working yet
  1092.  
  1093. $continue = 1
  1094.  
  1095. ; Find Battle
  1096. While $continue = 1
  1097. ; need to move away from pad first - maybe not necessary?
  1098. ; 09/01 - I decided this is necessary again
  1099. ; **** This section may need some work
  1100. MouseMove(($topLeft[0]+374), ($topLeft[1]+256), 3)
  1101. MouseClick("left")
  1102. sleep(500)
  1103. MouseMove(($topLeft[0]+389), ($topLeft[1]+313), 3)
  1104. MouseClick("left")
  1105. sleep(500)
  1106. ; find white pad
  1107. WaitForPads()
  1108. $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
  1109. If @error=1 Then
  1110. $exitCoord[0] = $topLeft[0]
  1111. $exitCoord[1] = $topLeft[1]
  1112. Else
  1113. $exitCoord[0]=$arenaCoord[0]
  1114. $exitCoord[1]=$arenaCoord[1]
  1115. EndIf
  1116.  
  1117. $battleCheck = 1
  1118.  
  1119. While $battleCheck = 1
  1120. ; next search for battle pads
  1121. WaitForPads()
  1122. $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor1)
  1123. If @error=1 Then
  1124. $battleCheck = 2
  1125. Else
  1126. Battle($arenaCoord[0], $arenaCoord[1])
  1127. WaitForPads()
  1128. $TotalXP=$TotalXP+$CWAXP[$NumberOfBattles]
  1129. EndIf
  1130. Wend
  1131. WaitForPads()
  1132. ; death check
  1133. If (DeathCheck() = 1) Then
  1134. $continue = 2
  1135. MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
  1136. Else
  1137. $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
  1138. If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
  1139. $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
  1140. DungeonPad($arenaCoord[0],$arenaCoord[1])
  1141. Else
  1142. DungeonPad($arenaCoord[0],$arenaCoord[1])
  1143. EndIf
  1144. EndIf
  1145. ; might need to check more than once
  1146. If (DeathCheck() = 1) Then
  1147. $continue = 2
  1148. MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
  1149. EndIf
  1150. WEnd
  1151.  
  1152. ; died - remove last battle XP
  1153. $TotalXP=$TotalXP-$CWAXP[$NumberOfBattles]
  1154.  
  1155. ReturnToArena()
  1156.  
  1157. EndFunc
  1158.  
  1159. Func ArenaUWA()
  1160. ; start script in arena in first room with battles (not in lobby)
  1161. ; if you die, you will return to the arena and start over
  1162. ; if you make it through, you need to stop the script!
  1163. ; this one is different so you do NOT need to be able to
  1164. ; survive through the first room!
  1165. ;
  1166. ; first room
  1167.  
  1168. ; ability to repeat this arena not working yet
  1169.  
  1170. $continue = 1
  1171.  
  1172. ; Find Battle
  1173. While $continue = 1
  1174. ; need to move away from pad first - maybe not necessary?
  1175. ; 09/01 - I decided this is necessary again
  1176. ; **** This section may need some work
  1177. MouseMove(($topLeft[0]+374), ($topLeft[1]+256), 3)
  1178. MouseClick("left")
  1179. sleep(500)
  1180. MouseMove(($topLeft[0]+389), ($topLeft[1]+313), 3)
  1181. MouseClick("left")
  1182. sleep(500)
  1183. ; find white pad
  1184. WaitForPads()
  1185. $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
  1186. If @error=1 Then
  1187. $exitCoord[0] = $topLeft[0]
  1188. $exitCoord[1] = $topLeft[1]
  1189. Else
  1190. $exitCoord[0]=$arenaCoord[0]
  1191. $exitCoord[1]=$arenaCoord[1]
  1192. EndIf
  1193.  
  1194. $battleCheck = 1
  1195.  
  1196. While $battleCheck = 1
  1197. ; next search for battle pads
  1198. WaitForPads()
  1199. $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor1)
  1200. If @error=1 Then
  1201. $battleCheck = 2
  1202. Else
  1203. Battle($arenaCoord[0], $arenaCoord[1])
  1204. WaitForPads()
  1205. $TotalXP=$TotalXP+$UWAXP[$NumberOfBattles]
  1206. EndIf
  1207. Wend
  1208. WaitForPads()
  1209. ; death check
  1210. If (DeathCheck() = 1) Then
  1211. $continue = 2
  1212. MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
  1213. Else
  1214. $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
  1215. If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
  1216. $arenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1]-119,$ExitColor1)
  1217. DungeonPad($arenaCoord[0],$arenaCoord[1])
  1218. Else
  1219. DungeonPad($arenaCoord[0],$arenaCoord[1])
  1220. EndIf
  1221. EndIf
  1222. ; might need to check more than once
  1223. If (DeathCheck() = 1) Then
  1224. $continue = 2
  1225. MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
  1226. EndIf
  1227. WEnd
  1228.  
  1229. ; died - remove last battle XP
  1230. $TotalXP=$TotalXP-$UWAXP[$NumberOfBattles]
  1231.  
  1232. ReturnToArena()
  1233.  
  1234. EndFunc
  1235.  
  1236. Func NewbGrind()
  1237. ; start script in Shikaakwa
  1238. ;
  1239. ; DungeonPad(817, 578)
  1240. DungeonPad2(($topLeft[0]+706),($topLeft[1]+432))
  1241.  
  1242. ;go to A3
  1243. ; 265, 252
  1244. DungeonPad2(($topLeft[0]+154),($topLeft[1]+106))
  1245. ;go to A2
  1246. ; 337, 241
  1247. DungeonPad2(($topLeft[0]+226),($topLeft[1]+95))
  1248.  
  1249. ; grind A2 until HP is 100% when done
  1250. $NewbHP=2
  1251. While $NewbHP > 1
  1252. $NewbHP = 1
  1253. ; enter Bellroot A2
  1254. ; 312, 518
  1255. DungeonPad(($topLeft[0]+201),($topLeft[1]+372))
  1256. WaitForPads()
  1257.  
  1258. ; enter first battle - left
  1259. ; 289, 482
  1260. Battle(($topLeft[0]+178),($topLeft[1]+336))
  1261. WaitForPads()
  1262.  
  1263. If ($BlankPixel3 = $BlankColor1) Then
  1264. $NewbHP = $NewbHP + 1
  1265. EndIf
  1266.  
  1267. ; enter 2nd battle - middle
  1268. ; 408, 373
  1269. Battle(($topLeft[0]+297),($topLeft[1]+227))
  1270. WaitForPads()
  1271.  
  1272. If ($BlankPixel3 = $BlankColor1) Then
  1273. $NewbHP = $NewbHP + 1
  1274. EndIf
  1275.  
  1276. ; enter 3rd battle - right
  1277. ; 624, 433
  1278. Battle(($topLeft[0]+513),($topLeft[1]+287))
  1279. WaitForPads()
  1280.  
  1281. If ($BlankPixel3 = $BlankColor1) Then
  1282. $NewbHP = $NewbHP + 1
  1283. EndIf
  1284.  
  1285. ; click to exit A2
  1286. ; 720, 554
  1287. DungeonPad(($topLeft[0]+609),($topLeft[1]+408))
  1288.  
  1289. ; move away from A2
  1290. ;MouseMove(542, 507, 3)
  1291. MouseMove(($topLeft[0]+431),($topLeft[1]+361), 3)
  1292. Sleep(200)
  1293. MouseClick("left")
  1294. Sleep(1000)
  1295. WEnd
  1296.  
  1297. ; go to A1
  1298. ; 528, 241
  1299. DungeonPad2(($topLeft[0]+417),($topLeft[1]+95))
  1300.  
  1301. ; grind A1 until HP is 100% when done
  1302. $NewbHP=2
  1303. While $NewbHP > 1
  1304. $NewbHP = 1
  1305. ; enter Bellroot A1
  1306. ; 696, 327
  1307. DungeonPad(($topLeft[0]+585),($topLeft[1]+181))
  1308. WaitForPads()
  1309.  
  1310. ; enter first battle
  1311. ; 361, 422
  1312. Battle(($topLeft[0]+250),($topLeft[1]+276))
  1313. WaitForPads()
  1314.  
  1315. If ($BlankPixel2 = $BlankColor1) Then
  1316. $NewbHP = $NewbHP + 1
  1317. EndIf
  1318.  
  1319. ; enter 2nd battle
  1320. ; 576, 410
  1321. Battle(($topLeft[0]+465),($topLeft[1]+264))
  1322. WaitForPads()
  1323.  
  1324. If ($BlankPixel2 = $BlankColor1) Then
  1325. $NewbHP = $NewbHP + 1
  1326. EndIf
  1327.  
  1328. ; enter 3rd battle
  1329. ; 553, 494
  1330. Battle(($topLeft[0]+442),($topLeft[1]+348))
  1331. WaitForPads()
  1332.  
  1333. If ($BlankPixel3 = $BlankColor1) Then
  1334. $NewbHP = $NewbHP + 1
  1335. EndIf
  1336.  
  1337. ; click to exit A1
  1338. ; 288, 554
  1339. DungeonPad(($topLeft[0]+177),($topLeft[1]+408))
  1340.  
  1341. ; move away from A1
  1342. ;MouseMove(795, 318, 3)
  1343. MouseMove(($topLeft[0]+684),($topLeft[1]+172), 3)
  1344. Sleep(200)
  1345. MouseClick("left")
  1346. Sleep(1000)
  1347. WEnd
  1348.  
  1349. ; go to B2
  1350. ; 696, 613
  1351. DungeonPad2(($topLeft[0]+585),($topLeft[1]+467))
  1352.  
  1353. ; 815, 529
  1354. DungeonPad2(($topLeft[0]+704),($topLeft[1]+383))
  1355.  
  1356. ; grind B2 until HP is 100% when done
  1357.  
  1358. $NewbHP = 2
  1359. While $NewbHP > 1
  1360. $NewbHP = 1
  1361. ; grind 2nd battle until HP is low
  1362. $RepeatB2 = 1
  1363. While $RepeatB2 = 1
  1364. ; enter Bellroot B2
  1365. ; 529, 504
  1366. DungeonPad(($topLeft[0]+418),($topLeft[1]+358))
  1367. WaitForPads()
  1368.  
  1369. ; enter 2nd battle
  1370. ; 577, 410
  1371. Battle(($topLeft[0]+466),($topLeft[1]+264))
  1372. WaitForPads()
  1373.  
  1374. If ($BlankPixel3 <> $BlankColor1) Then
  1375. $RepeatB2 = 2
  1376. Else
  1377. If ($BlankPixel = $BlankColor1) Then
  1378. $RepeatB2 = 2
  1379. Else
  1380. ; click to exit B2
  1381. ; 288, 553
  1382. DungeonPad(($topLeft[0]+177),($topLeft[1]+407))
  1383.  
  1384. ; move away from B2
  1385. ;MouseMove(636, 468, 3)
  1386. MouseMove(($topLeft[0]+525),($topLeft[1]+322), 3)
  1387. Sleep(200)
  1388. MouseClick("left")
  1389. Sleep(1000)
  1390. EndIf
  1391. EndIf
  1392. WEnd
  1393.  
  1394. ; enter first battle
  1395. ; 337, 458
  1396. Battle(($topLeft[0]+226),($topLeft[1]+312))
  1397. WaitForPads()
  1398.  
  1399. If ($BlankPixel3 = $BlankColor1) Then
  1400. $NewbHP = $NewbHP + 1
  1401. EndIf
  1402.  
  1403. ; enter 3rd battle
  1404. ; 553, 493
  1405. Battle(($topLeft[0]+442),($topLeft[1]+347))
  1406. WaitForPads()
  1407.  
  1408. If ($BlankPixel3 = $BlankColor1) Then
  1409. $NewbHP = $NewbHP + 1
  1410. EndIf
  1411.  
  1412. ; click to exit B2
  1413. ; 288, 553
  1414. DungeonPad(($topLeft[0]+177),($topLeft[1]+407))
  1415.  
  1416. ; move away from B2
  1417. ;MouseMove(636, 468, 3)
  1418. MouseMove(($topLeft[0]+525),($topLeft[1]+322), 3)
  1419. Sleep(200)
  1420. MouseClick("left")
  1421. Sleep(1000)
  1422. WEnd
  1423.  
  1424. ;return to Shik
  1425. ; 144, 408
  1426. DungeonPad(($topLeft[0]+33),($topLeft[1]+262))
  1427.  
  1428. ; 457, 613
  1429. DungeonPad(($topLeft[0]+346),($topLeft[1]+467))
  1430.  
  1431. ; 457, 613
  1432. DungeonPad(($topLeft[0]+346),($topLeft[1]+467))
  1433.  
  1434. ; 143, 601
  1435. DungeonPad(($topLeft[0]+32),($topLeft[1]+455))
  1436.  
  1437. ; go to Summerville
  1438. ; 337, 288
  1439. DungeonPad(($topLeft[0]+226),($topLeft[1]+142))
  1440.  
  1441. ; 360, 612
  1442. DungeonPad(($topLeft[0]+249),($topLeft[1]+466))
  1443.  
  1444. ; 145, 480
  1445. DungeonPad(($topLeft[0]+34),($topLeft[1]+334))
  1446.  
  1447. ; grind D1 until HP is 100% when done
  1448. $NewbHP=2
  1449. While $NewbHP > 1
  1450. $NewbHP = 1
  1451. ; enter Summerville D1
  1452. ; 625, 386
  1453. DungeonPad(($topLeft[0]+514),($topLeft[1]+240))
  1454. WaitForPads()
  1455.  
  1456. ; enter first battle
  1457. ; 408, 397
  1458. Battle(($topLeft[0]+297),($topLeft[1]+251))
  1459. WaitForPads()
  1460.  
  1461. If ($BlankPixel3 = $BlankColor1) Then
  1462. $NewbHP = $NewbHP + 1
  1463. EndIf
  1464.  
  1465. ; enter 2nd battle
  1466. ; 625, 362
  1467. Battle(($topLeft[0]+514),($topLeft[1]+216))
  1468. WaitForPads()
  1469.  
  1470. If ($BlankPixel3 = $BlankColor1) Then
  1471. $NewbHP = $NewbHP + 1
  1472. EndIf
  1473.  
  1474. ; enter 3rd battle
  1475. ; 553, 470
  1476. Battle(($topLeft[0]+442),($topLeft[1]+324))
  1477. WaitForPads()
  1478.  
  1479. If ($BlankPixel3 = $BlankColor1) Then
  1480. $NewbHP = $NewbHP + 1
  1481. EndIf
  1482.  
  1483. ; click to exit D1
  1484. ; 336, 528
  1485. DungeonPad(($topLeft[0]+225),($topLeft[1]+382))
  1486.  
  1487. ; move away from D1
  1488. ;MouseMove(558, 470, 3)
  1489. MouseMove(($topLeft[0]+447),($topLeft[1]+324), 3)
  1490. Sleep(200)
  1491. MouseClick("left")
  1492. Sleep(1000)
  1493. WEnd
  1494.  
  1495. ; go to C4
  1496. ; 505, 612
  1497. DungeonPad(($topLeft[0]+394),($topLeft[1]+466))
  1498.  
  1499. ; 649, 613
  1500. DungeonPad(($topLeft[0]+538),($topLeft[1]+467))
  1501.  
  1502. ; 457, 614
  1503. DungeonPad(($topLeft[0]+346),($topLeft[1]+468))
  1504.  
  1505. ; 144, 480
  1506. DungeonPad(($topLeft[0]+33),($topLeft[1]+334))
  1507.  
  1508. ; grind C4 until HP is 100% when done
  1509. $NewbHP=2
  1510. While $NewbHP > 1
  1511. $NewbHP = 1
  1512. ; enter Summerville C4
  1513. ; 409, 469
  1514. DungeonPad(($topLeft[0]+298),($topLeft[1]+323))
  1515. WaitForPads()
  1516.  
  1517. ; enter first battle
  1518. ; 385, 410
  1519. Battle(($topLeft[0]+274),($topLeft[1]+264))
  1520. WaitForPads()
  1521.  
  1522. If ($BlankPixel3 = $BlankColor1) Then
  1523. $NewbHP = $NewbHP + 1
  1524. EndIf
  1525.  
  1526. ; enter 2nd battle
  1527. ; 552, 350
  1528. Battle(($topLeft[0]+441),($topLeft[1]+204))
  1529. WaitForPads()
  1530.  
  1531. If ($BlankPixel3 = $BlankColor1) Then
  1532. $NewbHP = $NewbHP + 1
  1533. EndIf
  1534.  
  1535. ; click to exit C4
  1536. ; 288, 553
  1537. DungeonPad(($topLeft[0]+177),($topLeft[1]+407))
  1538.  
  1539. ; move away from C4
  1540. ;MouseMove(284, 462, 3)
  1541. MouseMove(($topLeft[0]+173),($topLeft[1]+296), 3)
  1542. Sleep(200)
  1543. MouseClick("left")
  1544. Sleep(1000)
  1545. WEnd
  1546.  
  1547. ; go to bleakwoods H3
  1548. ; 384, 243
  1549. DungeonPad(($topLeft[0]+273),($topLeft[1]+97))
  1550.  
  1551. ; 816, 385
  1552. DungeonPad(($topLeft[0]+705),($topLeft[1]+239))
  1553.  
  1554. ; 431, 242
  1555. DungeonPad(($topLeft[0]+320),($topLeft[1]+96))
  1556.  
  1557. ; 479, 241
  1558. DungeonPad(($topLeft[0]+368),($topLeft[1]+95))
  1559.  
  1560. ; 816, 362
  1561. DungeonPad(($topLeft[0]+705),($topLeft[1]+216))
  1562.  
  1563. ; 433, 241
  1564. DungeonPad(($topLeft[0]+322),($topLeft[1]+95))
  1565.  
  1566. ; 480, 241
  1567. DungeonPad(($topLeft[0]+369),($topLeft[1]+95))
  1568.  
  1569. ; 816, 458
  1570. DungeonPad(($topLeft[0]+705),($topLeft[1]+312))
  1571.  
  1572. ; 456, 252
  1573. DungeonPad(($topLeft[0]+345),($topLeft[1]+106))
  1574.  
  1575. ; 625, 240
  1576. DungeonPad(($topLeft[0]+514),($topLeft[1]+94))
  1577.  
  1578. ; 527, 241
  1579. DungeonPad(($topLeft[0]+416),($topLeft[1]+95))
  1580.  
  1581. ; 527, 241
  1582. DungeonPad(($topLeft[0]+416),($topLeft[1]+95))
  1583.  
  1584. ; 527, 241
  1585. DungeonPad(($topLeft[0]+416),($topLeft[1]+95))
  1586.  
  1587. ; 527, 241
  1588. DungeonPad(($topLeft[0]+416),($topLeft[1]+95))
  1589.  
  1590. ; 768, 240
  1591. DungeonPad(($topLeft[0]+657),($topLeft[1]+94))
  1592.  
  1593. ; 144, 529
  1594. DungeonPad(($topLeft[0]+33),($topLeft[1]+383))
  1595.  
  1596. ; 480, 242
  1597. DungeonPad(($topLeft[0]+369),($topLeft[1]+96))
  1598.  
  1599. ; grind H3 until HP is 80% when done
  1600. $NewbHP=2
  1601. While $NewbHP > 1
  1602. $NewbHP = 1
  1603. ; enter Bleakwoods H3
  1604. ; 288, 505
  1605. DungeonPad(($topLeft[0]+177),($topLeft[1]+359))
  1606. WaitForPads()
  1607.  
  1608. ; enter first battle
  1609. ; 336, 432
  1610. Battle(($topLeft[0]+225),($topLeft[1]+286))
  1611. WaitForPads()
  1612.  
  1613. If ($BlankPixel2 = $BlankColor1) Then
  1614. $NewbHP = $NewbHP + 1
  1615. EndIf
  1616.  
  1617. ; enter 2nd battle
  1618. ; 552, 349
  1619. Battle(($topLeft[0]+441),($topLeft[1]+203))
  1620. WaitForPads()
  1621.  
  1622. If ($BlankPixel2 = $BlankColor1) Then
  1623. $NewbHP = $NewbHP + 1
  1624. EndIf
  1625.  
  1626. ; enter 3rd battle
  1627. ; 505, 541
  1628. Battle(($topLeft[0]+394),($topLeft[1]+395))
  1629. WaitForPads()
  1630.  
  1631. If ($BlankPixel2 = $BlankColor1) Then
  1632. $NewbHP = $NewbHP + 1
  1633. EndIf
  1634.  
  1635. ; click to exit H3
  1636. ; 287, 553
  1637. DungeonPad(($topLeft[0]+176),($topLeft[1]+407))
  1638.  
  1639. ; move away from H3
  1640. ;MouseMove(380, 569, 3)
  1641. MouseMove(($topLeft[0]+269),($topLeft[1]+423), 3)
  1642. Sleep(200)
  1643. MouseClick("left")
  1644. Sleep(1000)
  1645. WEnd
  1646.  
  1647. ; go to Tsulas
  1648. ; 457, 613
  1649. DungeonPad(($topLeft[0]+346),($topLeft[1]+467))
  1650.  
  1651. ; 144, 530
  1652. DungeonPad(($topLeft[0]+33),($topLeft[1]+384))
  1653.  
  1654. ; 143, 528
  1655. DungeonPad(($topLeft[0]+32),($topLeft[1]+382))
  1656.  
  1657. ; 144, 553
  1658. DungeonPad(($topLeft[0]+33),($topLeft[1]+407))
  1659.  
  1660. ; 265, 421
  1661. DungeonPad(($topLeft[0]+154),($topLeft[1]+275))
  1662.  
  1663. EndFunc
  1664.  
  1665. Func GrindUW_A3()
  1666. ; start script outside of dungeon
  1667. ;
  1668. ; enter Underworld A3
  1669. ;DungeonPad(481, 359)
  1670. DungeonPad(($topLeft[0]+370), ($topLeft[1]+215))
  1671. WaitForPads()
  1672.  
  1673. ; enter first battle
  1674. ;Battle(239, 480)
  1675. Battle(($topLeft[0]+128), ($topLeft[1]+336))
  1676. WaitForPads()
  1677.  
  1678. ; enter second battle
  1679. ;Battle(504, 491)
  1680. Battle(($topLeft[0]+393), ($topLeft[1]+347))
  1681. WaitForPads()
  1682.  
  1683. ; enter third battle
  1684. ;Battle(312, 323)
  1685. Battle(($topLeft[0]+201), ($topLeft[1]+179))
  1686. WaitForPads()
  1687.  
  1688. ; enter fourth battle
  1689. ;Battle(673, 408)
  1690. Battle(($topLeft[0]+562), ($topLeft[1]+264))
  1691. WaitForPads()
  1692.  
  1693. ; exit Underworld A3
  1694. ;DungeonPad(168, 611)
  1695. DungeonPad(($topLeft[0]+57), ($topLeft[1]+467))
  1696.  
  1697. ; move away from Underworld A3
  1698. ;MouseMove(592, 427, 3)
  1699. MouseMove(($topLeft[0]+481), ($topLeft[1]+283), 3)
  1700. Sleep(100)
  1701. MouseClick("left")
  1702. Sleep(1000)
  1703. $TotalXP=$TotalXP+6544
  1704. EndFunc
  1705.  
  1706. Func GrindUW_B4()
  1707. ; start script outside of dungeon
  1708. ;
  1709. ; enter Underworld B4
  1710. ;DungeonPad(193, 337)
  1711. DungeonPad(($topLeft[0]+82), ($topLeft[1]+193))
  1712. WaitForPads()
  1713.  
  1714. ; enter first battle
  1715. ;Battle(432, 527)
  1716. Battle(($topLeft[0]+321), ($topLeft[1]+383))
  1717. WaitForPads()
  1718.  
  1719. ; enter second battle
  1720. ;Battle(384, 383)
  1721. Battle(($topLeft[0]+273), ($topLeft[1]+239))
  1722. WaitForPads()
  1723.  
  1724. ; enter third battle
  1725. ;Battle(576, 432)
  1726. Battle(($topLeft[0]+465), ($topLeft[1]+288))
  1727. WaitForPads()
  1728.  
  1729. ; enter fourth battle
  1730. ;Battle(624, 455)
  1731. Battle(($topLeft[0]+513), ($topLeft[1]+311))
  1732. WaitForPads()
  1733.  
  1734. ; exit Underworld B4
  1735. ;DungeonPad(673, 552)
  1736. DungeonPad(($topLeft[0]+562), ($topLeft[1]+408))
  1737.  
  1738. ; move away from Underworld B4
  1739. ;MouseMove(355, 317, 3)
  1740. MouseMove(($topLeft[0]+244), ($topLeft[1]+173), 3)
  1741. Sleep(100)
  1742. MouseClick("left")
  1743. Sleep(1000)
  1744. $TotalXP=$TotalXP+7559
  1745. EndFunc
  1746.  
  1747. Func GrindUW_A4()
  1748. ; start script outside of dungeon
  1749. ;
  1750. ; enter Underworld A4
  1751. ;DungeonPad(553, 564)
  1752. DungeonPad(($topLeft[0]+442), ($topLeft[1]+420))
  1753. WaitForPads()
  1754.  
  1755. ; enter first battle
  1756. ;Battle(240, 480)
  1757. Battle(($topLeft[0]+129), ($topLeft[1]+336))
  1758. WaitForPads()
  1759.  
  1760. ; enter second battle
  1761. ;Battle(504, 492)
  1762. Battle(($topLeft[0]+393), ($topLeft[1]+348))
  1763. WaitForPads()
  1764.  
  1765. ; enter third battle
  1766. ;Battle(312, 322)
  1767. WaitForPads()
  1768. Battle(($topLeft[0]+201), ($topLeft[1]+178))
  1769.  
  1770. ; enter fourth battle
  1771. ;Battle(672, 408)
  1772. Battle(($topLeft[0]+561), ($topLeft[1]+264))
  1773. WaitForPads()
  1774.  
  1775. ; enter fifth battle
  1776. ;Battle(600, 300)
  1777. Battle(($topLeft[0]+489), ($topLeft[1]+156))
  1778. WaitForPads()
  1779.  
  1780. ; exit Underworld A4
  1781. ;DungeonPad(168, 612)
  1782. DungeonPad(($topLeft[0]+57), ($topLeft[1]+468))
  1783.  
  1784. ; move away from Underworld A4
  1785. ;MouseMove(524, 491, 3)
  1786. MouseMove(($topLeft[0]+413), ($topLeft[1]+347), 3)
  1787. Sleep(100)
  1788. MouseClick("left")
  1789. Sleep(1000)
  1790. $TotalXP=$TotalXP+10470
  1791. EndFunc
  1792.  
  1793. Func GrindUW_C2()
  1794. ; start script outside of dungeon
  1795. ;
  1796. ; enter Underworld C2
  1797. ;DungeonPad(648, 295)
  1798. DungeonPad(($topLeft[0]+537), ($topLeft[1]+156))
  1799. WaitForPads()
  1800.  
  1801. ; enter first battle
  1802. ;Battle(241, 475)
  1803. Battle(($topLeft[0]+130), ($topLeft[1]+336))
  1804. WaitForPads()
  1805.  
  1806. ; enter second battle
  1807. ;Battle(312, 318)
  1808. Battle(($topLeft[0]+201), ($topLeft[1]+179))
  1809. WaitForPads()
  1810.  
  1811. ; enter third battle
  1812. ;Battle(599, 294)
  1813. Battle(($topLeft[0]+488), ($topLeft[1]+155))
  1814. WaitForPads()
  1815.  
  1816. ; exit Underworld C2
  1817. ;DungeonPad(168, 606)
  1818. DungeonPad(($topLeft[0]+57), ($topLeft[1]+467))
  1819.  
  1820. ; move away from Underworld C2
  1821. ;MouseMove(506, 316, 3)
  1822. MouseMove(($topLeft[0]+395), ($topLeft[1]+177), 3)
  1823. Sleep(100)
  1824. MouseClick("left")
  1825. Sleep(1000)
  1826. $TotalXP=$TotalXP+2280
  1827. EndFunc
  1828.  
  1829. Func DeathCheck()
  1830. $DeathYes=0
  1831. $DeathNo=0
  1832. ;$chimneycheck = 0xE2D6C3
  1833. $chimneycheck = PixelGetColor($topLeft[0]+267, $topLeft[1]+311)
  1834. If $chimneycheck < 0xB00000 Then
  1835. Return(0)
  1836. EndIf
  1837. For $DeathX = 267 to 277
  1838. For $DeathY = 311 to 321
  1839. $chimneycheck2 = PixelGetColor($topLeft[0]+$DeathX, $topLeft[1]+$DeathY)
  1840. If $chimneycheck2 = $chimneycheck Then
  1841. $DeathYes=$DeathYes+1
  1842. Else
  1843. $DeathNo=$DeathNo+1
  1844. ; not chimney - not dead - return 0
  1845. If $DeathNo > 10 Then
  1846. Return(0)
  1847. EndIf
  1848. EndIf
  1849. Next
  1850. Next
  1851. ; thats the chimney - they dead
  1852. Return(1)
  1853. EndFunc
  1854.  
  1855. Func ArenaGrind()
  1856. ; start script in arena in first room with battles (not in lobby)
  1857. ; if you die, you will return to the arena and start over
  1858. ; IMPORTANT - you need to be able to survive through the first room!
  1859. ;
  1860. ; first room
  1861.  
  1862. $NumberOfBattles=0
  1863. $ArenaContinue = 1
  1864. $RoomsCleared = 0
  1865. ; First room - find and do all two battles
  1866.  
  1867. While $ArenaContinue = 1
  1868. WaitForPads()
  1869. $ArenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
  1870. $BattleTextFind = PixelSearch($ArenaCoord[0],$ArenaCoord[1]+29,$ArenaCoord[0]+30,$ArenaCoord[1]+37,0xFFFFFF,5)
  1871. ; if Y is greater than 599, then its not a battle
  1872. If (@error=0) and ($ArenaCoord[1] < ($topLeft[1]+452)) Then
  1873. Battle($ArenaCoord[0]+3,$ArenaCoord[1]+13)
  1874. WaitForPads()
  1875. $TotalXP=$TotalXP+$ArenaXP[$ArenaNumber][$NumberOfBattles]
  1876. Else
  1877. $newArenaCoord[0]=$ArenaCoord[0]
  1878. $newArenaCoord[1]=$ArenaCoord[1]
  1879. $ArenaCoord = PixelSearch($topLeft[0]+1,$newArenaCoord[1]+1,$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
  1880. If (@error=0) and ($ArenaCoord[1]< ($topLeft[1]+452)) Then
  1881. Battle($ArenaCoord[0]+3, $ArenaCoord[1]+13)
  1882. WaitForPads()
  1883. $TotalXP=$TotalXP+$ArenaXP[$ArenaNumber][$NumberOfBattles]
  1884. Else
  1885. $ArenaContinue = 2
  1886. EndIf
  1887. EndIf
  1888. WEnd
  1889.  
  1890. $RoomsCleared = $RoomsCleared + 1
  1891.  
  1892. ; first room - go to exit pad
  1893. WaitForPads()
  1894. $arenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1, 5)
  1895. DungeonPad($arenaCoord[0]+3,$arenaCoord[1]+13)
  1896.  
  1897. $continue = 1
  1898.  
  1899. ; Find Battle
  1900. While $continue = 1
  1901. ; need to move away from pad first - maybe not necessary?
  1902. ; 09/01 - I decided this is necessary again
  1903. MouseMove(($topLeft[0]+374), ($topLeft[1]+256), 3)
  1904. MouseClick("left")
  1905. sleep(500)
  1906. ; find white pad
  1907. WaitForPads()
  1908. $ArenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1, 5)
  1909. If @error=1 Then
  1910. $exitCoord[0] = $topLeft[0]
  1911. $exitCoord[1] = $topLeft[1]
  1912. Else
  1913. $exitCoord[0]=$ArenaCoord[0]
  1914. $exitCoord[1]=$ArenaCoord[1]
  1915. EndIf
  1916.  
  1917. $battleCheck = 1
  1918.  
  1919. While $battleCheck = 1
  1920. ; next search for battle pads
  1921. WaitForPads()
  1922. If $NumberOfBattles < $ArenaNumberOfBattles[$ArenaNumber] Then
  1923. $ArenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor2, 5)
  1924. If @error=1 Then
  1925. $battleCheck = 2
  1926. Else
  1927. Battle($ArenaCoord[0]+3, $ArenaCoord[1]+13)
  1928. WaitForPads()
  1929. $TotalXP=$TotalXP+$ArenaXP[$ArenaNumber][$NumberOfBattles]
  1930. EndIf
  1931. Else
  1932. $battleCheck = 2
  1933. EndIF
  1934. Wend
  1935. WaitForPads()
  1936. ; keep count of rooms cleared - when arena is done - exit and repeat
  1937. $RoomsCleared = $RoomsCleared + 1
  1938. If $RoomsCleared = 49 Then
  1939. ; find exit
  1940. $ArenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$PadColor1, 5)
  1941. ; if entrance is found first - search again for exit
  1942. If (($ArenaCoord[0] = $exitCoord[0]) and ($ArenaCoord[1] = $exitCoord[1])) Then
  1943. $ArenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+3,$bottomRight[0],$bottomRight[1]-119,$ExitColor1, 5)
  1944. DungeonPad($ArenaCoord[0],$ArenaCoord[1])
  1945. Else
  1946. DungeonPad($ArenaCoord[0],$ArenaCoord[1])
  1947. EndIf
  1948. MouseMove(($topLeft[0]+320), ($topLeft[1]+239), 3)
  1949. MouseClick("left")
  1950. Sleep(2000)
  1951. DungeonPad(($topLeft[0]+82),($topLeft[1]+97))
  1952. Return
  1953. EndIf
  1954. ; death check
  1955. If (DeathCheck() = 1) Then
  1956. $continue = 2
  1957. MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
  1958. Else
  1959. ; find exit
  1960. $ArenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1, 5)
  1961. ; if entrance is found first - search again for exit
  1962. If (($arenaCoord[0] = $exitCoord[0]) and ($arenaCoord[1] = $exitCoord[1])) Then
  1963. If ($ArenaCoord[0] > ($topLeft[0]+505)) Then
  1964. $ArenaCoord = PixelSearch($topLeft[0],$exitCoord[1]+40,$bottomRight[0],$bottomRight[1]-119,$ExitColor1, 5)
  1965. DungeonPad($ArenaCoord[0]+3,$ArenaCoord[1]+13)
  1966. Else
  1967. $ArenaCoord = PixelSearch($exitCoord[0]+40,$topLeft[1],$bottomRight[0],$bottomRight[1]-119,$ExitColor1, 5)
  1968. DungeonPad($ArenaCoord[0]+3,$ArenaCoord[1]+13)
  1969. EndIf
  1970. Else
  1971. DungeonPad($ArenaCoord[0]+3,$ArenaCoord[1]+13)
  1972. EndIf
  1973. EndIf
  1974. ; might need to check more than once
  1975. If (DeathCheck() = 1) Then
  1976. $continue = 2
  1977. MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
  1978. EndIf
  1979. WEnd
  1980.  
  1981. ; died - remove last battle XP
  1982. $TotalXP=$TotalXP-$ArenaXP[$ArenaNumber][$NumberOfBattles]
  1983.  
  1984. ReturnToArena()
  1985.  
  1986. EndFunc
  1987. Func ArenaGrind2()
  1988. ; start script in arena in first room with battles (not in lobby)
  1989. ; if you die, you will return to the arena and start over
  1990. $NumberOfBattles=0
  1991. $ArenaContinue = 1
  1992. $RoomsCleared = 0
  1993. $ArenaRoomCount = 1
  1994. $continue = 1
  1995.  
  1996. ; Find Battle
  1997. While $continue = 1
  1998. ; need to move away from pad first - maybe not necessary?
  1999. ; 09/01 - I decided this is necessary again
  2000. ; 11/06 - good delay while we wait for pads
  2001. MouseMove(($topLeft[0]+374), ($topLeft[1]+256), 3)
  2002. MouseClick("left")
  2003. sleep(500)
  2004. ; find white pad
  2005. WaitForPads()
  2006. $battleCheck = 1
  2007. While $battleCheck = 1
  2008. ; next search for battle pads
  2009. WaitForPads()
  2010. ; need this code so it doesn't think 7-7 exit is a battle
  2011. If $NumberOfBattles < $ArenaNumberOfBattles[$ArenaNumber] Then
  2012. ; -177 avoids the non play area and the entrance at the start of an arena
  2013. $ArenaCoord = PixelSearch($topLeft[0],$topLeft[1],$bottomRight[0],$bottomRight[1]-177,$PadColor2, 5)
  2014. If @error=1 Then
  2015. $battleCheck = 2
  2016. Else
  2017. Battle($ArenaCoord[0]+3, $ArenaCoord[1]+13)
  2018. WaitForPads()
  2019. $TotalXP=$TotalXP+$ArenaXP[$ArenaNumber][$NumberOfBattles]
  2020. EndIf
  2021. Else
  2022. $battleCheck = 2
  2023. EndIf
  2024. Wend
  2025. WaitForPads()
  2026. ; keep count of rooms cleared - when arena is done - exit and repeat
  2027. $RoomsCleared = $RoomsCleared + 1
  2028. If $RoomsCleared = 49 Then
  2029. ; find exit
  2030. ; ArenaCoord[0] = $ArenaExit[$ArenaRoomCount]
  2031. ; ArenaCoord[1] = $ArenaExit[$ArenaRoomCount+1]
  2032. DungeonPad(($ArenaExit[$ArenaRoomCount])+$topLeft[0],($ArenaExit[$ArenaRoomCount+1])+$topLeft[1])
  2033. MouseMove(($topLeft[0]+320), ($topLeft[1]+239), 3)
  2034. MouseClick("left")
  2035. Sleep(2000)
  2036. DungeonPad(($topLeft[0]+82),($topLeft[1]+97))
  2037. Return
  2038. EndIf
  2039. ; death check
  2040. If (DeathCheck() = 1) Then
  2041. $continue = 2
  2042. MsgBox(8192, "You died! (arena check 1)", "You died!", 1)
  2043. Else
  2044. ; find exit
  2045. ; ArenaCoord[0] = $ArenaExit[$ArenaRoomCount]
  2046. ; ArenaCoord[1] = $ArenaExit[$ArenaRoomCount+1]
  2047. DungeonPad(($ArenaExit[$ArenaRoomCount])+$topLeft[0],($ArenaExit[$ArenaRoomCount+1])+$topLeft[1])
  2048. $ArenaRoomCount = $ArenaRoomCount + 2
  2049. If $ArenaRoomCount = 15 Then
  2050. $ArenaRoomCount = 1
  2051. EndIf
  2052. EndIf
  2053. ; might need to check more than once
  2054. If (DeathCheck() = 1) Then
  2055. $continue = 2
  2056. MsgBox(8192, "You died! (arena check 2)", "You died!", 1)
  2057. EndIf
  2058. WEnd
  2059.  
  2060. ; died - remove last battle XP
  2061. $TotalXP=$TotalXP-$ArenaXP[$ArenaNumber][$NumberOfBattles]
  2062. ReturnToArena()
  2063. EndFunc
  2064.  
  2065.  
  2066. Func ReturnToArena()
  2067. If $ArenaNumber = 1 Then
  2068. ; starting from Shikaakwa - return to FF
  2069. ;DungeonPad(335, 288)
  2070. DungeonPad(($topLeft[0]+224),($topLeft[1]+141))
  2071.  
  2072. ;DungeonPad(481, 238)
  2073. DungeonPad(($topLeft[0]+370),($topLeft[1]+91))
  2074.  
  2075. ;DungeonPad(168, 252)
  2076. DungeonPad(($topLeft[0]+57),($topLeft[1]+105))
  2077.  
  2078. ;DungeonPad(480, 234)
  2079. DungeonPad(($topLeft[0]+369),($topLeft[1]+87))
  2080.  
  2081. ;DungeonPad(313, 413)
  2082. DungeonPad(($topLeft[0]+202),($topLeft[1]+266))
  2083.  
  2084. ;DungeonPad(192, 240)
  2085. DungeonPad(($topLeft[0]+81),($topLeft[1]+93))
  2086. EndIf
  2087.  
  2088. If $ArenaNumber = 2 Then
  2089. ; starting from Shikaakwa - return to SVA
  2090. ;DungeonPad(335, 288)
  2091. DungeonPad(($topLeft[0]+224),($topLeft[1]+141))
  2092.  
  2093. ;DungeonPad(362, 612)
  2094. DungeonPad(($topLeft[0]+251),($topLeft[1]+465))
  2095.  
  2096. ;DungeonPad(816, 384)
  2097. DungeonPad(($topLeft[0]+705),($topLeft[1]+237))
  2098.  
  2099. ;DungeonPad(817, 287)
  2100. DungeonPad(($topLeft[0]+706),($topLeft[1]+140))
  2101.  
  2102. ;DungeonPad(433, 527)
  2103. DungeonPad(($topLeft[0]+322),($topLeft[1]+380))
  2104.  
  2105. ;DungeonPad(192, 241)
  2106. DungeonPad(($topLeft[0]+81),($topLeft[1]+94))
  2107. EndIf
  2108.  
  2109. If $ArenaNumber = 3 Then
  2110. ; starting from Shikaakwa - return to BWA
  2111. ;DungeonPad(432, 239)
  2112. DungeonPad(($topLeft[0]+321),($topLeft[1]+92))
  2113.  
  2114. ;DungeonPad(457, 250)
  2115. DungeonPad(($topLeft[0]+346),($topLeft[1]+103))
  2116.  
  2117. ;DungeonPad(624, 238)
  2118. DungeonPad(($topLeft[0]+513),($topLeft[1]+91))
  2119.  
  2120. ;DungeonPad(527, 238)
  2121. DungeonPad(($topLeft[0]+416),($topLeft[1]+91))
  2122.  
  2123. ;DungeonPad(528, 239)
  2124. DungeonPad(($topLeft[0]+417),($topLeft[1]+92))
  2125.  
  2126. ;DungeonPad(527, 238)
  2127. DungeonPad(($topLeft[0]+416),($topLeft[1]+91))
  2128.  
  2129. ;DungeonPad(527, 239)
  2130. DungeonPad(($topLeft[0]+416),($topLeft[1]+92))
  2131.  
  2132. ;DungeonPad(768, 239)
  2133. DungeonPad(($topLeft[0]+657),($topLeft[1]+92))
  2134.  
  2135. ;DungeonPad(432, 239)
  2136. DungeonPad(($topLeft[0]+321),($topLeft[1]+92))
  2137.  
  2138. ;DungeonPad(481, 239)
  2139. DungeonPad(($topLeft[0]+370),($topLeft[1]+92))
  2140.  
  2141. ;DungeonPad(384, 238)
  2142. DungeonPad(($topLeft[0]+273),($topLeft[1]+91))
  2143.  
  2144. ;DungeonPad(409, 467)
  2145. DungeonPad(($topLeft[0]+298),($topLeft[1]+320))
  2146.  
  2147. ;DungeonPad(192, 238)
  2148. DungeonPad(($topLeft[0]+81),($topLeft[1]+91))
  2149.  
  2150. EndIf
  2151.  
  2152. If $ArenaNumber = 4 Then
  2153.  
  2154. ; starting from Shikaakwa - return to DFA
  2155. ;DungeonPad(816, 576) - Shik to A4
  2156. DungeonPad2(($topLeft[0]+705),($topLeft[1]+429))
  2157.  
  2158. ;DungeonPad(697, 612) - A4 to B4
  2159. DungeonPad2(($topLeft[0]+586),($topLeft[1]+465))
  2160.  
  2161. ;DungeonPad(816, 600) - B4 to C4
  2162. DungeonPad2(($topLeft[0]+705),($topLeft[1]+453))
  2163.  
  2164. ;DungeonPad(816, 407) - C4 to D4
  2165. DungeonPad(($topLeft[0]+705),($topLeft[1]+260))
  2166.  
  2167. ;DungeonPad(815, 287)
  2168. DungeonPad(($topLeft[0]+704),($topLeft[1]+140))
  2169.  
  2170. ;DungeonPad(608, 587)
  2171. DungeonPad(($topLeft[0]+497),($topLeft[1]+440))
  2172.  
  2173. ;DungeonPad(502, 608)
  2174. DungeonPad(($topLeft[0]+391),($topLeft[1]+461))
  2175.  
  2176. ;DungeonPad(503, 608)
  2177. DungeonPad(($topLeft[0]+392),($topLeft[1]+461))
  2178.  
  2179. ;DungeonPad(550, 608)
  2180. DungeonPad(($topLeft[0]+439),($topLeft[1]+461))
  2181.  
  2182. ;DungeonPad(310, 609)
  2183. DungeonPad(($topLeft[0]+199),($topLeft[1]+462))
  2184.  
  2185. ;DungeonPad(815, 453)
  2186. DungeonPad(($topLeft[0]+704),($topLeft[1]+306))
  2187.  
  2188. ;DungeonPad(814, 380)
  2189. DungeonPad(($topLeft[0]+703),($topLeft[1]+233))
  2190.  
  2191. ;DungeonPad(815, 548)
  2192. DungeonPad2(($topLeft[0]+704),($topLeft[1]+401))
  2193.  
  2194. ;DungeonPad(815, 379)
  2195. DungeonPad(($topLeft[0]+704),($topLeft[1]+232))
  2196.  
  2197. ;DungeonPad(822, 548)
  2198. DungeonPad2(($topLeft[0]+711),($topLeft[1]+401))
  2199.  
  2200. ;DungeonPad(455, 368)
  2201. DungeonPad(($topLeft[0]+344),($topLeft[1]+221))
  2202.  
  2203. ;DungeonPad(192, 241)
  2204. DungeonPad(($topLeft[0]+81),($topLeft[1]+94))
  2205.  
  2206. EndIf
  2207.  
  2208. If $ArenaNumber = 5 Then
  2209.  
  2210. ; starting from Shikaakwa - return to BRA
  2211. ;DungeonPad(816, 576)
  2212. DungeonPad2(($topLeft[0]+705),($topLeft[1]+429))
  2213.  
  2214. ;DungeonPad(697, 612)
  2215. DungeonPad2(($topLeft[0]+586),($topLeft[1]+465))
  2216.  
  2217. ;DungeonPad(816, 600)
  2218. DungeonPad2(($topLeft[0]+705),($topLeft[1]+453))
  2219.  
  2220. ;DungeonPad(816, 407)
  2221. DungeonPad(($topLeft[0]+705),($topLeft[1]+260))
  2222.  
  2223. ;DungeonPad(815, 287)
  2224. DungeonPad(($topLeft[0]+704),($topLeft[1]+140))
  2225.  
  2226. ;DungeonPad(817, 431)
  2227. DungeonPad(($topLeft[0]+706),($topLeft[1]+284))
  2228.  
  2229. ;DungeonPad(265, 323)
  2230. DungeonPad(($topLeft[0]+154),($topLeft[1]+176))
  2231.  
  2232. ;DungeonPad(192, 240)
  2233. DungeonPad(($topLeft[0]+81),($topLeft[1]+93))
  2234.  
  2235. EndIf
  2236.  
  2237. If $ArenaNumber = 6 Then
  2238. ; starting from Shikaakwa - return to CWA
  2239. ;DungeonPad(432, 241)
  2240. DungeonPad(($topLeft[0]+321),($topLeft[1]+94))
  2241.  
  2242. ;DungeonPad(458, 252)
  2243. DungeonPad(($topLeft[0]+347),($topLeft[1]+105))
  2244.  
  2245. ;DungeonPad2(142, 531)
  2246. DungeonPad2(($topLeft[0]+31),($topLeft[1]+384))
  2247.  
  2248. ;DungeonPad2(143, 361)
  2249. DungeonPad2(($topLeft[0]+32),($topLeft[1]+214))
  2250.  
  2251. ;DungeonPad2(144, 506)
  2252. DungeonPad2(($topLeft[0]+33),($topLeft[1]+359))
  2253.  
  2254. ;DungeonPad(576, 243)
  2255. DungeonPad(($topLeft[0]+465),($topLeft[1]+96))
  2256.  
  2257. ;DungeonPad(312, 447)
  2258. DungeonPad(($topLeft[0]+201),($topLeft[1]+300))
  2259.  
  2260. ;DungeonPad(168, 398)
  2261. DungeonPad(($topLeft[0]+57),($topLeft[1]+251))
  2262.  
  2263. EndIf
  2264.  
  2265. If $ArenaNumber = 7 Then
  2266. ; starting from Shikaakwa - return to UWA
  2267. ;DungeonPad2(816, 577)
  2268. DungeonPad2(($topLeft[0]+705),($topLeft[1]+430))
  2269.  
  2270. ;DungeonPad2(696, 614)
  2271. DungeonPad2(($topLeft[0]+585),($topLeft[1]+467))
  2272.  
  2273. ;DungeonPad2(816, 600)
  2274. DungeonPad2(($topLeft[0]+705),($topLeft[1]+453))
  2275.  
  2276. ;DungeonPad(816, 410)
  2277. DungeonPad(($topLeft[0]+705),($topLeft[1]+263))
  2278.  
  2279. ;DungeonPad(815, 289)
  2280. DungeonPad(($topLeft[0]+704),($topLeft[1]+142))
  2281.  
  2282. ;DungeonPad(816, 434)
  2283. DungeonPad(($topLeft[0]+705),($topLeft[1]+287))
  2284.  
  2285. ;DungeonPad(816, 362)
  2286. DungeonPad(($topLeft[0]+705),($topLeft[1]+215))
  2287.  
  2288. ;DungeonPad(288, 242)
  2289. DungeonPad(($topLeft[0]+177),($topLeft[1]+95))
  2290.  
  2291. ;DungeonPad(816, 313)
  2292. DungeonPad(($topLeft[0]+705),($topLeft[1]+166))
  2293.  
  2294. ;DungeonPad(649, 229)
  2295. DungeonPad(($topLeft[0]+538),($topLeft[1]+82))
  2296.  
  2297. ;DungeonPad(144, 523)
  2298. DungeonPad(($topLeft[0]+33),($topLeft[1]+376))
  2299.  
  2300. ;DungeonPad(144, 498)
  2301. DungeonPad(($topLeft[0]+33),($topLeft[1]+351))
  2302.  
  2303. ;DungeonPad(143, 547)
  2304. DungeonPad2(($topLeft[0]+32),($topLeft[1]+400))
  2305.  
  2306. ;DungeonPad(144, 404)
  2307. DungeonPad(($topLeft[0]+33),($topLeft[1]+257))
  2308.  
  2309. ;DungeonPad2(600, 607)
  2310. DungeonPad2(($topLeft[0]+489),($topLeft[1]+460))
  2311.  
  2312. ;DungeonPad(144, 427)
  2313. DungeonPad(($topLeft[0]+33),($topLeft[1]+280))
  2314.  
  2315. ;DungeonPad(384, 235)
  2316. DungeonPad(($topLeft[0]+273),($topLeft[1]+88))
  2317.  
  2318. ;DungeonPad(143, 458)
  2319. DungeonPad(($topLeft[0]+32),($topLeft[1]+311))
  2320.  
  2321. EndIf
  2322.  
  2323. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement