Jump to content

PixelSearch Problems in game


spec1
 Share

Recommended Posts

In a game I play the Health is Green when good and Red when bad it's located at the bottom left corner x44 y740 color red it is 0x2128B5 what I have works on a screen shot but not in game could someone please help me out.

CODE
while 1

$coord = PixelSearch( 0, 0, 45, 767, 0xb52829, 10 )

If Not @error then

send("{A}")

Sleep(2000)

Endif

$coord = PixelSearch( 0, 0, 45, 767, 0x2128B5 )

If Not @error then

send("{B}")

sleep(2000)

endif

wend

And also this and it does the same works on screen shots but not in game.

CODE
while 1

if pixelgetcolor(15,649) = 0xBD2829 then

send("{A}")

sleep(2000) ;sleep 2 secounds so A is not spammed.

endif

sleep(25) ; take away some load when script is looping.

wend

Link to comment
Share on other sites

In a game I play the Health is Green when good and Red when bad it's located at the bottom left corner x44 y740 color red it is 0x2128B5 what I have works on a screen shot but not in game could someone please help me out.

CODE
while 1

$coord = PixelSearch( 0, 0, 45, 767, 0xb52829, 10 )

If Not @error then

send("{A}")

Sleep(2000)

Endif

$coord = PixelSearch( 0, 0, 45, 767, 0x2128B5 )

If Not @error then

send("{B}")

sleep(2000)

endif

wend

And also this and it does the same works on screen shots but not in game.

CODE
while 1

if pixelgetcolor(15,649) = 0xBD2829 then

send("{A}")

sleep(2000) ;sleep 2 secounds so A is not spammed.

endif

sleep(25) ; take away some load when script is looping.

wend

Anyone have any ideas why this would work on screen shots but not in game please HELP Thanks.

Link to comment
Share on other sites

you need to

while 1

$a_pix=pixelgetcolor(15,649) 

if $a_pix = 0xBD2829 then
send("{A}")
sleep(2000) ;sleep 2 secounds so A is not spammed.
endif

sleep(25) ; take away some load when script is looping.

wend
[\code]


            
                


    Edited  by Aceguy
    
    

            
        

        

        
            

    
        

        
            [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


McGod
            
            
                Posted 
                
            
        
    
    
        


McGod
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 569
                            
                                
                            
                        
                        
                    
                
            
            
                

    
    
        
Formerly Chip
    
    

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            Also depending on the game, it could have a block (Like GameGuard) preventing autoit from using pixel, mouse, and keyboard functions on it.


            
        

        

        
            

    
        

        
            [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u]
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


spec1
            
            
                Posted 
                
            
        
    
    
        


spec1
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Members
                
            
            
                
                    
                        
                            
                                
                            
                                 13
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                        Author
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            you need to 

 

while 1

$a_pix=pixelgetcolor(15,649)

if $a_pix = 0xBD2829 then

send("{A}")

sleep(2000) ;sleep 2 secounds so A is not spammed.

endif

sleep(25) ; take away some load when script is looping.

wend

[\code]

I cant get this to work in game or on screen shots, not sure why and there is no gameguard because the pixeltrigger made with autoIt works fine in the game http://www.autoitscript.com/forum/index.ph...hl=pixeltrigger but just cant get my stuff working please someone help I'm lost

Link to comment
Share on other sites

I have been working on this for days now and still not working, in the game I play the health goes red when it gets low and I want it to press A when it turns red, there are no gameguards to block autoIt because PixelTrigger http://www.autoitscript.com/forum/index.ph...hl=pixeltrigger

If I pick red in pixeltrigger and I point the gun at red in the game it will shoot I just need my script to watch a pixel or area and when it turns red press a for me when its red what I have works on Screenshot but not in game could someone please help me out sure it's easy for you guys I'm trying and I'm new at it Thanks.

CODE
while 1

$coord = PixelSearch( 0, 0, 45, 767, 0xb52829, 10 )

If Not @error then

send("{A}")

Sleep(2000)

Endif

$coord = PixelSearch( 0, 0, 45, 767, 0x2128B5 )

If Not @error then

send("{A}")

sleep(2000)

endif

wend

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...