PDA

View Full Version : [WoodCutting] Well of Goodwill Woodcutter



Googlez
03-21-2015, 06:38 PM
https://villavu.com/forum/attachment.php?attachmentid=25381&d=1426962189

Status Of Script : Very Good, Little To No Script Breaking Bugs

What It Does
The script is very basic. All it does is run from the well to the nearby woods, south of the grand exchange. It then cuts the trees down until the inventory is full, and goes to the well to bank them. It keeps track of progress and has a couple of fail safes.



How To Set It Up
Start at the well with your camera pointed all the way down and zoomed all the way out. To set it up you need to edit the player settings on lines 16-20 of the script so it matches your account info and the world you want to use this script on, also need to put the sps map in simbafolder/includes/sps/img/runescape_other . Next you put in place the standard SMART Client settings. Then you need to make the chatbox small as possible and put the xp counter on the top right of it. As shown in this picture :

http://i.imgur.com/3idtkvr.png





Download

SCRIPT -
program scriptTemplate;

var
XPGain, LoadsDone, TimeGone, Logs: Integer;
XPPerHour, LoadsPerHour, LogsPerHour, CurrentXP, OriginalXP: Integer;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}







//Player Handler/Settings
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := false;
world := 0;
end
currentPlayer := 0;
end;
procedure reEnterGame();
var
p:TPoint;
begin
lobby.findPlayButton(p);
print('Not Ingame, Clicking Play To Re-Enter.');
mouse(p.rand(randomRange(-50, 50), randomRange(-10, 10)), MOUSE_LEFT);
repeat
wait(500);
until isLoggedIn();
end;
// Proggy stolen from abu
procedure Proggy();


begin

if(lobby.isOpen())then
begin
reEnterGame;
end;
if(not isLoggedIn())then
begin
players[currentPlayer].login(); ;
end;
begin
ClearDebug;
CurrentXP := chatbox.getxPBar();
XPGain := (CurrentXP - OriginalXP); ;
begin
Writeln('***************************************** *************************');
Writeln('*/////////---------- Googlez Woodcutter @ Well ----------\\\\\\\*');
Writeln('*/////////----------____________________________----------\\\\\\\*');
Writeln('***************************************** *************************');
Writeln('*/////////We have done: ' + IntToStr(LoadsDone) + ' Loads');
Writeln('*/////////We have gained: ' + IntToStr(XPGain) + ' xp');
Writeln('*/////////We have chopped ' + IntToStr(Logs) + ' Logs');
Writeln('');
end;
end;
end;




procedure walkToTrees();
var
treePath: TPointArray;
begin

if (minimap.getColorPercent(minimap.getBlackBackgroun d(), 0) > 60.0) then
begin
players[currentPlayer].logout();
wait(RandomRange(3000,4000));
players[currentPlayer].login();
wait(RandomRange(3000,4000));
reEnterGame;

end;

treePath := [Point(323, 156), Point(304, 163), Point(280, 188), Point(270, 202), Point(253, 222), Point(239, 237), Point(231, 239)];
if SPS.walkPath(treePath) then
begin

if(lobby.isOpen())then
begin
reEnterGame;
end;
if(not isLoggedIn())then
begin
players[currentPlayer].login(); ;
end;
minimap.waitPlayerMoving();
end
else
begin

if(lobby.isOpen())then
begin
reEnterGame;
end;
if(not isLoggedIn())then
begin
players[currentPlayer].login(); ;
end;


writeLn('Opps, try again.');
walkToTrees();
end;
end;

procedure walkToBank();
var
bankPath: TPointArray;
begin

if (minimap.getColorPercent(minimap.getBlackBackgroun d(), 0) > 60.0) then
begin
players[currentPlayer].logout();
wait(RandomRange(3000,4000));
players[currentPlayer].login();
wait(RandomRange(3000,4000));
reEnterGame;

end;
bankPath := [Point(231, 239), Point(239, 237), Point(253, 222), Point(270, 202), Point(280, 188), Point(304, 163), Point(323, 156)];
if SPS.walkPath(bankPath) then
begin
minimap.waitPlayerMoving();

if(lobby.isOpen())then
begin
reEnterGame;
end;
if(not isLoggedIn())then
begin
players[currentPlayer].login(); ;
end;
if (minimap.getColorPercent(minimap.getBlackBackgroun d(), 0) > 60.0) then
begin
players[currentPlayer].logout();
wait(RandomRange(3000,4000));
players[currentPlayer].login();
wait(RandomRange(3000,4000));
reEnterGame;

end;
end
else
begin

