Sign in to follow this  
Followers 0
6105

detect color

6 posts in this topic

#1 ·  Posted (edited)

help me please, I want to make a robot for a Flash game but don't understand how make the definition of colors. I've made a simple layout of the game character and divided by the color if anyone can help please do this.

Edited by toader

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Share this post


Link to post
Share on other sites



First create a small script, compile it, then see if it can run while you play the game manually. There are many games now that recognize Autoit, and others, with a Game-Guard that will not allow Autoit to work.

... Then start reading the help file about PixelGetColor() and other functions

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

this is script of 1 battle:

Run('C:\Program Files\PigKiller\PigKiller.exe')
WinWait("PigKiller","")
If Not WinActive("PigKiller","") Then WinActivate("PigKiller","")
WinWaitActive("PigKiller","")
MouseMove(81,127)
MouseMove(167,229)
MouseMove(190,432)
MouseClick("left",98,495,2)
WinWait("Toader - PigKiller","")
If Not WinActive("Toader - PigKiller","") Then WinActivate("Toader - PigKiller","")
WinWaitActive("Toader - PigKiller","")
MouseMove(774,101)                                          ;move
MouseMove(227,334)                                          ;move
MouseMove(232,336)                                          ;move
MouseMove(229,334)                                          ;move
MouseClick("left",230,334,2)                                ;start battle
MouseMove(591,240)                             ;come to pig on yellow place
Send("{CTRLDOWN}")                                      ;attack the pig
MouseMove(598,220)                                        ;attack the pig
Send("{CTRLUP}g{CTRLDOWN}")                        ;g button
MouseMove(441,185)                                      ;move to pig
MouseMove(575,268)                                      ;move to pig
MouseMove(572,308)                                      ;move to pig
Send("g")                                                            ;g button
MouseMove(503,280)                                       ;move to pig
MouseMove(501,277)                                       ;move to pig
Send("{CTRLDOWN}")                                     ;move to pig
Send("MouseMove(411,251)                               ;move to pig
Send("{CTRLUP}g{CTRLDOWN}")                        ;g button
Send("MouseMove(492,258)                               ;move to pig
Send("{CTRLUP}g{CTRLDOWN}")                         ;g button
MouseMove(484,256)                                       ;move to pig
MouseMove(482,252)                                       ;move to pig
Send("{CTRLDOWN}")                                        ;attack the pig
MouseMove(441,229)                                          ;attack the pig
Send("{CTRLUP}g{CTRLDOWN}")                          ;g button
Send("MouseMove(451,238)                                   ;attack the pig
Send("{CTRLUP}g{CTRLDOWN}")                          ;g button
MouseMove(413,206)                                       ;move to pig
MouseMove(412,206)                                       ;move to pig
Send("{CTRLDOWN}")                                         ;attack the pig
MouseMove(302,130)                                           ;attack the pig
Send("{CTRLUP}g{CTRLDOWN}")                         ;attack the pig
Send("MouseMove(351,189)                                    ;attack the pig
Send("{CTRLUP}g{CTRLDOWN}")                         ;attack the pig
Send("MouseMove(387,184)                                    ;attack the pig
Send("{CTRLDOWN}g{CTRLDOWN}{CTRLUP}f")        ;finish battle

How to do all clicks not on this coortinations but on 12x12 pixel pig?

Edited by toader

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Share this post


Link to post
Share on other sites

Use

Opt() colorcoordinatemode

Opt() Mousecoordinatemode

PixelGetColor()

mouseMove() to the pink color

MouseClick() on the pic

... see help

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

i readed help but my eng is so bad i do not understand all(( only simply scripts.

Whow can help me to understand how i can do:

How i can do that my character was moving not just the yellow area as to the location that is closest to the pigs?

How do I make that he knew where the pig?

What's your native language?

Use a translator on the help text. Translators are insanely good at getting something close enough that it can be read from one language to another.

Utilisez un traducteur sur le texte d'aide. Les traducteurs sont aliéné bons pour obtenir quelque chose assez étroite qu'il peut lire d'une langue à l'autre.

Utilice un traductor en el texto de ayuda. Los traductores son insano buenos en conseguir algo bastante cercano que puede ser leído a partir de una lengua a otra.

Share this post


Link to post
Share on other sites

Use a translator on the help text. Translators are insanely good at getting something close enough that it can be read from one language to another.

yes i use translate.google.com but do not understand this opt,pixelgetcolor (((


[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

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