SRL Archive - RS3 Outdated / Broken Scripts

PlankMaker (Up to 160k per hour!)


Echo_

2011-02-05 10:42:49

My plans for revision 2.0:
MultiPlayer support
randomized walking
more failsafes and antiban
resting at the musician
better functionality and speed overall

Revision 2.0 should be done soon. Until then, be careful when using this script.

NOTE: This money making method is Members Only!
This script is an Oak plank maker. To sum up what I mean by this, the script withdraws oak logs from the Varrock east bank, runs to the Sawmill operator near the earth alter, and buys oak planks from him. Then it runs back to the bank, banks and repeats. Using this method, you can easily make 2m a day (pretty good imo). Be sure to start in Varrock East Bank with your coins in the first slot of your inventory, the script will take it from there. This script features a break handler, antiban, and a few failsafes, and prints a progress report to your scripts folder. I have tested it for about a week, and this is the best progress report I have gotten so far.

|——————————–|
|—— PlankMaker (Echo_) ——|
|——————————–|
Total runtime= 13 Hours 21 Minutes 2 Seconds
Active accounts= 1
Total planks made= 10017


That was an easy 2m :D Currently oak logs are 22 gp and oak logs are 486 gp, so the profit per plank is 214 gp per plank. Divide my plank output for 13 hours and multiply it by 214 means I was making around 164k per hour!

So finally, here' s the script. I hope someone can put it to good use! I will probably revise this script later, maybe add randomized case statements for the walking functions so that the same method isn' t used every time. But until then, heres the code.
{|----------------------------------------------------------------------------|
|-------------------------------- PlankMaker --------------------------------|
|------------------------------- Revision 1.0 -------------------------------|
|--------------------------------- by Echo_ ---------------------------------|
|----------------------------------------------------------------------------|
|------------------------------- Instructions -------------------------------|
|Start this script in the Varrock East Bank with coins in the first space of |
|your inventory and your logs deposited in the top visible area of the first |
|tab in your bank. Make sure you have enough cash to make all of your logs |
|into planks, you will need 250 gp per plank. |
|----------------------------------------------------------------------------|}
program PlankMaker;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i reflection/reflection.simba}

var
TotalPlanks: Integer;

const
WORLD = 66;
MEMBERS = True;
SIGNED = True;
PLANKS_TO_MAKE = 0;//enter a number of planks to make

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';//enter your username here
Pass := '';//enter your password here
Nick := '';//enter your nickname here
Active := True;
Pin := '';
BoxRewards := ['oins', 'mote'];
end;
{with Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
BoxRewards := ['oins', 'mote'];
end;}
end;

function CheckSetup: Boolean;
begin
if (PLANKS_TO_MAKE <= 0) then
begin
Writeln('Please enter a valid number of planks to make.');
Exit;
end;
Result := True;
end;

procedure AntiBan;
begin
case Random(20) of
5: RandomRClick;
10: RandomMovement;
15: ExamineInv;
20: BoredHuman;
end;
end;

procedure TakeABreak;
begin
if not LoggedIn then Exit;
Writeln('Taking a break as part of the antiban.');
Logout;
Sleep(20 * 60000 + RandomRange(30000, 90000));
LoginPlayer;
end;

procedure BreakTime;
begin
case Random(30) of
1: TakeABreak;
end;
end;

function Banking: Boolean;
var
x, y, i, Logs: Integer;
begin
if not LoggedIn then Exit;
Logs := DTMFromString('mlwAAAHicY2dgYEgC4mwgDgPiGCAOBuJ0qBg' +
'I5wNxIRBXAHEuEJcAcRYQV0abMrSlWjNMKQfpYELBPEAShtEBIx4MBQDr7gl6');

Writeln('Withdrawing logs from the bank.');
Wait(1000 + Random(200));
Setangle(True);
Wait(500 + Random(100));
OpenBankFast('veb');
if not BankScreen then
begin
OpenBankQuiet('veb');;
end;
if not BankScreen then
begin
R_OpenBankBooth('veb');
end;
if BankScreen then
begin
BankTab(1);
FixBank;
Wait(500 + Random(100));
for i := 2 to 28 do
begin
Deposit(i, 27, True);
end;
repeat
if FindDTM(Logs, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 4, 4);
Wait(500 + Random(100));
if IsUpText('ak') then
begin
Mouse(x, y, 0, 0, false);
Wait(500 + Random(100));
ChooseOption('draw-All');
Wait(500 + Random(100));
end;
end;
until(InvFull);
end;
CloseBank;
R_Rest(100);
Wait(500 + Random(100));
AntiBan;
FindNormalRandoms;
Wait(500 + Random(100));
SetRun(True);
FreeDTM(Logs);
Result := True;
end;