if(lobby.isOpen())then
begin
reEnterGame;
end;
if(not isLoggedIn())then
begin
players[currentPlayer].login(); ;
end;
writeLn('Opps, try again.');
walkToBank();
end;
end;


procedure openBank();
var
b : TBox;
cts,i,h,w: Integer;
tpa,tpa2 : TPointArray;
atpa : T2DPointArray;
begin

if(lobby.isOpen())then
begin
reEnterGame;
end;
if(not isLoggedIn())then
begin
players[currentPlayer].login(); ;
end;
findColorsTolerance(tpa, 9733948, mainscreen.getbounds(), 2, colorSetting(2, 0.13, 0.35));
SplitTPAWrap(tpa, 5, atpa);
SortATPASize(atpa, true);
//minimap.setAngle(180);
if (Length(tpa) < 1) then
begin
Exit;
end
else
begin

smartImage.debugATPA(atpa);
for i := 0 to high(atpa) do
begin

if(lobby.isOpen())then
begin
reEnterGame;
end;
if(not isLoggedIn())then
begin
players[currentPlayer].login(); ;
end;
smartImage.clear();
smartImage.debugATPA(atpa);
mouse(middleTPA(atpa[i]), MOUSE_MOVE);
if isMouseOverText(['Donate Well of Goodwill'], 500) then
fastClick(MOUSE_RIGHT);
chooseOption.select(['Open Bank Well of Goodwill'],MOUSE_LEFT);
smartImage.clear();
wait(RandomRange(3000,4000));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(RandomRange(3000,4000));
bankScreen.close();
Logs = Logs+28;
LoadsDone = LoadsDone+1;

end;
end

end

procedure cutTree();
var
b : TBox;
cts,i,h,w, trys: Integer;
tpa,tpa2 : TPointArray;
atpa : T2DPointArray;
begin

if(tabBackpack.isFull)then
begin
Exit;
end
else
begin

if(lobby.isOpen())then
begin
reEnterGame;
end;
if(not isLoggedIn())then
begin
players[currentPlayer].login(); ;
end;
if (minimap.getColorPercent(minimap.getBlackBackgroun d(), 0) > 60.0) then
begin
players[currentPlayer].logout();
wait(RandomRange(3000,4000));
players[currentPlayer].login();
wait(RandomRange(3000,4000));
reEnterGame;
end;
findColorsTolerance(tpa, 2704728, mainscreen.getbounds(), 4, colorSetting(2, 0.47, 0.50));
SplitTPAWrap(tpa, 5, atpa);
SortATPASize(atpa, true);
//minimap.setAngle(180);
if (Length(tpa) < 1) then
begin
Exit;
end
else
begin

smartImage.debugATPA(atpa);
for i := 0 to high(atpa) do
begin

if i>3 then begin walkToTrees(); end;

smartImage.clear();
smartImage.debugATPA(atpa);
if length(atpa)<(i-1) then break;//failsafe if your tpa doesnt exist doesnt try to acces it
mouse(middleTPA(atpa[i]), MOUSE_MOVE);
if isMouseOverText(['Chop down Tree'], 500) then

begin
fastClick(MOUSE_LEFT);
smartImage.clear();
print('Tree being cut.');
wait(RandomRange(5000,7000));
cutTree();
if(tabBackpack.isFull)then
begin
break();
end;

end
end


end


end;




end

begin

SPS.setup('thaiTrees', RUNESCAPE_OTHER);
smartEnableDrawing := true;
clearDebug();
setupSRL();
declarePlayers();
if not isLoggedIn() then
begin
players[currentPlayer].login(); ;
end;
wait(RandomRange(100,500));
Proggy();
exitTreasure();
repeat
begin
walkToTrees();
cutTree();
walkToBank();
openBank();
end;
until 1=2
end.

SPS MAP - 25383




Proggies So Far!
None.

Hitac
03-21-2015, 06:46 PM
Will try but not today.

yogiman1998
03-21-2015, 11:52 PM
Sounds like a nice script!
I will be giving it a go today and will post a Proggy as soon as I can!

cBots
03-22-2015, 02:32 AM
Awesome work! Looking forward to your future projects :D

Googlez
03-22-2015, 03:49 AM
Awesome work! Looking forward to your future projects :D

Scrub stahp spamming.

Bud
03-22-2015, 03:50 AM
Jokes man this is a great script, glad to see you got it actually working! :D

Renzanity
03-22-2015, 04:16 AM
Looks good. :)

You can work with the indentations on your script in a later time, when you start to update this project.

Bug I found:
-It misclicks the trees for 2-3 times and walks over to the trees before it successfully clicks on a tree(not the tree infront of it). (Which is somewhat troubling because that might cause somebody getting banned, for it acts not human-like at all.)

