Log in

View Full Version : GuitarHero



Cartmann
10-02-2009, 04:39 AM
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.


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.

YoHoJo
10-02-2009, 04:42 AM
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 :D

Home
10-02-2009, 04:50 AM
Please explain your problem better :) So i can help :)

~Home

Cartmann
10-02-2009, 04:55 AM
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=Ni1dV7gDaMo&feature=PlayList&p=8C669E32CCCC35B9&index=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

Home
10-02-2009, 04:59 AM
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=Ni1dV7gDaMo&feature=PlayList&p=8C669E32CCCC35B9&index=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

Cartmann
10-02-2009, 02:16 PM
the area i made it search for is a very tiny square inside each of thiese boxes