function WalkToSawmill: Boolean;
var
ToOperator: TTileArray;
begin
if not LoggedIn then Exit;
Writeln('Walking to the Sawmill operator.');
ToOperator := [Tile(3256, 3429), Tile(3264, 3429), Tile(3275, 3429), Tile(3286, 3428), Tile(3286, 3439), Tile(3286, 3449), Tile(3286, 3449), Tile(3291, 3467), Tile(3295, 3473), Tile(3301, 3480), Tile(3302, 3486), Tile(3302, 3491)];
WalkPath(ToOperator);
FindNormalRandoms;
Result := True;
end;

function FindOperatorColor: Boolean;
var
x, y: Integer;
begin
if not LoggedIn then Exit;
if FindObjCustom(x, y, ['awmi', 'mill', 'oper'], [14537693, 4541264, 8103642], 10) then
begin
Writeln('Found Sawmill operator.');
Mouse(x, y, 2, 2, false);
Wait(500 + Random(100));
ChooseOption('Buy');
Wait(500 + Random(100));
FindNormalRandoms;
Result := True;
end;
end;

function FindOperatorRef: Boolean;
var
x, y: Integer;
ClickPoint: Tpoint;
begin
ClickPoint := TileToMs(Point(3302, 3492), 10);
MMouse(ClickPoint.x, ClickPoint.y, 4, 4);
Wait(500 + Random(100));
if IsUpText('mill op') then
begin
Writeln('Found Sawmill operator.');
Mouse(ClickPoint.x, ClickPoint.y, 0, 0, false);
Wait(500 + Random(100));
ChooseOption('Buy');
Wait(500 + Random(100));
FindNormalRandoms;
Result := True;
end else
begin
Writeln('Could not find the Sawmill operator. Switching to the Color method.');
FindOperatorColor;
end;
end;

function BuyPlanks: Boolean;
var
x, y, icon: Integer;
begin
if not LoggedIn then Exit;
icon := BitmapFromString(52, 31, 'meJyt1wtrU0EQBeDf4qPa1qpofM' +
'XaJqaPm0cbrCFEYq0h1lK1WBERERERUcQ/7dGDwzi7O7vGwqHYmmy' +
'+zMzuvbc6+FT9yYXulKnUHwvTPvwsib5g8+lHk40nH9an79cm7+4+' +
'erP64Pj24PBmf1rr7F7ZHF1s7tSaHbPCf/JKVCBpVfPh68b41fLw+' +
'a17+9d6e1fb40utweLK1snaCklI6/FbUd0ZHQFWv39wY3sC2OX14V' +
'KjD1hoE95JqTQJhRIVmkgVWomKsZuAoZsLy91ao4OkbLPxUqSoCrW' +
'iChWTMfvVzd+wqG220jkkqtA+qlAoUWHAoEIrAeOYzderEpvPcxon' +
'JIRDZVQolKjQR6hQMYyZhp2qb6U+OmoLPYakCyUqDpVRoVCiQrkwY' +
'4DNXW8Rdq41mmsO/bot9fZDjHiipKiKQ2VUKJSosCvxLryX63BB3x' +
'b1OCR9LBgVh8qoUElD4vr8RAe22J44npAUHgvcgKLiUEHFOdQkqkh' +
'Cj/xJQwSjPSFJq8yxIBuQqt7RtxISL3ydZ19StoVqL/QYUlRljgWo' +
'ui++kkRVloTXI/giURi6KRjxGJJzWHGo8DKfRFVIQrZffu8f/whtg' +
'M1v7IonSooeC1SlSFSFJKqERBUT2tDN82tj4yEpugF5LBSSnEJpFY' +
'JfozDxaFL0WDCk8BxIFSql4q+MPvzZTRzI9AjJHAtQkRTddM6QR4c' +
'qVPF/EWBQK6iAxL9xsRCPHiqqNMk5ClIqv1BCQvgVUCV40EfA8PPs' +
'6gAehirxCCnbvpKh0r0zJMnp5f6ZlR0K8RMexEgEI1WaeaiiJKPi2' +
'xGsj2UpdCSCEU/JUEULlSUhXI02LI6GIqnB1vXR1zt5tkoNVbZ3IU' +
'mibRg5xumaKZFUyaiyvXNI8sX56Rg2blidEpuj+idS9CYW9REbThI' +
'JeTPAsuOUJUlgw/ZEQyHhxTRMiY28wnFyPPoGW9tSN3L62SG0aZ7A' +
'sr1LecwzCG2pW03txOODvxFKepclSXAhwLChcSU2xBwamkdYluR79' +
'M0/bNgFPqz6+4k1xZNylVQp5dGPAD8BkT/geA==');

