Sign in to follow this  
Followers 0
acidfear

High CPU usage

6 posts in this topic

Not sure if my last post went through on this subject because the site timed out, and I haven't found it yet if it did.

Basically I made a working pixelsearch aimbot for condition zero from code I used on someones aimbot. I forgot the name. Sunical or something. Anyway, it runs fine but the problem is it uses 99% of my CPU. I changed the settings for pixelsearch to 2 to scan every other ppixel, but it still runs a lot of cpu usage.

Are there ways of getting it down?

Thanks.

Share this post


Link to post
Share on other sites



Lemme see the script! :P


tolle indicium

Share this post


Link to post
Share on other sites

Lower your resolution or don't scan your entire screen.

Share this post


Link to post
Share on other sites

or u can ues ProcessSetPriority


some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Share this post


Link to post
Share on other sites

Don't the game screen change constantly?

If it does not you could do the obvious sleep(10).

Othervice you have to show your algorithm.

Or even better, search the forum as this topic is comming up like every week :P

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I have been searching the forums.

Heres my code:

#Include <Misc.au3>

HotKeySet("p","stop")

while 1
    


$searchcolor = 0xD0272E


sleep(2000)
$found = "no"


    If $found = "no" Then
                $pos = MouseGetPos()
                $coord = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50), $searchcolor,3,2) ; initial search area 50sq'pixels
                If IsArray($coord) = 1 and _ispressed(01) = 1 Then
                    Mousemove( $coord[0], $coord[1],0)
                    $found = "yes"
            EndIf
        EndIf   
        
            If $found = "yes" Then
                $pos = MouseGetPos()
                $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 10) , ($pos[1] + 10), $searchcolor,3,2) ; locked on search area 10sq'pixels
                    If IsArray($coord) = 1  and _ispressed(01) = 1 Then
                            Mousemove( $coord[0], $coord[1],0)
                        
                Else
                    $found = "no"
                EndIf
            EndIf
            
        WEnd
        
        
        
        
        func stop()
    
    exit
EndFunc
Edited by acidfear

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