Simtoon
2009-06-07 09:14:28
10 Year(s)
Are you affilated in anyway with Jagex LTD?
no
Were you Referred to SRL?
DansTheMan
What is your general programming knowledge?
PHP, HTML/XHTML,
Are you a member of any other communities?
Rsbot
Sythe
Tell us about yourself…
From: Simtoon
Im cool
Please show us one (or multiple) of your scripts.
{ =============================================================================
SimMiner by Simtoon - A VarrockEastMiner
Setup players at DeclarePlayers (Line 13+).
============================================================================= }
{.include SRL\SRL\misc\SMART.scar}
{.include SRL\SRL.scar}
var
World, x, y: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players are you using?
NumberOfPlayers(HowManyPlayers); //Ignore this line.
CurrentPlayer := 0; //Which player to start with?
World := 123; //World to use for SMART?
Players[0].Name := ''; //Player username.
Players[0].Pass := ''; //Password for player.
Players[0].Nick := ''; //Nickname of your username.
Players[0].Pin := '0000'; //Bank pin, leave if none.
Players[0].Strings[0] := 'iron'; //Only works for iron now
Players[0].Strings[3] := 'north'; //Run direction for fights?
Players[0].Strings[4] := 'Windows Live Messenger'; //Disguise title.
Players[0].Integers[0] := 21; //Amount of loads to do?
Players[0].Booleans[0] := False;
//Powermine? Doesn't have to be in VEM if case.
Players[0].Active := True; //Are you using this player?
{
Players[1].User := 'Username'; //Player username.
Players[1].Pass := 'Password'; //Password for player.
Players[1].Nick := 'erna'; //Nickname of your username.
Players[1].Strings[0] := 'silver'; //Ore to mine the most?
Players[1].Strings[1] := 'iron'; //Ore to mine moderately?
Players[1].Strings[2] := 'copper'; //Ore to mine least?
Players[1].Strings[3] := 'north'; //Run direction for fights?
Players[1].Strings[4] := 'Windows Live Messenger'; //Disguise title.
Players[1].Integers[0] := 21; //Amount of loads to do?
Players[1].Active := False; //Are you using this player?
}
{
(*******
ISN'T NECESSARY TO EDIT BEYOND THIS POINT
*******)
}
Writeln('You are using ' + IntToStr(HowManyPlayers) + ' player(s).');
end;
function FindObject(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
if not (FindColorsTolerance(arP, 4219784, MSX1, MSY1, MSX2, MSY2, 31)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 7.92) and (H <= 8.08) and (S >= 35.98) and (S <= 36.61) and (L >=
32.53) and (L <= 45.71) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 10.45) and (X <= 21.69) and (Y >= 9.78) and (Y <= 20.15) and (Z
>= 4.69) and (Z <= 9.24) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then
Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('ine')) then
begin
Mouse(P.x, P.y, 5, 5, True);
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;
GetMousePos(fx, fy);
end;
procedure BankThisShit;
var
i: Integer;
begin
if FindSymbol(x, y, 'bank') then
Wait(1000 + Random(600));
begin
OpenBankFast('veb');
Wait(1000 + Random(600));
repeat
i := i + 1;
Wait(250 + RandomRange(250, 300));
until ((BankScreen) or (i > 5));
if (i > 5) then
begin
Writeln('Not at bank.');
Writeln('Switching Players');
RandomNextPlayer(False);
end;
if (PinScreen) then
InPin(Players[CurrentPlayer].Pin);
end;
DepositAll;
end;
var
OFTP: TPoint;
{ =============================================================================
Description: Find's the specified ore colour from the RuneScape
MainScreen. Stores found coordinates in variable O.
============================================================================ }
function OreAutoColour(OreType: string; O: TPoint): Integer;
var
TPA: TPointArray;
i, bI: Integer;
BColour, BaColour: Integer;
begin
case (Lowercase(OreType)) of
'iron': BColour := 4219784;
end;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, BColour, MSX1, MSY1, MSX2, MSY2,
40);
bI := High(TPA);
for i := 0 to bI do
begin
BaColour := GetColor(TPA[i].X, TPA[i].Y);
if (SimilarColors(BColour, BaColour, 40)) then
begin
if (GetColor(TPA[i].X + 2, TPA[i].Y) = BaColour) then
if (GetColor(TPA[i].X, TPA[i].Y + 2) = BaColour) then
if (GetColor(TPA[i].X + 1, TPA[i].Y + 1) = BaColour) then
if (GetColor(TPA[i].X + 2, TPA[i].Y + 2) = BaColour) then
begin
Result := BaColour;
Writeln('Auto colouring found for ' + OreType);
O := TPA[i];
Exit;
end;
end;
end;
Writeln('Ore colour could not be found');
end;
function WalkToMine: Boolean;
var
xx, yy: integer;
begin
if not LoggedIn then
LoginPlayer;
if (RadialRoadWalk(FindVarrockRoadColor, 0, 90, 74, 1, 1)) then
begin
if (RadialRoadWalk(FindVarrockRoadColor, 0, 180, 74, 1, 1)) then
begin
if (RadialRoadWalk(FindVarrockRoadColor, 90, 180, 74, 1, -1)) then
begin
if (RadialRoadWalk(FindVarrockRoadColor, 90, 195, 74, -1, -1)) then
begin
repeat
RadialRoadWalk(FindVarrockRoadColor, 90, 195, 74, -1, -1);
until (FindSymbol(xx, yy, 'mining site'));
Result := True;
Mouse(xx, yy, 5, 5, True);
WriteLn('Found Mining Symbol & Clicked');
Players[CurrentPlayer].Loc := 'Mine';
Exit;
end
else
Writeln('Couldn''t Walk 4');
Result := False;
Logout;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
TerminateScript;
end
else
Writeln('Couldn''t Walk 3');
Result := False;
Logout;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
TerminateScript;
end
else
Writeln('Couldn''t Walk 2');
Result := False;
Logout;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
TerminateScript;
end
else
Writeln('Couldn''t Walk 1');
Result := False;
Logout;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
TerminateScript;
end;
function WalkToVarrock: Boolean;
var
x, y: integer;
begin
if not LoggedIn then
LoginPlayer;
if FindSymbol(x, y, 'mining site') then
Result := True;
Mouse(x, y, 5, 5, True);
WriteLn('Walked 1');
if RadialRoadWalk(FindVarrockRoadColor, 0, 90, 74, 1, 1) then
begin
if RadialRoadWalk(FindVarrockRoadColor, 270, 90, 74, 1, 1) then
begin
if RadialRoadWalk(FindVarrockRoadColor, 270, 90, 74, 1, 1) then
begin
if RadialRoadWalk(FindVarrockRoadColor, 270, 310, 74, 1, 1) then
begin
end
else
Writeln('Couldn''t Walk 4');
Result := False;
Logout;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
TerminateScript;
end
else
Writeln('Couldn''t Walk 3');
Result := False;
Logout;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
TerminateScript;
end
else
Writeln('Couldn''t Walk 2');
Result := False;
Logout;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
TerminateScript;
end
else
Writeln('Couldn''t Walk 1');
Result := False;
Logout;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
TerminateScript;
end;
{ =============================================================================
Description: Find's gas at found ores coordinates. If gas is
found then it will return the Box in LGF.
============================================================================ }
{
function FindGas(OFTP: TPoint; var LGF: TBox): Boolean;
var
TPA: TPointArray;
i, bI: Integer;
Colour, BaColour: Integer;
bTBox: TBox;
begin
Colour := 7244690;
FindColorsSpiralTolerance(OFTP.X, OFTP.Y, TPA, Colour, OFTP.X - 10,
OFTP.Y - 5, OFTP.X + 15, OFTP.Y + 20, 32);
bI := High(TPA);
for i := 0 to bI do
begin
BaColour := GetColor(TPA[i].X, TPA[i].Y);
if(SimilarColors(Colour, BaColour, 32)) then
begin
if(GetColor(TPA[i].X + 2, TPA[i].Y) = BaColour) then
if(GetColor(TPA[i].X, TPA[i].Y + 2) = BaColour) then
if(GetColor(TPA[i].X + 1, TPA[i].Y + 1) = BaColour) then
if(GetColor(TPA[i].X + 2, TPA[i].Y + 2) = BaColour) then
begin
Result := True;
Writeln('Gas found.');
LGF.X1 := OFTP.X - 10;
LGF.X2 := OFTP.X + 15;
LGF.Y1 := OFTP.Y - 5;
LGF.Y2 := OFTP.Y + 20;
Exit;
end;
end;
end;
Writeln('No gas has been detected');
end;
function GetGasAt(LGF: TBox): Boolean;
var
TPA: TPointArray;
i, bI: Integer;
Colour, BaColour: Integer;
begin
Colour := 7244690;
FindColorsSpiralTolerance(OFTP.X, OFTP.Y, TPA, Colour, LGF.X1,
LGF.Y1, LGF.X2, LGF.Y2, 32);
bI := High(TPA);
for i := 0 to bI do
begin
BaColour := GetColor(TPA[i].X, TPA[i].Y);
if(SimilarColors(Colour, BaColour, 32)) then
begin
if(GetColor(TPA[i].X + 2, TPA[i].Y) = BaColour) then
if(GetColor(TPA[i].X, TPA[i].Y + 2) = BaColour) then
if(GetColor(TPA[i].X + 1, TPA[i].Y + 1) = BaColour) then
if(GetColor(TPA[i].X + 2, TPA[i].Y + 2) = BaColour) then
begin
Result := True;
Exit;
end;
end;
end;
end;
}
procedure AntiBan;
begin
case Random(7) of
0: HoverSkill('mining', False);
1: HoverSkill('random', False);
2: GameTab(1 + Random(14));
3: BoredHuman;
4: RandomMovement;
5: PickupMouse;
6: RandomRClick;
end;
end;
var
SPos: Integer;
procedure DropOresSafe;
var
i, NSPosC: Integer;
TB: TBox;
begin
if not LoggedIn then
LoginPlayer;
if (SPos < 1) then
begin
for i := 1 to 28 do
begin
TB := InvBox(i);
MMouse(RandomRange(TB.X1 + 4, TB.X2 - 4), RandomRange(TB.Y1 + 4,
TB.Y2 - 4), 3, 3);
if (Uppercase(GetUpText) = 'ORE') then
DropItem(i)
else
begin
NSPosC := NSPosC + 1;
Continue;
end;
end;
end
else
begin
for i := SPos to 28 do
begin
TB := InvBox(i);
MMouse(RandomRange(TB.X1 + 4, TB.X2 - 4), RandomRange(TB.Y1 + 4,
TB.Y2 - 4), 3, 3);
if (Uppercase(GetUpText) = 'ORE') then
DropItem(i)
else
begin
NSPosC := NSPosC + 1;
Continue;
end;
end;
end;
if (NSPosC > 0) then
begin
ArrangeInv;
SPos := SPos + NSPosC;
end;
end;
var
LGF: TBox;
function OreMine: Boolean;
var
OC, I: Integer;
begin
if not LoggedIn then
LoginPlayer;
if (OreAutoColour(Players[CurrentPlayer].Strings[0], OFTP) > -1) then
begin
OC := GetColor(OFTP.X, OFTP.Y);
Mouse(OFTP.X, OFTP.Y, 3, 3, True);
repeat
if (I - GetSystemTime > 4000 + RandomRange(400, 1000)) then
begin
AntiBan;
I := GetSystemTime;
end;
if (FindNormalRandoms) then
SRLRandomsReport;
until (GetColor(OFTP.X, OFTP.Y) <> OC);
end
else if (OreAutoColour(Players[CurrentPlayer].Strings[1], OFTP) > -1) then
begin
OC := GetColor(OFTP.X, OFTP.Y);
Mouse(OFTP.X, OFTP.Y, 3, 3, True);
repeat
AntiBan;
if (FindNormalRandoms) then
SRLRandomsReport;
until (GetColor(OFTP.X, OFTP.Y) <> OC);
end
else if (OreAutoColour(Players[CurrentPlayer].Strings[0], OFTP) > -1) then
begin
OC := GetColor(OFTP.X, OFTP.Y);
Mouse(OFTP.X, OFTP.Y, 3, 3, True);
repeat
AntiBan;
if (FindNormalRandoms) then
SRLRandomsReport;
until (GetColor(OFTP.X, OFTP.Y) <> OC);
end;
end;
var
Loads, TLoads, Mined, TMined: Integer;
procedure MainPower;
begin
if not LoggedIn then
LoginPlayer;
repeat
if (not (Oremine)) then
Continue;
Mined := Mined + 1;
until (InvFull);
Loads := Loads + 1;
Wait(235 + Random(321));
DropOresSafe;
end;
procedure Main;
begin
if not LoggedIn then
LoginPlayer;
repeat
WalkToMine;
if (not (Oremine)) then
Continue;
Mined := Mined + 1;
until (InvFull);
Loads := Loads + 1;
Wait(235 + Random(321));
BankThisShit;
WalkToVarrock;
end;
procedure p_Report;
begin
Writeln('[========================================================]');
Writeln('[ Simtoons PowerMiner ]');
Writeln('[ Version 1.0 ]');
Writeln('[--------------------------------------------------------]');
Writeln(PadR('[ Active Players: ' + IntToStr(PlayersActive), 57) + ']');
Writeln(PadR('[ Current Player: ' + Players[CurrentPlayer].Nick, 57) + ']');
Writeln(PadR('[ Player Ores : ' + IntToStr(Mined), 57) + ']');
Writeln(PadR('[ Player Loads: ' + IntToStr(Loads), 57) + ']');
Writeln(PadR('[ Total Mined : ' + IntToStr(TMined), 57) + ']');
Writeln(PadR('[ Total Loads : ' + IntToStr(TLoads), 57) + ']');
Writeln('[========================================================]');
end;
begin
ClearDebug;
ClearReport;
SetupSRL;
MouseSpeed := RandomRange(12, 16);
DeclarePlayers;
SmartSetupEx(World, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
Wait(10);
until (SmartGetColor(253, 233) <> 1118604);
Wait(1000 + RandomRange(100, 600));
LoginPlayer;
Wait(1000 + RandomRange(100, 600));
begin
repeat
if (not (Players[CurrentPlayer].Booleans[0])) then
Main
else
MainPower;
TLoads := TLoads + Loads;
TMined := TMined + Mined;
if (Loads >= Players[CurrentPlayer].Integers[0]) then
begin
Loads := 0;
if (HowManyPlayers > 1) then
RandomNextPlayer(True)
else
begin
Writeln('The one player has achieved it''s load goal');
Writeln('No more players to use, terminating script.');
TerminateScript;
end;
end;
if ((not (LoggedIn)) and (HowManyPlayers > 1)) then
NextPlayer(False)
else
begin
Writeln('No more active players available :( MAKE A BIGGER ARMY');
p_Report;
TerminateScript;
end;
p_Report;
until (False);
end;
end.