Code:
program SeersMageCutter;
{$i SRL-6/srl.simba}
//{$i Runique/RuniqueInclude.simba}
//{$i Runique/eZForm.simba}
var
Store1, Store2:integer;
Procedure LoadBMPs;
begin
Store1:= BitmapFromString(126, 11, 'meJzVlc0NwjAMhTNI7j10CUbkw' +
'i5MwFpQUckyfvbLD0kElQ/JqxvHXxw3b3ve9tv9cVp+T9eYG1Qr7p' +
'Yu1+dhXJlhM6KcCaaUilnPDqp1MzYEtIjKPPIDo0h255oycLOeFBR' +
'PvEheyk+mf0c+B+W9hjynzckb69tqfQ+ZdL5Rv3VbQbfovhVrIn+I' +
'OMCjiY5M63L1iA+Sb41i6oTA1w3BcHD/CNg90DNavI+8QNOKjEU3X' +
'7k6+ujjwLh9UdLnE8HHrIt8it3DXapmZVJ7vBqRVeUY7cvVyG0qZl' +
'3PB9vIMvJYdT9C3txQXedRx+gmH92sNeSHsBpLHteJipP/N8kZYdk' +
'vI2/udVMXyrQnEE/NjURx/aPiRN2tZP4teetOozEJRzaJumFYk2CT' +
'J4mi/V/mFF3J');
Store2:= BitmapFromString(156, 10, 'meJztVssNwzAIzSC+55AlOmIv3' +
'aUTdK22qiWE4PFJTJ1LJA7kxQH8nsFp69bW7fF8dWu/xzkGk3IEln' +
'S7v7/mI2fZnEoyWTp1y7KEfBYaTMpx4YsdcVAj52r670rCLMRbX0M' +
'O5LNcUJ7r0rQwC2zJOZr6Ol6ajmSx7jU4GA+D8C3ZXk3pWuF77L64' +
'cSBYiItXmu18VRzMZOHL9CfWvaanMbx59SzVK63gI5pyh++aiuGPm' +
'oFxHJYEC+Zk+lnEoXWyWD6UVfMZMh/OUhgqE3mvprwYffh9Ng77oa' +
'ZO04XRQtzX1OIzz7weqvM1hW0yrp0zByxWw+YtP13Um9b8PKypmDZ' +
'Vmmp6LYY1pVX9yDc1qOmgb/W71VD+n4+jvm7VWk3FRiyGrTOQ6Tsn' +
'OJkf3yogU1Veu26i3z/cpztG');
end;
Procedure FreeBMPs;
begin
FreeBitmap(Store1);
FreeBitmap(Store2);
end;
Procedure StoreLogs;
var
X, Y, a, b:Integer;
begin
if findColorTolerance(X, Y, 9806377, 550, 255, 725, 500, 10) then
begin
mouse(x, y,1,1);
wait(250);
ClickMouse(X, Y, mouse_Right);
wait(250);
if findBitmapToleranceIn(Store1, a, b, 520, 215, 760, 542, 145) then
begin
mouse(a, b,1,1);
wait(250);
ClickMouse(a, b, mouse_Left);
wait(1250);
end;
end;
end;
Procedure StoreCandy;
var
X, Y, a, b:Integer;
begin
if findColorTolerance(X, Y, 9840246, 550, 255, 725, 500, 10) then
begin
mouse(x, y,1,1);
wait(250);
ClickMouse(X, Y, mouse_Right);
wait(250);
if findBitmapToleranceIn(Store2, a, b, 520, 215, 760, 542, 145) then
begin
mouse(a, b,1,1);
wait(250);
ClickMouse(a, b, mouse_Left);
wait(1250);
end;
end;
end;
function IsCutting: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(230, 130, 270, 255);
if (getPixelShiftAverage(PBox, 250, 500) > 700) then
result := true
end;
function IsntCutting: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(260, 180, 280, 235);
if (getPixelShiftAverage(PBox, 250, 500) < 395) then
result := true;
end;
function IsWalking: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(260, 180, 280, 235);
if (getPixelShiftAverage(PBox, 250, 500) > 400) then
result := true;
end;
function InvIsFull: Boolean;
var
x, y, a, b : Integer;
begin
if FindColorTolerance(x, y, 65536, 690, 480, 720, 490, 4) then
result := true;
end;
function InvIsntFull: Boolean;
begin
if not InvIsFull then
result := true;
end;
function CutTree: Boolean;
var
x, y: Integer;
begin
if findColorTolerance(x, y, 4221298, 8, 50, 485, 350, 10) then
begin
mouse(x, y, 1, 1);
Wait(250);
ClickMouse(x, y, mouse_Left);
Repeat
Wait(500);
Until((IsntCutting));
Wait(500);
end;
end;
procedure ClickMiniMapTrees;
var
x, y: Integer;
begin
if FindColorTolerance(x, y, 49525, 570, 65, 680, 185, 3) then
begin
mouse(x, y, 0);
repeat
Wait(100);
until(Not (IsWalking));
end;
end;
function BankIsOpen:boolean;
var
x, y:integer;
begin
if findColorTolerance(x, y, 2070783, 179, 62, 312, 80, 10) then
result := true
end;
function BankIsClosed:boolean;
begin
if not BankIsOpen then
result:= true;
end;
Procedure Closebank;
var
i:integer;
closetbox:tbox;
begin
closetbox:= intTobox(484, 66,495, 77);
if BankIsOpen then
begin
mouse(closetbox.getmiddle,MOUSE_LEFT,MOUSE_HUMAN);
end;
end;
function OpenBank:boolean;
begin
SendKeys('::bank',2,1);
wait(250);
PressKey(13);
begin
if BankIsOpen then
StoreLogs;
wait(500);
StoreCandy;
begin
if InvIsntFull then
Closebank;
end;
end;
end;
Procedure CutMages;
var
x, y: Integer;
begin
if IsntCutting then
begin
If Not InvIsFull then
CutTree;
Wait(750);
begin
if InvisFull then
OpenBank;
begin
if not InvIsFull then
CutMages;
end;
end;
end;
end;
begin
MouseSpeed := 20;
LoadBMPs;
AddOnTerminate('FreeBMPs');
//ClearDebug;
repeat;
CutMages;
until false;
end.