Code:
#include <ImageSearch.au3>
Global $Paused
Global $ini = "S-SarkothBot.ini"
Global $log = "S-SarkothBot.log"
;Get Window Status
Opt('MouseCoordMode', 2)
Opt('PixelCoordMode', 2)
$size = WinGetClientSize("[TITLE:Diablo III; CLASS:D3 Main Window Class]")
If ($size[0]/$size[1]) <> 16/9 Then $size[1]-=30 ; adjusts ratio for titlebar if not 16:9
HotKeySet(",","Leave") ;script started by pressing =
HotKeySet(".", "Pause") ;script paused by pressing -
HotKeySet("-", "Stop") ;script stopped by pressing x
$loadtime = 3200 ; time in ms the script waits for the game to load before it starts pathfinding. Slow this down for slower hard drives
;$tptime = 6900 ; time in ms the script waits for teleport before exiting the game
$yellow = 0xFFF000 ; yellow color code (repair icon)
$red = 0xD90000 ; red color code (repair icon)
$currentArrayItem = 0
;Sell
$vendorAll = True
$vendorRows = 5
$vendorCols = 10
;Change to match your abilities (1-4 by default)
$skillSmokeScreen = "1"
$skillPreperation = "2"
$skillCompanion = "3"
$skillCaltrops = "4"
;Stats
$movementSpeed = 25 ;This is the % increase movement speed you have. 25 = 25%, 0 = 0%, 50 = 50%
$pickupRadius = 12 ;Pickup globe/gold radius
;Custom Loot
$pngLoc = "C:\Users\Kalenen\Desktop\DH\PICS\" ;Location of the .PNGs
$totalItems = 1 ;Number of items in the pick array
Global $pick[$totalItems] ;DONT CHANGE THIS
;Array of items to loot
$pick[0] = "mythic.png|40" ;png|Tolerance
;$pick[1] = "item2.png"
;$pick[2] = "item3.png"
;Looting
$LootSets = True ;True if you want to pick up Sets
$LootLegendaries = True ;True if you want to pick up Legendaries
$LootRares = True ;True if you want to pick up Rares
$LootMagic = True ;True if you want to pick up Magic
$LootGems = False ;True if you want to pick up Gems
$LootTomes = False ;True if you want to pick up Tome of Secrets (Automatically picked up when LootMagic is True)
$LootCustom = False ;True if you want to pick up Custom Items (The items in the pick array above)
;Manage Loot
$mLoot = 30 ;Nuber of successful runs until Stash and Vendor
$mLootOff = 10 ;Stash and Vendor after mLoot +- X number of runs (Variability)
;Stashing
$StashLoot = True ;True if you want to store Items in the stash
$StashLegendary = True ;True if you want to store Legendary items in the stash
$StashRare = True ;True if you want to store Rare items in the stash
$StashMagic = False ;True if you want to store Magic items in the stash
$StashTomes = False ;True if you want to store Tomes items in the stash
;Vendoring
$VendorLoot = True ;True if you want to vendor Items
$VendorRare = False ;True if you want to vendor Rares
$VendorMagic = False ;True if you want to vendor Magic
;Variability
$Timer = False ;True and the bot will add random sleep intervals
;Options
$CreateLog = True ;True if you want to create a log file
$autoUpdate = True ;True if you want to automatically download new versions of this bot
$go = True
$Leave = False
$Dead = False
$Logout = False
$Window = False
$default_resolutionX = 1920 ;DO NOT CHANGE
$default_resolutionY = 1080 ;DO NOT CHANGE (seriously... i'll beat you with a stick)
$x_ratio = $size[0] / $default_resolutionX
$y_ratio = $size[1] / $default_resolutionY
$gX = 0
$gY = 0
$i = 0
;Counts
$LegendaryCount = 0
$SetCount = 0
$RareCount = 0
$MagicCount = 0
$GemCount = 0
$TomeCount = 0
$runCount = 0
$cellarCount = 0
$deathCount = 0
$t = TimerInit()
$rt = 0
;INI File
If FileExists($ini) Then
ReadINI()
Else
CreateINI()
EndIf
;Update Bot
If $autoUpdate == True Then
Call("DoUpdate")
EndIf
;Log File
If $CreateLog == True Then
$LogFile = FileOpen($log, 2)
EndIf
;Calculate new values
$mLootIn = $mLoot ;DO NOT CHANGE, how many more runs till next manage
$movementSpeed = 1+($movementSpeed/100)
;Main
While $go
Call("RunBot")
WEnd
;Script
Func RunBot()
if($Leave) Then
$i = 0
If CheckFor("DisconnectError", "", 720*$x_ratio, 360*$y_ratio, 1200*$x_ratio, 480*$y_ratio, .5) Then
LogWrite("Disconnected" & @CRLF)
RandClick("left", Round(960*$y_ratio), Round(635*$x_ratio), 50 ,10)
Sleep(Random(1000, 2000))
EndIf
;Checks if the player is in the Main Menu
If CheckFor("MainMenu", "", 0*$x_ratio, 360*$y_ratio, 480*$x_ratio, 480*$y_ratio) Then
$runCount += 1
LogWrite(@CRLF & "Run Number: " & $runCount & " - Runs till management: " & $mLootIn & @CRLF & "Main Menu" & @CRLF)
RandSleep(180, 300, 2)
While True
RandClick("left", Round(230*$x_ratio), Round(416*$y_ratio), 120, 20) ;Random Click on the resume button
If CheckFor("LimitError", Round(720*$x_ratio), Round(480*$y_ratio), Round(960*$x_ratio), Round(600*$y_ratio), 1) Then
Sleep(Random(1000, 2000))
RandClick("left", Round(960*$y_ratio), Round(635*$x_ratio), 50 ,10)
$rand = Random(40000, 80000)
LogWrite("Input Limit Reached - Waiting " & Round($rand/1000) & " seconds." & @CRLF)
Sleep($rand)
Else
ExitLoop
EndIf
WEnd
UpdateTooltip()
$rt = TimerInit()
$Window = False
$Logout = False
Else
LogWrite($pngLoc & "MainMenu.png not recognized")
RandMove($size[0],$size[1])
Return
EndIf
;Checks that the player is in the Old Ruins
If CheckFor("OldRuins", "Area", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio) Then
LogWrite("Old Ruins" & @CRLF)
;Start Run
RandClick("middle", Round(500*$x_ratio), Round(250*$y_ratio), 5, 5) ;starts the run [waypoint 1]
Moving(1125)
Send($skillSmokeScreen)
Moving(440)
RandClick("middle", 1, Round(370*$y_ratio), 5, 5) ;waits ~1 second then [waypoint 2]
Moving(1875)
RandClick("middle", Round(400*$x_ratio), Round(600*$y_ratio), 5, 5) ;middle of courtyard [waypoint 3]
Moving(50)
Send($skillSmokeScreen)
Moving(25)
Send($skillPreperation)
Moving(750)
RandMove(Round(300*$x_ratio),Round(80*$y_ratio), 5, 5) ;moves cursor over to the cellar so the proper blue pixel becomes highlighted
;Sleep(790)
Call("CheckDead")
If $Dead Then
Return
EndIf
;Checks if Dank Cellar is Open
LogWrite("Cellar Check ")
$Pixel2 = PixelSearch(0,0, Round(600*$x_ratio), Round(600*$y_ratio),0x334FB7,3)
If Not @error Then
LogWrite("- Found" & @CRLF)
RandClick("left", Round(300*$x_ratio), Round(80*$y_ratio), 10, 10) ;Entrance to cellar
Moving(1150)
Send($skillSmokeScreen)
Moving(2500)
Else ;ABORT RUN
LogWrite("- Not Found" & @CRLF)
Sleep(10)
Send($skillSmokeScreen)
Sleep(40)
Call("TownPortal")
If Not $Logout And Not $Dead And Not $Window Then
;Check if player needs to repair
Call("CheckRepair")
Call("LeaveGame")
Return
Else
$Window = False ; reset the flag so it doesn't think a window is always up
Return
EndIf
EndIf
Call("CheckDead")
If $Dead or $Logout Then
Return
EndIf
Else
LogWrite("- Old Ruins" & @CRLF)
Call("TownPortal")
If $Dead Then
Return
EndIf
Call("LeaveGame")
Return
EndIf
;Checks that the player is in the Dank Cellar
If CheckFor("DankCellar", "Area", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio) Then
LogWrite("Dank Cellar" & @CRLF)
$cellarCount += 1
UpdateTooltip()
RandClick("middle", Round(69*$x_ratio), Round(779*$y_ratio), 10, 10) ;moves to doorway leading to rare inside cellar
Moving(2750)
RandMove(Round(409*$x_ratio),Round(239*$y_ratio), 10, 10) ;hovers over the rare Sarkoth
Send("{SHIFTDOWN}")
Sleep(10)
Send(4)
Sleep(300)
Send(4)
RandMove(Round(555*$x_ratio),Round(219*$y_ratio), 10, 10) ;hovers over the rare Sarkoth
Sleep(300)
Send(4)
Sleep(500)
Send($skillCompanion)
LogWrite("Attacking Sarkoth" & @CRLF)
MouseDown("right") ;ATTACK
Sleep(2500)
MouseUP("right")
MouseDown("left") ;ATTACK
Sleep(7000)
MouseUP("left")
Sleep(50)
MouseDown("right") ;ATTACK
Sleep(6000)
MouseUP("right")
Send("{SHIFTUP}")
Sleep(300)
Call("Loot")
Call("TownPortal")
If $Dead or $Logout Then
Return
EndIf
Else
LogWrite("- Dank Cellar" & @CRLF)
Sleep(620)
Send($skillSmokeScreen)
Sleep(40)
Call("TownPortal")
If $Dead Then
Return
EndIf
Call("LeaveGame")
EndIf
;After successful run
If Not $Logout And Not $Dead And Not $Window Then
If $mLootIn <= 1 Then ;If its time to manage loot
If $StashLoot == True Then
Call("StashLoot")
EndIf
If $VendorLoot == True Then
Call("VendorLoot")
EndIf
$mLootIn = Round(Random($mLoot-$mLootOff, $mLoot+$mLootOff)) ;Reset Counter
Else
;Check if player needs to repair
Call("CheckRepair")
$mLootIn -= 1
EndIf
Call("LeaveGame")
Return
Else
$Window = False ; reset the flag so it doesn't think a window is always up
Return
EndIf
EndIf
EndFunc
;Helper Functions
Func CheckDead()
$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"
If Not @error Then
$deathCount += 1
UpdateTooltip()
LogWrite("Death - ")
$Dead = True
Call("LeaveGame")
Sleep(11000)
Else
$Dead = False
EndIf
$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
If Not @error Then
Sleep(11000)
$Dead = True
Else
$Dead = False
EndIf
EndFunc
Func CheckRepair()
ConsoleWrite("LF NT")
If CheckFor("NewTristram", "Area", 1560*$x_ratio, 0*$y_ratio, 1920*$x_ratio, 40*$y_ratio) Then
;Sleep(250)
ConsoleWrite(", F NT, LF Rep")
$RepairArea = PixelSearch(Round(1480*$x_ratio), 0, Round(1570*$x_ratio), Round(100*$y_ratio), $yellow)
If Not @error Then
Call("DoRepair")
EndIf
$RepairAreaRed = PixelSearch(Round(1480*$x_ratio), 0, Round(1570*$x_ratio), Round(100*$y_ratio), $red)
If Not @error Then
Call("DoRepair")
EndIf
EndIf
EndFunc
Func DoRepair()
Sleep(Random(75, 150))
MouseClick("left", Round(1480*$x_ratio),Round(281*$y_ratio)) ;begin movement towards merchant
Moving(1875)
MouseClick("left", Round(1316*$x_ratio),Round(206*$y_ratio)) ;moves to get merchant in screen
Moving(1875)
MouseClick("left", Round(845*$x_ratio),Round(225*$y_ratio)) ;NPC Merchant to the right of cain's home
Moving(2000)
;Make sure window is open
$VendorFound = PixelSearch(Round(150*$x_ratio), Round(0*$y_ratio), Round(300*$x_ratio), Round(100*$y_ratio), 0xC5C25A) ; checks for the bright spot on bag at top of vendor
If Not @error Then
MouseClick("left", Round(521*$x_ratio),Round(506*$y_ratio)) ;button to open up repair menu
Sleep(400)
MouseClick("left", Round(260*$x_ratio),Round(595*$y_ratio)) ;button to pay for repairs
Sleep(200)
Send("{Escape}")
Sleep(500)
EndIf
EndFunc
Func CalcTime()
$srt = TimerDiff($rt)
LogWrite("Runtime: " & Round($srt/1000,2) & " seconds." & @CRLF)
$trt = TimerDiff($t)
$total = Round((($trt/1000)/60)/60,4)
;Total runtiume calculation.
$hours = Floor((($trt/1000)/60)/60)
$minutes = (($trt/1000)/60)
;trim minutes if runtime is more then 1 hour.
If $minutes > 60 Then
While $minutes > 60
$minutes -=60
WEnd
EndIf
LogWrite("Total Runtime: " & $hours & " hours, "& Ceiling($minutes) &" minutes."& @CRLF)
EndFunc
Func CheckFor($img, $type = "", $startX = 0, $startY = 0, $endX = @DesktopWidth , $endY = @DesktopHeight , $seconds = 5 ,$tolerance = 100)
$c = 0
$string = $pngLoc & $img & ".png"
Do
$c +=1
Sleep(100)
If $c > ($seconds*10) Then ;Make sure we never get stuck here for infinity.
If $type = "Area" Then
LogWrite("Area not found ")
EndIf
Return False
EndIf
Until _ImageSearchArea($string, 1, $startX, $startY, $endX, $endY, $gX, $gY, $tolerance)
Return True
EndFunc
Func LeaveGame()
$Logout = true
Call("RandSleep")
LogWrite("Leaving Game" & @CRLF)
Sleep(Random(100, 500))
Send("{Escape}")
Sleep(500)
RandClick("left", Round(956*$x_ratio), Round(579*$y_ratio), 120*$x_ratio, 10*$y_ratio) ;Random Click on the leave button
Sleep(50)
Call("CalcTime")
EndFunc
Func Loot()
Sleep(200)
LogWrite("Looting" & @CRLF)
If $LootSets == True Then
$SetCount += LootGear(0x02CE01, 2)
EndIf
If $LootLegendaries == True Then
$LegendaryCount += LootGear(0xBF642F, 0)
EndIf
If $LootRares == True Then
$RareCount += LootGear(0xBBBB00, 2)
EndIf
If $LootTomes == True Then
Call("LootTomes")
EndIf
If $LootMagic == True Then
$MagicCount += LootGear(0x6969FF, 2)
EndIf
If $LootGems == True Then
Call("LootGems")
EndIf
If $LootCustom == True Then
Call("LootCustom")
EndIf
EndFunc
Func LootCustom()
$currentArrayItem = 0
$gX = 0
$gY = 0
for $i = 0 to ($totalItems - 1)
$array = StringSplit($pick[$i],"|")
$file = $array[1]
$accuracy = $array[2]
$urlString = $pngLoc & $file
;LogWrite("Looting " & $file & @CRLF)
While _ImageSearchArea($pngLoc & $file,1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,$accuracy)
MouseMove($gX, $gY, 3)
sleep(Random(75, 150))
MouseClick("left",$gX,$gY,1,1)
Moving(1200)
WEnd
next
EndFunc
Func LootGear($color, $tolerance = 2)
$count = 0
$Loot = PixelSearch(Round(400*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), $color, $tolerance) ; Magic loot (darker for compatibility)
If Not @error Then
While Not @error
$count += 1
MouseClick ('left', $Loot[0], $Loot[1])
Moving(900)
;Run at max 10 times per quality
If $count >= 10 Then
ExitLoop
EndIf
$Loot = PixelSearch(Round(400*$x_ratio), 0, Round(1690*$x_ratio), Round(900*$y_ratio), $color, $tolerance) ; Magic loot (darker for compatibility)
WEnd
EndIf
Return $count
EndFunc
Func LootGems()
$gX = 0
$gY = 0
While _ImageSearchArea($pngLoc & "square.png",1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,115)
;MouseMove($gX,$gY,3)
sleep(Random(75, 150))
MouseClick("left",$gX,$gY)
$GemCount += 1
Moving(900)
WEnd
EndFunc
Func LootTomes()
$gX = 0
$gY = 0
$Start = 0
;variables are all set, now onto the scan.
While _ImageSearchArea($pngLoc & "tome.png",1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,100)
;MouseMove($gX,$gY,3)
sleep(Random(75, 150))
MouseClick("left",$gX,$gY)
$TomeCount += 1
Moving(900)
WEnd
EndFunc
Func Moving($time)
Sleep($time/$movementSpeed)
EndFunc
Func RandClick($clickType, $xPos, $yPos, $xOff = 20, $yOff = 20)
$randX = Round(Random($xPos-($xOff*$x_ratio), $xPos+($xOff*$x_ratio)))
$randY = Round(Random($yPos-($yOff*$y_ratio), $yPos+($yOff*$y_ratio)))
MouseClick($clickType, $randX, $randY)
EndFunc
Func RandMove($xPos, $yPos, $xOff = 20, $yOff = 20)
$randX = Round(Random($xPos-($xOff*$x_ratio), $xPos+($xOff*$x_ratio)))
$randY = Round(Random($yPos-($yOff*$y_ratio), $yPos+($yOff*$y_ratio)))
MouseMove($randX, $randY)
EndFunc
Func RandSleep($min = 30, $max = 60, $chance = 5)
$randNum = Round(Random(1, 100))
;LogWrite("SleepCheck: (" & $randNum & ", " & $chance & ")" & @CRLF)
If $Timer == True And $randNum <= $chance Then
$sleepTime = Random($min*1000, $max*1000)
LogWrite("Random Sleep - " & Round($sleepTime/1000) & " sec" & @CRLF)
For $c = 0 To 10
Sleep($sleepTime/10)
ConsoleWrite("|")
Next
ConsoleWrite(@CRLF)
EndIf
EndFunc
Func StashLoot()
LogWrite("Putting Items in Stash" & @CRLF)
Sleep(Random(1000, 1500))
MouseClick("left", 1064*$x_ratio, 256*$y_ratio)
Moving(1875)
;Legendaries
While $StashLegendary == True
Sleep(Random(200, 300))
$LegendPixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x4D2C0D, 0)
If Not @error Then
LogWrite("Stashing Legendary" & @CRLF)
MouseClick("right", $LegendPixel[0], $LegendPixel[1])
Else
ExitLoop
EndIf
WEnd
;Rares
While $StashRare == True
Sleep(Random(200, 300))
$RarePixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x4A3C0B, 1)
If Not @error Then
LogWrite("Stashing Rare" & @CRLF)
MouseClick("right", $RarePixel[0], $RarePixel[1])
Else
ExitLoop
EndIf
WEnd
;Tomes
If _ImageSearchArea($pngLoc & "tomeIcon.png",1,1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio,$gX,$gY,100) And $StashTomes == True Then
LogWrite("Stashing Tomes" & @CRLF)
MouseClick("left",500*$x_ratio,360*$y_ratio,1,1)
Sleep(Random(500, 750))
MouseClick("right",$gX,$gY,1,1)
Sleep(Random(400, 600))
MouseClick("left",500*$x_ratio,200*$y_ratio,1,1)
Sleep(Random(200, 500))
EndIf
;Magic
While $StashMagic == True
Sleep(Random(100, 300))
$MagicPixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x182037, 2)
If Not @error Then
LogWrite("Stashing Magic" & @CRLF)
MouseClick("right", $MagicPixel[0], $MagicPixel[1])
Else
ExitLoop
EndIf
WEnd
Sleep(Random(500, 1000))
LogWrite("Done with Stash" & @CRLF)
Send("{ESCAPE}")
EndFunc
Func TownPortal()
LogWrite("Returning to Town" & @CRLF)
Send("t")
Sleep(6900)
Call("CheckDead")
EndFunc
Func VendorLoot()
LogWrite("Vendoring Items" & @CRLF)
If Not $StashLoot Then ;Move from TP towards vendor
Sleep(Random(300, 500))
MouseClick("left", 1565*$x_ratio, 50*$y_ratio)
Else ;Move from Stash towards vendor
Sleep(Random(300, 500))
MouseClick("left", 1560*$x_ratio, 120*$y_ratio)
EndIf
Moving(3000)
MouseClick("left", 1030*$x_ratio, 210*$y_ratio) ;Talk to vendor
Moving(3000)
;All
If $vendorAll == True Then
For $c = 1 To $vendorCols
For $r = 1 To $vendorRows
MouseClick("right", (((($c-1)*10)+32+1398)*$x_ratio), (((($r-1)*51)+32+572)*$y_ratio))
Next
Next
EndIf
;Rares
If $VendorRare == True Then
LogWrite("Selling Rare - ")
$c = 0
While $VendorRare
Sleep(Random(50, 50))
$RarePixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x4A3C0B, 1)
If Not @error Then
MouseClick("right", $RarePixel[0], $RarePixel[1])
$c += 1
Else
LogWrite($c & @CRLF)
ExitLoop
EndIf
WEnd
EndIf
;Magic
If $VendorMagic == True Then
LogWrite("Selling Magic - ")
$c = 0
While True
Sleep(Random(50, 50))
$MagicPixel = PixelSearch(1398*$x_ratio, 572*$y_ratio, 1914*$x_ratio, 888*$y_ratio, 0x182037, 2)
If Not @error Then
MouseClick("right", $MagicPixel[0], $MagicPixel[1])
$c += 1
Else
LogWrite($c & @CRLF)
ExitLoop
EndIf
WEnd
EndIf
Sleep(Random(50, 100))
LogWrite("Done With Vendor" & @CRLF)
Send("{ESCAPE}")
EndFunc
;Hotkey Functions
Func Leave()
$Leave = True
EndFunc
Func Pause()
$Leave = False
EndFunc
Func Stop() ;to allow the script to stop
LogWrite(@CRLF & "Legendary:" & $LegendaryCount & " Set:" & $SetCount & " Rare:" & $RareCount & " Magic:" & $MagicCount & " Gem:" & $GemCount & " Tome:" & $TomeCount & @CRLF)
If $CreateLog == True Then
FileClose($LogFile)
EndIf
Exit
EndFunc
;Settings Functions
Func CreateINI()
IniWrite($ini,"Options", "AutoUpdate", $autoUpdate)
IniWrite($ini,"Options", "Physical Log", $CreateLog)
IniWrite($ini, "Skills", "Caltrops", $skillCaltrops)
IniWrite($ini, "Skills", "Companion", $skillCompanion)
IniWrite($ini, "Skills", "Preperation", $skillPreperation)
IniWrite($ini, "Skills", "SmokeScreen", $skillSmokeScreen)
IniWrite($ini, "Looting", "Sets", $LootSets)
IniWrite($ini, "Looting", "Legendaries", $LootLegendaries)
IniWrite($ini, "Looting", "Rares", $LootRares)
IniWrite($ini, "Looting", "Magic", $LootMagic)
IniWrite($ini, "Looting", "Gems", $LootGems)
IniWrite($ini, "Looting", "Tomes", $LootTomes)
IniWrite($ini, "Looting", "Custom", $LootCustom)
IniWrite($ini, "Custom Loot", "PNG Location", $pngLoc)
IniWrite($ini,"Custom Loot", "Total Items", $totalItems)
;Array of items to loot
;$pick[0] = "mythic.png|40" ;png|Tolerance
;$pick[1] = "item2.png"
;$pick[2] = "item3.png"
IniWrite($ini, "ManageLoot","How Often", $mLoot)
IniWrite($ini, "Stashing", "Loot", $StashLoot)
IniWrite($ini, "Stashing", "Legendaries", $StashLegendary)
IniWrite($ini, "Stashing", "Rares", $StashRare)
IniWrite($ini, "Stashing", "Magic", $StashMagic)
IniWrite($ini, "Stashing", "Tomes", $StashTomes)
IniWrite($ini, "Vendoring", "Loot", $VendorLoot)
IniWrite($ini, "Vendoring", "Rares", $VendorRare)
IniWrite($ini, "Vendoring", "Magic", $VendorMagic)
IniWrite($ini, "Variability", "Timer", $Timer)
IniWrite($ini, "Variability", "ManageLoot", $mLootOff)
IniWrite($ini, "Additional", "Movement Speed", $movementSpeed)
IniWrite($ini, "Additional", "Pickup Radius", $pickupRadius)
IniWrite($ini, "Beta", "Area", $vendorAll)
IniWrite($ini, "Beta", "Rows", $vendorRows)
IniWrite($ini, "Beta", "Cols", $vendorCols)
EndFunc
Func LogWrite($text)
ConsoleWrite($text)
If $CreateLog == True Then
FileWriteLine($LogFile, $text)
EndIf
EndFunc
Func UpdateTooltip()
ToolTip("Runs: " & $runCount & ", Cellar Found: " & Round(($cellarCount/$runCount)*100) & "%, Deaths: " & $deathCount, 0, $size[1]-30)
EndFunc
Func ReadINI()
$autoUpdate = IniRead($ini,"Options", "AutoUpdate", $autoUpdate)
$CreateLog = IniRead($ini,"Options","Physical Log",$CreateLog)
$skillCaltrops = IniRead($ini, "Skills","Caltrops",$skillCaltrops)
$skillCompanion = IniRead($ini,"Skills","Companion",$skillCompanion)
$skillPreperation = IniRead($ini,"Skills","Preperation",$skillPreperation)
$skillSmokeScreen = IniRead($ini,"Skills","SmokeScreen",$skillSmokeScreen)
$LootSets = IniRead($ini,"Looting","Sets",$LootSets)
$LootLegendaries = IniRead($ini,"Looting","Legendaries",$LootLegendaries)
$LootRares = IniRead($ini,"Looting","Rares",$LootRares)
$LootMagic = IniRead($ini,"Looting","Magic",$LootMagic)
$LootGems = IniRead($ini,"Looting","Gems",$LootGems)
$LootTomes = IniRead($ini,"Looting","Tomes",$LootTomes)
$LootCustom = IniRead($ini,"Looting","Custom",$LootCustom)
$pngLoc = IniRead($ini,"Custom Loot","PNG Location",$pngLoc)
$totalItems = IniRead($ini,"Custom Loot","Total Items",$totalItems)
;Array of items to loot
;$pick[0] = "mythic.png|40" ;png|Tolerance
;$pick[1] = "item2.png"
;$pick[2] = "item3.png"
$mLoot = IniRead($ini,"ManageLoot","How Often",$mLoot)
$StashLoot = IniRead($ini,"Stashing","Loot",$StashLoot)
$StashLegendary = IniRead($ini,"Stashing","Legendaries",$StashLegendary)
$StashRare = IniRead($ini,"Stashing","Rares",$StashRare)
$StashMagic = IniRead($ini,"Stashing","Magic",$StashMagic)
$StashTomes = IniRead($ini,"Stashing","Tomes",$StashTomes)
$VendorLoot = IniRead($ini,"Vendoring","Loot",$VendorLoot)
$VendorRare = IniRead($ini,"Vendoring","Rares",$VendorRare)
$VendorMagic = IniRead($ini,"Vendoring","Magic",$VendorMagic)
$Timer = IniRead($ini,"Variability","Timer",$Timer)
$mLootOff = IniRead($ini,"Variability","ManageLoot",$mLootOff)
$movementSpeed = IniRead($ini,"Additional","Movement Speed",$movementSpeed)
$pickupRadius = IniRead($ini,"Additional","Pickup Radius",$pickupRadius)
$vendorAll = IniRead($ini,"Beta","Area",$vendorAll)
$vendorRows = IniRead($ini,"Beta","Rows",$vendorRows)
$vendorCols = IniRead($ini,"Beta","Cols",$vendorCols)
EndFunc