if FindBitmapToleranceIn(icon, x, y, MSX1, MSY1, MSX2, MSX2, 15) then
begin
MMouse(x, y, 5, 5);
Wait(500 + Random(100));
if IsUpText('Buy') then
begin
Writeln('Buying planks.');
Mouse(x, y, 0, 0, false);
Wait(500+Random(100));
ChooseOption('All');
Wait(500+Random(100));
FindNormalRandoms;
Result := True;
end;
end;
FreeBitmap(icon);
end;

function WalkToBank: Boolean;
var
ToBank: TTileArray;
begin
if not LoggedIn then Exit;
Writeln('Walking back to the bank.');
ToBank := [Tile(3302, 3486), Tile(3301, 3480), Tile(3295, 3473), Tile (3290, 3465), Tile(3286, 3449), Tile(3286, 3449), Tile(3286, 3439), Tile(3286, 3428), Tile(3275, 3429), Tile(3264, 3429), Tile(3256, 3429), Tile(3252, 3420)];
MakeCompass('s');
WalkPath(ToBank);
FindNormalRandoms;
Result := True;
end;

procedure IncTotalLogs(HowMuch: Integer);
begin
IncEx(TotalPlanks, 27);
Writeln('Increased total planks by ' + IntToStr(27) + '.');
Writeln('You have made ' + IntToStr(TotalPlanks) + ' total planks.');
end;

function WriteReportToFile: Boolean;
var
theFile: Integer;
thePath: string;
begin
thePath := AppPath + 'Scripts\PlankMaker.txt';
try
theFile := RewriteFile(thePath, False);
except
Writeln('Error opening file.');
end;
WriteFileString(theFile, '|--------------------------------|' + #13 + #10);
WriteFileString(theFile, '|------ PlankMaker (Echo_) ------|' + #13 + #10);
WriteFileString(theFile, '|--------------------------------|' + #13 + #10);
WriteFileString(theFile, 'Total runtime= ' + TimeRunning + #13 + #10);
WriteFileString(theFile, 'Active accounts= ' + IntToStr(HowManyPlayers) + #13 + #10);
WriteFileString(theFile, 'Total planks made= ' + IntToStr(TotalPlanks) + #13 + #10);
CloseFile(theFile);
Result := True;
end;

begin
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
ClearDebug;
SetupSRL;
SetUpReflection;
if (CheckSetup) then
begin
DeclarePlayers;
LoginPlayer;
Writeln('|--------------------------------|');
Writeln('|------ PlankMaker (Echo_) ------|');
Writeln('|--------------------------------|');
Writeln('Script starting up.');
end else
begin
TerminateScript;
end;
repeat
BreakTime;
Banking;
WalkToSawmill;
FindOperatorRef;
BuyPlanks;
WalkToBank;
IncTotalLogs(27);
until(TotalPlanks >= PLANKS_TO_MAKE) or (false);
WriteReportToFile;
Writeln('Script finished!');
end.

Credits: Coh3n- I used his Simba tutorial for my progress report function, and learned alot from his tuts in general
EvilChicken!- I used an Oak Log DTM from his fletching script

doublex8

2011-02-05 13:04:23

is there any quest requirements?

**BANNED The Man

2011-02-05 14:29:49

I will go through your script and see where I can help you :)


procedure AntiRandoms;
begin
FindNormalRandoms;
end;

No point in that, instead of calling the procedure AntiRandoms, just call the function FindNormalRandoms

Maybe give the option to choose how long to sleep for and how often.

You might want to add randomness to your walking, it would look very bot like.

For FindOperatorRef, why not use FindNPC?

you have:

procedure IncTotalLogs(HowMuch: Integer); // You have a parameter for how much to add, not that bad of an idea BUT
begin
IncEx(TotalPlanks, 27); // HERE you dont even use the parameter you just add 27 no matter what the argument is ^
Writeln('Increased total planks by ' + IntToStr(27) + '.'); // here why not just have increased by 27 why do inttostr then a number.
Writeln('You have made ' + IntToStr(TotalPlanks) + ' total planks.');
end;

look at the comments on it ^

You should also consider an ongoing progress report :)

Apart from that, nice first script :D

-Boom

Awkwardsaw

2011-02-05 15:02:49

only 168k per hour? i remember when planking was 500k+

also, may i suggest making your own reflection path walker? :) something that will click the next tile as soon as it appears on the minimap, to make it go faster and more human like

here is one of mine, you can use(for refrence ;))

function S_WalkPath(path : TTileArray) : Boolean;
var
i, c : Integer;
tp, ntp : TPoint;
begin
for i := 0 to high(path) do
begin
tp := TileToMM(path[i]);
if i < high(path) then
begin
ntp := TileToMM(path[i + 1]);
if rs_OnMinimap(ntp.x, ntp.y) then
continue;
end;
if not rs_OnMinimap(tp.x, tp.y) then
begin
debug('tile not on map: ' + inttostr(i));
continue;
end;
mouse(tp.x, tp.y, 5, 5, true);
if i < high(path) then
begin
ntp := TileToMM(path[i + 1]);
while not rs_OnMinimap(ntp.x, ntp.y) do
begin
ntp := TileToMM(path[i + 1]);
wait(100 + random(50));
r_findrandoms;
inc(c);
if c > 300 then
begin
result := false;
exit;
end;
if not ismoving then continue;
end;
end else
r_flag;
end;
result := true;
end;

Echo_

2011-02-05 19:59:00

From: Dynamite
I will go through your script and see where I can help you :)


procedure AntiRandoms;
begin
FindNormalRandoms;
end;

No point in that, instead of calling the procedure AntiRandoms, just call the function FindNormalRandoms

Maybe give the option to choose how long to sleep for and how often.

You might want to add randomness to your walking, it would look very bot like.

For FindOperatorRef, why not use FindNPC?

you have:

procedure IncTotalLogs(HowMuch: Integer); // You have a parameter for how much to add, not that bad of an idea BUT
begin
IncEx(TotalPlanks, 27); // HERE you dont even use the parameter you just add 27 no matter what the argument is ^
Writeln('Increased total planks by ' + IntToStr(27) + '.'); // here why not just have increased by 27 why do inttostr then a number.
Writeln('You have made ' + IntToStr(TotalPlanks) + ' total planks.');
end;

look at the comments on it ^

You should also consider an ongoing progress report :)

