Results 1 to 6 of 6

Thread: GuitarHero

  1. #1
    Join Date
    May 2009
    Location
    Denmark! YEAH I'M A VIKING!
    Posts
    344
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default GuitarHero

    Hello fellow scar scripters! i'm haveing a problem with a GuitarHero bot i've made.

    The point was that it searched all the fields every 100ms for the color, and when then pressed down the word for that specifik color.
    The problem is however, that it, ever 100 ms. Send all the keys at once, so it just becomes a huge spambot sending 50 words a sec :S
    Any help is appriciated.

    Code:
    program AutoGuitarhero;
    
    Procedure PressGreen;
    var
    x,y : integer;
    begin
     if findcolor(x,y,39168,250,855,260,865) then;
      begin
       Sendkeys('a');
      end;
    end;
    
    procedure PressRed;
    var
    x,y : integer;
    begin
     if findcolor(x,y,255,410,850,420,860) then;
      begin
       Sendkeys('s');
      end;
    end;
    
    procedure PressYellow;
    var
    x,y : integer;
    begin
     if findcolor(x,y,193780,590,850,600,860) then;
      begin
       Sendkeys('j');
      end;
    end;
    
    procedure PressBlue;
    var
    x,y : integer;
    begin
     if findcolor(x,y,16750848,750,850,760,860) then;
      begin
       Sendkeys('k');
      end;
    end;
    
    
    procedure PressOrange;
    var
    x,y : integer;
    begin
     if findcolor(x,y,26367,940,860,950,870) then;
      begin
       Sendkeys('l');
      end;
    end;
    
    var
    i : integer;
    Begin
     i:=0
      repeat
       i:=i+1;
       PressGreen;
       PressRed;
       PressYellow;
       PressBlue;
       PressOrange;
       wait(100);
      until(i=1000000)
    end.
    I ... Am ... CARTMANN!

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    SCAR Code:
    procedure PressOrange;
    var
    x,y : integer;
    begin
     if findcolor(x,y,26367,940,860,950,870) then;
     Sendkeys('l');
    end;

    You can shorten stuff like that

  3. #3
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Please explain your problem better So i can help

    ~Home

  4. #4
    Join Date
    May 2009
    Location
    Denmark! YEAH I'M A VIKING!
    Posts
    344
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i'm makeing a guitar hero bot, i want it to press down "a" when a green dot shows in the black field on the most left side, it's kinda hard to explain if you don't know the game :P

    http://www.youtube.com/watch?v=Ni1dV...x=0&playnext=1 - guitarhero link

    anyway, i want it to press down a only when it gets inside that "box" but the problem is, that i just spams it all the time.
    ex, when i start the bot, it just goese like: asjklasjklasjlkasjklasjklasjklasjkl instead of only saying "a" when it gets inside of my box.
    understand? :P
    I ... Am ... CARTMANN!

  5. #5
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by Cartmann View Post
    i'm makeing a guitar hero bot, i want it to press down "a" when a green dot shows in the black field on the most left side, it's kinda hard to explain if you don't know the game :P

    http://www.youtube.com/watch?v=Ni1dV...x=0&playnext=1 - guitarhero link

    anyway, i want it to press down a only when it gets inside that "box" but the problem is, that i just spams it all the time.
    ex, when i start the bot, it just goese like: asjklasjklasjlkasjklasjklasjklasjkl instead of only saying "a" when it gets inside of my box.
    understand? :P
    Well i think i got it. But if you have added those colors and coordinates correct where to search each color, it shouldn't do that. Like if it finds a red color from ( THIS BOX ) then it should only press that letter not others, exepct if there are other colors at the same time in other boxes.
    Did you get what i mean ?

    ~Home

  6. #6
    Join Date
    May 2009
    Location
    Denmark! YEAH I'M A VIKING!
    Posts
    344
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the area i made it search for is a very tiny square inside each of thiese boxes
    I ... Am ... CARTMANN!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •