Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 01:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



AUTOIT - script using pixel search doesnt work properly

Discussion on AUTOIT - script using pixel search doesnt work properly within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2011
Posts: 7
Received Thanks: 0
AUTOIT - script using pixel search doesnt work properly

I have posted again triying to explain better wich is my problem. My level of english is very low and a friend is helping me to express my problem i got whith the script.

Is the secon time i post the same please apologize me , and delete old post because here everyone will understand better what i am asking , and what i need.

I have done a bot that must be running all time.

It has 2 diferents parts.

Part 1 must do :

PHP Code:
_move(50,"s")
Sleep(200)
_move(50,"w")
Sleep(100
it has to repeat this part while pixel in position coords x=1241 and Y=16 is yellow color , repeat forever until pixel change.

When thes pixel is not yellow then it has to do this diferent script:

PHP Code:
Sleep(3000) ; time to enter and load SH
_move
(50,"w")
Sleep(5)
_move(40,"a")
ControlSend("Hellgate (x86 DX9)""""""{F2}") ;swapp weapon
Sleep
(1350)..... and some more lines i am not gonna copy ..... 
And when has finished running this second part i want script to start again in part 1 verifiying if pixel is yellow to repeat first part or second depending of color of pixel. running forever (i mean when second part finish must go to test pixel again to determine if must run first or second part ).


Now i post all script complete i have maden , cuz somethis it must be bad coded cuz the script its always repiting part1 even if pixel in corrds is not yellow.

Can some1 tell me where is the mistake plz:

ALL SCRIPT:
PHP Code:
#cs ----------------------------------------------------------------------------

AutoIt Version3.3.6.1
Author
Hectorin

Script 
Function:
Template AutoIt script.

#ce ----------------------------------------------------------------------------

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region
$Form1 GUICreate("Hellgate bot by hectorin"350220250131)
$Button1 GUICtrlCreateButton("DALE CAÑA"7432185490)
$Button2 GUICtrlCreateButton("YA BASTA"74132185490)
GUISetState(@SW_SHOW)
#EndRegion

HotKeySet("{F12}""Terminate")

Func _move($loop,$key)
For 
$i $loop to 1 Step -1
ControlSend
("Hellgate (x86 DX9)"""""$key)
Next
EndFunc

Func Terminate
()
Exit 
0
EndFunc

While 1
$nMsg 
GUIGetMsg()

Select

Case $Button1
While 1
sleep
(2000)

$coord PixelSearch001241160xFF000010 )

While 
1

_move
(50,"s") ; move backward and forward till enter SH
Sleep
(200)
_move(50,"w")
Sleep(100)

WEnd Color has changed then has entered SH

Sleep
(3000) ; time to load screen


