Sign in to follow this  
Followers 0
will88

pixlesearch

6 posts in this topic

#1 ·  Posted (edited)

when I use pixlesearch it seems to lag me is there a way to make this not happen?

Edited by will88

Share this post


Link to post
Share on other sites



You need to give us more information if you want help. Post the code that gives you trouble and tell us what version of AutoIt and what operating system you use.

HotKeySet("{F1}", "Start")
HotKeySet("{F2}", "Stop")
Global $Loop = 0

$InI = 'SETUP.ini';change to what you want to name the Setup.ini file

Global $deathini = IniRead(@ScriptDir & "\" & $InI, "Options", "Death", "NotFound")
$armorini = IniRead(@ScriptDir & "\" & $InI, "Options", "Armor", "NotFound")
$Cast = IniRead(@ScriptDir & "\" & $InI, "Options", "Cast", "NotFound")
$buffkey = $armorini
$WoW = 'World of Warcraft'
$notset = ''
$logout = 'logout'
$shutdownn = 'shutdown'
$quit = 'quit'
$attack = 't'
$findmob = '{tab}'
;colors
$mobtargeted = '0xC8C500'
$health = '0x009300'
$mana = '0x000095'
$armor = '0x0078EA'
$dead = '0x750100'
;
If FileExists(@ScriptDir & "\" & $InI) Then
Sleep(Random(400, 550))
Else
MsgBox(0, "Error", $InI & " does not exist!")
EndIf
If $deathini == $notset Then
$deathini = False
Else
$deathini = True
EndIf
If $armorini == $notset Then
$armorini = False
Else
$armorini = True
EndIf
If $armorini = False And $deathini = False Then
MsgBox(0, $InI, "Armor and Death options need to be setup in the .ini file")
EndIf
If $armorini = True And $deathini = False Then
MsgBox(0, $InI, "Death options need to be setup in the .ini file")
EndIf
If $armorini = False And $deathini = True Then
MsgBox(0, $InI, "Armor key needs to be setup in the .ini file")
EndIf
If $Cast == $notset Then
MsgBox(0, "Error", "Cast not set")
EndIf
While 1;
If $Loop = 1 Then
$deathdetect = PixelSearch(0, 0, 1000, 800, $dead)
If Not @error Then
ToolTip("you are dead")
died($deathini)
EndIf
;ToolTip("detecting buff")
$buff = PixelSearch(0, 0, 1000, 800, $armor)
If Not @error Then
;ToolTip("buff detected")
Sleep(Random(700, 1000))
Else
Send($buffkey)
Sleep(Random(600, 900))
EndIf
;ToolTip("checking mana")
PixelSearch(0, 0, 1000, 800, $mana)
;Sleep(Random(500, 700))
If Not @error Then
;ToolTip("good on mana")
;Sleep(Random(500, 1000))
Else
;ToolTip("I need mana")
Sleep(Random(9000, 10000))
EndIf
;ToolTip("checking health")
PixelSearch(0, 0, 1000, 800, $health)
;Sleep(Random(500, 700))
If Not @error Then
;ToolTip("good on health")
;Sleep(Random(500, 1000))
Else
;ToolTip("I need health")
Sleep(Random(9000, 10500))
EndIf
;ToolTip("finding mob")
Send($findmob)
Sleep(Random(500, 700))
PixelSearch(0, 0, 1000, 800, $mobtargeted)
;Sleep(Random(500, 700))
If Not @error Then
;ToolTip("mob found")
Sleep(Random(500, 700))
Send($attack)
Sleep(Random(300, 600))
Send($Cast)
Sleep(Random(10000, 15000))
Do
$mobalive = PixelSearch(0, 0, 1000, 800, $mobtargeted)
Sleep(Random(500, 700))
If @error Then
dead()
Else
alive()
;ToolTip("mob still alive")
EndIf
Until Not IsArray($mobalive)
EndIf
If $Loop = 1 Then
Sleep(1000)
Else
ExitLoop
EndIf
EndIf
WEnd
Func Start()
$Loop = 1
EndFunc;==>Start
Func Stop()
$Loop = 0
EndFunc;==>Stop
Func died($deathini)
If $deathini = $logout Then logout()
If $deathini = $shutdownn Then shutdownn()
If $deathini = $quit Then Quit()
EndFunc;==>died
Func logout()
Sleep(Random(800, 1000))
Send('{enter}')
Sleep(Random(800, 1000))
Send('/logout')
Sleep(Random(800, 1000))
Send('{enter}')
Exit
EndFunc;==>logout
Func shutdownn()
Shutdown(9)
EndFunc;==>shutdownn
Func Quit()
Exit
WinClose($WoW)
EndFunc;==>Quit
Func alive()
Send($Cast)
Sleep(Random(3000, 5000))
EndFunc;==>alive
Func dead()
$Loop = 1
EndFunc;==>dead

3.2.13.3 (beta)

sence theres multiple pixlesearches I seem to lag quite a bit

Share this post


Link to post
Share on other sites

1. Look at the area you are searching... 1000 pixels x 800 pixels ...

2. What operating system are you using, if it's Vista, try doing it with Aero Theme off.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

1. Look at the area you are searching... 1000 pixels x 800 pixels ...

2. What operating system are you using, if it's Vista, try doing it with Aero Theme off.

Im using windows xp, yea ive been looking in the helpfile.. 1000 pixels x 800 not sure how to make it less of a range to look for

Share this post


Link to post
Share on other sites

Check to make sure where they are located because if you do then your cutting down the finding. If you cut down the finding your checking it faster. Just use the information application and go through and map out where to look with the least fail safe


Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0