Bladest Posted July 21, 2010 Posted July 21, 2010 (edited) Hi all ! I am playing around with Pixeldetection for a game. What I want to do is to equip a weapon when I get an enemy into my target. Since the enemies name has a fixed area where it then pops up, I can´t just check a single pixel due to the different letters. So what I did was the following: -- While 1 ;Infinite Loop $Color = pixelsearch(934, 538, 1020, 545, 383348) If IsArray($Color) then Send ("i") endif Wend -- The idea behind this is: While 1; So that it permanently runs the check od the area $Color = pixelsearch(934, 538, 1020, 545, 383348); defines the result of the pixelsearch as $Color. The rectangele is from 934-1020 and from 438 to 545 The Color I am looking for is 383348. The Enemy name will always display within this Rectangle. If IsArray($Color) then ; so if the Array is $Color, which should be the case if I have any amount of pixels within the rectangle that are 383348 Color then Send ("i"); it will send the key "i" endif ; closes the If Wend ; closes the While The amazing thing is that I had it working on a bad quality. It would send "i" when it registered the requested color, and then I started to finetune it for more reliable performance. Suddenly it didn´t react anymore at all. Now I lost track, and when I read it it makes sense to me, so no clue how I a ) get it back to work again b ) make it efficient so that it reacts immediately if some pixels within the rectangle have the desired Color. Can anybody help me ? Edited July 21, 2010 by Bladest
Bladest Posted July 21, 2010 Author Posted July 21, 2010 I changed it to: While 1 ;Infinite Loop $Color = pixelsearch(934, 538, 1020, 545, 383348) If Not @error then Send ("i") endif Wend The result is that it works again, but it is SUPER unreliable. Sometimes it doesn´t do anything .. sometimes with a delay, it will send "i", and occasionally I have the feeling it sends "i" allthough it does not have 383348 in the rectangle.
enaiman Posted July 21, 2010 Posted July 21, 2010 Bumping your post so soon is a big No-No (it took you only 24 minutes to do it). And about game botting: read the announcements first. Even if the game is not online and not multiplayer there are slim chances that you will get help. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
Bladest Posted July 22, 2010 Author Posted July 22, 2010 Bumping your post so soon is a big No-No (it took you only 24 minutes to do it).And about game botting: read the announcements first. Even if the game is not online and not multiplayer there are slim chances that you will get help.I didn´t intend to bump at all... it was the third post on the top when I wrote the second post.I do ask for help, but I still try and work on it myself, I thought that was rather appreciated than detested.Also in reagrds to reading the announcement. I read the announcement, but it doesn´t relate to my question.I am not looking for help in regards to anything that is mentioned in there.Thanks for the warm welcome though !
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now