Advertisement
Shimizoki

Sarkoth Run DH

Jun 13th, 2012
13,581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 32.67 KB | None | 0 0
  1. ;Darkling Lord's Sarkoth DH Script v1.3.5 - 6/19/2012
  2. ;Installation Instructions: http://www.ownedcore.com/forums/diablo-3/diablo-3-bots-programs/356234-gold-item-farming-shimizokis-sarkoth-dh-script-autoit.html
  3. ;;;;;
  4. ;Revision: notAres @ ownedcore
  5. ;Original: mackus101 @ ownedcore
  6.  
  7. ;#include <ImageSearch.au3>
  8.  
  9. Global $Paused
  10. Global $ini = "S-SarkothBot.ini"
  11. Global $log = "S-SarkothBot.log"
  12.  
  13. ; -------------------- Update Variables --------------------- ;
  14. $VersionsInfo = "https://dl.dropbox.com/s/657jmncdq5wrqcz/version.ini?dl=1" ; Link to version.ini for updater
  15. $oldVersion = IniRead("updater.ini","Version","Version","Unknown")      ; Read the version from updater.ini
  16. $newVersion = "0.0"                                                     ; Initialize new version variable
  17.  
  18. ;Get Window Status
  19. Opt('MouseCoordMode', 2)
  20. Opt('PixelCoordMode', 2)
  21. $size = WinGetClientSize("[TITLE:Diablo III; CLASS:D3 Main Window Class]")
  22. If @error Then
  23.     MsgBox(16, "Fatal Error", "FATAL ERROR: Diablo 3 not running or not in Fullscreen Windowed")
  24.     Exit
  25. EndIf
  26. If ($size[0]/$size[1]) <> 16/9 Then $size[1]-=30 ; adjusts ratio for titlebar if not 16:9
  27.  
  28. ;Hotkeys
  29. HotKeySet("=","Leave")  ;script started by pressing =
  30. HotKeySet("-", "Pause") ;script paused by pressing -
  31. HotKeySet("x", "Stop") ;script stopped by pressing x
  32.  
  33. ;Sell
  34. $vendorArea = True  ;Vendors all the items in a area ROWSxCOLS
  35. $vendorRows = 4     ;Rows to vendor
  36. $vendorCols = 10    ;Cols to vendor
  37.  
  38. ;Change to match your abilities (1-4 by default)
  39. $skillSmokeScreen = "w"
  40. $skillPreperation = "a"
  41. $skillCompanion = "s"
  42. $skillCaltrops = "d"
  43.  
  44. ;Stats
  45. $movementSpeed = 0      ;This is the % increase movement speed you have. 25 = 25%, 0 = 0%, 50 = 50%
  46. $pickupRadius = 0       ;Pickup globe/gold radius
  47.  
  48. ;Custom Loot
  49. $pngLoc = "C:\Your Path\"   ;Location of the .PNGs
  50. $totalItems = 1             ;Number of items in the pick array
  51. $currentArrayItem = 0
  52. Global $pick[$totalItems]   ;DONT CHANGE THIS
  53.  
  54. ;Array of items to loot
  55. $pick[0] = "mythic.png|40"  ;png|Tolerance
  56. ;$pick[1] = "item2.png"
  57. ;$pick[2] = "item3.png"
  58.  
  59. ;Looting
  60. $LootSets = True        ;True if you want to pick up Sets
  61. $LootLegendaries = True ;True if you want to pick up Legendaries
  62. $LootRares = True       ;True if you want to pick up Rares
  63. $LootMagic = True       ;True if you want to pick up Magic
  64. $LootGems = True        ;True if you want to pick up Gems
  65. $LootTomes = False      ;True if you want to pick up Tome of Secrets (Automatically picked up when LootMagic is True)
  66. $LootCustom = False     ;True if you want to pick up Custom Items (The items in the pick array above)
  67.  
  68. ;Manage Loot
  69. $mLoot = 5              ;Nuber of successful runs until Stash and Vendor
  70. $IdentifyLoot = False   ;True if you want to identify items
  71.  
  72. ;Stashing
  73. $StashLoot = True       ;True if you want to store Items in the stash
  74. $StashLegendary = True  ;True if you want to store Legendary items in the stash
  75. $StashRare = True       ;True if you want to store Rare items in the stash
  76. $StashMagic = False     ;True if you want to store Magic items in the stash
  77. $StashTomes = False     ;True if you want to store Tomes items in the stash
  78.  
  79. ;Vendoring
  80. $VendorLoot = True      ;True if you want to vendor Items
  81. $VendorRare = False     ;True if you want to vendor Rares
  82. $VendorMagic = False    ;True if you want to vendor Magic
  83.  
  84. ;Variability
  85. $Timer = False          ;True and the bot will add random sleep intervals
  86. $atk1Time = 8.5         ;Time in seconds to attack with the right mouse button
  87. $atk2Time = 4.5         ;Time in seconds to attack with the left mouse button
  88. $atk3Time = 5           ;Time in seconds to attack both sides of sarkoth
  89. $usingNT = False        ;True if using NetherTentacles instead of Ball Lightning
  90.  
  91. ;Options
  92. $CreateLog = True       ;True if you want to create a log file
  93. $autoUpdate = True      ;True if you want to automatically download new versions of this bot
  94.  
  95. ;Constants
  96. $loadtime = 3200 ; time in ms the script waits for the game to load before it starts pathfinding. Slow this down for slower hard drives
  97. $yellow =   0xFFF000 ; yellow color code (repair icon)
  98. $red =      0xD90000 ; red color code (repair icon)
  99. $go = True
  100. $Leave = False
  101. $Logout = False
  102. $default_resolutionX = 1920     ;DO NOT CHANGE
  103. $default_resolutionY = 1080     ;DO NOT CHANGE (seriously... i'll beat you with a stick)
  104. $x_ratio = $size[0] / $default_resolutionX
  105. $y_ratio = $size[1] / $default_resolutionY
  106. $gX = 0
  107. $gY = 0
  108.  
  109. ;States
  110. $ExpectedState = "MainMenu"     ;Where the script thinks it should be
  111. $ActualState = ""               ;Where the script knows it was
  112.  
  113. ;Counts
  114. $LegendaryCount = 0
  115. $SetCount = 0
  116. $RareCount = 0
  117. $MagicCount = 0
  118. $GemCount = 0
  119. $TomeCount = 0
  120. $runCount = 0
  121. $cellarCount = 0
  122. $deathCount = 0
  123.  
  124. $t = TimerInit()
  125. $rt = 0
  126.  
  127. ;INI File
  128. If FileExists($ini) Then
  129.     ReadINI()
  130. Else
  131.     CreateINI()
  132. EndIf
  133.  
  134. ;Update Bot
  135. If $autoUpdate == True Then
  136.     ;#RequireAdmin
  137.     Call("DoUpdate")
  138. EndIf
  139.  
  140. ;Log File
  141. If $CreateLog == True Then
  142.     $LogFile = FileOpen($log, 2)
  143. EndIf
  144.  
  145. ;Calculate new values
  146. $mLootIn = $mLoot ;DO NOT CHANGE, how many more runs till next manage
  147. $movementSpeed = 1+($movementSpeed/100)
  148.  
  149. ;Check that PNGs are in the proper location
  150. If Not FileExists($pngLoc & "MainMenu.png") Then
  151.     MsgBox(16, "Fatal Error", "FATAL ERROR: Cannot find: " & $pngLoc & "MainMenu.png" & @CRLF & "Make sure your directory is set properly in the script")
  152.     Exit
  153. EndIf
  154.  
  155. ;Main
  156. While $go
  157.     Call("RunBot")
  158. WEnd
  159.  
  160. ;Script
  161. Func RunBot()
  162.     if($Leave) Then
  163.  
  164.         ;Check and Handle Network Disconnect
  165.         If CheckFor("DisconnectError", 720*$x_ratio, 360*$y_ratio, 1200*$x_ratio, 480*$y_ratio, .5) Then
  166.             RandClick("left", Round(960*$y_ratio), Round(635*$x_ratio), 25*$x_ratio, 5*$y_ratio)
  167.             Sleep(1500)
  168.         EndIf
  169.  
  170.         ;Main portion of script
  171.         Select
  172.             Case $ExpectedState == "OldRuins"
  173.                 LogWrite("Expects - OldRuins")
  174.                 UpdateTooltip()
  175.  
  176.                 ;Checks that the player is in the Old Ruins
  177.                 If CheckFor("OldRuins", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio) Then
  178.                     UpdateTooltip()
  179.  
  180.                     ;Start Run
  181.                     RandClick("middle", Round(500*$x_ratio), Round(250*$y_ratio), 5*$x_ratio, 5*$y_ratio) ;starts the run [waypoint 1]
  182.                     Moving(1125)
  183.                     Send($skillSmokeScreen)
  184.                     Moving(440)
  185.                     RandClick("middle", 1, Round(370*$y_ratio), 5*$x_ratio, 5*$y_ratio) ;waits ~1 second then [waypoint 2]
  186.                     Moving(1875)
  187.                     RandClick("middle", Round(400*$x_ratio), Round(600*$y_ratio), 5*$x_ratio, 5*$y_ratio) ;middle of courtyard [waypoint 3]
  188.                     Moving(50)
  189.                     Send($skillSmokeScreen)
  190.                     Moving(25)
  191.                     Send($skillPreperation)
  192.                     Moving(750)
  193.                     Send($skillCaltrops)
  194.                     Sleep(300)
  195.                     RandMove(Round(300*$x_ratio),Round(80*$y_ratio), 5*$x_ratio, 5*$y_ratio) ;moves cursor over to the cellar so the proper blue pixel becomes highlighted
  196.  
  197.  
  198.                     ;Checks if Dank Cellar is Open
  199.                     LogWrite("Checking - DankCellar")
  200.                     $Pixel2 = PixelSearch(0,0, Round(600*$x_ratio), Round(600*$y_ratio),0x334FB7,3)
  201.                     If Not @error Then
  202.                         $ExpectedState = "DankCellar"
  203.                         LogWrite(" Moving - To DankCellar")
  204.                         RandClick("left", Round(300*$x_ratio), Round(80*$y_ratio), 5*$x_ratio, 5*$y_ratio) ;Entrance to cellar
  205.                         Moving(750)
  206.                         Send($skillSmokeScreen)
  207.                         Moving(2500)
  208.                     Else ;ABORT RUN
  209.                         LogWrite(" Not Found - DankCellar")
  210.                         Sleep(10)
  211.                         RandClick("middle", Round(1100*$x_ratio), Round(600*$y_ratio)) ;moves between caltrops for safety before teleporting back to town
  212.                         Moving(250)
  213.                         Send($skillCaltrops)
  214.                         Sleep(200)
  215.                         Send($skillSmokeScreen)
  216.                         Sleep(40)
  217.                         Call("TownPortal")
  218.                     EndIf
  219.                 Else
  220.                     If $ActualState == "MainMenu" OR $ActualState == "NewTristram" Then
  221.                         $ExpectedState = $ActualState
  222.                     ElseIf Not Call("CheckDead") Then
  223.                         Call("TownPortal")
  224.                     EndIf
  225.                 EndIf
  226.  
  227.  
  228.             Case $ExpectedState == "DankCellar"
  229.                 LogWrite("Expects - DankCellar")
  230.                 UpdateTooltip()
  231.  
  232.                 ;Checks that the player is in the Dank Cellarwa
  233.                 If CheckFor("DankCellar", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio, 5) Then
  234.                     $cellarCount += 1
  235.                     UpdateTooltip()
  236.  
  237.                     RandClick("middle", Round(120*$x_ratio), Round(1020*$y_ratio), 10*$x_ratio, 10*$y_ratio) ;moves to doorway leading to rare inside cellar
  238.                     Moving(2750)
  239.                     RandMove(Round(450*$x_ratio),Round(70*$y_ratio), 5*$x_ratio, 5*$y_ratio) ;hovers over the rare Sarkoth
  240.                     Sleep(10)
  241.                     Send("{SHIFTDOWN}")
  242.                     MouseDown("right") ;ATTACK
  243.                     Send($skillCompanion)
  244.                     Sleep($atk1Time*1000)
  245.                     MouseUp("right")
  246.  
  247.                     ;If using NT, Attack both sides
  248.                     If $usingNT == True Then
  249.                         ;Sleep(4000)
  250.                         RandMove(Round(300 * $x_ratio), Round(75 * $y_ratio), 1, 1) ;attack left
  251.                         MouseDown("right")
  252.                         Sleep($atk3Time*1000)
  253.                         MouseUp("right")
  254.                         RandMove(Round(530 * $x_ratio), Round(50 * $y_ratio), 1, 1) ;attack right
  255.                         MouseDown("right")
  256.                         Sleep($atk3Time*1000)
  257.                     MouseUp("right")
  258.                     EndIf
  259.  
  260.                     Sleep(500)
  261.                     RandClick("right", Round(600*$x_ratio), Round(20*$y_ratio)) ;break the table & chair
  262.  
  263.                     MouseDown("left")
  264.                     Sleep($atk2Time*1000)
  265.                     MouseUP("left")
  266.                     Sleep(Random(50, 150))
  267.                     Send("{SHIFTUP}")
  268.                     Sleep(Random(300, 500))
  269.  
  270.                     ;Do a little dance because you have a low pickup radius
  271.                     If $pickupRadius <= 10 Then
  272.                         RandClick("middle", Round(370*$x_ratio), Round(180*$y_ratio)) ;Left
  273.                         Moving(2500)
  274.                         RandClick("middle", Round(1200*$x_ratio), Round(380*$y_ratio)) ;Right
  275.                         Moving(1500)
  276.                     Else
  277.                         RandClick("middle", Round(530*$x_ratio), Round(190*$y_ratio)) ;location of sarkoth after death
  278.                         Moving(2750)
  279.                     Endif
  280.  
  281.                     Send($skillCompanion)
  282.                     Call("Loot")
  283.                     $mLootIn -= 1
  284.                     Send($skillCompanion)
  285.                     RandSleep(5, 10, 50)
  286.                     Call("TownPortal")
  287.                 Else
  288.                     If $ActualState == "MainMenu" OR $ActualState == "NewTristram" Then
  289.                         $ExpectedState = $ActualState
  290.                     ElseIf Not Call("CheckDead") Then
  291.                         Call("TownPortal")
  292.                     EndIf
  293.                 EndIf
  294.  
  295.  
  296.             Case $ExpectedState == "NewTristram"
  297.                 ;Ensure successful town portal
  298.                 If Call("CheckDead") Then
  299.                     Return
  300.                 EndIf
  301.  
  302.                 LogWrite("Expects - New Tristram")
  303.                 UpdateTooltip()
  304.  
  305.                 ;Checks that theplayer is in New Tristram
  306.                 If CheckFor("NewTristram", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio, 5) Then
  307.                     UpdateTooltip()
  308.                     RandSleep(30, 60, 10)
  309.  
  310.                     ;If its time to manage loot
  311.                     If $mLootIn == 0 Then
  312.                         If $IdentifyLoot == True Then
  313.                             ;Call("Identify")
  314.                         EndIf
  315.                         If $StashLoot == True Then
  316.                             Call("Stash")
  317.                         EndIf
  318.                         If $VendorLoot == True Then
  319.                             Call("VendorLoot")
  320.                         EndIf
  321.                         $mLootIn = $mLoot ;Reset Counter
  322.                     Else
  323.                         ;Check if player needs to repair
  324.                         Call("CheckRepair")
  325.                     EndIf
  326.                     Call("LeaveGame")
  327.                 Else
  328.                     If $ActualState == "MainMenu" Then
  329.                         $ExpectedState = $ActualState
  330.                     ElseIf Not Call("CheckDead") Then
  331.                         Call("TownPortal")
  332.                     EndIf
  333.                 EndIf
  334.  
  335.  
  336.             Case Else
  337.                 LogWrite("Expects - MainMenu")
  338.                 UpdateTooltip()
  339.  
  340.                 ;Checks if the player is in the Main Menu
  341.                 If CheckFor("MainMenu", 0*$x_ratio, 360*$y_ratio, 480*$x_ratio, 480*$y_ratio) Then
  342.                     $runCount += 1
  343.                     UpdateTooltip()
  344.                     RandSleep(60, 180, 2)
  345.  
  346.                     ;Keep trying to enter game if Game Limit has been reahed.
  347. ;                   While True
  348.                         RandClick("left", Round(230*$x_ratio), Round(416*$y_ratio), 120*$x_ratio, 5*$y_ratio) ;Random Click on the resume button
  349. ;                       If CheckFor("LimitError", Round(720*$x_ratio), Round(480*$y_ratio), Round(960*$x_ratio), Round(600*$y_ratio), .5) Then
  350. ;                           Sleep(Random(1000, 2000))
  351. ;                           RandClick("left", Round(960*$y_ratio), Round(635*$x_ratio), 25*$x_ratio, 5*$y_ratio)
  352. ;                           $rand = Random(40000, 80000)
  353. ;                           LogWrite("Waiting " & Round($rand/1000) & " seconds.")
  354. ;                           Sleep($rand)
  355. ;                       Else
  356. ;                           ExitLoop
  357. ;                       EndIf
  358. ;                   WEnd
  359.  
  360.                     $rt = TimerInit()
  361.                     $ExpectedState = "OldRuins"
  362.                     LogWrite("Runs: " & $runCount & ", Manage In: " & $mLootIn)
  363.                 Else
  364.                     If $ActualState == "" Then
  365.                         MsgBox(16, "Fatal Error", "FATAL ERROR: " & $pngLoc & "MainMenu.png" & @CRLF & "Image is not recognizeable.")
  366.                         Exit
  367.                     ElseIf Not Call("CheckDead") Then
  368.                             Call("LeaveGame")
  369.                     EndIf
  370.                 EndIf
  371.         EndSelect
  372.     EndIf
  373. EndFunc
  374.  
  375. ;Helper Functions
  376. Func CheckDead()
  377.     LogWrite("Checking Death")
  378.     $LogoutTimerCancel = PixelSearch(Round(900*$x_ratio), Round(240*$y_ratio), Round(1010*$x_ratio), Round(290*$y_ratio), 0x993827) ; checks for cancel button on logout timer
  379.     If Not @error Then
  380.         LogWrite(" Found - Logout Cancel")
  381.         ;Sleep(11000)
  382.         Return True
  383.     Else
  384.         LogWrite(" Not Found - Logout Cancel")
  385.     EndIf
  386.  
  387.     $CloseButton = PixelSearch(Round(1570*$x_ratio), Round(110*$y_ratio), Round(1590*$x_ratio), Round(120*$y_ratio), 0x8C2300) ; checks for the red color of the "X" on an open window
  388.     If Not @error Then
  389.         Sleep(200)
  390.         Send("{SPACE}") ;close any open windows
  391.         Return True
  392.     EndIf
  393.  
  394.     $YouHaveDied = PixelSearch(Round(620*$x_ratio), Round(325*$y_ratio), Round(625*$x_ratio), Round(330*$y_ratio), 0xFFFFFF) ; checks for white text "YOU HAVE DIED"
  395.     If Not @error Then
  396.         LogWrite(" Found - Death")
  397.         $deathCount += 1
  398.         UpdateTooltip()
  399.         Call("LeaveGame")
  400.         Sleep(11000)
  401.         Return True
  402.     Else
  403.         LogWrite(" Not Found - Death")
  404.         Return False
  405.     EndIf
  406.  
  407. EndFunc
  408.  
  409. Func CheckRepair()
  410.     LogWrite("Checking - Repair")
  411.     $RepairArea = PixelSearch(Round(1480*$x_ratio), 0, Round(1570*$x_ratio), Round(100*$y_ratio), $yellow)
  412.     If Not @error Then
  413.         LogWrite(" Found - Damaged")
  414.         Call("DoRepair")
  415.     Else
  416.         LogWrite(" Not Found - Damaged")
  417.     EndIf
  418.  
  419.     $RepairAreaRed = PixelSearch(Round(1480*$x_ratio), 0, Round(1570*$x_ratio), Round(100*$y_ratio), $red)
  420.     If Not @error Then
  421.         LogWrite(" Found - Broken")
  422.         Call("DoRepair")
  423.     Else
  424.         LogWrite(" Not Found - Broken")
  425.     EndIf
  426. EndFunc
  427.  
  428. Func DoRepair()
  429.     LogWrite("Start - Repairing")
  430.     Sleep(Random(75, 150))
  431.     MouseClick("left", Round(1480*$x_ratio),Round(281*$y_ratio)) ;begin movement towards merchant
  432.     Moving(1875)
  433.     MouseClick("left", Round(1316*$x_ratio),Round(206*$y_ratio)) ;moves to get merchant in screen
  434.     Moving(1875)
  435.     MouseClick("left", Round(845*$x_ratio),Round(225*$y_ratio)) ;NPC Merchant to the right of cain's home
  436.     Moving(2000)
  437.  
  438.     ;Make sure window is open
  439.     $VendorFound = PixelSearch(Round(0*$x_ratio), Round(0*$y_ratio), Round(420*$x_ratio), Round(120*$y_ratio), 0xC5C25A, 5) ; checks for the bright spot on bag at top of vendor
  440.     If Not @error Then
  441.         LogWrite("Found - Repair")
  442.         MouseClick("left", Round(521*$x_ratio),Round(506*$y_ratio)) ;button to open up repair menu
  443.         Sleep(400)
  444.         MouseClick("left", Round(260*$x_ratio),Round(595*$y_ratio)) ;button to pay for repairs
  445.         Sleep(200)
  446.         Send("{Escape}")
  447.         Sleep(500)
  448.     Else
  449.         Send("{SPACE}")
  450.         LogWrite("Not Found - Repair")
  451.     EndIf
  452.     LogWrite("Finished - Repairing")
  453. EndFunc
  454.  
  455. Func CalcTime()
  456.     $srt = TimerDiff($rt)
  457.     LogWrite("Runtime: " & Round($srt/1000,2) & " seconds.")
  458.     $trt = TimerDiff($t)
  459.     $total = Round((($trt/1000)/60)/60,4)
  460.  
  461.     ;Total runtiume calculation.
  462.     $hours = Floor((($trt/1000)/60)/60)
  463.     $minutes = (($trt/1000)/60)
  464.     ;trim minutes if runtime is more then 1 hour.
  465.     If $minutes > 60 Then
  466.         While $minutes > 60
  467.             $minutes -=60
  468.         WEnd
  469.     EndIf
  470.     LogWrite("Total Runtime: " & $hours & " hours, "& Ceiling($minutes) &" minutes.")
  471.     LogWrite("")
  472. EndFunc
  473.  
  474. Func CheckFor($img, $startX = 0, $startY = 0, $endX = @DesktopWidth, $endY = @DesktopHeight, $seconds = 10, $tolerance = 100)
  475.     $c = 0
  476.     $string = $pngLoc & $img & ".png"
  477.     Do
  478.         $c +=1
  479.         Sleep(100)
  480.         If $c > ($seconds*10) Then ;Make sure we never get stuck here for infinity.
  481.             LogWrite(" Not Found - " & $img)
  482.             Return False
  483.         EndIf
  484.     Until _ImageSearchArea($string, 1, $startX, $startY, $endX, $endY, $gX, $gY, $tolerance)
  485.     LogWrite(" Found - " & $img)
  486.     $ActualState = $img
  487.     Return True
  488. EndFunc
  489.  
  490. Func Identify()
  491.     Send("i")
  492.     Sleep(1300)
  493.     LogWrite("Start - Identify")
  494.     $preArmor = PixelChecksum(1600, 170, 1865, 535)
  495.     While _ImageSearchArea($pngLoc & "unidentified.png", 1, 1400*$x_ratio, 580*$y_ratio, 1915*$x_ratio, 890*$y_ratio, $gX, $gY, 120)
  496.         LogWrite(" Found - Unidentified")
  497.         MouseClick("right", $gX, $gY, 1, 4)
  498.         Sleep(250)
  499.         If Not $preArmor = PixelChecksum(1600, 170, 1865, 535) Then
  500.             LogWrite(" Error - Missidentified")
  501.             Sleep(250)
  502.             MouseClick("right", $gX, $gY, 1, 4)
  503.         Else
  504.             LogWrite(" Identifying")
  505.             MouseMove(Round(Random(0, 400)*$x_ratio), Round(Random(700, 1080)*$y_ratio), 3) ;Moves mouse out of the way
  506.             Sleep(Random(3000, 3500))
  507.         EndIf
  508.     WEnd
  509.     LogWrite("Finish - Identify")
  510.     Send("i")
  511.     Sleep(200)
  512. EndFunc
  513.  
  514. Func LeaveGame()
  515.     LogWrite("Leaving Game")
  516.     $Logout = true
  517.     Call("RandSleep")
  518.     Sleep(Random(100, 500))
  519.     Send("{Escape}")
  520.     Sleep(Random(100, 500))
  521.     RandClick("left", Round(956*$x_ratio), Round(579*$y_ratio), 120*$x_ratio, 5*$y_ratio) ;Random Click on the leave button
  522.     $ExpectedState = "MainMenu"
  523.     Call("CalcTime")
  524. EndFunc
  525.  
  526. Func Loot()
  527.     LogWrite("Start - Looting")
  528.     MouseMove(Round(Random(1400,1920)*$x_ratio),Round(Random(700,1080)*$y_ratio),3) ;Moves mouse out of the way
  529.     If $LootSets == True Then
  530.         LogWrite(" Searching - Set")
  531.         $SetCount += LootGear(0x02CE01, 2)
  532.     EndIf
  533.     If $LootLegendaries == True Then
  534.         LogWrite(" Searching - Legendary")
  535.         $LegendaryCount += LootGear(0xBF642F, 0)
  536.     EndIf
  537.     If $LootRares == True Then
  538.         LogWrite(" Searching - Rare")
  539.         $RareCount += LootGear(0xBBBB00, 2)
  540.     EndIf
  541.     If $LootTomes == True Then
  542.         LogWrite(" Searching - Tome")
  543.         $TomeCount += LootItem("tome", 100)
  544.     EndIf
  545.     If $LootMagic == True Then
  546.         LogWrite(" Searching - Magic")
  547.         $MagicCount += LootGear(0x6969FF, 2)
  548.     EndIf
  549.     If $LootGems == True Then
  550.         LogWrite(" Searching - Gem")
  551.         $GemCount += LootItem("square", 115)
  552.     EndIf
  553.     If $LootCustom == True Then
  554.         LogWrite(" Searching - Custom")
  555.         for $i = 0 to ($totalItems - 1)
  556.             $array = StringSplit($pick[$i],"|")
  557.             $file = $array[1]
  558.             $tolerance = $array[2]
  559.             LootItem($file, $tolerance)
  560.         next
  561.     EndIf
  562.     LogWrite("Finished - Looting")
  563. EndFunc
  564.  
  565. Func LootGear($color, $tolerance = 2)
  566.     $count = 0
  567.     $Loot = PixelSearch(Round(400*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), $color, $tolerance) ; Magic loot (darker for compatibility)
  568.     While Not @error
  569.         LogWrite("  Found - " & $color)
  570.         $count += 1
  571.         MouseClick ('left', $Loot[0], $Loot[1])
  572.         Moving(900)
  573.         MouseMove(Round(Random(1400,1600)*$x_ratio),Round(Random(700,900)*$y_ratio),3) ;Moves mouse out of the way
  574.  
  575.         ;Run at max 5 times per quality
  576.         If $count >= 5 Then
  577.             LogWrite("  Overburdened - " & $color)
  578.             ExitLoop
  579.         EndIf
  580.  
  581.         $Loot = PixelSearch(Round(400*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), $color, $tolerance) ; Magic loot (darker for compatibility)
  582.     WEnd
  583.     Return $count
  584. EndFunc
  585.  
  586. Func LootItem($item, $tolerance)
  587.     $count = 0
  588.     $gX = 0
  589.     $gY = 0
  590.  
  591.     While _ImageSearchArea($pngLoc & $item & ".png",1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,$tolerance)
  592.         LogWrite("  Found - " & $item)
  593.         $count += 1
  594.         sleep(Random(75, 150))
  595.         MouseClick("left",$gX,$gY)
  596.         Moving(900)
  597.         MouseMove(Round(Random(1400,1920)*$x_ratio),Round(Random(700,1080)*$y_ratio),3) ;Moves mouse out of the way
  598.  
  599.         ;Run at max 5 times per quality
  600.         $count += 1
  601.         If $count >= 5 Then
  602.             ExitLoop
  603.         EndIf
  604.     WEnd
  605.     Return $count
  606. EndFunc
  607.  
  608. Func Moving($time)
  609.     Sleep($time/$movementSpeed)
  610. EndFunc
  611.  
  612. Func RandClick($clickType, $xPos, $yPos, $xOff = 5, $yOff = 5, $clicks = 1, $speed = 4)
  613.     If $xOff < 1 Then $xOff = 1
  614.     If $yOff < 1 Then $yOff = 1
  615.     $randX = Round(Random($xPos-($xOff*$x_ratio), $xPos+($xOff*$x_ratio)))
  616.     $randY = Round(Random($yPos-($yOff*$y_ratio), $yPos+($yOff*$y_ratio)))
  617.     MouseClick($clickType, $randX, $randY, $clicks, $speed)
  618. EndFunc
  619.  
  620. Func RandMove($xPos, $yPos, $xOff = 5, $yOff = 5)
  621.     If $xOff < 1 Then $xOff = 1
  622.     If $yOff < 1 Then $yOff = 1
  623.     $randX = Round(Random($xPos-($xOff*$x_ratio), $xPos+($xOff*$x_ratio)))
  624.     $randY = Round(Random($yPos-($yOff*$y_ratio), $yPos+($yOff*$y_ratio)))
  625.     MouseMove($randX, $randY)
  626. EndFunc
  627.  
  628. Func RandSleep($min = 30, $max = 60, $chance = 5)
  629.     $randNum = Round(Random(1, 100))
  630.     If $Timer == True And $randNum <= $chance Then
  631.         $sleepTime = Random($min*1000, $max*1000)
  632.         LogWrite("Random Sleep - " & Round($sleepTime/1000) & " sec" & @CRLF)
  633.  
  634.         For $c = 0 To 10
  635.             Sleep($sleepTime/10)
  636.             ConsoleWrite("|")
  637.         Next
  638.         ConsoleWrite(@CRLF)
  639.     EndIf
  640. EndFunc
  641.  
  642. Func Stash()
  643.     LogWrite("Start - Stashing")
  644.     Sleep(Random(250, 500))
  645.     MouseClick("left", 1064*$x_ratio, 256*$y_ratio)
  646.     Moving(1875)
  647.  
  648.     ;Legendaries
  649.     If $StashLegendary == True Then
  650.         StashGear(0x4D2C0D, 0)
  651.     EndIf
  652.  
  653.     ;Rares
  654.     If $StashRare == True Then
  655.         StashGear(0x4A3C0B, 1)
  656.     EndIf
  657.  
  658.     ;Tomes
  659.     $count = 0
  660.     While $StashTomes == True
  661.         LogWrite("Searching - Tome")
  662.         If _ImageSearchArea($pngLoc & "tomeIcon.png",1,1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio,$gX,$gY,100) Then
  663.             LogWrite("Stashing - Tome")
  664.             MouseClick("left",500*$x_ratio,360*$y_ratio,1,1)
  665.             Sleep(Random(500, 750))
  666.             MouseClick("right",$gX,$gY,1,1)
  667.             Sleep(Random(400, 600))
  668.             MouseClick("left",500*$x_ratio,200*$y_ratio,1,1)
  669.             Sleep(Random(200, 500))
  670.  
  671.             ;Run at max 5 times per quality
  672.             $count += 1
  673.             If $count >= 5 Then
  674.                 LogWrite("  Overburdened - Tome")
  675.                 ExitLoop
  676.             EndIf
  677.         Else
  678.             ExitLoop
  679.         EndIf
  680.     WEnd
  681.  
  682.     ;Magic
  683.     While $StashMagic == True
  684.         StashGear(0x182037, 2)
  685.     WEnd
  686.  
  687.     Sleep(Random(500, 1000))
  688.     LogWrite("Finished - Stashing")
  689.     Send("{ESCAPE}")
  690. EndFunc
  691.  
  692. Func StashGear($color, $tolerance)
  693.     $count = 0
  694.     While True
  695.         LogWrite("Searching - " & $color)
  696.         Sleep(Random(200, 300))
  697.         $Stash = PixelSearch(1400*$x_ratio, 580*$y_ratio, 1915*$x_ratio, 890*$y_ratio, $color, $tolerance)
  698.         If Not @error Then
  699.             LogWrite("Stashing - " & $color)
  700.             MouseClick("right", $Stash[0], $Stash[1])
  701.  
  702.             ;Run at max 5 times per quality
  703.             $count += 1
  704.             If $count >= 5 Then
  705.                 LogWrite("  Overburdened - " & $color)
  706.                 ExitLoop
  707.             EndIf
  708.         Else
  709.             ExitLoop
  710.         EndIf
  711.     WEnd
  712. EndFunc
  713.  
  714. Func TownPortal()
  715.     LogWrite("Calling - TownPortal")
  716.     Send("t")
  717.     Sleep(6500)
  718.     $ExpectedState = "NewTristram"
  719. EndFunc
  720.  
  721. Func VendorLoot()
  722.     LogWrite("Start - Vendoring")
  723.  
  724.     If Not $StashLoot Then ;Move from TP towards vendor
  725.         LogWrite("Moving - From Portal")
  726.         Sleep(Random(300, 500))
  727.         MouseClick("left", 1565*$x_ratio, 50*$y_ratio)
  728.     Else ;Move from Stash towards vendor
  729.         LogWrite("Moving - From Stash")
  730.         Sleep(Random(300, 500))
  731.         MouseClick("left", 1560*$x_ratio, 120*$y_ratio)
  732.     EndIf
  733.     LogWrite("Moving - To Vendor")
  734.     Moving(3000)
  735.     MouseClick("left", 1030*$x_ratio, 210*$y_ratio) ;Talk to vendor
  736.     Moving(2500)
  737.  
  738.     ;Make sure window is open
  739.     $VendorFound = PixelSearch(Round(0*$x_ratio), Round(0*$y_ratio), Round(420*$x_ratio), Round(120*$y_ratio), 0xC5C25A, 5) ; checks for the bright spot on bag at top of vendor
  740.     If Not @error Then
  741.         LogWrite("Found - Vendor")
  742.  
  743.         ;All
  744.         If $vendorArea == True Then
  745.             LogWrite("Vendor All - R=" & $vendorRows & " C=" & $vendorCols)
  746.             For $c = 1 To $vendorCols
  747.                 For $r = 1 To $vendorRows
  748.                     RandClick("right", (((($c-1)*50)+32+1400)*$x_ratio), (((($r-1)*51)+32+580)*$y_ratio), 1, 2, 1, 3)
  749.                 Next
  750.             Next
  751.         EndIf
  752.  
  753.         ;Rares
  754.         If $VendorRare == True Then
  755.             $c = 0
  756.             While $VendorRare
  757.             LogWrite("Searching - Rare")
  758.                 Sleep(Random(200, 300))
  759.                 $RarePixel = PixelSearch(1400*$x_ratio, 580*$y_ratio, 1915*$x_ratio, 890*$y_ratio, 0x4A3C0B, 1)
  760.                 If Not @error Then
  761.                     LogWrite("Found - Rare")
  762.                     MouseClick("right", $RarePixel[0], $RarePixel[1])
  763.                     $c += 1
  764.  
  765.                     If $c >= 20 Then
  766.                         LogWrite("Excess/Un-identified - Rare")
  767.                         ExitLoop
  768.                     EndIf
  769.                 Else
  770.                     LogWrite("Not Found - Rare")
  771.                     ExitLoop
  772.                 EndIf
  773.             WEnd
  774.         EndIf
  775.  
  776.         ;Magic
  777.         If $VendorMagic == True Then
  778.             LogWrite("Searching - Magic")
  779.             $c = 0
  780.             While True
  781.                 Sleep(Random(100, 300))
  782.                 $MagicPixel = PixelSearch(1400*$x_ratio, 580*$y_ratio, 1915*$x_ratio, 890*$y_ratio, 0x182037, 2)
  783.                 If Not @error Then
  784.                     LogWrite("Found - Magic")
  785.                     MouseClick("right", $MagicPixel[0], $MagicPixel[1])
  786.                     $c += 1
  787.  
  788.                     If $c >= 20 Then
  789.                         LogWrite("Excess/Un-identified - Magic")
  790.                         ExitLoop
  791.                     EndIf
  792.                 Else
  793.                     LogWrite("Not Found - Magic")
  794.                     ExitLoop
  795.                 EndIf
  796.             WEnd
  797.         EndIf
  798.  
  799.         Sleep(Random(500, 1000))
  800.         LogWrite("Finished - Vendoring")
  801.         Send("{ESCAPE}")
  802.     Else
  803.         Send("{SPACE}")
  804.         LogWrite("Not Found - Vendor")
  805.     EndIf
  806.     LogWrite("Finished - Vendoring")
  807. EndFunc
  808.  
  809. ;Hotkey Functions
  810. Func Leave()
  811.    $Leave = True
  812. EndFunc
  813.  
  814. Func Pause()
  815.     $Paused = Not $Paused
  816.  
  817.     If $Paused Then
  818.         LogWrite("Script - Paused")
  819.     Else
  820.         LogWrite("Script - UnPaused")
  821.     EndIf
  822.  
  823.     While $Paused
  824.         Sleep(100)
  825.     WEnd
  826. EndFunc
  827.  
  828. Func Stop() ;to allow the script to stop
  829.     LogWrite(@CRLF & "Legendary:" & $LegendaryCount & " Set:" & $SetCount & " Rare:" & $RareCount & " Magic:" & $MagicCount & " Gem:" & $GemCount & " Tome:" & $TomeCount & @CRLF)
  830.     If $CreateLog == True Then
  831.         FileClose($LogFile)
  832.     EndIf
  833.     Exit
  834. EndFunc
  835.  
  836. ;Settings Functions
  837. Func _ImageSearchArea($findImage, $resultPosition, $x1, $y1, $right, $bottom, ByRef $x, ByRef $y, $tolerance)
  838.     If $tolerance > 0 Then $findImage = "*" & $tolerance & " " & $findImage
  839.     $findImage = "*TRANSBLACK " & $findImage
  840.     If @AutoItX64 Then
  841.         $result = DllCall("ImageSearchDLL_x64.dll", "str", "ImageSearch", "int", $x1, "int", $y1, "int", $right, "int", $bottom, "str", $findImage)
  842.     Else
  843.         $result = DllCall("ImageSearchDLL.dll", "str", "ImageSearch", "int", $x1, "int", $y1, "int", $right, "int", $bottom, "str", $findImage)
  844.     EndIf
  845.     If $result = "0" Then
  846.         Return 0
  847.     EndIf
  848.  
  849.     ; Otherwise get the x,y location of the match and the size of the image to
  850.     ; compute the centre of search
  851.     $array = StringSplit($result[0], "|")
  852.     If (UBound($array) >= 4) Then
  853.         $x = Int(Number($array[2]))
  854.         $y = Int(Number($array[3]))
  855.         If $resultPosition = 1 Then
  856.             $x = $x + Int(Number($array[4]) / 2)
  857.             $y = $y + Int(Number($array[5]) / 2)
  858.         EndIf
  859.         Return 1
  860.     EndIf
  861. EndFunc   ;==>_ImageSearchArea
  862.  
  863. Func CreateINI()
  864.     IniWrite($ini,"Options", "AutoUpdate", $autoUpdate)
  865.     IniWrite($ini,"Options", "Physical Log", $CreateLog)
  866.  
  867.     IniWrite($ini, "Skills", "Caltrops", $skillCaltrops)
  868.     IniWrite($ini, "Skills", "Companion", $skillCompanion)
  869.     IniWrite($ini, "Skills", "Preperation", $skillPreperation)
  870.     IniWrite($ini, "Skills", "SmokeScreen", $skillSmokeScreen)
  871.  
  872.     IniWrite($ini, "Looting", "Sets", $LootSets)
  873.     IniWrite($ini, "Looting", "Legendaries", $LootLegendaries)
  874.     IniWrite($ini, "Looting", "Rares", $LootRares)
  875.     IniWrite($ini, "Looting", "Magic", $LootMagic)
  876.     IniWrite($ini, "Looting", "Gems", $LootGems)
  877.     IniWrite($ini, "Looting", "Tomes", $LootTomes)
  878.     IniWrite($ini, "Looting", "Custom", $LootCustom)
  879.  
  880.     IniWrite($ini, "Custom Loot", "PNG Location", $pngLoc)
  881.     ;IniWrite($ini,"Custom Loot", "Total Items", $totalItems)
  882.  
  883.     ;Array of items to loot
  884.     ;$pick[0] = "mythic.png|40" ;png|Tolerance
  885.     ;$pick[1] = "item2.png"
  886.     ;$pick[2] = "item3.png"
  887.  
  888.     IniWrite($ini, "ManageLoot","How Often", $mLoot)
  889.     ;IniWrite($ini, "ManageLoot","Identify", $IdentifyLoot)
  890.  
  891.     IniWrite($ini, "Stashing", "Loot", $StashLoot)
  892.     IniWrite($ini, "Stashing", "Legendaries", $StashLegendary)
  893.     IniWrite($ini, "Stashing", "Rares", $StashRare)
  894.     IniWrite($ini, "Stashing", "Magic", $StashMagic)
  895.     IniWrite($ini, "Stashing", "Tomes", $StashTomes)
  896.  
  897.     IniWrite($ini, "Vendoring", "Loot", $VendorLoot)
  898.     IniWrite($ini, "Vendoring", "Rares", $VendorRare)
  899.     IniWrite($ini, "Vendoring", "Magic", $VendorMagic)
  900.  
  901.  
  902.     IniWrite($ini, "Variability", "Timer", $Timer)
  903.     IniWrite($ini, "Variability", "Secondary Attack", $atk1Time)
  904.     IniWrite($ini, "Variability", "Primary Attack", $atk2Time)
  905.     IniWrite($ini, "Variability", "Adds Attack", $atk3Time)
  906.     IniWrite($ini, "Variability", "Using NT", $usingNT)
  907.  
  908.     IniWrite($ini, "Additional", "Movement Speed", $movementSpeed)
  909.     IniWrite($ini, "Additional", "Pickup Radius", $pickupRadius)
  910.  
  911.     IniWrite($ini, "Beta", "Area", $vendorArea)
  912.     IniWrite($ini, "Beta", "Rows", $vendorRows)
  913.     IniWrite($ini, "Beta", "Cols", $vendorCols)
  914. EndFunc
  915.  
  916. Func DoUpdate()
  917.     $Ini = InetGet($VersionsInfo,@ScriptDir & "\version.ini")                                           ;download version.ini
  918.     If $Ini = 0 Then                                                                                    ;was the download of version.ini successful?
  919.         MsgBox(0,"ERROR","The server seems to be offline. No update will be done.")
  920.     Else
  921.         $newVersion = IniRead (@ScriptDir & "\version.ini","Version","Version","")                      ;reads the new version out of version.ini
  922.         If $newVersion = $oldVersion Then                                                               ;compare old and new
  923.             ;MsgBox (0,"No update","There is no update available!")
  924.             FileDelete(@ScriptDir & "\version.ini")
  925.         Else
  926.             $msg = MsgBox (4,"Update","Would you like to update from version " & $oldVersion & " to " & $newVersion & "?")
  927.             If $msg = 7 Then                                                                            ;No was pressed
  928.                 FileDelete(@ScriptDir & "\version.ini")
  929.             ElseIf $msg = 6 Then                                                                        ;OK was pressed
  930.                 ;------------------------------- Begin download the zip file --------------------------------------;
  931.                 $downloadLink = IniRead(@ScriptDir & "\version.ini","Version","download","NotFound")
  932.                 ConsoleWrite($downloadLink)
  933.                 $dlhandle = InetGet($downloadLink,@ScriptDir & "\S-SarkothBot-" & $newVersion & ".rar",1,1)
  934.                 ProgressOn("Update", "Downloading Updates", "",-1,-1,16)                                                        ;creates an progressbar
  935.  
  936.                 $Size = InetGetSize($downloadLink,1)                                                    ;get the size of the update
  937.                 While Not InetGetInfo($dlhandle, 2)
  938.                     $Percent = (InetGetInfo($dlhandle,0)/$Size)*100
  939.                     ProgressSet( $Percent, $Percent & " percent")                                       ;update progressbar
  940.                     Sleep(1)
  941.                 WEnd
  942.                 ProgressSet(100 , "Done", "Complete")                                                   ;show complete progressbar
  943.                 sleep(500)
  944.                 ProgressOff()                                                                           ;close progress window
  945.  
  946.                 ;------------------------------- Write the new version for future updates --------------------------------------;
  947.                 IniWrite("updater.ini","version","version",$newVersion)                                 ;updates update.ini with the new version
  948.                 InetClose($dlhandle)                                                                    ;close net connection
  949.                 MsgBox(-1,"Success","Download Complete! Please restart the bot." & @CRLF & "Check your Change Log.txt file to see the newest updates!")                     ;show complete message
  950.                 FileDelete(@ScriptDir & "\version.ini")
  951.                 Exit
  952.             EndIf
  953.         EndIf
  954.     EndIf
  955. EndFunc
  956.  
  957. Func LogWrite($text)
  958.     ConsoleWrite($text & @CRLF)
  959.     If $CreateLog == True Then
  960.         FileWriteLine($LogFile, $text)
  961.     EndIf
  962. EndFunc
  963.  
  964. Func UpdateTooltip()
  965.     ToolTip("Runs: " & $runCount & ", Cellar Spawn: " & Round(($cellarCount/$runCount)*100) & "%, Deaths: " & $deathCount & ", Manage In: " & $mLootIn, 0, $size[1]-20)
  966.     ;ToolTip("Expected: " & $ExpectedState & ", Actual: " & $ActualState, 0, $size[1]-20)
  967. EndFunc
  968.  
  969. Func ReadINI()
  970.     $autoUpdate = IniRead($ini,"Options", "AutoUpdate", $autoUpdate)
  971.     $CreateLog = IniRead($ini,"Options","Physical Log",$CreateLog)
  972.  
  973.     $skillCaltrops = IniRead($ini, "Skills","Caltrops",$skillCaltrops)
  974.     $skillCompanion = IniRead($ini,"Skills","Companion",$skillCompanion)
  975.     $skillPreperation = IniRead($ini,"Skills","Preperation",$skillPreperation)
  976.     $skillSmokeScreen = IniRead($ini,"Skills","SmokeScreen",$skillSmokeScreen)
  977.  
  978.     $LootSets = IniRead($ini,"Looting","Sets",$LootSets)
  979.     $LootLegendaries = IniRead($ini,"Looting","Legendaries",$LootLegendaries)
  980.     $LootRares = IniRead($ini,"Looting","Rares",$LootRares)
  981.     $LootMagic = IniRead($ini,"Looting","Magic",$LootMagic)
  982.     $LootGems = IniRead($ini,"Looting","Gems",$LootGems)
  983.     $LootTomes = IniRead($ini,"Looting","Tomes",$LootTomes)
  984.     $LootCustom = IniRead($ini,"Looting","Custom",$LootCustom)
  985.  
  986.     $pngLoc = IniRead($ini,"Custom Loot","PNG Location",$pngLoc)
  987.     ;$totalItems = IniRead($ini,"Custom Loot","Total Items",$totalItems)
  988.  
  989.     ;Array of items to loot
  990.     ;$pick[0] = "mythic.png|40" ;png|Tolerance
  991.     ;$pick[1] = "item2.png"
  992.     ;$pick[2] = "item3.png"
  993.  
  994.     $mLoot = IniRead($ini,"ManageLoot","How Often",$mLoot)
  995.     ;$IdentifyLoot = IniRead($ini, "ManageLoot","Identify", $IdentifyLoot)
  996.  
  997.     $StashLoot = IniRead($ini,"Stashing","Loot",$StashLoot)
  998.     $StashLegendary = IniRead($ini,"Stashing","Legendaries",$StashLegendary)
  999.     $StashRare = IniRead($ini,"Stashing","Rares",$StashRare)
  1000.     $StashMagic = IniRead($ini,"Stashing","Magic",$StashMagic)
  1001.     $StashTomes = IniRead($ini,"Stashing","Tomes",$StashTomes)
  1002.  
  1003.     $VendorLoot = IniRead($ini,"Vendoring","Loot",$VendorLoot)
  1004.     $VendorRare = IniRead($ini,"Vendoring","Rares",$VendorRare)
  1005.     $VendorMagic = IniRead($ini,"Vendoring","Magic",$VendorMagic)
  1006.  
  1007.     $Timer = IniRead($ini,"Variability","Timer",$Timer)
  1008.     $atk1Time = IniRead($ini,"Variability","Secondary Attack",$atk1Time)
  1009.     $atk2Time = IniRead($ini,"Variability","Primary Attack",$atk2Time)
  1010.     $atk3Time = IniRead($ini,"Variability","Adds Attack",$atk3Time)
  1011.     $usingNT = IniRead($ini,"Variability","Using NT",$usingNT)
  1012.  
  1013.     $movementSpeed = IniRead($ini,"Additional","Movement Speed",$movementSpeed)
  1014.     $pickupRadius = IniRead($ini,"Additional","Pickup Radius",$pickupRadius)
  1015.  
  1016.     $vendorArea = IniRead($ini,"Beta","Area",$vendorArea)
  1017.     $vendorRows = IniRead($ini,"Beta","Rows",$vendorRows)
  1018.     $vendorCols = IniRead($ini,"Beta","Cols",$vendorCols)
  1019. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement