Simba Code:
program GuccisMapleChopper;
{$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;
Banking = 'yes'; // Banks at Seers Village, if you would like power chopping make no
Skiller = 'no'; // Hatchet in inventory.
var
StartXP, TotalEXP, LogsChopped, MapleLog, x, y: integer;
ToBank: TPointArray;
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;
procedure XP;
begin
StartXp := GetXpBar(1)
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;
procedure Chopped;
begin
if (BankScreen) then
IncEx(LogsChopped, 28);
end;
Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
Procedure OnSmart; // Thanks to TehQ
var
WOODY, W_EXP: integer;
begin
W_EXP := (LogsChopped*100)
WOODY := round((W_EXP) / (GetTimeRunning / 3600000.0));
PrintOnSmart(['Version: 2 by Mega','',''+'Woodcutting XP Gained: ' +IntToStr(W_EXP),
''+'Woodcutting XP/Hour: ' +IntToStr(WOODY),''+MsToTime(GetTimeRunning, Time_Abbrev)],Point(32,10), 16777215);
end;
procedure Report;
begin
if (BankScreen) then
begin
TotalEXP := (LogsChopped*100);
Writeln('############ MegaMapleChopper ##########');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Xp gained : ' + IntToStr(TotalEXP));
Writeln('|= Logs Chopped: ' + IntToStr(LogsChopped));
Writeln('########################################');
end;
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
exit;
FindNormalRandoms;
case Random(160) of
0:
begin
WriteLn('AntiBan Is Being Performed');
GameTab(Tab_Stats);
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 DTM;
begin
MapleLog := DTMFromString('mbQAAAHicY2VgYNjDzMCwC4hPAvFWIF4NxNMYGRi6gXgGEC8E4qlA7GfEBVTNhIYxASMWDAYAb/cHPw==');
end;
procedure FrDTM;
begin
FreeDTM(MapleLog);
end;
procedure FailSafe (Reason:String);
begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
TerminateScript;
end;
function FindMaple(Var X,Y: Integer): Boolean;
var
CTS: Integer;
TPA: TPointArray;
begin
Result := False;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.20, 0.39);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2375787, MSX1, MSY1, MSX2, MSY2, 7);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
MMouse(TPA[0].X, TPA[0].Y, 5, 5);
if WaitUpText('hop', 250) then
begin
GetMousePos(X, Y);
Mouse(x, y, 0, 0, False);
ChooseOption('Chop');
Result := True;
Exit;
end;
end;
procedure WalkToBank;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['6_6','6_7','7_7','7_6']);
ToBank := [Point(2751, 2646), Point(2767, 2665), Point(2767, 2682),
Point(2756, 2706), Point(2740, 2706), Point(2740, 2686), Point(2720, 2520),
Point(2543, 2528), Point(2540, 2828), Point(2921, 2856), Point(2925, 2525)];
end;
procedure Bankin;
begin
if InvFull then
SPS_WalkPath(ToBank);
begin
case Skiller of
'no':
begin
if SPS_WalkPath(ToBank) then
Wait(100 + Random(50));
OpenBankFast('clt');
Repeat
Wait(50);
Until(Bankscreen);
if (BankScreen) then
DepositAll;
end;
end;
case Skiller of
'yes':
begin
if SPS_WalkPath(ToBank) then
Wait(100 + Random(50));
OpenBank('clt',True,True);
Repeat
Wait(50);
Until(Bankscreen);
if (BankScreen) then
FindDTMRotated(MapleLog, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('all');
end;
end;
end;
end;
procedure MapleChopp;
begin
SetAngle(SRL_ANGLE_HIGH);
case Banking of
'no':
begin
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
wait(200+random(400));
if FindMaple(x, y) then
begin
Writeln('Tree 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 Tree');
repeat
wait(50+random(100));
Until(InvFull);
DropAll;
end;
end;
begin
Case Banking of
'yes':
begin
if (InvFull) then
SPS_WalkPath(ToBank);
Bankin;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
wait(200+random(400));
if FindMaple(x, y) then
begin
Writeln('Tree 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 Tree');
repeat
wait(50+random(100));
Until(InvFull);
end;
end;
end;
end;
procedure FailSafe2 (Reason:String);
var
Z:TPoint;
begin
Z:= SPS_GetMyPos;
if (Not Cutting) then
Begin
BoredHuman;
SPS_WalkToPos(Point(2744, 2647));
end;
end;
begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
ActivateClient;
Smart_Server := 99;
SetupSRL;
DTM;
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
wait(1000+random(400));
Repeat
MapleChopp;
Bankin;
OnSmart;
Report;
Until(False)
FrDTM;
end.