Nadeem
2009-05-13 04:34:42
Credits to zasz for the idea.
[HOW TO USE:]
var
Skills: TStringArray;
SkillFlashing('fir', True, Skills); // This will only check if firemaking is flashing, and click it, wait 2000 - 5000ms then close window, and return the skill string in array Skills.
SkillFlashing('fir', False, Skills); // This will only check if firemaking is flashing, not click, and return the skill string in array Skills.
SkillFlashing('all', True, Skills); // This will check all skills, if flashing, then click, wait 2000-5000ms and close window, and return ALL flashing skills into the array Skills.
SkillFlashing('all', False, Skills); // This will check all skills, not click, and return ALL flashing skills into the array Skills.
If you don't get the idea on how to use it, let me know and I'll explain even more :P[CURRENT SPEED:]
SkillFlashing; v3.0:
[I]These were all done with the mouse starting at left top corner of RS screen.[/I]
[U]Check ALL Skills, AND return all array of skills flashing, not clicking, one scroll:[/U]
> 454
> fir
> woo
> sum
> Successfully executed
[U]Check ALL Skills, AND return all array of skills flashing, not clicking, two scrolls:[/U]
> 931
> fir
> woo
> sum
> Successfully executed
[U]Check ALL Skills, AND return all array of skills flashing, clicking all with random 2k-5k ms each wait, two scrolls:[/U]
> 11302
> fir
> woo
> sum
> Successfully executed
[U]Checking One Skill, not clicking:[/U]
> 0
> fir
> Successfully executed
[U]Checking One Skill, not clicking:[/U]
> 16
> woo
> Successfully executed
[U]Checking One Skill, not clicking, scroll once:[/U]
> 410
> sum
> Successfully executed
[U]Checking One Skill, clicking:[/U]
> 3894
> fir
> Successfully executed
[THE FUNCTION:]
{×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
× Function : SkillFlashing: Boolean; | v3.1
× Author : Nadeem
× Desc. : Check if skill flashing, if C = True, then click it.
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××}
function SkillFlashing(Skill: string; C: Boolean; var F: TStringArray): Boolean;
var
X, Y, I, II, SID, HH, MS, TS: Integer;
S: string;
Skills: TStringArray;
Temp, Tempora: TIntegerArray;
Coords: TPointArray;
begin
Gametab(2);
MS := MouseSpeed;
MouseSpeed := 50;
SID := 24;
Result := False;
Coords := [Point(559,249), Point(569,266), Point(559,299), Point(573,329),//03
Point(566,379), Point(569,399), Point(589,433), Point(629,239),//07
Point(623,283), Point(609,309), Point(629,339), Point(623,373),//11
Point(623,393), Point(629,423), Point(669,232), Point(663,269),//15
Point(673,309), Point(679,339), Point(669,379), Point(679,403),//19
Point(679,423), Point(569,433), Point(623,433), Point(663,439)];
Skills := ['att', 'str', 'def', 'ran', 'pra', 'mag', 'run', 'hit', 'agi', //08
'her', 'thi', 'cra', 'fle', 'sla', 'min', 'smi', 'fis', 'coo', //17
'fir', 'woo', 'far', 'con', 'hun', 'sum', 'all']; //24
HH := High(Skills);
for I := 0 to HH do
begin
if (Skill = Skills[I]) then
begin
SID := I;
Break;
end;
end;
if (SID >= 21) and (SID <> 24) and (GetColor(673, 433) <> 12427653) then
begin
MMouse(719, 413, 10, 17);
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
end else if (GetColor(619, 243) <> 143297) then
begin
MMouse(719, 243, 10, 17);
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
end;
if (SID <> 24) then
begin
TS := 1 shl 16;
Tempora := [GetColor(Coords[SID].x, Coords[SID].y)];
if (Tempora[0] <> TS) then
begin
if C then
begin
Mouse(Coords[I].x, Coords[I].y, 6, 6, True);
Wait(RandomRange(2000, 5000));
CloseWindow;
end;
S := Skills[SID];
Result := True;
end;
end else
begin
Tempora := GetColors(Coords);
if (GetColor(673, 433) <> 12427653) then
begin
MMouse(719, 413, 10, 17);
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
end;
SetLength(Temp, 3);
for I := 0 to 2 do
Temp[I] := GetColor(Coords[I+21].x, Coords[I+21].y);
Tempora := CombineIntArray(Tempora, Temp);
HH := High(Tempora);
for I := 0 to HH do
begin
if (I >= 21) and (I <= 23) then Continue;
if (I <= 20) then
II := I
else
II := I-3;
if (II = 22) then
TS := 789517
else
TS := 1 shl 16;
if (Tempora[I] <> TS) then
begin
if C then
begin
if (II < 21) and (GetColor(619, 243) <> 143297) then
Mouse(Coords[II].x, Coords[II].y - RandomRange(30,40), 6, 6, True)
else
Mouse(Coords[II].x, Coords[II].y, 6, 6, True);
Wait(RandomRange(2000, 5000));
CloseWindow;
end;
if (S <> '') then
S := S + ',' + Skills[II]
else
S := Skills[II];
Result := True;
end;
end;
end;
F := Explode(',', S);
MouseSpeed := MS;
end;
[UPDATES:]
[[I]v3.0[/I]]
- Extremely Faster!
- Averaging 0ms - 10ms for single skill checking
- Averaging 375ms - 465ms for all skill checking with 1x scroll up or down
- Return skills flashing into a string array
- Clicks if told to on skill
[[I]v2.0[/I]]
- Extremely Fast!
- Averaging <150ms for all and single
- Returns skills flashing into an array
- Autocolors, its skill. So never will anyone have to change any colors up, because there are no colors to change :P
[[I]v1.5[/I]]
- TBox changes
- Size shifting
~NS