SCAR Code:
{.Script Info:
# ScriptName = E-Z Chopper.
# Author = Esteban, with thanks to 3Garrett3 for helping me a lot.
# Description = Used for cutting willows next to the Draynor Bank.
# Version = 1.0 Release.
# Date = Release date ****, 2007
# Comments = Make sure to read and follow all directions.
/Script Info}
program EZChopper;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
var TotalLoads, Ents, Loads: integer;
BrokenAxe: Boolean;
{=====================================================================}
{====================Set These Following Constants====================}
{=====================================================================}
Const
LoadsToDo= 1;//How many loads to do before switching players.
TimePerLoad= 10; //Max number of minutes 1 load should take. Set to your preference.
WillowColorA= 5337208;//Only set the willow colors if the script can't find them.
WillowColorB= 2914408;
WillowColorC= 33453453;
AntiBanageAmount= 18; //How often to perform an AntiBan procedure while chopping.
//Set to 9 for 100% antiban, 18 for 50%.
//Set to 0 for no antiban, and greater than 18 for less then 50%.
VerNum= '1.0'; //Script Version.
{=====================================================================}
{========================End Setting Constants========================}
{=====================================================================}
{=====================================================================}
{=============================Payer Setup=============================}
{=====================================================================}
procedure DeclarePlayers;
begin
HowManyPlayers := 6; //Number of PLAYERS. active or not.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Player to start on.
//set all user names, passwords, nicks and Boolean2 correctly please.
Players[0].Name := 'Username';//Username of the account.
Players[0].Pass := 'Pass';//Account's password.
Players[0].Nick := '3-4 Non capital letters in the usename';
Players[0].Active := True;//Is the player to be used?
Players[0].boolean2 := False;//True if axe is wielded.
//If axe is in inventory, must be in first slot, set false.
Players[1].Name := 'Username';
Players[1].Pass := 'Pass';
Players[1].Nick := 'Nick';
Players[1].Active := True;
Players[1].boolean2 := False;
Players[2].Name := 'UserName';
Players[2].Pass := 'Password';
Players[2].Nick := '3-4 letters of UserName';
Players[2].Active := False;
Players[2].boolean2 := False;
Players[3].Name := 'UserName';
Players[3].Pass := 'Password';
Players[3].Nick := '3-4 letters of UserName';
Players[3].Active := False;
Players[3].boolean2 := False;
Players[4].Name := 'UserName';
Players[4].Pass := 'Password';
Players[4].Nick := '3-4 letters of UserName';
Players[4].Active := False;
Players[4].boolean2 := False;
Players[5].Name := 'UserName';
Players[5].Pass := 'Password';
Players[5].Nick := '3-4 letters of UserName';
Players[5].Active := False;
Players[5].boolean2 := False;
end;
{=====================================================================}
{====================End Player and script Setup======================}
{=========Only edit the below if you know what is being done==========}
{=====================================================================}
{=====================================================================}
{===============================Credits===============================}
{=====================================================================}
Procedure Credits;
begin
ClearDebug;
writeln('E-Z Chopper brought to you by- ');
writeln(' ___ ___ _____ ___ ___ ___ _ ');
writeln('| __| | __| |_ _| | _ | | _ | | | | ');
writeln('| __| |__ | | | | _< | | | | | | ');
writeln('|___| |___| |_| |___| |_|_| |_|___| ');
writeln(' ');
writeln(' -With thanks to 3garrett3 ');
wait(3000+random(500));
end;
{=====================================================================}
{========================Walking to the Willows=======================}
{=====================================================================}
Procedure WalkToWillow;
var WaterEdge, WillowGroundWater, Tries, x, y: Integer;
begin if(GetCombatLevel < 15)then TerminateScript;
begin
if(not(LoggedIn))then Exit;
MakeCompass('W');
if(FindSymbol(x,y,'Fish'))then
begin
Writeln('Walking to the Willows via FishSymbol.');
SetRun(True);
Mouse(x,y,2,2,True);
Flag;
end else
begin
WillowGroundWater := BitmapFromString(12, 9, 'z78DA3377B134' +
'70B23047224D9D4D2C0DDD4CDD4C0D8D8CB09266D848739A99033' +
'56D909903F7A30BD08FC82459E660318D0273504CA3D81C78B851' +
'C51C5CB100000F208F80');
repeat
if(FindBitmap(WillowGroundWater,x,y))then
begin
writeln('Found The BitMap.');
WaterEdge := AutoColorThis(WillowGroundWater, 10, MMX1, MMY1, MMX2, MMY2);
If (WaterEdge > 0) then
begin
SetRun(True);
RadialWalk( WaterEdge , 199, 247, 54, 2, 2);
writeln('Walking to the Willows via Bitmap.');
FFlag(1);
exit;
end;
tries:= tries +1;
wait(52+random(42));
end;
until(Tries >= 15);
end;
end;
end;
{======================================================================}
{=============================Anti Randoms=============================}
{======================================================================}
function FindFastRandoms: Boolean; //Thanks goes to WT=Fakawi for this.
var
i: Integer;
begin
if(not(LoggedIn))then exit;
for i := 1 to 8 do
begin
case I 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;
if(Result= true)then LogOut;
end;
Procedure AntiRandoms;
begin
if(not(loggedIn))then exit;
FindFastRandoms;
FindNormalRandoms;
end;
Procedure AntiBan;
begin
if(not(LoggedIn))then Exit;
case Random(AntiBanageAmount) of
0: begin
HoverSkill('Random', false);
wait(1453+Random(432));
end;
1: begin
HoverSkill('Woodcutting',false);
wait(1364+Random(413));
GameTab(4);
end;
2: PickUpMouse;
3: AlmostLogOut;
4: SayCurrentLevels('Woodcutting');
5: begin
case random(4) of
0: TypeSend('Whats up?');
1: TypeSend('wc lvls?');
2: TypeSend('Woodcutting levels?');
3: TypeSend('sup?');
end;
end;
6: begin
MakeCompass('N');
wait(10+random(5));
MakeCompass('S');
wait(10+random(5));
MakeCompass('E');
end;
7: begin
LowestAngle;
HighestAngle;
end;
8: RandomRClick;
end;
end;
{======================================================================}
{=========================Chopping the Willows=========================}
{======================================================================}
Procedure ChopTheWillow;
var ChopTime: Integer;
begin
if(not(LoggedIn))then Exit;
MarkTime(ChopTime);
Wait(50+random(42));
MakeCompass('E');
HighestAngle;
repeat
Wait(100+random(55));
if(FindColorSpiralTolerance(x, y, WillowColorA, MSX1, MSY1, MSX2, MSY2, 4)or
FindColorSpiralTolerance(x, y, WillowColorB, MSX1, MSY1, MSX2, MSY2, 4)or
FindColorSpiralTolerance(x, y, WillowColorC, MSX1, MSY1, MSX2, MSY2, 4))then
begin
wait(300+random(100));
writeln('Found one of the Willow colors! Checking to see if it is a willow.');
MMouse(x, y, 5, 5);
if(IsUpTextMulti('illow', 'llo', 'low'))then
begin
wait(500+random(100));
writeln('Found a Willow! Begin chopping');
Mouse(x, y, 1, 1, true);
wait(645+random(321));
if(FindChatText('do not'))then
begin
FindHead;
if(not(FindHead))then
begin
Mouse(x, y, 1, 1, true);
if(FindChatText('do not'))then
begin
BrokenAxe:= True
Exit;
end;
end;
end;
if(IsUpTextMulti('illow', 'llo', 'low'))then
begin
if(FindColorSpiralTolerance(x, y, 516576, 6, 6,117 , 27, 4)or
FindColorSpiralTolerance(x, y, 118992, 6, 6, 117, 27, 4))then
begin
writeln('Possibly found an ent.');
MakeCompass('E');
MMouse(652, 83, 1, 1);
Mouse(652, 83, 1, 1, true);
writeln('Found an Ent, possibly advoiding it. Waiting for the ent to go away.');
wait(20123+random(1234));
RunBack;
Ents:= Ents + 1;
Mouse(x, y, 1, 1, true);
if(InChat('do not'))then
begin
BrokenAxe:= True;
exit;
end;
end;
end;
AntiRandoms;
case random(2)of
0: SleepAndMovemouse(9876+random(1234));
1: wait(8765+random(321));
end;
AntiRandoms;
Antiban;
end;
end;
until(Invfull) or (TimeFromMark(ChopTime) > (TimePerLoad * 60000 ));
end;
{======================================================================}
{=========================Walking to the Bank==========================}
{======================================================================}
Procedure WalkToBank;
var x, y, BankSymbol, bankSymbolColor: integer;
begin
if(not(LoggedIn))then exit;
MakeCompass('N');
if(FindSymbol(x,y,'Bank'))then
begin
Writeln('Walking to Bank via BankSymbol.');
SetRun(True);
Mouse(x, y, 5, 5, True);
Flag;
exit;
end;
if(not(FindSymbol(x,y,'Bank')))then
begin
Writeln('Could not find the entire bank symbol. Looking for Bank Symbol color.');
BankSymbol := BitmapFromString(15, 15, 'z78DAC5D44B0A80300C' +
'04D02BF5A7D1A5B1BDFF955C64331012D2BAA88B410A79C2D098D' +
'29EE7ADBDF4C6C4F5204C395FD3B439FA68675EFB8A6FEAA49B28' +
'5F4FE5C2CDF7B58C02BE63FA329A1159344C9CFD234BEAA9B86CF' +
'56CB511912DDF6A66568E776EC9FEAD8BCBB3B72EDE737CA351B0' +
'4CC9D94D97296B3B36FDCCD20753EF1DC8');
BankSymbolColor:= AutoColorThis(BankSymbol, 40, MMX1, MMY1, MMX2, MMY2);
MakeCompass('N');
RadialWalk( BankSymbolColor , 5, 60, 66, 2, 2);
Flag;
end;
end;
{=======================================================================}
{===========================Banking Inventory===========================}
{=======================================================================}
Procedure BankInventory;
var WillowDTM, Axe: integer;
begin
if(not(loggedIn))then exit;
Axe := DTMFromString('78DA633CC0C4C0B0849101195444F131FC07D' +
'220D1FF40C0B803A8660FAA1A882C8C04D2FB816A1611507318A8' +
'66310135A7816A9611507312A8660D0135FB08DB05009EB20FEB');
WillowDTM := DTMFromString('78DA633CCFC4C0308991010420240383BB830' +
'4C32F28FF3F1030EE07AA9985AA06C682F1190F02D54C20A0E610' +
'504D170135D7806ADA09A8B905543383809AB3403573F0AB01002' +
'9EF0F55');
MakeCompass('S');
wait(4345+random(423));
if(BrokenAxe)then
begin
if(Players[CurrentPlayer].Boolean2)then
begin
GameTab(5);
TakeOff(Axe);
end;
GameTab(4);
end;
OpenBankQuiet('db');
wait(321+random(111));
if(FindDTM(WillowDTM, x, y, 625, 324, 815, 587))then
begin
MMouse(x, y, 2, 2);
wait(300+random(123));
Mouse(x, y, 0, 0, false);
wait(100+random(99));
ChooseOption(x, y, 'All');
if(BrokenAxe)then
begin
DepositAll;
Withdraw(1, 1, 1);
end;
if(Not(Players[CurrentPlayer].Boolean2))then
begin
Deposit(2, 28, 2);
end;
wait(123+random(123));
end;
CloseBank;
Loads:= Loads + 1;
TotalLoads:= TotalLoads + 1;
wait(321+random(123));
end;
Procedure ProgressReport;
begin
Writeln('<------------------------------------------->' );
Writeln('|E-Z Chopper Version ' + VerNum + ' by Esteban' );
Writeln('|-------------------------------------------|' );
Writeln('|Worked for '+ ScriptTime2(2) );
Writeln('|-------------------------------------------|' );
Writeln('|Chopped '+ IntToStr(TotalLoads) + ' Loads' );
Writeln('|-------------------------------------------|' );
Writeln('|Possibly Avoided '+ IntToStr(Ents) + ' Ents' );
Writeln('|-------------------------------------------|' );
Writeln('|Make sure to post all progress reports.' );
Writeln('<------------------------------------------->' );
SRLRandomsReport;
end;
begin
Credits;
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
wait(1000+random(1000));
repeat
WalkToWillow;
Wait(1654+random(1230));
ChopTheWillow;
WalkToBank;
BankInventory;
ProgressReport;
if(not(LoggedIn))then
begin
writeln('User was logged out for some reason. Switching players');
Nextplayer(false);
Loads:= 0;
end;
If(LoadsToDo >= Loads)then
begin
writeln('Sucessfully completed player loads. Switching Players');
NextPlayer(True);
Loads:= 0;
end;
until (false);
end.