Apart from that, nice first script :D

-Boom


No, there are no quest requirements.

I forgot why I had a procedure for finding randoms :p I will edit that now. Like I said, I was planning on adding a case statement for my TileArrays, so that when the procedure is called, there are three different options for the script to chose randomly when walking to the sawmill. I actually couldn' t use the FindNPC function, because the NPC' s name is "Sawmill operator". The script thinks that I am calling an operator rather than the name of the npc, so I just used color methods.

Thanks for the path example! I will try to implement it and use Ttile arrays as my failsafe :D

Overall, thanks for the comments guys. I will try to fix up the script now :D

doublex8

2011-02-06 09:56:06

If you don't gain experience from this script there is no point in putting a findrandoms function since you won't have any.

**BANNED The Man

2011-02-06 10:01:20

From: doublex8
If you don't gain experience from this script there is no point in putting a findrandoms function since you won't have any.


You get randoms even when not earning xp.
I have got a random from just walking around…

doublex8

2011-02-06 10:09:15

From: Dynamite
You get randoms even when not earning xp.
I have got a random from just walking around…


you are the first person I have ever heard say that…there is a video that shows that randoms are directly affected from exp gained. how long ago was it?

EDIT: and when was that last time you did something that gained any amount of xp? I have mined a rock and halfway back to the bank finally triggered the random, sometimes they are delayed.

**BANNED The Man

2011-02-06 10:12:53

From: doublex8
you are the first person I have ever heard say that…there is a video that shows that randoms are directly affected from exp gained. how long ago was it?

EDIT: and when was that last time you did something that gained any amount of xp? I have mined a rock and halfway back to the bank finally triggered the random, sometimes they are delayed.


Like 2 days ago.
From the RS wiki:
From: RS Wiki
Players gaining experience will have a higher chance of getting a Random Event.

kitchenrange

2011-02-06 11:36:05

You defnitely get randoms when you're walking and not gaining exp.

This isn't the 19th century of Runescape anymore.

doublex8

2011-02-06 12:50:02

From: kitchenrange
You defnitely get randoms when you're walking and not gaining exp.

This isn't the 19th century of Runescape anymore.


made me lol. I guess it just has never happened to me…but usually when I play I am constantly gaining xp :P

wand2658

2011-02-26 21:49:24

Sometimes doesn't make planks when at sawmill. Script could be improved overall, looking forward to v2.

Increased total planks by 27.
You have made 108 total planks.
Withdrawing logs from the bank.
Walking to the Sawmill operator.

Echo_

2011-02-27 14:54:05

I haven't really payed attention to this script for awhile, I may rewrite it if I have time. Atm I am working on an important scripting project, so idk when I will get a chance to revise this.

hash.burnswell

2011-08-02 20:54:11

It failed 3 loads in a row for me, but it got to the saw mill faster than all the other bots = )) got this error:

Warning! You passed a wrong ye to a finder function: 515. The client has a height of 503, thus the ye is out of bounds. Setting the value to 502 (h-1) for now.

Home

2011-08-03 03:00:43

From: hash.burnswell
It failed 3 loads in a row for me, but it got to the saw mill faster than all the other bots = )) got this error:


It's outdated at the moment :)

Echo please contact us (Pub Sect Mods) If you wan't it back.

Thanks.


~Home

Moved.