Sign in to follow this  
Followers 0
Leo87

Running PixelGetColor in background

5 posts in this topic

Hi, I'm new in using AutoIt and was working to make a simple bot for a game. I have some part of the script here..

Do
    ControlSend($win ,"" ,"" ,"2")  ;send key 2 for the 2nd Skill
    Sleep(1000) ;stop for 1 sec
    ControlSend($win ,"" ,"" ,"1") ;send key 1 for the 1st Skill
    Sleep(1000) ;stop for 1 sec
    If PixelGetColor(102,146, $handle) <> 0xFF8242 Then ;Look if HP is less than specified (Only Instant HP should be used)
        ControlSend($win ,"" ,"" ,"4") ;Press 9 for + instant HP
    EndIf


    If PixelGetColor(93,159, $handle) <> 0x187DFF Then;Look if MP less than specified (Only Instant MP should be used)
        ControlSend($win ,"" ,"" ,"0") ;Press 0 for + instant MP
        Sleep(500)
    EndIf



Until PixelGetColor(466,124, $handle) <> 0x426D8C ;Keep repeating until the selected monster died

As my control are running in background, i have one big problem here;

I could not fully run this bot on background. This means I have to make some part of the game open so that this script would work. So i figure it out, since all the key and mouse click is running on background, there left the PixelGetColor command that does not do so.

So I would like to ask, Could I run the PixelGetColor in background? If can hope you can teach me. If Cannot, how do i solve this function?

FYI, the PixelGetColor is used to check the HP and MP of the game.

Hope someone can help me with this.

Really Thanks..

Leo

Share this post


Link to post
Share on other sites



the game needs to be visible on the screen, and i don't think there is anyway around it.

but if someone knows a way, i'd like to know as well ;)

Share this post


Link to post
Share on other sites

maybe someone else can provide a hook, but here's a proxy dll: http://www.mikoweb.eu/index.php?node=28

both the dll and C++ source

Share this post


Link to post
Share on other sites

Hope someone could help..Bump

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

- read sticky on the top of the forum before posting -

removed content as its Game bot related.

Edited by Jos
Jos

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0