Jump to content
Sign in to follow this  
spec1

PixelSearch Problems in game

Recommended Posts

spec1

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

Share this post


Link to post
Share on other sites
spec1

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.

Share this post


Link to post
Share on other sites
Aceguy

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
  


        
    

    
        
            Share this post
            
            Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    

    

                    
                        
                    
                
                    
                    
                    






    

    
        
            
McGod
              

    
        
    
             0
    
        
    

        
        
            

    
        
    

        
    
    
        
McGod   

    
        
    
             0
    
        
    

        
        
            
                Formerly Chip
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             0
    
        
    

                569 posts
                
                

            
        
    
    
        


    

    
        
            
                
                
                
                    
                
                
            
        

        
            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]
  


        
    

    
        
            Share this post
            
            Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    

    

                    
                        
                    
                
                    
                    
                    






    

    
        
            
spec1
              

    
        
    
             0
    
        
    

        
        
            

    
        
    

        
    
    
        
spec1   

    
        
    
             0
    
        
    

        
        
            
                Seeker
            
            

            
                

    
        
    

            
            Members
            
            
                

    
        
    
             0
    
        
    

                13 posts
                
                

            
        
    
    
        


    

    
        
            
                
                
                
                    
                
                
            
        

        
            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

Share this post


Link to post
Share on other sites
spec1

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

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  

×