Jump to content

a problem about my code


Rider
 Share

Recommended Posts

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

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

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...