SCAR Code:
program PowerMiner;
{.Include SRL/SRL.Scar}
Var
x, y, i, timer, Dropped, Symbolcolor, OreDTM: Integer;
Mining: Boolean;
Rockcolor: array [0..2] of Integer;
Rockmound: array [0..2] of Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'Kasmember18';
Players[0].Pass := 'Password';
Players[0].Nick := 'smem'; // 3-4 letters of username
Players[0].Active := True; // Is the player active?
end;
Procedure Inti;
begin
Rockcolor[0]:= 2107972;//Color of rock vein
Rockcolor[1]:= 2108231;//Color of rock vein
Rockcolor[2]:= 2371662;//Color of rock vein
Rockmound[0]:= 5600126;//Color of the actual rock it self
Rockmound[1]:= 6785687;
Rockmound[2]:= 7510182;
SymbolColor := 11381427;//Color of the oblesk on minimap grey part
Mining:=False;
Dropped:=0;
OreDTM := DTMFromString('78DA63DCCBC4C0B09991011978E92A31D83BF' +
'1338044FF0301E341A09AA5A86A1818189148207D0CA866270135' +
'A7806AD61050B306A8661301355B816AF61250B303A8660901359' +
'B806A56E3570300625F10A9');
end;
Procedure Angle;
begin
KeyDown(Vk_Up);
Wait(1000+Random(500));
KeyUp(Vk_Up);
MakeCompass('S');
end;
Procedure Antirandom;
begin
lampskill:='smithing';
FindNormalRandoms;
FindTalk;
if FindFight=true then
begin
RunAway('W',true,1,4000+random(2000));
if FindColorSpiralTolerance(x, y, Symbolcolor, MMX1, MMY1, MMX2, MMY2,5) then
begin
MMouse(x, y, 3, 3);
ClickMouse(x, y, True);
Wait(2000+random(1000));
end else RunAway('E',true,1,4000+random(2000));
end;
end;
Procedure Antiban;
begin
Case Random(10) of
0:PickupMouse;
1:BoredHuman;
2:HoverSkill('Mining', False);
3:RandomMovement;
4:RandomRClick;
5:Writeln('Nothing');
6:Writeln('Nothing');
7:Writeln('Nothing');
8:Writeln('Nothing');
9:Writeln('Nothing');
end;
end;
Procedure Mineore;
begin
repeat
if FindObjCustom(x, y,['ock','rock','roc'], [Rockmound[1],Rockmound[2],Rockmound[0]],0) then
begin
MMouse(x, y, 5, 5);
end;
For i:=0 to 2 do
begin
if FindObjTPA(x, y, Rockcolor[i], 5, 5, MSX2, MSY2, 0, ['ock','rock','roc']) then
begin
MMouse(x, y, 3, 3);
ClickMouse(x, y, True);
Mining:=True;
Antiban;
AntiRandom;
Wait(4000+random(100));
Mining:=False;
AntiRandom;
end;
end;
until(Invfull);
end;
Procedure Dropore;
begin
repeat
begin
FindDTM(OreDTM, x, y, 550, 205, 735, 460);
MMouse(x, y, 3, 3);
ClickMouse(x, y, False);
Wait(100+random(10));
ChooseOption('Dro');
Dropped:=Dropped+1
Wait(300+random(10));
AntiRandom;
end;
until( not FindDTM(OreDTM, x, y, 550, 205, 735, 460) );
end;
procedure ProgressReport;
begin
ClearDebug;
Writeln('Time Running : ' + TimeRunning +'. ');
Writeln('Gained '+ IntToStr(Dropped*35) +' xp.');
end;
begin
Cleardebug;
Inti;
setupsrl;
DeclarePlayers;
loginplayer;
repeat
Angle;
Mineore;
Dropore;
Mineore;
Dropore;
Logout;
ProgressReport;
Wait(20000+random(1000));
LoginPlayer;
until(false);
end.