SCAR Code:
program SuperCrazyGuitarManiacDeluxe3Solver;
{.Include SRL/SRL.Scar}
//1.Start the game.
//2.Set up scar. AND DRAG THE CROSS HAIR ONTO THE GAME WINDOW.
//3.Click run.
//4.WHEN IT SAIS PRESS ENTER DO IT!
const
SX = 75;//X POINT OF THE SONG.
SY = 87;//Y POINT OF THE SONG.
var
Wrong, Right : Integer;
{Detects a chosen color at a certain point that is chosen}
function FindGameColor(X, Y, Color : Integer):Boolean;
var
FoundColor : Integer;
begin
if(GetColor(X, Y)=Color)then
begin
Result:=True;
WriteLn('Color - ' +IntToStr(Color)+ ' Was Found.');
end else
Result:=False;
end;
{Clicks a chosen color, at a certain chosen point. Uses FindGameColor.}
function ClickGameColor(A, B, ChosenColor : Integer):Boolean;
begin
if(FindGameColor(A, B, ChosenColor))then
begin
Mouse(A, B, 0, 0, True);
Result:=True;
WriteLn('The Color Was Clicked.');
end else
Result:=False;
end;
{Waits until a certain color is seen at a certain chosen point. Uses FindGameColor}
procedure WaitUntilColorFound(A, B, TheColor : Integer);
begin
if(FindGameColor(A, B, TheColor))then
begin
Exit;
end else
begin
repeat
Wait(100);
until(FindGameColor(A, B, TheColor));
end;
end;
{Finds the up arrow key on any of the 4 key strokes. Uses FindGameColor.}
function SolveUp : Boolean;
begin
if(FindGameColor(76, 96, 153))or(FindGameColor(76, 146, 153))
or(FindGameColor(76, 213, 153))or(FindGameColor(76, 253, 153))then
begin
SendArrow(0);
Result:=True;
Right := Right + 1;
end else
Result:=False;
Wrong := Wrong + 1;
end;
{Finds the right arrow key on any of the 4 key strokes. Uses FindGameColor.}
function SolveRight : Boolean;
begin
if(FindGameColor(76, 96, 6697728))or(FindGameColor(76, 146, 6697728))
or(FindGameColor(76, 213, 6697728))or(FindGameColor(76, 253, 6697728))then
begin
SendArrow(1);
Result:=True;
Right := Right + 1;
end else
Result:=False;
Wrong := Wrong + 1;
end;
function SolveLeft : Boolean;
begin
if(FindGameColor(76, 96, 6697830))or(FindGameColor(76, 146, 6697830))
or(FindGameColor(76, 213, 6697830))or(FindGameColor(76, 253, 6697830))then
begin
SendArrow(3);
Result:=True;
Right := Right + 1;
end else
Result:=False;
Wrong := Wrong + 1;
end;
function SolveDown : Boolean;
begin
if(FindGameColor(76, 96, 26112))or(FindGameColor(76, 146, 26112))
or(FindGameColor(76, 213, 26112))or(FindGameColor(76, 253, 26112))then
begin
SendArrow(2);
Result:=True;
Right := Right + 1;
end else
Result:=False;
Wrong := Wrong + 1;
end;
procedure SolveFour;
begin
if(FindGameColor(76, 96, 10066329))or(FindGameColor(76, 96, 9737364))then
begin
repeat
KeyDown(GetKeyCode(chr(52)));
until(not(FindGameColor(76, 96, 10066329))or(FindGameColor(76, 96, 9737364)));
KeyUp(GetKeyCode(chr(52)));
end;
end;
procedure SolveThree;
begin
if(FindGameColor(76, 146, 10066329))or(FindGameColor(76, 146, 9737364))then
begin
repeat
KeyDown(GetKeyCode(chr(51)));
until(not(FindGameColor(76, 146, 10066329))or(FindGameColor(76, 146, 9737364)));
KeyUp(GetKeyCode(chr(51)));
end;
end;
procedure SolveTwo;
begin
if(FindGameColor(76, 213, 10066329))or(FindGameColor(76, 213, 9737364))then
begin
repeat
KeyDown(GetKeyCode(chr(50)));
until(not(FindGameColor(76, 213, 10066329))or(FindGameColor(76, 213, 9737364)));
KeyUp(GetKeyCode(chr(50)));
end;
end;
procedure SolveOne;
begin
if(FindGameColor(76, 253, 10066329))or(FindGameColor(76, 253, 9737364))then
begin
repeat
KeyDown(GetKeyCode(chr(49)));
until(not(FindGameColor(76, 253, 10066329))or(FindGameColor(76, 253, 9737364)));
KeyUp(GetKeyCode(chr(49)));
end;
end;
procedure PlayTheSong;
begin
repeat
ClearDebug;
if(SolveUp)then WriteLn('Up');
Wait(10);
if(SolveRight)then WriteLn('Right');
Wait(10);
if(SolveDown)then WriteLn('Down');
Wait(10);
if(SolveLeft)then WriteLn('Left');
Wait(10);
SolveFour;
Wait(10);
SolveThree;
Wait(10);
SolveTwo;
Wait(10);
SolveOne;
Wait(10);
until(false);
end;
{Starts rocking!!! >:D}
procedure StartRockin;
begin
Mouse(430, 242, 0, 0, True);
Wait(500);
Mouse(SX, SY, 0, 0, True);
Wait(100);
PlayTheSong;
end;
begin
MouseSpeed := 25;
StartRockin;
end.