TRiLeZ
2009-09-18 08:29:19
{*******************************************************************************
function HowManyNotes: integer;
By: TRiLeZ
Description: Results the number of notes the user has made.
*******************************************************************************}
function HowManyNotes: integer;
var
I, X, Y: Integer;
begin
if (not (GetCurrentTab = tab_Notes)) then
begin
if GameTab(tab_Notes) then WaitColor(564, 214, 6795405, 1, 500);
end;
if (GetCurrentTab = tab_Notes) then
begin
for I := 0 to 30 do
begin
if FindText(x, y, IntToStr(i), SmallChars, 630, 203, 668, 236) then Result := I;
end;
end;
end;
{*******************************************************************************
function AddNote(Note: string): boolean;
By: TRiLeZ
Description: Adds a note. Results true if successful.
*******************************************************************************}
function AddNote(Note: string): boolean;
var
T: Integer;
begin
if (not (GetCurrentTab = tab_Notes)) then
begin
if GameTab(tab_Notes) then WaitColor(564, 214, 6795405, 1, 500);
end;
if (GetCurrentTab = tab_Notes) then
begin
if (GetColor(564, 214) = 6795405) then
begin
Mouse(565, 217, 4, 4, true);
MarkTime(t);
while (GetColor(236, 485) = 6321792) do
begin
Wait(RandomRange(2, 5));
if (TimeFromMark(t) >= 7500) then Exit;
end;
Wait(RandomRange(1000, 1500));
TypeSend(Note);
Result := True;
end;
end;
end;
{*******************************************************************************
function DeleteAllNotes: boolean;
By: TRiLeZ
Description: Deletes all notes. Results true if successful.
*******************************************************************************}
function DeleteAllNotes: boolean;
var
T: Integer;
begin
if (not (GetCurrentTab = tab_Notes)) then
begin
if GameTab(tab_Notes) then WaitColor(564, 214, 6795405, 1, 500);
end;
if (GetCurrentTab = tab_Notes) then
begin
if (GetColor(722, 453) = 1976367) then
begin
Mouse(722, 453, 4, 4, false);
if WaitOption('Delete all', 2500) then
begin
MarkTime(t);
while (not GetColor(481, 362) = 10264383) do
begin
Wait(RandomRange(2, 5));
if (TimeFromMark(t) >= 7500) then Exit;
end;
Wait(RandomRange(1000, 1500));
Mouse(257, 401, 6, 4, true);
Result := True;
end;
end;
end;
end;
Some functions for notes in RS.