SCAR Code:
program ProjectS;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}
const
//-->Loads<--\\
Loads = 10; //How many loads per player before switching
//--->SRL ID<---\\
YourSRLId = '5840';
YourSRLPassword ='234324';
//--->Pin - Make same for ALL chars. If no Pin, leave blank<---\\
YourPin = '';
{-------------------------------------------------------
Player Setup
--------------------------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'estl';
Players[0].Active := True;
end;
{----------------------------Do Not Edit Below This----------------------------}
var x, y, LoadsNum, LoadsNum2: integer;
//-----------------------------AntiRandoms/AntiBan----------------------------\\
Procedure AntiRandoms;
begin
If(FindFight)then
RunAway('N', True,1,15000);
FindNormalRandoms;
FindLamp('Woodcutting');
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
6: DoEmote(400 +Random(90));
end;
end;
//---------------------------------ChopTree-----------------------------------\\
procedure ChopTree;
var
CuttingTime: Integer;
Tries: Integer;
begin
MarkTime(CuttingTime);
MakeCompass('S');
repeat
if FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']) then
begin
MMouse(X, Y, 3, 3);
Wait(150);
if(IsUpText('aple'))then
begin
Mouse(X, Y, 3, 3, False);
Wait(150 + Random(75));
ChooseOption('hop')
FFlag(0);
AntiBan;
X := MSCX;
Y := MSCY;
FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']);
MMouse(X, Y, 3, 3);
MarkTime(CuttingTime);
repeat
AntiBan;
Wait(75 + Random(25));
FindNormalRandoms;
Wait(50 + Random(50));
MMouse(X, Y, 3, 3);
until (TimeFromMark(CuttingTime) > 400000+random(20000)) or not IsUpText('aple');
end;
end
else
begin
Tries := Tries + 1;
if (Tries >= 20) then
begin
LogOut;
NextPlayer(False);
Exit;
end;
end;
until (InvFull) or not (LoggedIn)
end;
//----------------------Walking from maples to Bank--------------------------\\
function WalkToBank : Boolean;
var
BankDTM, X, Y:Integer;
begin
BankDTM := DTMFromString('78DA63CC676260F06000037608C5F0E70F138' +
'300906604E2FF40C0980754E3C58006189148200D32C79B809A02' +
'22D41412B60B00174E09C5');
if (DTMRotated(BankDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(X, Y, 1, 1, True);
Wait(450 + Random(115));
FFlag(0);
WriteLn('Player has successfully walked to the Maple Trees.');
Result := True;
end
else
begin
WriteLn('Player could not find the bank using DTM.');
FindSymbol(X, Y, 'Bank');
Mouse(X, Y, 1, 1, True);
FFlag(0);
Wait(730 + Random(525));
if (not (FindSymbol(X, Y, 'Bank'))) then
begin
WriteLn('Failed to find the Bank');
LogOut;
Exit;
end;
end;
FreeDTM(BankDTM);
end;
//--------------------------------Banking-------------------------------------\\
function Banking : Boolean;
var
MapleDTM, BX, BY, MX, MY: Integer;
begin
if (not (InvFull)) or (not (LoggedIn)) then
Exit;
if (InvFull) then
begin
MapleDTM := DTMFromString('78DA639CC1C4C060CEC8800C621D78C0344C9' +
'4713A508D1EAA1A982C5C4D3B508D25013593806A9C09A8590C54' +
'634740CD02A01A1D026ABA816A0CF0AB0100C6F60664');
FindObjTPA(BX, BY, 7699838, 15, -1, 15, 15, 3, ['ank','Ban', 'Bank']);
Wait(1210 + Random(895));
MMouse(BX, BY, 0, 0);
if (IsUpText('Banker')) then
begin
Mouse(BX, BY, 1, 1, False);
ChooseOption('Bank');
FFlag(0);
end
else
Mouse(BX, BY, 1, 1, False);
Wait(115 + Random(65));
ChooseOption('Use-quickly');
FFlag(0);
Wait(900 + Random(620));
if (PinScreen) then
InPin(YourPin);
Wait(1000 + Random(150));
if (BankScreen) then
begin
FindDTM(MapleDTM, MX, MY, MIX1, MIY1, MIX2, MIY2);
Deposit(2, 28, True);
FreeDTM(MapleDTM);
Wait(285 + Random(110));
LoadsNum := LoadsNum + 1;
LoadsNum2 := LoadsNum2 + 1;
ReportVars[1] := ReportVars[1] + 1;
SendSRLReport;
Result := True;
Wait(2500 + Random(1240));
end
else
begin
WriteLn('Could not find the Bank or the Banker.');
LogOut;
end;
end;
end;
//Willows to Bank\\
function WalkToMaple : Boolean;
var
WalkMDTM, X, Y: Integer;
begin
if (not (LoggedIn)) or (InvFull) then
Exit;
AntiRandoms;
WalkMDTM := DTMFromString('78DA636C636260706400035608C5F0F4CD4B8' +
'687409A1188FF03016326508D3B030AF8F74F984112AA060418EB' +
'8850D34E849A22A01A6FFC6A0071791418');
if (DTMRotated(WalkMDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
FreeDTM(WalkMDTM);
Mouse(X, Y, 5, 5, True);
FFlag(0);
Result := True;
Mouse(MMCX, MMCY - 10, 5, 5, True);
FFlag(5);
end
else
begin
FreeDTM(WalkMDTM);
WriteLn('Player failed to walk into the Maple Trees.');
FindSymbolIn(X, Y, 'Tree', 595, 30, 665, 80);
Mouse(X, Y, 5, 5, True);
Result := True;
end;
Exit;
end;
//SetupScript\\
procedure SetupScript;
begin
SRLId := YourSRLId;
SRLPassword:= YourSRLPassword;
SetupSRL;
ScriptID:= '687';
DeclarePlayers;
end;
//THE MAIN LOOPAGE!\\
begin
SetupScript;
repeat
WalkToMaple;
ChopTree;
AntiBan;
WalkToBank;
Banking;
if (LoadsNum2=Loads) then
begin
NextPlayer(True);
LoadsNum2 := 0;
MakeCompass('S')
Writeln('Players Switched successfully')
end;
until (false)
end.