Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cs ----------------------------------------------------------------------------
- AutoIt Version: 3.3.8.1
- Author: myName
- Script Function:
- Template AutoIt script.
- #ce ----------------------------------------------------------------------------
- ; Script Start - Add your code below here
- #RequireAdmin
- $blue = 0x6969FF;
- $yellow = 0xFFFF00
- $green = 0x00FF00
- $legend = 0xFF8000
- $gem = 0x99bbff
- $pickupGem = IniRead("config.ini", "LootType", "Gems", True)
- $pickupYellow = IniRead("config.ini", "LootType", "Yellow", True)
- $pickupLegend = IniRead("config.ini", "LootType", "Legendary", True)
- $lootX = 635
- $lootY = 208
- $endLootX = 1208
- $endLootY = 605
- WinActivate("Diablo III")
- Global $paused;
- Global $start = TimerInit()
- HotKeySet("{PAUSE}", "TogglePause")
- Global $state = "Init";
- Init();
- While 1
- StartGame()
- WEnd
- Func TogglePause ()
- $paused = NOT $paused
- while $paused
- sleep(10)
- WEnd
- EndFunc
- Func Init()
- EndFunc
- Func StartGame ()
- $found = False
- while NOT $found
- $coord = PixelSearch(340, 513, 341, 514, 0x290400, 10)
- If Not @error Then
- $found = true;
- Sleep(500)
- MouseClick("left", 340, 513, 1, 50)
- Else
- Sleep(200);
- EndIf;
- WEnd
- $start = TimerInit()
- usePortal()
- EndFunc
- Func usePortal()
- $found = false;
- while not $found
- $coord = PixelSearch(439, 1013, 440, 1014, 0x35373B, 10)
- If Not @error Then
- $found = True
- Sleep(1000)
- MouseClick("left", 159, 117, 1, 10)
- Else
- Sleep(100)
- EndIf
- WEnd
- GoToBoss()
- EndFunc
- Func GoToBoss()
- Sleep(5000)
- $found = False
- while not $found
- $coord = PixelSearch(679, 215, 679, 215, 0x245cb4, 30)
- If Not @error Then
- $found = True
- Sleep(2000)
- MouseClick("left", 679, 215, 1, 10)
- Else
- Sleep(100)
- EndIf
- WEnd
- StartBoss()
- EndFunc
- Func StartBoss()
- Sleep(4000)
- $found = False
- while not $found
- $coord = PixelSearch(135, 572, 135, 572, 0x6D6236, 30)
- If Not @error Then
- $found = True
- Sleep(2000)
- MouseClick("left", 777, 957, 2, 20)
- Else
- sleep(100)
- EndIf
- WEnd
- BeatBoss()
- EndFunc
- Func BeatBoss()
- Sleep(2500)
- $dead = False
- Send("2")
- Send("3")
- Send("4")
- MouseMove(1150, 137)
- MouseDown("right")
- Send("1")
- while not $dead
- $coords = PixelSearch(880, 144, 1360, 425, $yellow, 1)
- If Not @error Then
- MouseUp("right")
- if $pickupYellow Then
- MouseClick("left", $coords[0], $coords[1], 1, 10)
- EndIf
- $dead = True
- Sleep(2000)
- Else
- $coords = PixelSearch(880, 144, 1360, 425, $legend, 3)
- If Not @error Then
- $dead = True
- MouseUp("right")
- MouseClick("left", $coords[0], $coords[1], 1, 10)
- Sleep(2000)
- EndIf
- Sleep(500)
- EndIf
- if TimerDiff($start) > 180000 Then
- $dead = True
- MouseUp("right")
- EndIf
- WEnd
- Loot()
- EndFunc
- Func Loot()
- $nothingToFind = false
- while not $nothingToFind
- $nothingToFind = True
- if $pickupYellow Then
- if LootItem($yellow) Then
- $nothingToFind = false;
- EndIf;
- EndIf
- Sleep(500)
- If $pickupGem Then
- If LootItem($gem) Then
- $nothingToFind = false;
- EndIf
- EndIf
- if $pickupLegend Then
- If LootItem($legend) Then
- $nothingToFind = False
- EndIf
- If LootItem($green) Then
- $nothingToFind = False
- EndIf
- EndIf
- WEnd
- Sleep(100)
- EndGame()
- EndFunc
- Func LootItem ($color)
- $coords = PixelSearch($lootX, $lootY, $endLootX, $endLootY, $color, 3)
- If Not @error Then
- MouseClick("left", $coords[0], $coords[1], 1, 10)
- Sleep(1000)
- return True;
- Else
- return False;
- EndIf
- EndFunc
- Func EndGame ()
- Send("{ESCAPE}")
- Sleep(100)
- MouseClick("left", 340, 473, 1, 10)
- Sleep(15000)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement