SCAR Code:
{.Script Info:
# ScriptName = Chelsea Power Miner
# Author = Stuckman
# Description = This Powermines Copper, Tin or Iron for you
# Version = 0.09
# Date = 12/4/07
# Comments = Please Post Reports and Bugs
# Comments = Make Sure Pick Is In Slot 1 or equipped
# Thanks = To Pentti for helping with my main procedure
# Thanks = To nielsie95 for the tutorial on multiplayer
# Thanks = And to anyone else who has helped me making this script
/Script Info}
program Chelsea_Power_Miner;
{.include SRL/SRL.scar}
{.include SRl\SRL\extended\xAutotalk.scar}
{.include SRL\SRL\extended\xAntiBan.scar}
var
rockcolour,rockcolour1,rockcolour2,i,l,Q,P : integer;
const
loads=10; //total number of loads you want it to do
rock='Copper'; //chose Copper, Tin, or Iron
characterloads=2; //number of loads per character
{ setup player }
procedure DeclarePlayers;
begin
HowManyPlayers := 2; //Number of PLAYERS. active or not.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Player to start on.
//set all user names, passwords and nicks correctly please.
Players[0].Name := 'xxxxxxxxxxx';
Players[0].Pass := 'xxxxxxxxxxxxx';
Players[0].Nick := 'xxxx';
Players[0].Active := True;
Players[1].Name := 'xxxxxxxxxxxxx';
Players[1].Pass := 'xxxxxxxx';
Players[1].Nick := 'xxxx';
Players[1].Active := True;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
{ End Setup }
procedure setrockcolour;
begin
if(rock='Copper')then
begin
rockcolour:=6789865;
rockcolour1:=4352403;
rockcolour2:=4816587;
end;
if(rock='Tin')then
begin
rockcolour:=5592411;
rockcolour1:=9145494;
rockcolour2:=7171445;
end;
if(rock='Iron')then
begin
rockcolour:=1054503;
rockcolour1:=1844541;
rockcolour2:=2635093;
end;
end;
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
a: Integer;
begin
for a := 1 to 8 do
begin
case A of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
procedure failsafes;
begin
if(not(LoggedIn))then
begin
writeln('Not Logged In.');
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].Loc := 'Not Logged In';
end;
end;
procedure NoBans;
begin
failsafes;
if(Players[CurrentPlayer].Active = False)then
Exit;
case Random(15) of
0: RandomRClickEvery(2+random(5));
1: begin
HoverSkill('mining', false);
wait(3000+random(2000));
GameTab(4);
end;
2: begin
HoverSkill('smithing', false);
wait(3000+random(2000));
GameTab(4);
end;
3: begin
HoverSkill('random', false);
wait(3000+random(2000));
GameTab(4);
end;
4: begin
GameTab(1);
wait(1000+random(3000));
GameTab(4);
end;
5: begin
case random(4) of
0: MakeCompass('N');
1: MakeCompass('S');
2: MakeCompass('E');
3: MakeCompass('W');
end;
end;
6: PickUpMouse;
7: begin
case random(3) of
0: TypeSend('What pickaxe are you using?');
1: TypeSend('pickaxes?');
2: SayCurrentLevels('mining');
end;
end;
8: begin
GameTab(1 + Random(12));
wait(1000+random(1000));
GameTab(4);
end;
9: begin
case random(11) of
0: TypeSend('Mining lvls?');
1: TypeSend('Mining levels?');
2: TypeSend('Mining lvls');
3: TypeSend('Mining levels');
4: TypeSend('What is your Mining level?');
5: TypeSend('What ur mining lvl????');
6: TypeSend('Mining lvls please?');
7: TypeSend('Smithing lvls');
8: TypeSend('Smithing levels');
9: SayCurrentLevels('mining');
10: begin
TypeSend('My mining level is ');
SayCurrentLevels('mining');
TypeSend('What is ur mining level?')
end;
end;
end;
10: AlmostLogout;
11: MouseBox(MSX1,MMY1,MMX2,MMY2,6);
12: SleepAndMoveMouse(9647 + random(1674));
13: LeaveScreenEvery(3+random(3));
14: begin
RotateEvery(10+random(15));
perfectnorth;
end;
end;
end;
procedure AntiRandoms;
begin
failsafes;
if(Players[CurrentPlayer].Active = False)then
Exit;
FindNormalRandoms;
FindFastRandoms;
if (FindFight = true) then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
end;
end;
procedure Chats;
begin
SetChat('Hide',1)
SetChat('Friends',2)
SetChat('Off',3)
end;
procedure DropOres;
begin
AntiRandoms;
if(Players[CurrentPlayer].Active = False)then
Exit;
dropto(2,28);
AntiRandoms;
nobans;
end;
procedure Mine;
begin
repeat
AntiRandoms;
if(Players[CurrentPlayer].Active = False)then
Exit;
P:=0
repeat
P:=P+1
wait(250+random(100));
until(FindObj(x,y,'ine',rockcolour,9))or(FindObj(x,y,'ine',rockcolour1,9))or(FindObj(x,y,'ine',rockcolour2,9))or(P=50)
if(P=50)then
begin
writeln('No Rocks');
Players[CurrentPlayer].Active := False;
Players[CurrentPlayer].Loc := 'No Rocks';
Exit;
end;
if(not(P=50))then
begin
MMouse(x,y,2,2);
wait(100+random(50));
if(random(7)=0)then
begin
Mouse(x,y,5,5,False);
wait(25);
ClickOption('ine',1);
end
else
Mouse(x,y,5,5,True)
wait(1150+random(450));
Q:=0
repeat
Q:=Q+1
wait(100+random(100));
until(InChat('cur'))or(InChat('man'))or(Q=20)
wait(500+random(500));
end;
Q:=0
if(random(8)=0)then
begin
antirandoms;
nobans;
end;
antirandoms;
until(InvFull)
i:= i + 1;
l:= l + 1;
DropOres;
end;
procedure Setup;
begin
SetupSRL;
FindRS;
ActivateClient;
if not LoggedIn then
begin
LoginPlayer;
end;
HighestAngle;
Chats;
Wait(1000);
i:=0;
l:=0;
DeclarePlayers;
setrockcolour;
end;
procedure ProgressReport;
begin
ClearDebug;
Writeln('////////////////////|\\\\\\\\\\\\\\\\\\\\');
Writeln('/You have been using chelsea powerminer\');
Writeln('///Worked For ' + TimeRunning + '\\\')
Writeln('//////You have mined '+ inttostr(i) + ' Loads\\\\\\');
Writeln('///////////End Progress Report\\\\\\\\\\\');
SrlRandomsReport
end;
begin
Setup;
repeat
repeat
failsafes;
if(Players[CurrentPlayer].Active = False)then
NextPlayer(False);
Mine;
ProgressReport;
until(l=characterloads)
if(l=characterloads)then
begin
LogOut;
NextPlayer(True);
l:=0;
HighestAngle;
Writeln('Switched players successfully!');
end;
until(i=loads)
end.