SCAR Code:
program DropPotential;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Magic.scar}
// Just camp this upstairs in ANY building. Fill in the nick name, log your player in and AWWAAAAAYYYY you go!
// It will tele upon finding a fight, keep Lumby Runes.
const
TheNickName = 'ero';
var
ATime, ABanCount: Integer;
function MyConvertTime(Ms: integer): String;
var
RHours, Minutes, Seconds, RMinutes, RSeconds: Integer;
begin
Seconds := Ms div 1000;
Minutes := Seconds div 60;
RHours := Minutes div 60;
Result := IntToStr(Seconds) + ' Seconds';
if Minutes <> 0 then
begin
RSeconds := Seconds mod (Minutes * 60);
Result := IntToStr(Minutes) + ' Minutes and ' + IntToStr(RSeconds) +
' Seconds';
end;
if RHours <> 0 then
begin
RMinutes := Minutes mod (RHours * 60);
RSeconds := Seconds mod (Minutes * 60);
Result := IntToStr(RHours) + ' Hours, ' + IntToStr(RMinutes) +
' Minutes and ' + IntToStr(RSeconds) + ' Seconds';
end;
end;
procedure AntiBan(ForceClick: Boolean);
var
I, G, Key1, Key2: Integer;
begin
if ForceClick then I := Random(70) else I := Random(600);
Status('Antibanning! [' + IntToStr(I) + ']');
Inc(ABanCount);
case I of
0..9: RandomRClick;
10..15: BoredHuman;
16..28: PickUpMouse;
29..35:
begin
g:= GetCurrentTab;
GameTab(RandomRange(1, 14));
Wait(RandomRange(1000, 1500));
GameTab(g);
end;
36..40: DoEmote(RandomRange(1, 37));
41..45, 66..69:
begin
GameTab(4);
repeat
I := Random(29) + 1;
if ExistsItem(I) then
begin
MouseItem(I, False);
Wait(RandomRange(80, 110));
if Random(2) = 1 then
ChooseOption('anc')
else
ChooseOption('xam');
Exit;
end;
until False;
end;
46..55: MakeCompass(IntToStr(random(361)));
56..65: begin
case Random(2) of
0: begin
Key1 := Vk_up; Key2 := Vk_down;
end;
1: begin
Key1 := Vk_down; Key2 := Vk_up;
end;
end;
KeyDown(Key1);
Wait(RandomRange(400, 700));
KeyUp(Key1);
Wait(RandomRange(100, 150));
KeyDown(Key2);
Wait(RandomRange(400, 700));
KeyUp(Key2);
end;
70..100: SleepAndMoveMouse(RandomRange(200, 500));
101..130: HoverSkill('random', False);
else
begin
Dec(ABanCount);
Status('');
Exit;
end;
end;
Status('');
ATime := GetTimeRunning;
end;
//wizzup
Function ScanMiniMap(iFrom, iTo, Distance: Integer): Integer;
// Old Code. Still works.
Var
I, iX,iY: Integer;
Begin
Result := 0;
For I := iFrom To ITo Do
Begin
iX := Round(Distance * Sin(I * Pi / 180)) + MMCX;
iY := Round(-Distance * Cos(I * Pi / 180)) + MMCY;
If GetColor(iX, iY) = 65536 Then
Inc(Result);
End;
End;
var
Total, Report, T, InvRandoms: Integer;
BCount, TempBlk: Integer;
begin
SetupSRL;
SMARTSetupEx(44, True, True, False);
SetTargetDC(SmartGetDC);
NumberOfPlayers(1);
Players[0].Nick := TheNickName;
while not LoggedIn do
Wait(500);
ClearDebug;
BCount := ScanMiniMap(0, 359, 30);
Writeln('Black Count Returned: ' + IntToStr(BCount));
Total := GetTimeRunning;
repeat
T := GetTimeRunning;
if InRange((GetTimeRunning - Total) mod 60000, 0, 1000) then
Disguise(MyConvertTime(T-Total) + ' running.');
FindNonInventoryRandoms;
if T - InvRandoms > 120000 then
begin
FindNormalRandoms;
InvRandoms := T;
end;
if T - ATime > 45000 then
AntiBan(T - ATime > 270000);
if T - Report > 120000 then
begin
Writeln('-------------------------------------------------------------');
Writeln('Gained ' + MyConvertTime(T - Total) + ' of Drop Potential.');
Writeln('Preformed ' + IntToStr(ABanCount) + ' antibans. At ' + IntToStr(Round((ABanCount / (T - Total)) * 3600000)) + ' p/h');
Writeln('-------------------------------------------------------------');
Writeln('');
Report := GetTimeRunning;
end;
if FindFight then
begin
CastSpell(19);
Disguise('Found Fight, Escaping. Terminated.');
Break;
end;
TempBlk := 0;
TempBlk := ScanMiniMap(0, 359, 30);
if TempBlk <> BCount then
Status('TempBlk: ' + IntToStr(TempBlk));
if FindDead or not InRange(TempBlk, BCount - 15, BCount + 15) then
begin
if not FindDead then
begin
Writeln('[1] Difference of ' + IntToStr(iAbs(BCount - TempBlk)) + ' pixels in Black Count.');
MMouse(-50, -50, 0, 0);
Wait(600);
TempBlk := 0;
TempBlk := ScanMiniMap(0, 359, 30);
Writeln('[2] Difference of ' + IntToStr(iAbs(BCount - TempBlk)) + ' pixels in Black Count.');
if InRange(TempBlk, BCount - 15, BCount + 15) then
begin
BCount := TempBlk;
Continue;
end;
end;
Disguise('Found Somewhere else.. Terminating.');
Break;
end;
Wait(RandomRange(400, 800));
until False;
Writeln('');
Writeln('-------------------------------------------------------------');
Writeln('Gained ' + MyConvertTime(T - Total) + ' of Drop Potential.');
Writeln('Preformed ' + IntToStr(ABanCount) + ' antibans. At ' + IntToStr(Round((ABanCount / (T - Total)) * 360000)) + ' p/h');
Writeln('-------------------------------------------------------------');
LogOut;
end.