Hello everyone, I have been using this script lately and I fixed it up a bit by adding failsafes and bonfire burning, since that's much faster than dropping. I'm posting it below for anyone to use. OP can add it to the first post if they wish to.
program AIOPowerChopper;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
type
MSObject = record
Color, Tol, Width, Height: Integer;
Hue, Sat: Extended;
LogDTM: String;
TreeUpText, LogUpText, LogOption: TStringArray;
end;
var
Objects: Array Of MSObject;
x, y, fs, StartXP, XPGained, AntiBans: Integer;
{|¯¯ _ _ _ _ _ ¯¯|}
{| |S| |E| |T| |U| |P| |}
{|__ ¯ ¯ ¯ ¯ ¯ __|}
const
NAME = 'AIO PowerChopper'; //Script Name
VERSION = '0.9'; //Script Version
AUTHOR = 'Wreck'; //Script Author
WHICHTREE = 'oak'; //Oak, Willow, Maple, Ivy, Teak, Arctic Pine
RUNATENERGY = 15; //Turn run on at this percentage energy
ANIMPIXELS = 300; //PixelShift Animation threshold
COMPASSSTART = 'N'; //'N','E','S','W' Compass starting direction
SRLStats_User = ''; //SRLStats Username
SRLStats_Password = ''; //SRLStats Password
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Username
Players[0].Pass := ''; //Password
Players[0].Nick := '';
Players[0].BoxRewards := ['XP', 'Lamp', 'Book', 'mote', 'ostume', 'ssence'];
Players[0].LampSkill := SKILL_WOODCUTTING;
Players[0].Active := True;
end;
{|¯¯ _ _ _ _ _ _ _ ¯¯|}
{| |A| |N| |T| |I| |B| |A| |N| |}
{|__ ¯ ¯ ¯ ¯ ¯ ¯ ¯ __|}
procedure FindRandoms;
begin
If FindNormalRandoms Then
If Not LoggedIn Then
begin
writeln('We might be stuck in a random.');
writeln('Ending Script.');
TerminateScript;
end;
end;
procedure RandomCompass;
begin
case Random(4) of
0: MakeCompass('N');
1: MakeCompass(RandomRange(-25, -55));
2: MakeCompass('E');
3: MakeCompass(RandomRange(-115, -155));
4: MakeCompass('S');
5: MakeCompass(RandomRange(-205, -245));
6: MakeCompass('W');
7: MakeCompass(RandomRange(-295, -335));
end;
end;
procedure AntiBan;
begin
case random(400) of
1: Begin HoverSkill('woodcutting', False); AntiBans := AntiBans + 1; End;
2: Begin HoverSkill('random', False); AntiBans := AntiBans + 1; End;
3: Begin Boredhuman; AntiBans := AntiBans + 1; End;
4: Begin PickUpMouse; AntiBans := AntiBans + 1; End;
5: Begin RandomMovement; AntiBans := AntiBans + 1; End;
6: Begin RandomRClick; AntiBans := AntiBans + 1; End;
7: Begin Wait(2500 + random(4500)); AntiBans := AntiBans + 1; End;
8: Begin
if not (WHICHTREE = 'ivy') then
RandomCompass;
AntiBans := AntiBans + 1;
End;
end;
end;
{|¯¯ _ _ _ _ _ _ ¯¯|}
{| |S| |C| |R| |I| |P| |T| |}
{|__ ¯ ¯ ¯ ¯ ¯ ¯ __|}
procedure SetUpObjects;
begin
setLength(Objects, 1);
case (LowerCase(WHICHTREE)) of
'oak':
with Objects[0] do //Oak
begin
Color := 2179407;
Tol := 10;
Width := 10;
Height := 30;
Hue := 0.12;
Sat := 0.37;
LogDTM := 'mAAEAAHic42FgYMhhYmDIBOICIC4D4nIgroayc4E4DYgTgDgZSj8B6rkDxDeB+DYQPwDi50D8BojfA/FHIH4HVfMQiMsijIEkE9GYlYE0wEgiRgYA/jIRGA==';
TreeUpText := ['wn Oa', 'op down O'];
LogUpText := ['Oak', 'ak lo', 'Oak log'];
LogOption := ['rop', 'op Oa', 'rop Oak'];
end;
'willow':
with Objects[0] do //Willow
begin
Color := 2832184;
Tol := 6;
Width := 10;
Height := 30;
Hue := 0.25;
Sat := 0.15;
LogDTM := 'mAAEAAHiclcvBCkBAFIXhMxNJWYg8jKXXMzbTlNiRPCb51Swszamvezp1K0mzlRZs2HHiwAoPhxETAgoj3fxdyOglajTo4n13RUPfUuxvudJiEn3zALu3ClQ=';
TreeUpText := ['wn Wi', 'op down W'];
LogUpText := ['llow', 'ow lo', 'low log'];
LogOption := ['rop', 'op Wi', 'rop Wil'];
end;
'maple':
with Objects[0] do //Maple
begin
Color := 3028299;
Tol := 12;
Width := 10;
Height := 30;
Hue := 0.19;
Sat := 0.42;
LogDTM := 'mFQEAAHic42VgYLjMBME3gPgeFD8A4sdAfAuILwHxaSA+CsWngLiVkYGhFoirgbgOiJsYIWLdQNwPxBOBeBKU3QZVE23DC7SNiSTMykA6YCQDowAAboASnQ==';
TreeUpText := ['wn Ma', 'op down M'];
LogUpText := ['aple', 'le lo', 'ple log'];
LogOption := ['rop', 'op Ma', 'rop Map'];
end;
'ivy':
with Objects[0] do //Ivy
begin
Color := 2507572;
Tol := 8;
Width := 10;
Height := 10;
Hue := 0.10;
Sat := 0.16;
TreeUpText := ['op I', 'hop Ivy'];
end;
'teak':
with Objects[0] do //Teak
begin
Color := 5396064;
Tol := 20;
Width := 10;
Height := 30;
Hue := 0.25;
Sat := 0.06;
LogDTM := 'mwQAAAHic42RgYOAFYmYGBOACYhEglgFiSSAWBGJuqBqQnCgQi0PV8AExK1TftLoQIMlEABMGjERgOAAAN7sCag==';
TreeUpText := ['wn Te', 'op down T'];
LogUpText := ['eak', 'ak lo', 'eak log'];
LogOption := ['rop', 'op Te', 'rop Tea'];
end;
'arctic pine':
with Objects[0] do //Arctic Pine
begin
Color := 7380067;
Tol := 40;
Width := 10;
Height := 30;
Hue := 0.29;
Sat := 0.48;
LogDTM := 'm1gAAAHic42JgYHBmYmBwA2JfIPYH4gAgdgdiWyA2BWITILYC4idAtTeB+C4QPwbi10D8Fog/AvE7Boj8HSCuSjIDkkwEMSsDcYCRSIwAAPVXDOI=';
TreeUpText := ['wn Ar', 'op down A'];
LogUpText := ['rctic', 'ne lo', 'ine log'];
LogOption := ['rop', 'op Ar', 'rop Arc'];
end;
end;
end;
procedure SetUpCharacter;
begin
ClearDebug;
MakeCompass(COMPASSSTART);
SetAngle(SRL_ANGLE_HIGH);
ToggleXPBar(True);
StartXP := GetXPBarTotal;
end;
function IsChopping: Boolean;
var
T: Integer;
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
if (AveragePixelShift(PBox, 250, 500) < ANIMPIXELS) then
begin
MarkTime(T);
while (TimeFromMark(T) < (250 + RandomRange(150, 250))) do
begin
if (AveragePixelShift(PBox, 250, 500) > ANIMPIXELS) then
begin
Result := True;
Break;
end;
end;
end
else
Result := True;
end;
function FindMSObject(var fx, fy: Integer; Obj: MSObject): Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
i, tmpCTS, k: Integer;
P: TPoint;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Obj.Hue, Obj.Sat);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Obj.Color, MSX1, MSY1, MSX2, MSY2, Obj.Tol);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAtoATPAEx(TPA, Obj.Width, Obj.Height);
SortATPASize(ATPA, True);
Marktime(k);
For i := 0 To High(ATPA) Do
begin
if TimeFromMark(k) > 15000 then
Exit;
MiddleTPAEx(ATPA[i], P.x, P.y);
MMouse(P.x, P.y, 5, 5);
if WaitUpTextMulti(Obj.TreeUpText, 650 + Random(150)) then
begin
GetMousePos(fx, fy);
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
function CheckClick(var fx, fy: Integer; Obj: MSObject; ClickType: String): Boolean;
begin
if WaitUpTextMulti(Obj.TreeUptext, 350 + Random(150)) then
case (LowerCase(ClickType)) of
'left':
begin
Mouse(fx, fy, 0, 0, mouse_Left);
Result := True;
end;
'right':
begin
Mouse(fx, fy, 0, 0, mouse_Right);
if WaitOptionMulti(Obj.TreeUpText, 350 + Random(150)) then
Result := True;
end;
'rand':
case Random(2) of
0:
begin
Mouse(fx, fy, 0, 0, mouse_Left);
Result := True;
end;
1:
begin
Mouse(fx, fy, 0, 0, mouse_Right);
if WaitOptionMulti(Obj.TreeUpText, 350 + Random(150)) then
Result := True;
end;
end;
end;
end;
function CountLogs: Integer;
var
DTM: Integer;
begin
DTM := DTMFromString(Objects[0].LogDTM);
Result := CountItems('dtm', DTM, []);
end;
procedure DropLogs(var Obj: MSObject);
var
TPA: TPointArray;
P: TPoint;
LogDTM, i, fs1: Integer;
begin
LogDTM := DTMFromString(Obj.LogDTM);
FindDTMs(LogDTM, TPA, MIX1, MIY1, MIX2, MIY2);
if (Length(TPA) < 1) then
begin
FreeDTM(LogDTM);
Exit;
end;
RAaSTPAEx(TPA, 10, 10);
For i := 0 To High(TPA) Do
begin
if (fs1 >= 3) then
begin
FreeDTM(LogDTM);
Exit;
end;
MMouse(TPA[i].x, TPA[i].y, 5, 5);
if WaitUpTextMulti(Obj.LogUpText, 350 + Random(150)) then
begin
GetMousePos(P.x, P.y);
Mouse(P.x, P.y, 0, 0, mouse_Right);
WaitOptionMulti(Obj.LogOption, 350 + Random(150));
end
else
begin
IncEx(fs1, 1);
RandomCompass;
end;
end;
FreeDTM(LogDTM);
end;
function Burn : Boolean;
var
LogDTM, PrevCount, x, y, b: Integer;
XP : LongInt;
begin
LogDTM := DTMFromString('mrAAAAHic42BgYMhhYmBIBOIsIC4F4gooTgXiWCAOZGRg8ARiDyB2AWI/II4A4lhGiJyXhSLQFCac+D8DfsBIAMMAANZPB7E=');
repeat
FindRandoms;
PrevCount := InvCount;
if FindDTM(LogDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
XP := GetXPBarTotal;
Mouse(x, y, 3, 3, mouse_right);
WaitOption('ight', 300 + Random(300));
Wait(1200 + Random(600));
end;
until (PrevCount > InvCount);
repeat
FindRandoms;
Wait(600); //waits until log is burned
until (GetXPBarTotal > XP);
repeat
FindRandoms;
PrevCount := InvCount;
if FindDTM(LogDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 3, 3, mouse_left);
Wait(800 + random(400));
MouseBox(269, 404, 335, 447, Mouse_left); //add to bonfire
Wait(1600 + random(600));
end else
begin
Result := True;
FreeDTM(LogDTM);
Exit;
end;
until (PrevCount > InvCount);
Marktime(b);
repeat
FindRandoms;
Wait(1200 + Random(400));
until((CountItems('dtm', LogDTM, [])=0 ) or (TimeFromMark(b)>2*60*1000))
if CountItems('dtm', LogDTM, [])=0 then
begin
Writeln('All burned');
Result := True;
end
else
Result := False;
FreeDTM(LogDTM);
end;
{|¯¯ _ _ _ _ _ _ ¯¯|}
{| |P| |R| |O| |G| |G| |Y| |}
{|__ ¯ ¯ ¯ ¯ ¯ ¯ __|}
procedure ProgressReport;
var
wcXPH, AntiBansPH :Integer;
begin
XPGained := GetXPBarTotal - StartXP;
AntiBansPH := Round((AntiBans * 3600) / (GetTimeRunning / 1000));
wcXPH := Round((XPGained * 3600) / (GetTimeRunning / 1000));
ClearDebug;
Writeln(' Script: ' + NAME);
Writeln(' Version: ' + VERSION);
Writeln(' Author: ' + AUTHOR);
Writeln('~~~~');
Writeln(' Time Running: ' + TimeRunning);
Writeln(' AntiBans Done: ' + IntToStr(AntiBans));
Writeln(' AntiBans/Hour: ' + IntToStr(AntiBansPH));
Writeln('~~~~');
Writeln(' WC XP Gained: ' + IntToStr(XPGained));
Writeln(' WC XP/Hour: ' + IntToStr(wcXPH));
end;
{|¯¯ _ _ _ _ ¯¯|}
{| |L| |O| |O| |P| |}
{|__ ¯ ¯ ¯ ¯ __|}
begin
{$IFDEF SMART}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
SetUpSRL;
DeclarePlayers;
ActivateClient;
if (not LoggedIn) then
LogInPlayer;
SetUpObjects;
SetUpCharacter;
while LoggedIn do
begin
FindRandoms;
RunEnergy(RUNATENERGY);
ProgressReport;
if InvFull then
repeat
Burn;
until (CountLogs = 0)
else
if IsChopping then
AntiBan
else
if (fs >= 4) then
Logout
else
if FindMSObject(x, y, Objects[0]) then
begin
fs := 0;
if CheckClick(x, y, Objects[0], 'rand') then
FFlag(0);
end
else
begin
IncEx(fs, 1);
RandomCompass;
end;
end;
end.
Edit: Proggy with the version above:
Script: AIO PowerChopper
Version: 0.9
Author: Wreck
~~~~
Time Running: 3 Hours, 49 Minutes and 53 Seconds
AntiBans Done: 131
AntiBans/Hour: 34
~~~~
WC XP Gained: 131311
WC XP/Hour: 34272