Sign in to follow this  
Followers 0
Rider

a problem about my code

5 posts in this topic

hi,

im building a bot to a game called mu online

and i cant understand few things

first of all, i want to make a color recognition by the cursor,

my program gets the color of the position of my cursor

this is the code:

dim $OnKey = "f5"
dim $OffKey = "f6"
dim $MouseSelectClick = "right"
HotKeySet("{"&$OnKey&"}","onoff")
HotKeySet("{"&$OffKey&"}","exitapp")
Dim $click = False
;$name = inputbox("John's AutoClicker", "What speed do you want the auto clicker to run at?")
;Sleep (500)
;MsgBox (1, "John's AutoClicker", "Running at delay of " & $name)
;MsgBox (1, "John's AutoClicker", "Push "&$OnKey&" to start/stop and "&$OffKey&" to exit.")


Func onoff()
   If $click = False Then
      $click = True
   Else
      $click = False
   EndIf
EndFunc

func GetLocationColor($x,$y)
    return PixelGetColor ( $x , $y)
    EndFunc
Func exitapp()
   Exit
EndFunc
func MouseSelect($clickButton)
    MouseClick($clickButton)
    EndFunc
While True
   If $click = True Then
       $pos = MouseGetPos()
msgbox(1,"Color Recognition","color:"&GetLocationColor($pos[0],$pos[1])& "/ MousePos:" &$pos[0] & "," & $pos[1])
   EndIf
   
WEnd

the problem is that i get color value "0" on the game, but when i use this program on the desktop its working.

i get the same problem when i made the mouse

how i make it work?

second question - how i translate color value to a color?

tnx and have a good day

Share this post


Link to post
Share on other sites



i want to know how to make it work on a window of another program

i dont asking to break the rules

Share this post


Link to post
Share on other sites

i want to know how to make it work on a window of another program

i dont asking to break the rules

Experienced users don't like wasting their time helping with online game bots here.

Take it as a fact!

So don't expect much help in such topic even with such bad topic title.

Many games work in fullscreen where PixelGetColor will not work

Also some games have antibot systems which may be your case.

Share this post


Link to post
Share on other sites

i make this bot for a project to school

its not just to hack a game as u say

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