PDA

View Full Version : [WoodCutting] [SRL] drynorWillowChopper



6b49WR7VbUjs9Hqeq5Etr
06-23-2018, 01:07 PM
No idea how stable it is, Currently has no anti bans, breaking, or failsafes of any kind.

drynor.png needs to be placed inside of Includes\RSWalker\maps



program drynorWillowChopper;
{$define SMART} //If not using SMART, then comment this line out
{$I SRL/OSR.simba}
{$I RSWalker/Walker.simba}
const
LOGIN_NAME = '';
LOGIN_PASS = '';
RS_WORLD = -1;
IS_MEMBER = False;

var
leWalker: TRSWalker;

procedure declarePlayers();
begin
with Players.New()^ do
begin
LoginName := LOGIN_NAME;
Password := LOGIN_PASS;
IsActive := True;
IsMember := IS_MEMBER;
World := RS_WORLD;
end;
Players.SetCurrent(0);
end;

function isChopping(): Boolean;
var
invCount: Integer;
begin
invCount := Inventory.Count;
wait(randomRange(7000, 15000));
Result := (Inventory.Count <> invCount);
end;

procedure startup();
begin
SRL.Setup([]);
leWalker.Init('world[4_5].png', -1);

declarePlayers();

if (not SRL.isLoggedIn) then
begin
Players.LoginCurrent();
MainScreen.setAngle(True);
end;
end;

procedure walkToWillows();
var
path: TPointArray;
begin
path := [[338, 406], [317, 444]];
leWalker.WalkPath(path);
end;

procedure chopWillows();
var
TPA, willowTree: TPointArray;
ATPA: T2DPointArray;
begin
if (SRL.FindColors(TPA, CTS2(1918270, 9, 0.05, 1.11), MainScreen.GetBounds) > 0) then
begin
ATPA := TPA.Cluster(12);
ATPA.FilterSize(1, 95);
ATPA.SortByIndex(MainScreen.GetMiddle);

for willowTree in ATPA do
begin
Mouse.Move(willowTree[Random(Length(willowTree))]);

if MainScreen.IsUpText(['Chop down W', 'hop down W', 'p down W']) then
begin
Mouse.Click(mouse_left);
Break;
end;
end;
repeat
wait(randomRange(500, 1500));
until(not isChopping);
end;
end;

procedure walkToBank();
var
path: TPointArray;
begin
path := [[317, 444], [338, 406]];
leWalker.WalkPath(path);
end;

procedure doBank();
begin
BankScreen.Open(blDrynor);
wait(randomRange(250, 400));
BankScreen.DepositAll;
BankScreen.Close;
end;

begin
clearDebug();
startup();

repeat
walkToWillows();
repeat
chopWillows();
until(Inventory.IsFull);
walkToBank();
doBank();
until(false);
end.

KeepBotting
06-23-2018, 01:44 PM
Congratulations on the release!

slacky
06-23-2018, 03:18 PM
It's a nice first released script, reminds me of my own earlier scripts :-)
Thanks for the contribution!
PS: you are loading the map from RSWalker's slices (https://github.com/slackydev/RSWalker/blob/master/maps/slices/world%5B4_5%5D.png), which means people don't need to download the given map - they already have it ;)

6b49WR7VbUjs9Hqeq5Etr
06-23-2018, 11:07 PM
It's a nice first released script, reminds me of my own earlier scripts :-)
Thanks for the contribution! PS: you are loading the map from RSWalker's slices (https://github.com/slackydev/RSWalker/blob/master/maps/slices/world%5B4_5%5D.png), so people don't need to download the given map - they already have it ;)


Congratulations on the release!

Should go without saying, But if there is anyway i can improve on the tree detection I would love to hear about it and try it out, And thank you both, I wrote it in like 5 minutes before leaving this morning and came back like 2 hours later with it still running.

slacky
06-23-2018, 11:08 PM
Should go without saying, But if there is anyway i can improve on the tree detection I would love to hear about it and try it out.
I published something that could be useful some time ago:
https://villavu.com/forum/showthread.php?t=117808

Ofc that find any type of tree as is, but I think it could be made to only find willows with the right parameters.

Patriq
06-24-2018, 08:04 AM
Grats on the first release ma dude! :D

jonnyhotpockets
07-07-2018, 03:25 PM
getting this error;

Error: Plugin(.) has not been found
Compiling failed.

Benny
07-09-2018, 03:11 PM
getting this error;

Error: Plugin(.) has not been found
Compiling failed.

Have you followed this guide: https://villavu.com/forum/showthread.php?t=118211

P1nky
07-09-2018, 05:12 PM
Reminds me of my first script - Draynor Willow Chopper&Banker.

Awesome release, keep adding onto it :)