SCAR Code:
program VarrokYewCutter;
{.include SRl/SRL/Misc/SMART.scar}
{.include SRl/SRl.scar}
{.include SRL/SRL/Skill/Woodcutting.scar}
{.include SRL/SRL/misc/Users.scar}
//////////////////////////////////////////////////////////////////////
// Varrok Yew Cutter By Nicbaz //
// \\
// This Script Has Theese Fetures //
// DTM's \\
// TPA's //
// Multi \\
// Map Walking //
// Multi PLayer \\
// Colour Useage //
// Cases \\
// Hello And Welcome To My first real \\
// Script this script is designed to cut and bank yew logs in //
// Seers bank Fill in the script in the below lines lines 60-67 \\
// //
////////////////////////////////////////////////////////////////////\\
// V 1.1 //
// Wrote Wcing Procedure \\
// Walking With symbles //
// \\
//////////////////////////////////////////////////////////////////////
//V 1.2 \\
// Started To learn DTM's //
// And Radial Map Walking \\
// //
/////////////////////////////////////////////////////////////////////
//V 1.3 \\
//TPA's In the wood Cutting Procedure //
// \\
/////////////////////////////////////////////////////////////////////
//V 1.4 \\
//Added in random talking //
//And DTM's For Banking \\
/////////////////////////////////////////////////////////////////////
//V 1.5 //
//Removed Random Talking \\
//Added In Multi Player //
// \\
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
//Future Updates \\
//Needed Failsafes //
//Needed SRL stats \\
// \\
/////////////////////////////////////////////////////////////////////
// Thanks to Torrent of Flame for his Tutorials and Help :D \\
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz Delcare Players //////////////////
/////////////////////////////////////////////////////////////////////
const
YourSRLId = '618';
YourSRLPassword ='dragon';
SmartWorld = 77;
procedure DeclarePlayers;
begin
Disguise('Cs 1.6');
SRLPlayerForm(True, ['Do Not Change', 'Do Not Change'], ['Loads'], ['Do Not Change', 'Do Not Change'], ['Do Not Change']);
end;
/////////////////////////////////////////////////////////////////////
////////////////////////Dont Edit Below Here ////////////////////////
/////////////////////////////////////////////////////////////////////
var x, y: integer;
Loads, Yew: integer;
BrokenAxe: integer;
NormalAxe: integer;
BrokenAxes: integer;
FallyBank, VarrokBank, EdgeBank: integer;
/////////////////////////////////////////////////////////////////////
////////////////////////nicbaz load DTM's ///////////////////////////
/////////////////////////////////////////////////////////////////////
procedure LoadDTMs;
begin
BrokenAxe := DTMFromString('78DA636C616260E0636440061D697C601A26C' +
'AD80354C38FAA06260B57D30754C34D404D2F508D080135CD4035' +
'5C04D4D400D5A8E05703008C0604B4');
NormalAxe := DTMFromString('78DA63E4626060E067400175F17C609A11CA6' +
'7640312720C688011550D0B909025A0860748B01050230E245809' +
'A81105127C04D480E439F1AB01004CBC01C4');
FallyBank := DTMFromString('78DA63CC656060886440017B764E673007D28' +
'C40FC1F081813818C58881C1354CD9F3F10162394CF984A849A4C' +
'201183AAE6DF3F615435B998E660A82922C2AE32C26A006AEF17D' +
'7');
VarrokBank := DTMFromString('78DA63F4636060906100034608C5D0D258CDF' +
'00BCAFF0F048C1E408622448E09AAE6ED5B543D8CDE40420955CD' +
'9F3F4CA86AFC31CDC150138CA9E6DF3F615435E144D8154D580D0' +
'02B0C157D');
EdgeBank := DTMFromString('78DA632C626060D06500032608C590979EC6F' +
'00B483302F17F20602C04322C1850C0D7AF109A11CA672C001206' +
'A8E6FCF9C384A94603B71A100B00D3460EA0');
end;
/////////////////////////////////////////////////////////////////////
////////////////////////nicbaz Walk To Bank /////////////////////////
/////////////////////////////////////////////////////////////////////
procedure WalkTobank;
begin
MakeCompass('S');
RoadColor := FindVarrockRoadColor;
if (findSymbol(x, y, 'tree')) then begin
mouse(x, y, 2, 2, true);
FFlag(2);
if not RadialWalk(RoadColor, 355, 25, 65, 4, 4) then
RadialWalk(RoadColor, 355, 27, 65, 4, 4);
Writeln('Walking To bank')
if not RadialWalk(RoadColor, 359, 27, 72, 4, 4) then
RadialWalk(RoadColor, 355, 33, 72, 4, 4);
Writeln('Walking To bank')
if not RadialWalk(RoadColor, 345, 15, 60, 4, 4) then
RadialWalk(RoadColor, 345, 13, 60, 4, 4);
Writeln('Walking To bank')
if (findSymbol(x, y, 'bank')) then begin
mouse(x, y, 2, 2, true);
FFlag(2);
if not (findSymbol(x, y, 'bank')) then
begin
MakeCompass('s');
wait(1000);
if DTMRotated(VarrokBank, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln ('found bank dtm');
wait(1000)
Mouse(x - 6, y - 6, 12, 2, true);
FFlag(0)
end;
end;
end;
end;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz AntiBan //////////////////////////
/////////////////////////////////////////////////////////////////////
procedure AntiBans;
begin
case Random(7) of
0: HoverSkill('woodcutting', false);
1: DoEmote(1 + Random(20));
2: AlmostLogout;
3: BoredHuman;
4: RandomMovement;
5: PickUpMouse;
6: RandomRClick;
end;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz randoms //////////////////////////
/////////////////////////////////////////////////////////////////////
procedure Randoms;
begin
FindTalk;
FindNormalRandoms;
FindLamp('Woodcutting');
FindEnt(x, y, true);
SolvePinball;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz CheckAxe /////////////////////////
/////////////////////////////////////////////////////////////////////
procedure CheckAxe;
begin
if FindAxe then
begin
Writeln('Axe Found')
end
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz Ent//// //////////////////////////
/////////////////////////////////////////////////////////////////////
procedure EntFinder; //By Yohojo - edited by bobbohobbo
var
EX, EY: integer;
FX, FY: integer;
SafeEntWait: LongInt;
begin
if (not (LoggedIn)) then
Exit;
begin
Status('Ent Checking')
if
(FindObjCustom(EX, EY, ['Yew'], [4690821], 7)) then
begin
MMouse(EX, EY, 0, 0)
if FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) then
begin
Status('Found Ent');
MarkTime(SafeEntWait)
repeat
FTWait(5)
FindNormalRandoms;
if not (LoggedIn) then
NextPlayer(False);
until TimeFromMark(SafeEntWait) > 20000 + Random(5000);
end;
end;
end;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////Naum/Torrent// //////////////////////////
/////////////////////////////////////////////////////////////////////
procedure WaitWhilstChopping; //Credits to numan and torrent for this
var
CuttingMark : Integer;
begin
MarkTime(CuttingMark);
repeat
AntiBans;
Randoms;
CheckAxe;
EntFinder;
AntiBans;
until (FindBlackChatMessage('cut some logs')) or (TimeFromMark(CuttingMark) > (200000));
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz ChooseColor///////////////////////
/////////////////////////////////////////////////////////////////////
function PickYewColour: Integer; // ty jesus for help
begin
case random(4) of
0: Result := 3297356;
1: Result := 3898223;
2: Result := 534303;
3: Result := 534046;
4: Result := 4218718;
end;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz banking //////////////////////////
/////////////////////////////////////////////////////////////////////
procedure Banking;
begin
Yew := DTMFromString('78DA6394616060E0674001A10E5C0C5C409A1' +
'188FF0301A3169021C4800618914820AD0A243808A8910312AC04' +
'D480EC6127A006E45E09026AE48184247E3500B4EB05E9');
begin
Wait(300 + random(160));
OpenBankQuiet('sb');
if (not (FindDTM(Yew, x, y, mix1, miy1, mix2, miy2))) then
begin
if (FindColorSpiralTolerance(x, y, 608352, mix1, miy1, mix2, miy2, 15)) then
begin
Mouse(x, y, 4, 3, false);
ChooseOption('All');
Loads := Loads + 1;
end;
end else
if (FindDTM(Yew, x, y, mix1, miy1, mix2, miy2)) then
begin
Mouse(x, y, 4, 3, false);
ChooseOption('All');
Loads := Loads + 1;
end;
CloseBank;
Wait(150 + random(278));
MakeCompass('S');
end;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz To Tress /////////////////////////
/////////////////////////////////////////////////////////////////////
procedure WalkTrees;
begin
MakeCompass('N');
RoadColor := FindVarrockRoadColor;
if not RadialWalk(RoadColor, 350, 10, 65, 4, 4) then
RadialWalk(RoadColor, 345, 5, 65, 4, 4);
FFlag(2);
if FindSymbol(x, y, 'water') then
begin
if not RadialWalk(RoadColor, 0, 25, 69, 4, 4) then
RadialWalk(RoadColor, 0, 35, 69, 4, 4);
Writeln('Walkig step 2')
FFlag(2);
if not RadialWalk(RoadColor, 0, 18, 75, 4, 4) then
RadialWalk(RoadColor, 350, 25, 70, 4, 4);
Writeln('Walking To Tree')
FFlag(2);
if (findSymbol(x, y, 'tree')) then begin
mouse(x, y, 2, 2, true);
FFlag(2);
if not (findSymbol(x, y, 'tree')) then
if FindSymbol(x, y, 'alter') then
if (findSymbol(x, y, 'tree')) then begin
mouse(x, y, 2, 2, true);
FFlag(2);
begin
end;
end;
end;
end;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz Is Axe Broken ////////////////////
/////////////////////////////////////////////////////////////////////
function IsAxeBroken: boolean;
begin
if FindDTM(BrokenAxe, x, y, 547, 206, 734, 464) then
Writeln('Axe is broken! Attempting to bank and get new one.');
BrokenAxes := BrokenAxes + 1;
WalkTobank;
begin
Writeln('Banking for new axe..');
Banking;
if (FindDTM(NormalAxe, x, y, 151, 210, 595, 281)) then
begin
ChooseOption('1')
CheckAxe;
CloseBank;
end;
end;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz ChooseClick //////////////////////
/////////////////////////////////////////////////////////////////////
function ChooseClick: Integer; // jesus for help TY
begin
case random(2) of
0: begin
Mouse(x, y, 3, 3, true);
end;
1: begin
Mouse(x, y, 4, 4, false);
ChooseOption('hop');
end;
end;
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz ChopYew //////////////////////////
/////////////////////////////////////////////////////////////////////
procedure ChopYew;
var Attempts: integer;
CuttingTime: integer;
begin
if (not (LoggedIn)) then NextPlayer(false);
MarkTime(CuttingTime);
SetAngle(true);
repeat
if (not (FindObjTPA(x, y, PickYewColour, 10, -1, 7, 7, 15, ['Yew']))) then
begin
Wait(2000 + random(250));
Attempts := Attempts + 1;
if (Attempts = 100) then
begin
Writeln('Could not find yews');
Attempts := 0;
NextPlayer(false);
Wait(1500 + random(1200));
end;
end else
begin
if FindObjTPA(x, y, PickYewColour, 10, -1, 7, 7, 15, ['Yew']) then
begin
ChooseClick;
WaitWhilstChopping;
end;
begin
Randoms;
Antibans;
EntFinder;
FindEnt(x, y, True);
end;
end;
until (TimeFromMark(CuttingTime) > 800000 + random(60000)) or (InvFull)
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz Nicbaz ///////////////////////////
/////////////////////////////////////////////////////////////////////
procedure text;
begin
ClearDebug;
Writeln(' _______ .__ ___. ')
wait(250 + random(30));
Writeln(' \ \ |__| ____\_ |__ _____ ________')
wait(250 + random(30));
Writeln(' / | \| |/ ___\| __ \\__ \ \___ /')
wait(250 + random(30));
Writeln('/ | \ \ \___| \_\ \/ __ \_/ / ')
wait(250 + random(30));
Writeln('\____|__ /__|\___ >___ (____ /_____ \')
wait(250 + random(30));
Writeln(' \/ \/ \/ \/ \/')
wait(2000)
Writeln(' _____.___. __________ ')
wait(250 + random(30));
Writeln(' \__ | | ______ _ __ \______ \______ _ __ ___________')
wait(250 + random(30));
Writeln(' / | |/ __ \ \/ \/ / | ___/ _ \ \/ \/ // __ \_ __ \')
wait(250 + random(30));
Writeln(' \____ \ ___/\ / | | ( <_> ) /\ ___/| | \/')
wait(250 + random(30));
Writeln(' / ______|\___ >\/\_/ |____| \____/ \/\_/ \___ >__| ')
wait(250 + random(30));
Writeln(' \/ \/ \/ ')
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////nicbaz Anti Leech////////////////////////
/////////////////////////////////////////////////////////////////////
procedure DieLeech;
begin
if (SRLID = '') or (SRLPassword = '')then
begin
Wait(1000+Random(400));
ClearDebug;
Writeln('YOU ARE A LEACHER');
wait (1000)
Writeln('So Go Get Your Self a SRL ID and PAss');
wait(1000)
Writeln('If you dont do that you the script will not run');
Wait(1000)
Writeln('www.srl-forums.com');
wait(1000)
Writeln('Go kill your SELF!!!!!');
Wait(1000)
Writeln('NICBAZZZZ');
TerminateScript;
end;
end;
/////////////////////////////////////////////////////////////////////////
///////////////////////////nicbaz Proggy/////////////////////////////////
/////////////////////////////////////////////////////////////////////////
procedure Proggy;
begin
ClearDebug;
Writeln(',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,');
Writeln('/\Please Post Progress Reports & Any problems /\ ');
Writeln('//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ ');
Writeln('//\\Worked For: ' + TimeRunning + ' //\\');
Writeln('//\\Did: ' + IntToStr(Loads) + ' Loads //\\');
Writeln('//\\Broke: ' + IntToStr(BrokenAxes) + ' Axes //\\');
Writeln('//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ ');
Writeln('//\\ Thanks for Using my Script :D //\\ ');
Writeln('```````````````````````````````````````````````');
end;
/////////////////////////////////////////////////////////////////////
////////////////////////////Mainloop/////////////////////////////////
/////////////////////////////////////////////////////////////////////
procedure Setup;
begin
SetupSRL;
SRLId := YourSRLId;
SRLPassword:= YourSRLPassword;
DieLeech;
text;
SmartSetupEx(SMARTWorld, false, true);
SetTargetDC(SmartGetDC);
while not SmartReady do Wait(2000);
DeclarePlayers;
LoginPLayer;
end;
begin
Setup;
LoadDTMs;
CheckAxe;
Wait(900 + Random(333));
repeat
WalkTrees;
ChopYew;
WalkTobank;
Banking;
if (Loads = Players[CurrentPlayer].Integers[0]) then
begin
NextPlayer(True);
Loads := 0;
MakeCompass('S')
Writeln('Players Switched successfully')
end;
Proggy;
until (False);
end.
/////////////////////////////////////////////////////////////////////////
//Thank you for useing my script! //
//Credits to //
//Torrent Of Flame For Lots of Help! //
//Jesus For lots of help! //
//And Da Owner for lots of help! //
/////////////////////////////////////////////////////////////////////////