Jump to content

JamLegend bot help? (pixelGetColor, sending keys)


Recommended Posts

Hello all. I'm new here, but enough of that.

As topic says, I'm trying to make a bot for JamLegend. I don't know if I'm allowed to post links to other websites, so I won't. You can easily find it on google.

What is this game about? Its like "Guitar hero" or "Frets on Fire" online.

Where I get stuck?

Basically... Everywhere. I'm totally new to AutoIt, so... I think this is the big problem.

My first language is not english, so some functions or variables names can be strange to you.

So, this is my code:

#include <Color.au3>
Func Tikrinam1($xx1,$yy1) ; My base function. It does all the work
    $pikselis1 = PixelGetColor($xx1,$yy1)
    $hexas1 = Hex($pikselis1, 6)
    $hh1 = '0x' & $hexas1
    $colorget1 = _ColorGetRed($hexas1)
    $safetyCheck = 0
    if $colorget1 = 0 And $safetyCheck = 0 Then ;if red is 255 and the key is not pressed, then press the key
        $safetyCheck = 1
        Sleep(75)
        Send("{1 down}")
        Sleep(30)
    Else
        $safetyCheck = 0
        Send("{1 up}")
    EndIf
EndFunc


$X1 = 672
$Y = 491
While 1=1
    Tikrinam1($X1,$Y)
WEnd

Basically, this is my plan of making bot:

* Get Color of the pixel

* When it changes color (i.e. to red), press the key

* When the color comes back to normal, unpress the key

* Do the same with three to five keys.

The main window, where I need to press keys looks like this:

Posted Image

At this point, my script checks only for one (the first line) pixel, and for one color.

THe base problem is, that when script is working, and I press other keys (i.e. "2", "3", and others) they just stuck! I have to press them two-four times repeatedly, to make them unpressed.

What I am doing wrong? Could someone give me some code examples how should I do it? Or am I doing it all wrong, and should scrap and remake it?

Your help is really appreciated. :D

Link to comment
Share on other sites

  • 3 months later...

assuming the code is Visual Basic/Studio, i may be able to help with the sendkeys.send/sendwait section. if you can screenshot twaht you what the form to look like, and the pixelgetcolor commands filled in, i think i can get this working. feel free to contact me via email (runescapetechman@hotmail.com) or on MSN if you wish. i know the basics of visual basic and a little bit of advanced coding.

~3\/@|\/

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