_move
(50,"w") ; Once inside has to make all this
Sleep
(5)
_move(40,"a")
ControlSend("Hellgate (x86 DX9)""""""{F2}") ;swapp weapon
Sleep
(1350)
ControlSend("Hellgate (x86 DX9)""""""{3}") ; use zombi form
Sleep
(2500)
ControlSend("Hellgate (x86 DX9)""""""{F1}") ; swap original weapons
Sleep
(1350)
ControlSend("Hellgate (x86 DX9)""""""{1}")
Sleep(1350)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{6}")
Sleep(350)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(1350)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{8}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{0}") ; all sumons are up
Sleep
(100)
_move(150,"w")
Sleep(10)
_move(25,"a")
ControlSend("Hellgate (x86 DX9)""""""{2}") ; reaper
Sleep
(3500)
ControlSend("Hellgate (x86 DX9)""""""{1}")
Sleep(1350)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{6}") ; basic function for sumon any pet its dead
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{8}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(100)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{0}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{6}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{8}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{9}")
_move(30,"f") ; loot
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{0}"); finished sumon pet dead
Sleep
(2100)
ControlSend("Hellgate (x86 DX9)""""""{6}") ; basic function for sumon any pet its dead
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{8}")
Sleep(100)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{9}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{0}")
Sleep(1500)
_move(30,"a")
_move(30,"f") ; loot
Sleep
(15)
_move(30,"f") ; loot
_move
(50,"w")
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{4}") ; nova
_move
(30,"f") ; loot
sleep
(500)
ControlSend("Hellgate (x86 DX9)""""""{1}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{6}") ; basic function for sumon any pet its dead
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{5}")
_move(30,"f") ; loot
Sleep
(1000)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{8}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(100)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{0}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{6}") ; basic function for sumon any pet its dead
Sleep
(1000)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{8}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(1000)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{0}")
Sleep(3000)
_move(100,"w")
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{4}") ; nova
sleep
(500)
ControlSend("Hellgate (x86 DX9)""""""{1}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{6}")
Sleep(100)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{5}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{7}")
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(100)
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{8}")
Sleep(1000)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{9}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{0}")
Sleep(3000)
_move(40,"d")
_move(30,"f") ; loot
_move
(40,"s") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{'}") ; hp inyector
Sleep
(350)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(250)
ControlSend("Hellgate (x86 DX9)""""""{1}")
_move(30,"f") ; loot
Sleep
(1350)
ControlSend("Hellgate (x86 DX9)""""""{6}") ; basic function for sumon any pet its dead
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{8}")
_move(30,"f") ; loot
Sleep
(1000)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{0}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{6}")
_move(30,"f") ; loot
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{5}")
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(100)
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{8}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{9}")
_move(30,"f") ; loot
Sleep
(1000)
ControlSend("Hellgate (x86 DX9)""""""{0}"); finished sumon pet dead
Sleep
(1000)
ControlSend("Hellgate (x86 DX9)""""""{6}") ; basic function for sumon any pet its dead
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(100)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{8}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{0}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(350)
ControlSend("Hellgate (x86 DX9)""""""{1}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{6}")
Sleep(350)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{5}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(350)
ControlSend("Hellgate (x86 DX9)""""""{8}")
_move(30,"f") ; loot
Sleep
(350)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{0}")
_move(90,"d")
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{4}") ; nova
Sleep
(1000)
ControlSend("Hellgate (x86 DX9)""""""{1}")
Sleep(1350)
ControlSend("Hellgate (x86 DX9)""""""{6}") ; basic function for sumon any pet its dead
_move
(30,"f") ; loot
Sleep
(1000)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{8}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(1000)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{0}")
Sleep(1000)
ControlSend("Hellgate (x86 DX9)""""""{6}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{5}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{7}")
Sleep(100)
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{8}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{9}")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{0}"); finished sumon pet dead
Sleep
(1350)
ControlSend("Hellgate (x86 DX9)""""""{4}") ; nova
_move
(30,"f") ; loot
Sleep
(2500)
_move(30,"f") ; loot
_move
(15,"a")
_move(30,"f") ; loot
ControlSend
("Hellgate (x86 DX9)""""""{4}") ; nova
_move
(30,"f") ; loot

Sleep
(2350)
_move(30,"f") ; loot

ControlSend
("Hellgate (x86 DX9)""""""{ENTER}")
Sleep(100)
Send("+7stuck")
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{ENTER}")
Sleep(15000)
_move(90,"s")
Sleep(5)
_move(18,"w")
Sleep(5) ; walking back and fordward cuz sometimes door doesnt detect us well
_move
(18,"s")
Sleep(4000)

Send("{ALTDOWN}"); finished running SH doing a reset here
Sleep
(500)
MouseClick("left",1039,79,1)
Sleep(500)
MouseClick("left",1039,79,1)
Sleep(100)
ControlSend("Hellgate (x86 DX9)""""""{ENTER}")
Sleep(10)
MouseClick("left",558,571,1)
Sleep(500)
MouseClick("left",558,571,1)
Sleep(200)
ControlSend("Hellgate (x86 DX9)""""""{ENTER}")
Sleep(100)
MouseClick("left",645,550,1)
Sleep(300)
MouseClick("left",645,550,1)
Sleep(400)
Send("{ALTUP}")
Sleep(350) ; reset done now its gonna start again GOTO START

WEnd

Case $Button2
GUIDelete
()
ExitLoop

EndSelect


wend 

If i run the script without pixel search it works perfect , all code its ok except pixel seach but i would prefer to test color pixel for not loose runs with the char in a place he has not to be, testing the pixel i ensure he is in right place and i dont loose a complete cycle (imput lag, death of char makes the char to be in bad place and start running part 2 and u loose a complete cycle, thats because i want to run part 1 til be sure pixel is not yellow cuz this means char is in good place)

Another problem it has the script is the second button or f11 terminate function. Both of them are not working and i just can get out form script from taskmanager. It would be nice to have a break script code better than mine.

Any suggest it will be apreciated. And Sorry for my low level of english.
hectorin is offline  
Old 08/10/2011, 19:59   #2
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
Please 1. use a spoiler 2. put the code in [ php][/ php]
butter123 is offline  
Old 08/11/2011, 12:01   #3
 
elite*gold: 0
Join Date: Jan 2011
Posts: 16
Received Thanks: 1
FFNearestSpot

Hi, i didn´t read ur code but if Pixelsearch do not good working then try with the function FFNearestSpot. Maybe it will help u
HHamburg is offline  
Reply


Similar Threads Similar Threads
AutoIt Pixel Search & Click Frage.
11/23/2010 - AutoIt - 12 Replies
Hey e*pvpers. Bin grade angefangen, mich bisschen in AutoIt reinzuarbeiten. Wollte dazu nen kleinen, recht simplen Bot erstellen, der eine bestimmte Pixelfarbe sucht - Wenn er das gefunden hat, sollte er eig draufklicken. Bin allerdings nur so weit gekommen, dass der Pixel gefunden wird, und ein Klick auch gemacht wird. Allerdings klickt die Maus da wo der Cursor grade steht, und movt nicht zu dem jeweiligen Pixel. Und da ich wie gesagt grad erst anfange, weiss ich den Befehl...
Problem mit Pixel search Autoit
06/18/2010 - AutoIt - 14 Replies
Wie der Titel schon sagt habe ich ein Problem mit der funktion Pixel search Mein Problem ist das die Maus immer über die Rausgesuchte Pixel Position geht zb O ist der ausgewählte punkt es kommt aber eher sowas raus als ob ich Ö striche ausgewählt hab Also aimt immer etwas über der angegebennen position der Code : und dann hätte ich noch die frage ob man mehrere Pixel Searches in einem Script laufen lassen kann Zb: Wenn die Lebensanzeige sinkt oder Fast lehr ist das eine Function...
Cant make this autoit script to work
08/15/2009 - Dragonica Hacks, Bots, Cheats & Exploits - 4 Replies
Anyone can tell me why this doesn't work? My dragonica window will be active, but it just wont spam the x every second. I have tried messing around with the codes but no luck o.O ;HotKey for terminating the script #include <file.au3> Dim $aRecords ;Window title for dragonica should be changed after every patch $WinTitle = "Dragonica (Client Ver : 0.908.1301)"



All times are GMT +1. The time now is 01:31.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.