Simba Code:
program MegaIvyChopper;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True;
NumbOfPlayers = 1;
StartPlayer = 0;
var
IvyChopped, Ivy, TotalEXP, x, y: integer;
aFound: Extended;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP'];
With Players[0] do
begin
Name := ''; //Username.
Pass := ''; //Password.
Active := True;
end;
end;
function CheckAndClick (UpText, Option:String; x, y:Integer; RClick:Boolean):Boolean;
begin
MMouse(x, y, 6, 6);
If WaitUpText(UpText, 1000+Random(200)) 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(150+Random(100));
FFlag(0);
end;
end;
end;
Function Cutting: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(250, 132, 279, 193);
Result := (AveragePixelShift(PBox, 500, 800) > 425);
end;
function BirdNest: Boolean;
var
i, x, y: integer;
begin
if (Pos('A bird', GetChatBoxText(i, 255))<>0) then // Credit to Shuttleu for this line
begin
WriteLn('Found a Bird Nest');
if FindObjCustom(x, y, ['ake Bird Nest', 'bird', 'nest'], [2767422, 2961972, 3818051], 10) then
Mouse(x, y, 5, 5, True);
end;
end;
procedure SetDTM;
begin
Ivy := DTMFromString('mrAAAAHic42BgYDgKxMeBeDcQnwTia0B8FYgPAPFGIK4B4nwo3QbE1UCcAMTzgbgDiMtmhjGEF9gzBGXZMHjFmzHEVbkwxFY4M2Ql2jAk1LgxEAKMBDAMAACfGxLL');
end;
procedure Report;
var
IvyChopped: integer;
TotalEXP: integer;
begin
TotalEXP := (IvyChopped*333);
Writeln('############ MegaIvyChopper ##########');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Xp gained : ' + IntToStr(TotalEXP));
Writeln('######################################');
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
exit;
FindNormalRandoms;
case Random(2) of
0:
begin
WriteLn('AntiBan Is Being Performed');
HoverSkill('Woodcutting', false);
wait(2500+Random(1000));
Mouse(659, 189, 0, 0, True);
end;
1:
begin
WriteLn('Bored')
If (Cutting) then
BoredHuman;
end;
end;
end;
procedure CrashSMART;
begin
Writeln('You are using CRASHSMART, so we are going to reload your client after the RS update!');
SmartgetFieldObject(1488,'crash');
Wait(5000);
WriteLn('CRASHSMART Failed: Make sure you are using the custom libsmart plugin');
TerminateScript;
end;
procedure FreDTM;
begin
FreeDTM(Ivy);
end;
procedure IvyChopping;
begin
SetDTM;
MakeCompass('N');
SetAngle(SRL_ANGLE_LOW);
wait(200+random(400));
if (FindDTMRotated(Ivy, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)) then
begin
Writeln('Ivy Has Been Found :)');
Wait(10+random(20));
Mouse(x,y,4,4,true)
Wait(10+random(45));
if (Cutting) then
Antiban;
end else Writeln('Cannot find Ivy');
repeat
wait(50+random(100));
Until(Not Cutting);
end;
procedure FailSafe (Reason:String);
begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
TerminateScript;
end;
begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
ActivateClient;
Smart_Server := 30;
SetupSRL;
SetDTM;
SRL_Procs[srl_OnRSUpdate] := @CrashSMART;
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
wait(1000+random(400));
Repeat
IvyChopping;
BirdNest;
AntiBan;
Report;
FreDTM;
Until(false);
end.