SCAR Code:
{//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//
| Draynor Willow Crusher & Banker |
| By Torrent of Flame |
| Scar 3.14 SRL 4.0 Rev 14 |
| Version 1.6 |
| Chops Willows at Draynor and Banks them |
| Start from Draynor Bank |
| Start Logged Out |
| Replacement axes in first 2 bank slots |
| |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
| How Many Loads at line 25 |
| Setup Player at lines 39-42 |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\
|Version 1.1 Includes |
| Anti-Ban |
| Anti-Random |
| Working Walking (Lol :D) |
| Complete Revision of Script - Sorted Unnecissary codes and BMP's |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.2 Includes |
| Essential Repairs for Banking - Willow DTM was invalid, WillowBMP added |
| Banking Works! |
| Main Loop Fixed - Repeats after banking |
| |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.3 Includes |
| Fixed Banking |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.4 Includes |
| SRL Stats |
| Multi-Player |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.5 Includes |
| BankPin Compatibility |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.6 Includes |
| A Few Failsafes! |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|Version 1.7 Includes |
| Modified Anti-Ban |
| DTM's |
| SMART (Finally!) |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ |
|Version 1.8 Includes |
| Willow DDTM |
| Axe Checker |
| Broken Axe Checker |
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\}
Program WillowCrusher;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}
const
//-->Loads<--\\
Loads = 1; //How many loads per player before switching
//--->SRL ID<---\\
YourSRLId = '';
YourSRLPassword ='';
//--->Pin - Make same for ALL chars. If no Pin, leave blank<---\\
YourPin = '1993';
//SMART World\\
SMARTWorld = 152;
{-------------------------------------------------------
Player Setup
--------------------------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers := 2; //How many Players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer :=0; //Starting Player
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := False;
{ Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := True;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := True;
Players[4].Name := '';
Players[4].Pass := '';
Players[4].Nick := '';
Players[4].Active := True;
Players[5].Name := '';
Players[5].Pass := '';
Players[5].Nick := '';
Players[5].Active := True; }
end;
{----------------------------Do Not Edit Below This----------------------------}
var x, y: integer;
LoadsNum: integer;
LoadsNum2: integer;
MMTree: integer;
BrokenAxe: integer;
BrokenAxes: integer;
NormalAxe: integer;
Banker: integer;
//Load DTM's\\
procedure LoadDTMs;
begin
MMTree := DTMFromString('78DA6364636060E0604001497EA20CFF81342' +
'310FF07024626208305558D7E9210986684F21939895003B28B19' +
'558D7D8104A61A26026A5830D560D8C50A24D850D5B8997162DAC' +
'58EE9771435EC84DD0C00E5D90BB5');
BrokenAxe := DTMFromString('78DA636C616260E0636440061D697C601A26C' +
'AD80354C38FAA06260B57D30754C34D404D2F508D080135CD4035' +
'5C04D4D400D5A8E05703008C0604B4');
NormalAxe := DTMFromString('78DA63E4626060E067400175F17C609A11CA6' +
'7640312720C688011550D0B909025A0860748B01050230E245809' +
'A81105127C04D480E439F1AB01004CBC01C4');
Banker := DTMFromString('78DA6364636060E0604001B3CAC2C0342394C' +
'FC80C24B850D538DAD8A0AAE10412CCA86A4A737350D57061DA55' +
'575A82AA861B48B0A2AA3936231F530D0FAA9ACAC20254356C986' +
'A7CDCDD51D5300109365435FE5E9E7035202900DBBD0A48');
end;
//Signature\\
procedure Signature;
begin
ClearDebug;
wait(250 + random(30));
writeln(' Torrents Willow Crusher&Banker V1.7 ');
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(250 + random(30));
writeln(' (_)`\___/ (_) (_) `\____)(_) (_) \__)');
wait(500 + random(30));
end;
//Torrent Proggy\\
procedure ToFProggy;
begin
ClearDebug;
Writeln(',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,');
Writeln('/\Please Post Progress Reports & Any problems /\ ');
Writeln('/\ From Wherever you got the script /\ ');
Writeln('//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ ');
Writeln('//\\Worked For: ' + TimeRunning + ' //\\');
Writeln('//\\Did: ' + IntToStr(LoadsNum)+ ' Loads //\\');
Writeln('//\\Broke: ' + IntToStr(BrokenAxes)+ ' Axes //\\');
Writeln('//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ ');
Writeln('//\\ Thanks for Using my Script :D //\\ ');
Writeln('```````````````````````````````````````````````');
end;
//--------------------------------Anti-Ban!!------------------------------------\\
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10: TypeSend('Bored, notice how bored I am..');
11: RandomRClick; //^^saying that so much will get BANNED, just saying
12: HoverSkill('Woodcutting', False);
13: RandomMovement;
14: BoredHuman;
15: PickUpMouse;
16: AlmostLogout;
17: DoEmote(400 +Random(90));
18: begin
GameTab(1 +Random(12));
wait(2000 +Random(1000));
GameTab(4);
end;
end;
end;
//------------------------------Anti-Randoms!!------------------------------\\
procedure FindRandoms;
begin
FindTalk;
FindNormalRandoms;
FindLamp('Woodcutting');
SolvePinball;
FindEnt(x, y, true);
end;
//EntFinder\\
procedure EntFinder; //By Yohojo - Modded 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, ['Willow'], [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;
//---------------------------------IsAxeBroken?--------------------------------\\
Procedure IsAxeBroke;
begin
if FindDTM(BrokenAxe, x, y, 547, 206, 734, 464) then
begin //took out extra findDTM
Mouse(x,y,5,5,false); //added so it'll actually drop it
ChooseOption('rop');
BrokenAxes := BrokenAxes +1;
end;
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 2, 2, true);
Flag;
Writeln('Banking for new axe..');
OpenBankQuiet('db');
if (FindDTM(NormalAxe, x, y, 151, 210, 595, 281)) then
begin
ChooseOption('1')
CloseBank;
end;
end;
end;
//---------------------------------ChopTree-----------------------------------\\
procedure ChopTree;
var CuttingTime: integer;
Tries: integer;
begin
MarkTime(CuttingTime);
MakeCompass('S');
EntFinder;
FindEnt(x, y, True);
repeat
if FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7) then
begin
Mouse(x,y,0,0,false); //took out unneeded isuptext, uptext disappears after
Wait(5000 + (random(150)));//you right click
ChooseOption('hop')
AntiBan;
tries := 0; // added this, so it won't accumulate over time
if (FindDTM(BrokenAxe, x, y, 547, 206, 734, 464)) then
begin
IsAxeBroke;
end;
if (not (FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7))) then
Wait(100+random(100));
Tries := Tries + 1;
if(Tries = 50)then
begin
Writeln ('Willow Logs not found. Switching Players..');
Logout;
NextPlayer(True); //found the problem!
end; //without the begin/end, it did the logout/login if it doesn't
end; // find the willows even once
until(InvFull) or (TimeFromMark(CuttingTime) > 800000+random(60000));
end;
//----------------------Walking from Willows to Bank--------------------------\\
procedure WalkToBank;
begin
if (not(LoggedIn)) then
Exit;
SymbolAccuracy:= 0.2;
Makecompass('N');
if (not(FindSymbol(x, y, 'bank'))) then
begin
if (FindDTM(MMTree, x, y, 743, 241, 752, 251)) then
begin
Mouse(x, y, 2, 2, true);
MakeCompass('N');
SetAngle(True);
if (FindDTM(Banker, x, y, 521, 418, 600, 462)) then
begin
Mouse(x, y, 2, 2, true);
Flag;
Writeln('Got to bank');
end;
end;
end else //took out unneeded if then statement
begin
Mouse(x, y, 2, 2, true);
Flag;
Writeln('Got to bank');
end;
end;
//--------------------------------->Willow DDTM!<-----------------------------\\
function LoadWillows: integer;
var
WillowMP: TDTMPointDef;
WillowSP: array of TDTMPointDef;
WillowDDTM: TDTM;
begin
SetArrayLength(WillowSP, 2);
WillowMP.x := 743;
WillowMP.y := 434;
WillowMP.color := 1852749;
WillowMP.tolerance := 9;
WillowSP[0].x := 733;
WillowSP[0].y := 430;
WillowSP[0].color := 4352627;
WillowSP[0].Tolerance := 5;
WillowSP[1].x := 751;
WillowSP[1].y := 441;
WillowSP[1].color := 1720648;
WillowSP[1].Tolerance := 5;
WillowDDTM.MainPoint := WillowMP;
WillowDDTM.SubPoints := WillowSP;
result := AddDTM(WillowDDTM);
end;
//-----------------------------Banking the Willows----------------------------\\
function Banking: Boolean;
begin
if (InvFull) then
begin
MakeCompass('N')
Wait (300 + random(160));
OpenBankQuiet('db');
if (PinScreen) then
InPin(YourPin);
if(not(FindDTM(LoadWillows, x, y, 547, 206, 734, 464)))then
begin
if(FindColorSpiral(x, y, 1985878, 547, 206, 734, 464)) then
begin
Mouse(x, y, 4, 3, false);
ChooseOption('All');
Result := True;
if Result = True then
begin
LoadsNum := LoadsNum + 1;
LoadsNum2 := LoadsNum2 + 1;
ReportVars[1] := ReportVars[1] + 1;
SendSRLReport;
end;
end;
end else
if(FindDTM(LoadWillows, x, y, 547, 206, 734, 464))then
begin
Mouse(x, y, 4, 3, false);
ChooseOption('All');
Result := True;
if Result = True then
begin
LoadsNum := LoadsNum + 1;
LoadsNum2 := LoadsNum2 + 1;
ReportVars[1] := ReportVars[1] + 1;
SendSRLReport;
end;
end;
CloseBank;
Wait(150 + random (278));
MakeCompass('S');
end;
end;
//-----------------------Walking from Bank to Willows-------------------------\\
procedure WalkToWillow;
var WaterColor : integer;
begin
CheckAxe;
IsAxeBroke;
if (not (FindSymbol(x, y, 'fish'))) then
begin
MakeCompass('W');
WaterColor := FindWaterColor;
RadialWalk(WaterColor, 225, 351, 64, 2, 2);
Flag;
Writeln('At Willows Now');
end else
if (FindSymbol(x, y, 'fish')) then
begin
Mouse(x, y, 2, 2, true);
Flag;
Writeln('Got to Willows');
end;
end;
//--------------------------->>>Main Loop<<<----------------------------------\\
procedure SetupScript;
begin
SmartSetupEx(SMARTWorld, false, true);
SetTargetDC(SmartGetDC);
while not SmartReady do Wait(2000);
SRLId := YourSRLId;
SRLPassword:= YourSRLPassword;
SetupSRL;
ScriptID:= '687';
Signature;
DeclarePlayers;
LoadDTMs;
end;
begin
SetupScript;
CheckAxe;
repeat
WalkToWillow;
ChopTree; //choptree has it's own repeat already, took out unneeded
AntiBan;
WalkToBank;
Banking;
if (LoadsNum2=Loads) then
begin
NextPlayer(True);
LoadsNum2 := 0;
MakeCompass('S')
Writeln('Players Switched successfully')
end;
TofProggy;
SRLRandomsReport;
until (false)
end.
{
Thanks to anyone who helped me fix errors:
- Rasta Magician (Cleaned up my script at 3rd of 4th version)
- BobboHobbo (For the Ent Finder)
- Pshycor (For helping me FINALLY getting SMART to work)
- Anyone who helped me in Script Errors Forum
And Finally, Thanks SRL for all the awsome tutorials! :]