Sign in to follow this  
Followers 0
faeltop

How i make this script continuos on lopping?!

2 posts in this topic

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

Share this post


Link to post
Share on other sites



faeltop,

Welcome to the AutoIt forum. :)

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now (there is also a link at bottom right of each page) - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. :naughty:

See you soon with a legitimate question I hope. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0