|
You last visited: Today at 04:42
Advertisement
Pixel problem
Discussion on Pixel problem within the AutoIt forum part of the Coders Den category.
11/05/2012, 12:26
|
#1
|
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
|
Pixel problem
i got problem with this script
Code:
While True
If PixelGetColor(411, 24, "0xF94746") Then
ControlSend($title, "", "", "{3}")
Else
ControlSend($title, "", "", "{Tab}")
EndIf
WEnd
problem is that when it kills mob it wont send tab to aim for other mobs
i need when it kills mobs it send tab kill mob send tab ....
|
|
|
11/05/2012, 14:12
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 557
Received Thanks: 160
|
PixelGetColor:
Returns a pixel color according to x,y pixel coordinates.
PixelGetColor ( x , y [, hwnd] )
you use this function like this:
PixelGetColor( x, y, color)
And what you want is this:
PixelSearch ( left, top, right, bottom, color)
so ...
Code:
While True
PixelSearch ( 1, 1, @DesktopWidth, @DesktopHeight, "0xF94746")
If NOT @ ERROR Then
ControlSend($title, "", "", "{3}")
Else
ControlSend($title, "", "", "{Tab}")
EndIf
WEnd
|
|
|
11/05/2012, 15:01
|
#3
|
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
|
Still dont work when i run it its press TAB 4-5 times and stop but wont press 3 to attack mob here is whold script
Code:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <Color.au3>
#include <Array.au3>
Global $Paused
$title = ("Archlord")
WinActivate($title)
; HotKeys
HotKeySet("{F8}", "TogglePause")
HotKeySet("{F9}", "_Quit")
; Coords of hunt area
$xTop = 143
$yTop = 119
$xBot = 882
$yBot = 582
; Mob color
$mobcolor = "0xF94746"
; Mob hp
$xMobhp = 409
$yMobhp = 41
$mobhpcolor = "0xF74A48"
; Pause bot
Func TogglePause()
$Paused = NOT $Paused
While $Paused
Sleep(100)
ToolTip("Bot is paused" ,0 ,0)
WEnd
ToolTip("")
EndFunc
; Exits bot
Func _Quit()
Exit
EndFunc
; Main action
While True
PixelSearch ($xTop, $yTop, $xBot, $yBot, $mobcolor, 10)
If NOT @error Then
ControlSend($title, "", "", "{3}")
Else
ControlSend($title, "", "", "{Tab}")
EndIf
WEnd
here is pic of mob hp bar
so i need something like this
Code:
; send tab to get mob
ControlSend($title, "", "", "{Tab}")
; scan mob bar for color if is mob alive kill it
ControlSend($title, "", "", "{3}")
if not
; send tab again
ControlSend($title, "", "", "{Tab}")
...............................
sry if is stupid question or request by im new in this i was read many tutorials and cant got in to work
|
|
|
|
Similar Threads
|
Pixel Farben Problem
02/16/2012 - AutoIt - 2 Replies
Hallo ic h habe ein Problem ich will einen eizenlden Pixel auf seine Farbe Testen und dann wenn der Pixel diese Farbe hat entsprechende Befehle ausführen. Das Sript funktioniert aber nicht. Kann mir jemand helfen?
While 1
If PixelGetColor(633, 563) = "0x6E3F2D" Then
MouseMove ( 633, 563 , 15)
MouseClick("left")
EndIf
If PixelGetColor(868, 604) = "0x6E3F2D" Then
MouseMove ( 868, 604 , 15)
|
Pixel search Bot Problem
01/10/2011 - General Coding - 6 Replies
Hallo ich habe hier folgenden Bot gemacht:
Auto it
Global $paused
Global $i
Global $a = 100
Global $Mouse
Global $ii
HotKeySet("{F8}", "_Scannerstart")
|
Problem bei Pixel search
12/07/2010 - AutoIt - 15 Replies
Heey,
habe noch nie etwas mit AutoIt geschreiben...
Hier mein script:
Ich wollte eigentlich nur dass mein Mauszeiger auf 736, 699 klickt, dann die Pixel in dem Bereich sucht und drauf klickt. Daraufhin wieder woanders hin klickt und wieder die Pixel den dem Bereich sucht und wieder drauf klickt.
|
[Problem]autoit pixel erkennen
01/31/2010 - Metin2 - 1 Replies
Ich bin dabei mit autoit einen relogbot zu erstellen.
Mir fehlt nur noch die Funktion die erkennt das der bot
Einlogen starten soll .
Ich habe mir eigentlich gedacht einfacht ine funktion zu nützen
die erkennt wenn ein pixel die Farbe wechselt .
Dummerweise finde ich in metin2 erstens mal keine farblfäche
die groß genug wäre . Oder das pixel erkennen tut in
metin irgendwie nicht .habe die funktion schon mit paint getestet
dort tut es super.
|
All times are GMT +2. The time now is 04:42.
|
|