Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How i make this script continuos on lopping?!

$
0
0
Hi Everyone, i have a script works 99%... the problem is, the script dont continue on loop, this execute only one time (1x).
How i put continues looping in this script?
Thanks.

#include <ImageSearch.au3>
;================SETTINGS================;
;Looting
$LootCustom = True  ;True if you want to pick up Custom Items (The items in the pick array above)
;Custom Loot
$pngLoc = "C:\loots\" ;Location of the .PNGs
$totalItems = 2   ;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] = "2.png|40"
;$pick[2] = "item3.png"i
;===DO NOT CHANGE ANYTHING BELOW HERE===;
HotKeySet("x", "Stop") ;script stopped by pressing x
$walktime = 3000 ; time in ms the script waits for you to enter and load the cellar. Slow this down for slower move speeds and loading times
$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)

$default_resolutionX = 1920
$default_resolutionY = 1080
$x_ratio = @Desktopwidth / $default_resolutionX
$y_ratio = @Desktopheight / $default_resolutionY
$i = 0
Call("LootCustom")

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
  ;ConsoleWrite("Looting " & $file & @CRLF)
  
  while  _ImageSearchArea($pngLoc & $file,1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,$accuracy) = 1
   MouseMove($gX, $gY, 3)
   sleep(Random(75, 150))
   MouseClickDrag("left",$gX,$gY,438,39) ; Mudar somente os 2 pares finais para a BP de Rares
   sleep(Random(800, 1200))
  
  
  WEnd
   Next
EndFunc

[/CODE]

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>