Naum
2009-07-23 20:36:14
SkillCoords:
In SRL/SRL/Core/GameTab.scar
Tab_Music Functions
All of these In SRL/SRL/Core/GameTab.scar
Loop(State : (TurnOn, TurnOff));
Loop(TurnOff);
Will turn off the Loop if it is on and will not do anything if it is off.
Loop(TurnOn);
Will turn on the Loop if it is off and will not do anything if it is on.
NumberOfUnlockedSongs : Integer
Gets the amount of Unlocked Songs out of 604, will return '-1' if failed
SelectMusic(Music : String);
If the selected music is playing then it will abort.
Otherwise, it will select the given music if it is unlocked, otherwise there is a 1/5 chance of it clicking the locked tune.
It uses some basic math to calculate where the song titles (of that respective suffix) begins. Useful for Anti-Ban :).
In SRL/SRL/Core/GameTab.scar
Function SkillCoords(Row, Column : ShortInt): TPoint;
Begin
Result := Point(577 + (53 * (Column-1)), 228 + (32 * (Row-1)));
If Row = 8 Then Result.y := 419;
End;^ This is basically a shorter SkillCords, and it does work! ^Tab_Music Functions
All of these In SRL/SRL/Core/GameTab.scar
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;Loop(State : (TurnOn, TurnOff));
Loop(TurnOff);
Will turn off the Loop if it is on and will not do anything if it is off.
Loop(TurnOn);
Will turn on the Loop if it is off and will not do anything if it is on.
NumberOfUnlockedSongs : Integer
Gets the amount of Unlocked Songs out of 604, will return '-1' if failed
SelectMusic(Music : String);
If the selected music is playing then it will abort.
Otherwise, it will select the given music if it is unlocked, otherwise there is a 1/5 chance of it clicking the locked tune.
It uses some basic math to calculate where the song titles (of that respective suffix) begins. Useful for Anti-Ban :).