I didn't run the script long enough to actually see everything that the script does, but I'm sure you'll be updating this anyway. ;)

Googlez
03-22-2015, 05:27 AM
Looks good. :)

You can work with the indentations on your script in a later time, when you start to update this project.

Bug I found:
-It misclicks the trees for 2-3 times and walks over to the trees before it successfully clicks on a tree(not the tree infront of it). (Which is somewhat troubling because that might cause somebody getting banned, for it acts not human-like at all.)

I didn't run the script long enough to actually see everything that the script does, but I'm sure you'll be updating this anyway. ;)

Thanks! Will look into this, but if i understand you correctly, you mean it does this while its running to the tree area?

Renzanity
03-22-2015, 05:58 AM
Thanks! Will look into this, but if i understand you correctly, you mean it does this while its running to the tree area?

First, it would walk to the tree area.
Second, it would click on a tree and miss. (Do you have your camera set to RS3 or Classic?)
Lastly, it would successfully click on the tree after doing the second part 2-3 times.

Either way man, it's still a good job on your part. :norris:

EDIT:
Did you see my message on your inbox?

AttilaBilly
03-22-2015, 08:57 AM
Running this over night, will let you know how it goes. (Starting on a lvl 1 wc account, with membership)

Googlez
03-22-2015, 07:10 PM
First, it would walk to the tree area.
Second, it would click on a tree and miss. (Do you have your camera set to RS3 or Classic?)
Lastly, it would successfully click on the tree after doing the second part 2-3 times.

Either way man, it's still a good job on your part. :norris:

EDIT:
Did you see my message on your inbox?

Fixed, tyvm

Googlez
03-22-2015, 10:35 PM
Updated to keep the script from completely crashing at random times.

Googlez
03-24-2015, 07:35 AM
Another update, adding fail safes for if minimap goes black for gold farming, lobby crashes, and logout crashes.

beaststatus16
04-04-2015, 11:42 AM
For me it doesn't bank it goes to the well right outside the GE and just sits there until it logs me off. And sometimes it will run to the well with a full inventory and then goes back to try to get more logs. Fix?

Allgood
05-29-2015, 08:39 AM
Had a lot of trouble getting it to setup correctly. Ended up changing line 111 to


chooseOption.select(['Open Bank'],MOUSE_LEFT);

Rather than its default


chooseOption.select(['Open Bank Well of Goodwill'],MOUSE_LEFT);

As well as ctrl + f 'ing '9733948' (less the quote) and changing all (two) instances to '11575881' (less the quote). I'm not sure if anyone else has had issues with opening the bank, but making these two minute changes fixed it for me :D

Mack
06-13-2015, 04:28 AM
Running tonight, post a proggy tomorrow! Also, for the skillers out there, would you be interested in making it say if you have an axe in the inv. it will just deposit logs?

EDIT:
************************************************** ****************
*/////////---------- Googlez Woodcutter @ Well ----------\\\\\\\*
*/////////----------____________________________----------\\\\\\\*
************************************************** ****************
*/////////We have done: 1 Loads
*/////////We have gained: 0 xp
*/////////We have chopped 28 Logs

** Can/will not run this script, looks like it may need a little bit of work still, miss-clicks/reads the wrong colors too much, probably cause a quick-like ban.**
Good job on the walking path and Bank! Just take a little time working with the colors and try to stay away from that head chef's place! Takes the doors colors and the mouse goes wild whilst looking for colors for trees.

srlMW
06-13-2015, 06:21 AM
Also, for the skillers out there, would you be interested in making it say if you have an axe in the inv. it will just deposit logs?


You can store any axe no matter what level requirements in your toolbelt.

Mack
06-15-2015, 05:37 AM
You can store any axe no matter what level requirements in your toolbelt.

oh god, all this time i didn't know that. for some reason, anywho's, good antiban??

srlMW
06-15-2015, 05:53 AM
oh god, all this time i didn't know that. for some reason, anywho's, good antiban??Better late than never! :tongue:

Xiiiii
06-20-2015, 08:09 AM
************************************************** ****************
*/////////---------- Googlez Woodcutter @ Well ----------\\\\\\\*
*/////////----------____________________________----------\\\\\\\*
************************************************** ****************
*/////////We have done: 82 Loads
*/////////We have gained: 0 xp
*/////////We have chopped 2296 Logs

Script doesn't break, but has a few problems. It tries to click the floor of the cooking guild, and often misses the well when trying to bank.

teddybear
06-30-2015, 09:04 AM
cant seem to get it working, keep getting fatal error at startup, seems like there is a thaiTrees.png file missing from the sps