Code:
program StoicCopperPower07;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I SRL-OSR/SRL/Misc/SmartGraphics.Simba}
// Begin User Setup
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Three Letter Nick
BoxRewards := ['Xp'];
Active:=True;
end;
end;
// End User Setup
// Begin AntiBan
procedure AntiBan;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
25: HoverSkill('Mining', false);
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
92: HoverSkill('Mining', false);
end;
end;
end;
// End AntiBan
// Begin Finding Copper
function FindCopper(var x, y : Integer) : Boolean;
var
a : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS :Integer;
Box : TBox;
begin
if(not(LoggedIn))then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.02, 0.83)
FindColorsSpiralTolerance(MSCX, MSCY, TPA,
3502798, MSX1, MSY1, MSX2, MSY2, 4);
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 15, 15);
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
Box := IntToBox((MP.X - 20), (MP.Y - 20), (MP.X + 20), (MP.Y + 20));
{$IFDEF SMART8}
SMART_DrawBoxEx(True, True, Box, clYellow);
{$ENDIF}
MMouse(MP.X, MP.Y, 4, 4);
if(WaitUpText('Mine', 750))then
begin
x := MP.x; y := MP.y;
Result := True;
{$IFDEF SMART8}
SMART_ClearCanvas;
{$ENDIF}
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
// End Finding Copper
// Begin Mining Copper
procedure MineCopper;
var
x, y: Integer;
Box : TBox;
begin
if(not(LoggedIn))then Exit;
MakeCompass('N');
Box := IntToBox(MSCX - 10, MSCY - 25, MSCX + 15, MSCY + 15);
repeat
if(not(FindNormalRandoms))then
begin
if(FindCopper(x, y))then
begin
Wait(RandomRange(100, 450));
Mouse(x, y, 12, 12, mouse_Left)
Wait(RandomRange(100, 550));
while(Animating(Box, 750, 30))do
begin
AntiBan;
Wait(RandomRange(100,300));
end;
end else
Exit;
end;
until(InvFull or (not FindCopper(x, y)));
end;
// End Mining Copper
// Begin Find & Drop Copper
procedure FindAndDrop();
var
DTM, x, y : Integer;
TP : TPoint;
begin
DTM := DTMFromString('mPwEAAHic42dgYLAEYg0g1gdiIyA2B2I7IHYGYjcgdgViJyC2B2ILqBpDINYCYmsgtgViU6iYAZI5IDErqD4XIPYAYk8oG4Sv15gBSUYyMfmAXBux2AoACj0Iew==');
if(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 7, 7, mouse_Right);
Wait(RandomRange(750, 900));
if(FindTextTPAEx(4231423, 0, MIX1, MIY1, MIX2, MIY2, TP.X, TP.Y,
'rop', StatChars, ClickLeft))then
Wait(RandomRange(750, 900));
begin
while(InvCount > 1)do
begin
AntiBan;
Wait(RandomRange(250, 500));
end;
end;
end;
FreeDTM(DTM);
end;
// End Find & Drop Copper
// Begin Main Loop Procedure
procedure MainLoop;
begin
SetAngle(SRL_ANGLE_HIGH);
repeat
FindCopper();
MineCopper();
FindAndDrop();
until(AllPlayersInactive);
end;
begin
{$IFDEF SMART8}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL();
ClearDebug();
DeclarePlayers();
LoginPlayer();
MainLoop();
end.