WT-Fakawi
2007-11-28 11:56:33
Found this in my inbox today.
What to do? He sounds genuine.
From: freedox
Hi i have 1 problem…my friend "negaal" sold my this script…And now i heard that you have to be srl member to have this script.He sold me this script for 25$(in estonia it makes 300 koroni) and he also gave me one program.
And i also heard that selling srl members stuff is not allowed so plz do smt about him…..!He has sold it to others too and now one srl member told me that i should contack with administrator…so now i'm contacting you:)
Here is the program:Here is the script:procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;
procedure KeyUp(key: Byte);
begin
SmartReleaseKey(key);
end;
procedure KeyDown(key: Byte);
begin
SmartHoldKey(key);
end;
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;
procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;
function FindWindow(Title: String): Boolean;
begin
result:= true;
end;
procedure ActivateClient;
begin
end;
function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;program VarrockEastMiner;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
{.include SRL/SRL/Misc/Trade.scar}
{.include SRL/SRL/Misc/Path.scar}
{ This script will mine Copper, Iron or Tin at the Varrock East mine.
This script is created by Wizzup? }
{--------------------------------------------------------
Make sure these constants are right.
--------------------------------------------------------}
Const
StartPlayer = 0;
TheOreTol = 9;
SecondsToWait = 3;
MinutesPerLoad = 10;
Loads = 2;
NumberOfUsers = 7; // How many players are you using?
RemoteControlMasterNickName = ''; // Part of the Remote Control Masters' Name.
YourSRLId = '3347'; // Must be a string!
YourSRLpass = 'qweeda'; // Must be a string!
VersionNumber = '0.61';
TheRockColor =4018562; // Pick the one at the mine.
WizzyDebug = True;
{--------------------------------------------------------
Script variables.
--------------------------------------------------------}
Var
RockColor, TotalOres,
OreTol, MyMark, OreMask,
PickAxeMask, CopperOres, IronOres, TinOres,
TinOre, CopperOre, IronOre, Dx, Dy,
Gasses: Integer;
ScriptStartTime1,
FindNorMalRandomsTime: LongInt;
NormalRandomsTime, FastRandomsTime, FindTalkTime: LongInt;
CurRock: String;
{--------------------------------------------------------
Setup Player Names, Passes and NickNames here.
--------------------------------------------------------}
Procedure DeclarePlayers;
Begin
NumberOfPlayers( NumberOfUsers );
CurrentPlayer := StartPlayer;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[0].Loc := 'Bank';
Players[0].Strings[0] := 'Iron'; // Primairy Ore Color
Players[0].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[0].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[0].Booleans[0] := true; // Is The Pick Equipped?
Players[0].Booleans[1] := True; // False for brightness Check Once.
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=True;
Players[1].Loc := 'Bank';
Players[1].Strings[0] := 'Iron'; // Primairy Ore Color
Players[1].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[1].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[1].Booleans[0] := true; // Is The Pick Equipped?
Players[1].Booleans[1] := True; // False for brightness Check Once.
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active:=True;
Players[2].Loc := 'Bank';
Players[2].Strings[0] := 'Iron'; // Primairy Ore Color
Players[2].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[2].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[2].Booleans[0] := false; // Is The Pick Equipped?
Players[2].Booleans[1] := True; // False for brightness Check Once.
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active:=True;
Players[3].Loc := 'Bank';
Players[3].Strings[0] := 'Iron'; // Primairy Ore Color
Players[3].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[3].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[3].Booleans[0] := True; // Is The Pick Equipped?
Players[3].Booleans[1] := True; // False for brightness Check Once.
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Active:=True;
Players[4].Loc := 'Bank';
Players[4].Strings[0] := 'Iron'; // Primairy Ore Color
Players[4].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[4].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[4].Booleans[0] := True; // Is The Pick Equipped?
Players[4].Booleans[1] := True; // False for brightness Check Once.
Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='ate';
Players[5].Active:=True;
Players[5].Loc := 'Bank';
Players[5].Strings[0] := 'Iron'; // Primairy Ore Color
Players[5].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[5].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[5].Booleans[0] := True; // Is The Pick Equipped?
Players[5].Booleans[1] := True; // False for brightness Check Once.
Players[6].Name :='';
Players[6].Pass :='';
Players[6].Nick :='';
Players[6].Active:=True;
Players[6].Loc := 'Bank';
Players[6].Strings[0] := 'Iron'; // Primairy Ore Color
Players[6].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[6].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[6].Booleans[0] := True; // Is The Pick Equipped?
Players[6].Booleans[1] := True; // False for brightness Check Once.
{Players[7].Name :='';
Players[7].Pass :='';
Players[7].Nick :='';
Players[7].Active:=True;
Players[7].Loc := 'Bank';
Players[7].Strings[0] := 'Iron'; // Primairy Ore Color
Players[7].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[7].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[7].Booleans[0] := True; // Is The Pick Equipped?
Players[7].Booleans[1] := True; // False for brightness Check Once. }
{ Players[9].Name :='';
Players[9].Pass :='';
Players[9].Nick :='';
Players[9].Active:=True;
Players[9].Loc := 'Bank';
Players[9].Strings[0] := 'Iron'; // Primairy Ore Color
Players[9].Strings[1] := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[9].Strings[2] := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[9].Booleans[0] := True; // Is The Pick Equipped?
Players[9].Booleans[1] := True;} // False for brightness Check Once.
Writeln( IntToStr ( HowManyPlayers ) + ' Players' );
End;
procedure LoadPaths;
begin
Path[0].Mainpoint.x:=707; // Out Of East Bank to Left
Path[0].Mainpoint.y:=49;
Path[0].Subpoints[0].x:=673;
Path[0].Subpoints[0].y:=98;
Path[0].Subpoints[1].x:=646;
Path[0].Subpoints[1].y:=99;
Path[0].Subpoints[2].x:=625;
Path[0].Subpoints[2].y:=22;
Path[0].Subpoints[3].x:=657;
Path[0].Subpoints[3].y:=47;
Path[1].Mainpoint.x:=711; // Straight Long Line East
Path[1].Mainpoint.y:=92;
Path[1].Subpoints[0].x:=677;
Path[1].Subpoints[0].y:=91;
Path[1].Subpoints[1].x:=651;
Path[1].Subpoints[1].y:=91;
Path[1].Subpoints[2].x:=624;
Path[1].Subpoints[2].y:=89;
Path[1].Subpoints[3].x:=588;
Path[1].Subpoints[3].y:=86;
Path[2].Mainpoint.x:=669; // T- Split
Path[2].Mainpoint.y:=86;
Path[2].Subpoints[0].x:=684;
Path[2].Subpoints[0].y:=117;
Path[2].Subpoints[1].x:=686;
Path[2].Subpoints[1].y:=54;
Path[2].Subpoints[2].x:=630;
Path[2].Subpoints[2].y:=83;
Path[3].Mainpoint.x:=648; // Large Square Shape, Wall and Road
Path[3].Mainpoint.y:=149;
Path[3].Subpoints[0].x:=636;
Path[3].Subpoints[0].y:=93;
Path[3].Subpoints[1].x:=650;
Path[3].Subpoints[1].y:=95;
Path[3].Subpoints[2].x:=652;
Path[3].Subpoints[2].y:=108;
Path[3].Subpoints[3].x:=635;
Path[3].Subpoints[3].y:=108;
Path[4].Mainpoint.x:=599; // Way Back
Path[4].Mainpoint.y:=95;
Path[4].Subpoints[0].x:=664;
Path[4].Subpoints[0].y:=120;
Path[4].Subpoints[1].x:=650;
Path[4].Subpoints[1].y:=91;
Path[4].Subpoints[2].x:=660;
Path[4].Subpoints[2].y:=60;
Path[4].Subpoints[3].x:=631;
Path[4].Subpoints[3].y:=95;
Path[5].Mainpoint.x:=584; // Way Back 2
Path[5].Mainpoint.y:=86;
Path[5].Subpoints[0].x:=608;
Path[5].Subpoints[0].y:=87;
Path[5].Subpoints[1].x:=633;
Path[5].Subpoints[1].y:=84;
Path[5].Subpoints[2].x:=665;
Path[5].Subpoints[2].y:=81;
Path[5].Subpoints[3].x:=694;
Path[5].Subpoints[3].y:=79;
end;
function w_GasCheck(gx, gy: integer): boolean;
Var
x1, y1, x2, y2, I, time, c: Integer;
R, G, B: Integer;
H, S, L: ExtEnded;
X, Y, Z: ExtEnded;
Gas, Gas2: TPointArray;
Colors, C2: TIntegerArray;
begin
Try
x1 := gx - 35;
If x1 < 0 Then
x1 := 0;
y1 := gy - 35;
If y1 < 0 Then
y1 := 0;
x2 := gx + 35;
If x2 > 515 Then
x2 := 515;
y2 := gy + 35;
If y2 > 336 Then
y2 := 336;
Time := GetSystemTime;
Result := False;
c := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2ModIfiers(0.2, 0.2);
FindColorsTolerance(Gas, 8886170, x1, y1, x2, y2, 20);
ColorToleranceSpeed(c);
If length(Gas) < 10 Then
Exit;
Colors := GetColors(Gas);
C2 := Colors;
ClearSameIntegers(C2);
//writeln('w_Colors Length: ' + inttostr(length(colors)));
// writeln('w_C2 Length: ' + inttostr(length(C2)));
If Length(C2) < 40 Then
Exit;
For I := 0 To High(Gas) Do
Begin
ColorToRGB(Colors[I], R, G, B);
If Abs(R - G) <= 10.0 Then
Begin
ColorToHSL(Colors[I], H, S, L);
If (H > 11.5) And (H < 16.0) And (S < 12.0) Then
Begin
ColorToXYZ(Colors[I], X, Y, Z);
If (Abs(X - Y) < 5.0) And (Abs(X - Z) < 5.0) And (Abs(Y - Z) < 5.0) Then
Begin
SetLength(Gas2, Length(Gas2) + 1);
Gas2[High(Gas2)] := Gas[I];
End;
End;
End;
End;
WriteLn('w_time: ' + IntToStr(GetSystemTime - Time));
WriteLn('w_gas2 length: ' + IntToStr(Length(Gas2)));
Result := (Length(Gas2) > 30); // The only number you might want to tweak.
//debugtpa(Gas2, '');
If Result Then
Begin
Gasses := Gasses + 1;
WriteLn('w_GasCheck gave true');
WriteFileString(TheFile, '******** FOUND w_GAS RANDOM ********' +
Chr(13));
End;
Except WriteLn('w_gasCheck ERROR: No window selected'); End;
End;
function IsNewRock(rock: tpoint): boolean;
var
x1, y1, x2, y2, c, time: integer;
Points: Tpointarray;
begin
time := getsystemtime;
x1 := rock.x - 15;
if x1 < 0 then
x1 := 0;
y1 := rock.y - 15;
if y1 < 0 then
y1 := 0;
x2 := rock.x + 15;
if x2 > 515 then
x2 := 515;
y2 := rock.y + 15;
if y2 > 515 then
y2 := 515;
c := getcolortolerancespeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.1, 0.8);
FindColorsTolerance(Points, 1527647, x1, y1, x2, y2, 9);
SetColorspeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(c);
if length(Points) > 150 then
begin
Rock := MiddleTPA(Points);
Result := True;
end;
end;
Function DebugTPA(Points: TPointArray; BmpName: String): Boolean;
Var
Width, Height, ClientBMP, I: Integer;
xs, ys, xe, ye: Integer;
Begin
Try
Begin
xe := xs xor xs;
ye := ys xor ys;
xs := 1 shl 20;
ys := 1 shl 20;
For I := 0 To High(Points) Do
Begin
xs := Min(xs, Points[I].X);
ys := Min(ys, Points[I].Y);
xe := Max(xe, Points[I].X);
ye := Max(ye, Points[I].Y);
End;
Width := xe - xs;
Height := ye - ys;
DisplayDebugImgWindow(0, 0);
DisplayDebugImgWindow(Width, Height);
ClientBMP := BitmapFromString(Width, Height, '');
CopyClientToBitmap(ClientBMP, xs, ys, xe, ye);
For I := 0 To High(Points) Do
FastSetPixel(ClientBMP, Points[I].X - xs, Points[I].Y - ys, 255);
If BmpName <> '' Then
SaveBitmap(ClientBMP, ScriptPath + BmpName + '.bmp');
SafeDrawBitmap(ClientBMP, GetDebugCanvas, 0, 0);
DisplayDebugImgWindow(Width, Height);
FreeBitmap(ClientBMP);
End
Except
FreeBitmap(ClientBMP);
End;
Result := True;
End;
Function DebugATPA(aPoints: Array Of TPointArray; BmpName: String): Boolean;
Var
Width, Height, ClientBMP, I, L, C, Col: Integer;
xs, ys, xe, ye: Integer;
OuterPoints: TPointArray;
Begin
For I := 0 To High(aPoints) Do
L := L + Length(aPoints[i]);
SetLength(OuterPoints, L + 1);
C := 0;
For I := 0 To High(aPoints) Do
For L := 0 To High(aPoints[i]) Do
Begin
C := C + 1;
OuterPoints[C] := aPoints[i][L];
End;
Try
Begin
xe := xs xor xs;
ye := ys xor ys;
xs := 1 shl 20;
ys := 1 shl 20;
For I := 0 To High(OuterPoints) Do
Begin
xs := Min(xs, OuterPoints[i].X);
ys := Min(ys, OuterPoints[i].Y);
xe := Max(xe, OuterPoints[i].X);
ye := Max(ye, OuterPoints[i].Y);
End;
Width := xe - xs;
Height := ye - ys;
DisplayDebugImgWindow(0, 0);
DisplayDebugImgWindow(Width, Height);
ClientBMP := BitmapFromString(Width, Height, '');
CopyClientToBitmap(ClientBMP, xs, ys, xe, ye)
For I := 0 To High(aPoints) Do
Begin
Col := Random(16777215);
For L := 0 To High(aPoints[i]) Do
FastSetPixel(ClientBMP, aPoints[i][L].X - xs, aPoints[i][L].Y - ys, Col);
End;
SafeDrawBitmap(ClientBMP, GetDebugCanvas, 0, 0);
DisplayDebugImgWindow(Width, Height);
If BmpName <> '' Then
SaveBitmap(ClientBMP, ScriptPath + BmpName + '.bmp');
FreeBitmap(ClientBMP);
End
Except
FreeBitmap(ClientBMP);
End;
Result := True;
End;
function findIron: tpointarray;
var
atpa: tpointarrayarray;
points: tpointarray;
time, i: integer;
colors: tintegerarray;
x, y, z, h, s, l: extended;
begin
colortolerancespeed(2);
SetColorspeed2Modifiers(0.05, 0.05);
time := getsystemtime;
findcolorsspiraltolerance(270, 180, points, 2898781, 3, 3, 515, 336, 50);
SetColorspeed2Modifiers(0.2, 0.2);
colors := getcolors(points);
for i := 0 to high(points) do
begin
colortoxyz(colors[i], x, y, z);
if abs(x-z) < 3 then
if y < 4.0 then
begin
colortohsl(colors[i], h, s, l);
if (l > 12) and (l < 30) and (h > 4) and (h < 6) then
begin
setlength(result, length(result) + 1);
result[high(result)] := points[i];
end;
end;
end;
atpa := tpatoatpaex(result, 30, 30);
setlength(result, 0);
for i := 0 to high(atpa) do
begin
if length(atpa[i]) < 5 then
continue;
setlength(result, length(result) + 1);
result[high(result)] := middletpa(atpa[i]);
end;
//If WizzyDebug Then WriteLn('Iron rocks took: ' + inttostr(getsystemtime - time));
//debugatpa(atpa, '');
end;
function followIron(var rock: tpoint): boolean;
var
x1, y1, x2, y2, i, c: integer;
x, y, z, h, s, l: extended;
Points, Points2: Tpointarray;
colors: Tintegerarray;
begin
x1 := rock.x - 20;
if x1 < 0 then
x1 := 0;
y1 := rock.y - 20;
if y1 < 0 then
y1 := 0;
x2 := rock.x + 20;
if x2 > 515 then
x2 := 515;
y2 := rock.y + 20;
if y2 > 515 then
y2 := 515;
c := getcolortolerancespeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.05, 0.05);
FindColorsTolerance(Points, 2898781, x1, y1, x2, y2, 50);
SetColorspeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(c);
colors := getcolors(points);
for i := 0 to high(points) do
begin
colortoxyz(colors[i], x, y, z);
if abs(x-z) < 3 then
if y < 4.0 then
begin
colortohsl(colors[i], h, s, l);
if ((l > 12) and (l < 30)) then
begin
setlength(Points2, length(Points2) + 1);
Points2[high(Points2)] := points[i];
end;
end;
end;
if length(Points2) > 5 then
begin
Rock := MiddleTPA(Points2);
Result := True;
end;
end;
function findCopper: tpointarray;
var
atpa: tpointarrayarray;
points: tpointarray;
time, i: integer;
colors: tintegerarray;
x, y, z, h, s, l: extended;
begin
colortolerancespeed(2);
SetColorspeed2Modifiers(0.05, 0.2);
time := getsystemtime;
findcolorsspiraltolerance(270, 180, points, 5011106, 3, 3, 515, 336, 25);
SetColorspeed2Modifiers(0.2, 0.2);
colors := getcolors(points);
for i := 0 to high(points) do
begin
colortoxyz(colors[i], x, y, z);
if abs(x-z) < 3 then
if y < 10.0 then
begin
colortohsl(colors[i], h, s, l);
if (s > 35) and (s < 38) and (h > 7) and (h < 9)then
begin
setlength(result, length(result) + 1);
result[high(result)] := points[i];
end;
end;
end;
atpa := tpatoatpaex(result, 25, 25);
setlength(result, 0);
for i := 0 to high(atpa) do
begin
if length(atpa[i]) < 5 then
continue;
setlength(result, length(result) + 1);
result[high(result)] := middletpa(atpa[i]);
end;
If WizzyDebug Then WriteLn('Copper rocks took: ' + inttostr(getsystemtime - time));
//debugatpa(atpa, '');
end;
function followCopper(var rock: tpoint): boolean;
var
x1, y1, x2, y2, i, c: integer;
x, y, z, h, s, l: extended;
Points, Points2: Tpointarray;
colors: Tintegerarray;
begin
x1 := rock.x - 20;
if x1 < 0 then
x1 := 0;
y1 := rock.y - 20;
if y1 < 0 then
y1 := 0;
x2 := rock.x + 20;
if x2 > 515 then
x2 := 515;
y2 := rock.y + 20;
if y2 > 515 then
y2 := 515;
c := getcolortolerancespeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.05, 0.2);
FindColorsTolerance(Points, 5011106, x1, y1, x2, y2, 25);
SetColorspeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(c);
colors := getcolors(points);
for i := 0 to high(points) do
begin
colortoxyz(colors[i], x, y, z);
if abs(x-z) < 3 then
if y < 10.0 then
begin
colortohsl(colors[i], h, s, l);
if (s > 35) and (s < 38) and (h > 7) and (h < 9)then
begin
setlength(Points2, length(Points2) + 1);
Points2[high(Points2)] := points[i];
end;
end;
end;
if length(Points2) > 5 then
begin
Rock := MiddleTPA(Points2);
Result := True;
end;
end;
function findTin: tpointarray;
var
atpa: tpointarrayarray;
points: tpointarray;
time, i, r, g, b: integer;
colors: tintegerarray;
x, y, z, h, s, l: extended;
begin
colortolerancespeed(2);
SetColorspeed2Modifiers(0.2, 0.2);
time := getsystemtime;
findcolorsspiraltolerance(270, 180, points, 10132390, 3, 3, 515, 336, 30);
colors := getcolors(points);
for i := 0 to high(points) do
begin
colortorgb(colors[i], r, g, b);
if abs(g - b) < 3 then
begin
colortoxyz(colors[i], x, y, z);
if (abs(x - z) < 5) and (abs(x - y) < 5) and (abs(z - y) < 5) then
begin
colortohsl(colors[i], h, s, l);
if h < 5.0 then
begin
setlength(result, length(result) + 1);
result[high(result)] := points[i];
end;
end;
end;
end;
atpa := tpatoatpaex(result, 25, 25);
setlength(result, 0);
for i := 0 to high(atpa) do
begin
if length(atpa[i]) < 5 then
continue;
setlength(result, length(result) + 1);
result[high(result)] := middletpa(atpa[i]);
end;
If WizzyDebug Then Writeln('Tin rocks took: ' + inttostr(getsystemtime - time));
//debugatpa(atpa, '');
end;
function followTin(var rock: tpoint): boolean;
var
x1, y1, x2, y2, i, c, r, g, b: integer;
x, y, z, h, s, l: extended;
Points, Points2: Tpointarray;
colors: Tintegerarray;
begin
x1 := rock.x - 20;
if x1 < 0 then
x1 := 0;
y1 := rock.y - 20;
if y1 < 0 then
y1 := 0;
x2 := rock.x + 20;
if x2 > 515 then
x2 := 515;
y2 := rock.y + 20;
if y2 > 515 then
y2 := 515;
c := getcolortolerancespeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.2, 0.2);
FindColorsTolerance(Points, 10132390, x1, y1, x2, y2, 30);
ColorToleranceSpeed(c);
colors := getcolors(points);
for i := 0 to high(points) do
begin
colortorgb(colors[i], r, g, b);
if abs(g - b) < 3 then
begin
colortoxyz(colors[i], x, y, z);
if (abs(x - z) < 5) and (abs(x - y) < 5) and (abs(z - y) < 5) then
begin
colortohsl(colors[i], h, s, l);
if h < 5.0 then
begin
setlength(Points2, length(Points2) + 1);
Points2[high(Points2)] := points[i];
end;
end;
end;
end;
if length(Points2) > 5 then
begin
Rock := MiddleTPA(Points2);
Result := True;
end;
end;
function findrocks(rocks: string): tpointarray;
begin
case lowercase(rocks) of
'tin': result := findTin;
'copper': result := findCopper;
'iron': result := findIron;
End;
End;
function followrock(Var rock: TPoint; rocks: string): boolean;
begin
case lowercase(rocks) of
'tin': result := followTin(rock);
'copper': result := followCopper(rock);
'iron': result := followIron(rock);
End;
End;
function rockseconds(rocks: string): integer;
begin
case lowercase(rocks) of // time in seconds you want to wait, per rock.
'tin': result := 8;
'copper': result := 8;
'iron': result := 8;
End;
End;
//----------------------------------------------------------------------------//
//-- Checks and sets Auto Retaliate. True = On, False = Off --//
//----------------------------------------------------------------------------//
procedure Retaliate(AutoRet:Boolean); // WT-Fakawi.
var
x, y: integer;
begin
GameTab(1);
if AutoRet then
begin
If not FindColor(x,y,1777020,624, 385, 719,396) then
begin
Mouse(666,381,8,8, True);
end;
end;
if not AutoRet then
begin
If FindColor(x,y,1777020,624, 385, 719,396) then
begin
Mouse(666,381,8,8, True);
end;
end;
end;
{--------------------------------------------------------
Function HighestBrightNess: Boolean;
--------------------------------------------------------}
Function HighestBrightNess: Boolean;
Begin
GameTab(11);
Wait(400);
If GetColor(706, 226) <> 16777215 Then
Begin
Mouse(712, 226, 2, 2, True);
Result := True;
Wait(200);
End;
End;
{--------------------------------------------------------
Declare required bitmaps.
--------------------------------------------------------}
Procedure BitMaps;
Begin
IronOre := BitmapFromString(1, 18, '22150D2818112E1D15331F1' +
'838221A3F261D43281D00000100000153432E67533A6E583D745D' +
'42765F43796245826849876D4C8C7150');
CopperOre := BitmapFromString(1, 18, '6C3D1A7B461D884E22955' +
'524A15C28AA612AB8692E00000100000153432E67533A6E583D74' +
'5D42765F43796245826849876D4C8C7150');
TinOre := BitmapFromString(1, 16, '696262635C5B635C5B635C5B' +
'635C5B736B6B7971707F76760000016E583D765F43826849846B4' +
'A876D4C8C71508E7351');
PickaxeMask := BitmapFromString(18, 12, 'z78DA3330400037' +
'3030C001F0CB1203DC3000EDEC22D555F4B48B9E3652622FE5AE2' +
'5DE04EA86097E7B89497B948418252AA99B472889714CBDF42C1F' +
'7099498BBC836C26005E85072C');
OreMask := BitmapFromString(11, 11, 'z78DA73730301033070436' +
'2238B60024C35B84CC0A5923C13F0BB937813F0EB22DE04CC5022' +
'CF04CADD404CC890EA0BFCE2F85D4E4C6A212FF470998FCC0600F' +
'B599CC1');
End;
{--------------------------------------------------------
Procedure FTWaitAll(Time:Integer); // By WT-Fakawi.
Anti-Random and Wait Procedure.
--------------------------------------------------------}
Procedure FTWaitAll(Time:Integer); // By WT-Fakawi.
var t: integer;
begin
For T:=1 to Time do
begin
Wait(5);
FindTalk;
RC;
HandleTrade;
end;
MarkTime(FindNormalRandomsTime);
if FindNormalRandomsTime-ScriptStartTime1 >(10000+Random(5000)) then
begin
FindNormalRandoms;
MarkTime(ScriptStartTime1);
end;
end;
// New Randoms Checking.
Function FindNormalRandomsTimeEx: Boolean;
Var
TempTime, Time1: LongInt;
Begin
TempTime := GetSystemTime;
If TempTime - NormalRandomsTime > 6000 Then
Begin
NormalRandomsTime := GetSystemTime;
Time1 := GetSystemTime;
Result := FindNormalRandoms;
Status('Calling FNRandoms; Took '+IntToStr(GetSystemTime-Time1)+'.');
Exit;
End;
If TempTime - FindTalkTime > 500 Then
Begin
FindTalkTime := GetSystemTime;
Time1 := GetSystemTime;
Result := FindTalk;
Status('Calling FT; Took '+IntToStr(GetSystemTime-Time1)+'.');
Exit;
End;
End;
Function MiddleOfMine(Var x, y: Integer): Boolean;
Var
Rocks: TPointArray;
TP: TPoint;
Begin
FindColorsTolerance(Rocks, RockColor, MMX1, MMY1, MMX2, MMY2, 0);
Result := (Length(Rocks) > 0);
If Result Then
TP := MiddleTPA(Rocks);
x := TP.X;
y := TP.Y;
End;
Function ToFar: Boolean;
Var
Rocks: TPointArray;
TP: TPoint;
Begin
result := false;
FindColorsTolerance(Rocks, RockColor, MMX1, MMY1, MMX2, MMY2, 0);
if Length(Rocks) > 0 then
begin
TP := MiddleTPA(Rocks);
Result := (Distance(643,84,TP.x,Tp.y) > 34);
end;
End;
Function FindVEMBankers(Var Bank: TPoint; Var Angle: Extended): Boolean;
Var
I: Integer;
B, gB: TPointArray;
Begin
FindColorsSpiralTolerance(MMCX, MMY2, B, 60909, MMX1, MMCY, MMX2, MMY2, 0);
For I := 0 To High(B) - 1 Do
Begin
If (Abs(B[I].Y - B[I + 1].Y) < 15) And (Abs(B[I].X - B[I + 1].X) < 60) Then
Begin
SetLength(gB, Length(gB) + 1);
gB[High(gB)] := B[I];
If High(gB) > 3 Then // 4 bankers.
Begin
Bank := MiddleTPA(gB);
Bank.Y := Bank.Y - 5;
Angle := Degrees(ArcTan2(gB[0].y - gB[High(gB)].y, gB[0].x - gB[High(gB)].x)) + 90;
If Angle < 0 Then
Angle := 90 - (Angle * -1) + 270;
Result := True;
Exit;
End;
End
Else
SetLength(gB, 0);
End;
End;
Function FindVarrockBank(Var x, y: Integer): Boolean;
Var
Angle: Extended;
Bank: TPoint;
Begin
If FindVEMBankers(Bank, Angle) Then
Begin
WriteLn('Found VEM Bankers, under ' + FloatToStr(Angle) + ' degrees.');
Result := True;
x := Bank.X;
y := Bank.Y;
End;
End;
{--------------------------------------------------------
Procedure ToMine;
This walks you to the mine,
and set's player location on 'Mine'.
--------------------------------------------------------}
Procedure ToMine;
Var
Timer: LongInt;
Begin
RoadColor := FindVarrockRoadColor;
WalkPath(0);
MarkTime(Timer);
Repeat
WalkPath(1);
If TimeFromMark(Timer) > 120000 Then
Begin
LogOut;
Exit;
End;
Until FindPath(2, False);
MarkTime(Timer);
Repeat
RadialRoadWalk(RoadColor, 90, 270, 55, -1, -1);
If TimeFromMark(Timer) > 120000 Then
Begin
LogOut;
Exit;
End;
Until FindPath(3, True);
Dx := MMCX;
Dy := MMCY;
If FindColorSpiral(Dx, Dy, RockColor, MMX1, MMY1, MMX2, MMY2) Then
Begin
Mouse(Dx, Dy, 2, 2, True);
FFlag(0);
End;
Wait(1000+Random(500));
If MiddleOfMine(Dx, Dy) Then
Begin
Mouse(Dx, Dy, 2, 2, True);
FFlag(0);
End
Else
Begin
WriteLn('No Middle of mine');
LogOut;
End;
MakeCompass('N');
Players[CurrentPlayer].Loc := 'Mine';
If WizzyDebug Then WriteLn('Players.Loc = Mine');
End;
{--------------------------------------------------------
Procedure ToBank;
This walks you to the bank,
and set's player location on 'Bank'.
--------------------------------------------------------}
Procedure ToBank;
Var
x, y, C: Integer;
Timer: LongInt;
Water, BankFound: Boolean;
Begin
ColorToleranceSpeed(1);
MakeCompass('N');
If WizzyDebug Then WriteLn('To Bank');
Status('Walking to the bank.');
If Not LoggedIn Then Exit;
MarkTime(MyMark);
Mouse(675, 25, 5, 5, True);
Wait(4000+Random(1000));
FFlag(0);
FindNormalRandomsTimeEx;
RoadColor := FindVarrockRoadColor;
LinearRoadWalk(RoadColor, 350, 60, -1, 1);
LinearRoadWalk(RoadColor, 10, 55, -1, 1);
MarkTime(Timer);
Repeat
RadialRoadWalk(RoadColor, 450, 310, 55, -1, 1);
If TimeFromMark(Timer) > 120000 Then
Begin
LogOut;
Exit;
End;
Until FindPath(2, True);
WalkPath(4);
WalkPath(5);
MarkTime(MyMark);
Repeat
If (TimeFromMark(MyMark) > 320000) Then Begin Logout; Exit; End;
If Not LoggedIn Then Break;
BankFound := FindVarrockBank(x, y);
If BankFound Then Break;
FindNormalRandomsTimeEx;
// LinearRoadWalk(RoadColor, 250, 30, 1, 0);
RadialRoadWalk(RoadColor, 180,280, 30, 1, 0);
FTWait(2);
If FindSymbol(x, y, 'water') Then
Begin
Water := True;
Break;
End;
Until BankFound;
If Water And Not BankFound Then
Begin
C := 0;
While C < 3 Do
Begin
LinearRoadWalk(RoadColor, 90, 30, 0, -1);
BankFound := FindVarrockBank(x, y);
If BankFound Then
Break;
C := C + 1;
End;
If Not BankFound Then
Begin
Players[CurrentPlayer].Loc := 'No MM Bank DTM';
LogOut;
Exit;
End;
End;
If BankFound Then
Begin
Mouse(x, y, 0, 0, True);
Wait(100);
FFlag(0);
Players[CurrentPlayer].Loc := 'Bank';
If WizzyDebug Then
WriteLn('Players.Loc := Bank');
Status('We have reached the bank.');
End;
End;
Procedure SetOreColor;
Begin
Case Random(20) Of
0,1,2,3,4,5,6,7,8,
9,10,11,12,13,14,15,16, 17 : CurRock := LowerCase(Players[CurrentPlayer].Strings[0]);
18: CurRock := LowerCase(Players[CurrentPlayer].Strings[1]);
19: CurRock := LowerCase(Players[CurrentPlayer].Strings[2]);
End;
End;
Function MyMine(): boolean;
Var
rocks: TPointArray;
i, time: integer;
rock: tpoint;
begin
SetOreColor;
findnormalrandoms;
result := false;
Begin
Rocks := FindRocks(CurRock);
For I := 0 To high(rocks) Do
Begin
rock.x := rocks[i].x;
rock.y := rocks[i].y
If Not IsNewRock(rock) Then
Continue;
If w_GasCheck(rock.x, rock.y - 20) Then
Continue;
MMouse(rock.x, rock.y, 0, 0);
Wait(100);
If IsUptext('ine') Then
Result := True;
If Result Then Break;
End;
If Not Result Then
Exit;
Mouse(rock.x, rock.y, 0, 0, True);
Time := GetSystemTime;
Repeat
wait(200);
If (getsystemtime - time > 3000) Then
Begin
If w_GasCheck(rock.x, rock.y - 20) Then
Begin
mouse(mmcx, mmcy, 2, 2, True);
wait(1000);
exit;
End;
End;
If (getsystemtime - time > 5000) Then
Begin
findnormalrandoms;
wait(300);
If FindFight Then
Begin
RunTo('S', True);
exit;
End;
FindPick;
End;
If getsystemtime - time > 1000 * RockSeconds(CurRock) Then
break;
Until Not FollowRock(rock, CurRock);
End;
End;
{--------------------------------------------------------
Function EasyBank:Boolean;
--------------------------------------------------------}
Function EasyBank:Boolean;
Var
C, x, y: Integer;
Begin
C := 0;
Repeat
FTWaitAll(2);
C := C + 1;
If OpenBankFast('veb') Then
Begin
Result := True;
Exit;
End;
If C = 5 Then
Begin
If FindVarrockBank(x, y) Then
Begin
Mouse(x, y, 0, 0, True);
Wait(200 + Random(400));
FFlag(0);
Wait(100);
End;
End;
Until BankScreen Or (C > 10);
If BankScreen Then
Begin
Result := True;
Exit;
End Else
Begin
Players[CurrentPlayer].Loc := 'No MS Bank';
Players[CurrentPlayer].Active := False;
LogOut;
End;
End;
Procedure StorePick;
Var
x, y: Integer;
Begin
If InvFull Then
Begin
If (FindBitmapMaskTolerance(OreMask, x, y, 559, 210, 735, 460, 5, 10)) Then
Begin
Mouse(x, y, 5, 5, False);
ChooseOption('Drop');
End;
End;
GameTab(5);
Mouse(593, 303, 0, 0, True);
Wait(Random(4)+8);
GameTab(4);
End;
{--------------------------------------------------------
Procedure BankStuff;
Banks all the ores, and the rest of the stuff
in the inventory, Withdraws new pick if broken.
--------------------------------------------------------}
Procedure BankStuff;
Var
x, y, tTotalOres, tTinOres, tCopperOres, tIronOres: Integer;
Begin
If (NoPick = True) And (Players[CurrentPlayer].booleans[0] = True) Then
StorePick;
If Not LoggedIn Then
Exit;
If Not EasyBank Then
Exit;
If BankScreen Then
Begin
FixBank;
tTotalOres := CountItemBmpMaskTol(OreMask, 5, 15);
tTinOres := CountItemBmpTol(TinOre, 10);
tCopperOres := CountItemBmpTol(CopperOre, 10);
tIronOres := CountItemBmpTol(IronOre, 10);
TotalOres := TotalOres + tTotalOres;
TinOres := TinOres + tTinOres;
CopperOres := CopperOres + tCopperOres;
IronOres := IronOres + tIronOres;
ReportVars[0] := tTotalOres;
ReportVars[1] := tTinOres;
ReportVars[2] := tCopperOres;
ReportVars[3] := tIronOres;
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + CountItemBmpMaskTol(OreMask,5,15);
ClickAllItemsBmpMaskTolWait(OreMask, 'All', 20, 25, 1000 + Random(500));
If Players[CurrentPlayer].booleans[0] Then Deposit(1, 28, 2)
Else Deposit(2, 28, 2);
If NoPick Then Withdraw(1, 1, 1);
End;
Wait(1);
If BankScreen Then CloseBank;
If NoPick Then
Begin
If FindPickHeadColor Then
NoPick := False
Else
NoPick := true;
If FindColor(x, y, Hc1, MIX1, MIY1, MIX2, MIY2) Then
Mouse(x, y, 0, 0, True);
End;
If NoPick Then
Begin
Players[CurrentPlayer].Loc := 'No Pickaxe.';
LogOut;
Exit;
End;
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
Banks := Banks + 1;
ReportVars[4] := ReportVars[4] + 1;
CloseBank;
Wait(1000 + Random(500));
End;
{--------------------------------------------------------
Procedure PlayerReport;
Uses the WriteLn function to print out player stats.
--------------------------------------------------------}
Procedure PlayerReport;
Var
Active, rand: string;
I: Integer;
Begin
For I := 0 To HowManyPlayers - 1 Do
Begin
If Players[i].Active = True Then
Active := 'T'
Else
Active := 'F';
If Players[i].rand <> '' Then
rand := '; Rand: ' + Players[i].rand
else rand := '';
WriteLn((IntToStr(I)) + ' : ' + Players[I].nick + ' = ' +
Active + ' ' + Players[I].Loc + rand + '; B: ' + IntToStr(Players[I].Integers[0])
+ ' Ores;'+ ' M : ' + IntToStr(Players[I].Level[15]));
End;
End;
{--------------------------------------------------------
Procedure ProgressReport;
Prints out the scripts statistics.
--------------------------------------------------------}
Procedure ProgressReport;
Var
Rate, Sec: Integer;
Begin
Sec:= GetTimeRunning div 1000+1;
Rate:= 3600*TotalOres/Sec; // by mastaraymond.
WriteLn('----------------------------');
WriteLn('');
WriteLn('Varrock East Miner Report V. ' + VersionNumber);
WriteLn('');
WriteLn('Worked for '+ TimeRunning);
WriteLn('Ores Mined and Banked : '+IntToStr(Totalores));
WriteLn('Mining at a rate of ' + IntToStr(Rate) + ' ores p/h.');
WriteLn('');
If TinOres > 0 Then WriteLn(''+IntToStr(TinOres)+' Tin Ores.');
If CopperOres > 0 Then WriteLn(''+IntToStr(CopperOres)+' Copper Ores.');
If IronOres > 0 Then WriteLn(''+IntToStr(IronOres)+' Iron Ores.');
If Gasses > 0 Then WriteLn('Number of avoided gasses: '+IntToStr(Gasses));
If PickAxeAttached > 0 Then WriteLn('Picks attached: '+ + IntToStr(PickAxeAttached) + '.');
WriteLn('');
WriteLn('----------------------------');
WriteLn('');
PlayerReport;
WriteLn('');
WriteLn('----------------------------');
SRLRandomsReport;
End;
{--------------------------------------------------------
Procedure SetupScript;
Sets all procedure's needed, and logs in the first player.
--------------------------------------------------------}
Procedure SetupScript;
Begin
ClearDebug;
SetupSRL;
SetupMining;
BitMaps;
DeclarePlayers;
CurrentPlayer := StartPlayer;
LoginPlayer;
If Not Players[CurrentPlayer].booleans[1] Then
Begin
HighestBrightness;
Players[CurrentPlayer].booleans[1] := True;
End;
SendArrowSilentWait(0,1500+Random(501));
RockColor := TheRockColor;
OreTol := TheOreTol;
TradeSameTrader := True;
SetOreColor;
FindPickHeadColor;
HIGHESTANGLE;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
End;
{--------------------------------------------------------
Procedure DoChats;
Set's the Chat's in RuneScape.
--------------------------------------------------------}
Procedure DoChats;
Begin
SetChat('on',1);
SetChat('on',1);
SetChat('friends',2);
SetChat('friends',2);
SetChat('on',3);
SetChat('on',3);
End;
Procedure ClearVars;
Var
I : Integer;
Begin
For I := 1 To 19 Do
ReportVars[I] := 0;
End;
{--------------------------------------------------------
Script Setup.
--------------------------------------------------------}
begin
SetupScript;
ScriptID := '48';
ClearVars;
SRLID := YourSRLId;
SRLPassword := YourSRLPass;
GetAllLevels;
ReportVars[5] := 1;
DoChats;
RCMaster := RemoteControlMasterNickName;
RCLoc:= 'Bank';
NormalRandomsTime := GetSystemTime;
FastRandomsTime := GetSystemTime;
FindTalkTime := GetSystemTime;
SymbolAccuracy := 0.8;
LoadPaths;
RoadColor := 8357513;
Repeat
If Players[CurrentPlayer].booleans[2] = False Then
Begin
Retaliate(False);
Players[CurrentPlayer].booleans[2] := True;
End;
If Players[CurrentPlayer].Loc = 'Bank' Then
Begin
ToMine;
End;
If Players[CurrentPlayer].Loc = 'Mine' Then
Begin
If WizzyDebug Then WriteLn('We have reached the mine.');
MarkTime(MyMark);
Players[CurrentPlayer].Level[15] := GetSkillLevel('mining');
SetRun(True);
If WizzyDebug Then WriteLn('Starting Mine Loop.');
Repeat
Wait(100);
If Not MyMine() Then
if ToFar then
If MiddleOfMine(Dx, Dy) Then
Begin
Writeln('Walking back to the mine');
Mouse(Dx, Dy, 2, 2, True);
FFlag(0);
End;
If FlagPresent Then Wait(2000+Random(500));
FindNormalRandoms;
If Not LoggedIn Then Break;
If Not FindPick then Break;
Until (( InvCount = 28 )
Or (TimeFromMark( MyMark ) > 1000 * 60 * MinutesPerLoad));
If WizzyDebug Then WriteLn('Back to the Bank.');
SetRun(False);
MakeCompass('N');
ToBank;
BankStuff;
End;
ProgressReport;
If ( LoggedIn And (Players[CurrentPlayer].Banked Mod Loads = 0 )) Then
Begin
MarkTime(MyMark);
LogOut;
NextPlayer(True);
If Not Players[CurrentPlayer].booleans[1] Then
Begin
HighestBrightness;
Players[CurrentPlayer].booleans[1] := True;
End;
GetAllLevels;
HIGHESTANGLE;
SetOreColor;
RoadColor := FindVarrockRoadColor;
FindPickHeadColor;
DoChats;
End;
If Not LoggedIn Then
Begin
NextPlayer(False);
If Not Players[CurrentPlayer].booleans[1] Then
Begin
HighestBrightness;
Players[CurrentPlayer].booleans[1] := True;
End;
NoPick:=False;
HIGHESTANGLE;
GetAllLevels;
SetOreColor;
RoadColor := FindVarrockRoadColor;
FindPickHeadColor;
If NoPick Then LogOut;
DoChats;
End;
Until False;
end.
What to do? He sounds genuine.