Simba Code:
Program B3astchopper;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i sps/sps.simba}
Const
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 120; //How Many Minutes To break After
BreakFor = 5; //How long to Break For
Version = '1.0';
TREES_TO_CUT = 'willow';
PLAYER_BANK_PIN = '9251';
Var
Logs_Chopped: Integer;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Function CheckAndClick(UpText, Option:string; X,Y:Integer; RClick:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUpText(UpText, 1500+random(500)) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:=WaitOption(Option, 2000);
If Result Then FFlag(0);
End Else;
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;
Procedure Antiban;
Begin
Case Random(5000) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(8000 + Random(380)); End;
2: Begin StatsGuise('AntiBan') RandomAngle(1); End;
3: Begin StatsGuise('AntiBan') GameTab(Tab_Stats) HoverSkill('random', False); GameTab(28) End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(4000 + Random(400)); GameTab(28) End;
5: Begin Wait(3000) End;
End;
End;
Procedure FailSafe(Reason:String);
Begin
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
Procedure WalkToTree;
Var
ToTrees:TPointArray;
Begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
Writeln('Attempting To Walk To Trees...')
SetupSRL;
SPS_Areas := ['10_9'];
ToTrees:= [Point(4209, 3686), Point(4190, 3735)];
SPS_WalkPath(ToTrees);
Writeln('Found the trees');
Wait(5354+random(254));
End;
Function ChopDown:Boolean;
Var
X, Y, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount +1;
If FindObjCustom(X, Y, ['Chop', 'down', 'willow'], [2107945, 922899, 723723, 1384477], 30) Then
Begin;
WriteLn('Aww yea! A tree woot@!');
StatsGuise('Aww Yea! A tree woot@!');
GetMousePos(x, y)
StatsGuise('Aww yea! A tree Woot@!');
Case Random(2) Of
0: Mouse (x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 400);
End;
End;
Repeat
MarkTime(TreeCounter);
Antiban;
Wait(100);
If InvCount=Plusone Then
Writeln('We got a log baby');
Until (InvCount=Plusone)
End;
End;
Procedure WalkToWillows;
Var
walkTree:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['10_9','11_9','11_8','9_8','9_9']);
walkTree := [Point(4186, 3668), Point(4184, 3645), Point(4151, 3721)];
SPS_WalkPath(walkTree);
end;
Procedure WalkToBank;
Var
walkBank:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['10_9','11_9','11_8','9_8','9_9']);
walkBank := [Point(4152, 3698), Point(4202, 3685)];
SPS_WalkPath(walkBank);
end;
Procedure bankLogs;
Var
Logs_Chopped: Integer;
EXP_GAINED: Integer;
begin
if(InvFull) then
begin
WriteLn('Inventory full, Banking');
OpenBankFast('db');
WriteLn('Depositing ' + TREES_TO_CUT + ' logs.');
if(PinScreen) then
WriteLn('Entering Bank PIN: ' + PLAYER_BANK_PIN + '.');
InPin(PLAYER_BANK_PIN);
if(BankScreen) then
DepositAll;
Logs_Chopped := Logs_Chopped + 28;
EXP_Gained := EXP_Gained + 1890;
WriteLn('Deposited ' + TREES_TO_CUT + ' logs.');
WriteLn('Closing Bank');
WriteLn('Logs Chopped: ' + IntToStr(Logs_Chopped));
WriteLn('Gained EXP: ' + IntToStr(EXP_Gained));
CloseBank;
WriteLn('Getting Walk Path');
Wait(2000 + Random(1500));
WriteLn('Found Walk Path');
Wait(1000 + Random(300));
WriteLn('Walking to Willows');
end;
end;
Procedure checkFullInv;
begin
if(InvFull) then
begin
WriteLn('Inventory Full, finding bank path...');
WalkToBank;
Wait(1000 + Random(1500));
WriteLn('Found Bank, Walking to bank...');
bankLogs;
WalkToWillows;
end;
end;
Procedure treeChop;
var x, y: integer;
begin
if not LoggedIn then Exit;
if(InvFull) then exit;
repeat
if FindObj(x, y, 'hop', 3491141, 10) then
Mouse(x, y, 1, 1, false);
ChooseOption('hop');
repeat
wait(1200+random(450));
AntiBan;
CheckFullInv;
Until not(IsUpText('illow')or(InvFull))
until(InvFull);
end;
{------------------------------------------------------------------------------}
begin
ClearDebug;
SetUpSRL;
repeat
WalkToBank;
bankLogs;
WalkToWillows;
ChopDown;
until (Logs_Chopped >= 10000);
end.