SCAR Code:
Procedure Loop(State : (TurnOn, TurnOff));
Begin
GameTab(tab_Music);
If GetCurrentTab <> tab_Music Then Exit;
If (GetColor(643, 226) = 716552) xOr (State = TurnOn) Then
Mouse(633, 212, 20, 20, True);
End;
Function NumberOfUnlockedSongs: Integer;
Var TmpStr : String;
x, y : Integer;
Begin
GameTab(tab_Music);
If GetCurrentTab <> tab_Music Then Exit;
If FindColor(x, y, 39423, 671, 220, 673, 223) Then
TmpStr := GetTextAtEx(x - 2, y - 2, 0, StatChars, False, False, 0, 1, 39423, 30, False, tr_AllChars);
If Pos(' ', TmpStr) > 0 Then Delete(TmpStr, Pos(' ', TmpStr), Length(TmpStr));
Result := StrToIntDef(Trim(TmpStr), -1);
End;
Function SelectMusic(Name : String) : Boolean;
Var I, x, y, xx, yy, Time : Integer;
Arr : TStringArray;
CordY : Extended;
Result2 : Boolean;
Begin
Result := (Capitalize(Trim(LowerCase(Name))) = GetMusic);
If Result Then
Begin
WriteLn('We are already playing the song');
Exit;
End;
If NumberOfUnlockedSongs <= 30 Then
Begin
WriteLn('Too few songs unlocked');
Exit
End;
GameTab(tab_Music);
If GetCurrentTab <> tab_Music Then Exit;
Arr := ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
If Pos('the ', Trim(LowerCase(Name))) > 0 Then Delete(Name, 1, 4);
For I := 0 to High(Arr) Do
If LowerCase(Name) = 'random' Then
Begin
I := Random(23);
Name := Capitalize(Arr[i]);
Break;
End Else
If LowerCase(Trim(Left(Name, 1))) = Arr[i] Then
Break;
CordY := ((5.158 * I) + I Mod 3);
If StartsWith('s', Trim(Name)) Then CordY := CordY - 2.03;
If GetNumbers(Left(LowerCase(Trim(Name)), 1)) = '7' Then
CordY := CordY - (CordY - 0.5);
Mouse(719, 287 + Round(CordY), 6, 1, True);
Wait(200 + Random(200));
Time := GetSystemTime + 9600;
MMouse(718, 440, 7, 7);
GetMousePos(x, y);
HoldMouse(x, y, True);
Repeat
Result := FindTextTpaEx(ClGreen, 0, MIX1, MIY1, MIX2, MIY2, xx, yy, Capitalize(Name), StatChars, Nothing);
Result2 := FindTextTpaEx(ClRed, 0, MIX1, MIY1, MIX2, MIY2, xx, yy, Capitalize(Name), StatChars, Nothing);
Until((Result) Or (Result2) Or (GetSystemTime >= Time));
Wait((Round(CordY)/5) + Random(30));
ReleaseMouse(x, y, True);
Wait(100 + Random(200));
If Result Then
ClickText(Capitalize(Name), StatChars, MIX1, MIY1, MIX2, MIY2, True);
If Result2 Then
If Random(5) = 0 Then
ClickText(Capitalize(Name), StatChars, MIX1, MIY1, MIX2, MIY2, True);
If Result Then WriteLn('Found The Song (Unlocked)');
If Result2 Then WriteLn('Found The Song (Locked)');
If (Not (Result)) And (Not (Result2)) Then WriteLn('Could NOT Find The Song :(');
End;