SRL Archive - RS3 Help

learning and creating script as i go through all the tutorial....


The Anihilator

2015-01-14 14:32:37

As i am reading the tutorials, I have been creating a simple script to help me understand what i am reading (by creating)…

My script plan is

Start - castle Wars
run to teak tree
cut logs
run to castle bank chest
deposit logs
repeat

I been using Mayor's tutorials and have received some help in private from him… Thank you so much for all you've done mayor.

so here are some question i have

1)
In tutorial it is stated to use randoms… and was placed in script as such..

 wait(randomRange(1000, 2000));  

but below i see you have changed this to …

  wait(gaussRangeInt(1000,2000)); 

Why?

2) In my progress report Mayor told me - "Missing the global 'LoadsDone' variable" i placed and now get error -
Error: Unknown declaration "LoadsDone" at line 50
Compiling failed.


procedure depositlogs();
var
bankTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit;
if depositBox.isOpen() then
begin
bankTimer.start();
repeat
if (depositBox.count > 0) then
begin
depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);
wait(gaussRangeInt(1000,2000));
end;
until(depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 10000);

inc(LoadsDone);
end;
depositBox.close();
end;

procedure progressReport();
var
logsCut, profit, profitPerHour: integer;
begin
logsCut:= LoadsDone * 28;
profit := (logsCut * 375);
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));

writeLn('========================================================');
writeLn('TAs_Teak_logs_to_Castle_Bank');
writeLn('Time Run: ' + timeRunning);
writeLn('Logs Cut: ' + intToStr(logsCut));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('Profit Made: ' + intToStr(profit));
writeLn('Per Hour: ' + intToStr(profitPerHour));
writeLn('========================================================');
end;

My entire script at this point is as such


program TAs_Teak_logs_to_bank;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'username';
password := 'password';
isActive := true;
isMember := true;
end;
currentPlayer := 0;
end;

procedure findDepositBox();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
repeat
mainscreen.findObject(x, y, 724754, 1, colorSetting(2, 2.39, 2.71), mainscreen.playerPoint, 30, 50, 50, ['ank', 'chest'], MOUSE_LEFT);
wait(randomRange(1000, 2000));
inc(i);
until depositBox.isOpen() or (i >= 15);
end;

procedure depositlogs();
var
bankTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit;
if depositBox.isOpen() then
begin
bankTimer.start();
repeat
if (depositBox.count > 0) then
begin
depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);
wait(gaussRangeInt(1000,2000));
end;
until(depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 10000);

inc(LoadsDone);
end;
depositBox.close();
end;

procedure runToTree();
var
pathToTree: TPointArray;
begin
if not isLoggedIn() then
exit;
pathToTree :=[Point(613, 141), Point(613, 141), Point(614, 127), Point(651, 127), Point(682, 130), Point(692, 134), Point(686, 161), Point(669, 192), Point(656, 211), Point(634, 226), Point(602, 250), Point(567, 261), Point(504, 265), Point(450, 264), Point(407, 263), Point(376, 268), Point(326, 270), Point(277, 273), Point(239, 268), Point(197, 275), Point(160, 287), Point(134, 293)]
if SPS.walkPath(pathToTree) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Tree');
end;

procedure chopTeak();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
begin
if mainscreen.findObject(x, y,999465, 7, ['eak'], MOUSE_RIGHT)then
begin
writeLn('We right clicked a tree!');
chooseOption.select(['hop down']);
tabBackPack.waitForShift(5000);
end;
end;

begin
clearDebug();
setupSRL();

repeat
repeat
chopTeak();
until tabBackpack.isFull();
findDepositBox();
depositLogs();
until false;
end;



procedure hikeToBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() then
exit;
pathToBank :=[Point(133, 292), Point(161, 289), Point(183, 282), Point(207, 274), Point(244, 269), Point(288, 268), Point(327, 269), Point(373, 268), Point(412, 262), Point(467, 262), Point(522, 261), Point(584, 258), Point(628, 238), Point(662, 219), Point(695, 182), Point(701, 142), Point(675, 131), Point(621, 128), Point(612, 135)]
if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Bank');
end;
procedure progressReport();
var
logsCut, profit, profitPerHour: integer;
begin
logsCut:= LoadsDone * 28;
profit := (logsCut * 375);
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));

writeLn('========================================================');
writeLn('TAs_Teak_logs_to_Castle_Bank');
writeLn('Time Run: ' + timeRunning);
writeLn('Logs Cut: ' + intToStr(logsCut));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('Profit Made: ' + intToStr(profit));
writeLn('Per Hour: ' + intToStr(profitPerHour));
writeLn('========================================================');
end;

begin // main loop
clearDebug();
smartEnableDrawing := true;
disableSRLDebug := false;
setupSRL();
declarePlayers();
SPS.setup('TEAK_MAP', RUNESCAPE_OTHER);
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;
if tabBackpack.isFull() then
begin
hikeToBank();
findDepositBox();
depositlogs();
end;
runToTree();
chopTeak();
hikeToBank();
findDepositBox();
depositLogs();
progressReport();
end.
:D

The Mayor

2015-01-14 15:03:21

From: The Anihilator
As i am reading the tutorials, I have been creating a simple script to help me understand what i am reading (by creating)…

My script plan is

Start - castle Wars
run to teak tree
cut logs
run to castle bank chest
deposit logs
repeat

I been using Mayor's tutorials and have received some help in private from him… Thank you so much for all you've done mayor.

so here are some question i have

1)
In tutorial it is stated to use randoms… and was placed in script as such..

 wait(randomRange(1000, 2000));  

but below i see you have changed this to …

  wait(gaussRangeInt(1000,2000)); 

Why?

2) In my progress report Mayor told me - "Missing the global 'LoadsDone' variable" i placed and now get error -
Error: Unknown declaration "LoadsDone" at line 50
Compiling failed.


procedure depositlogs();
var
bankTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit;
if depositBox.isOpen() then
begin
bankTimer.start();
repeat
if (depositBox.count > 0) then
begin
depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);
wait(gaussRangeInt(1000,2000));
end;
until(depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 10000);

inc(LoadsDone);
end;
depositBox.close();
end;

procedure progressReport();
var
logsCut, profit, profitPerHour: integer;
begin
logsCut:= LoadsDone * 28;
profit := (logsCut * 375);
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));

writeLn('========================================================');
writeLn('TAs_Teak_logs_to_Castle_Bank');
writeLn('Time Run: ' + timeRunning);
writeLn('Logs Cut: ' + intToStr(logsCut));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('Profit Made: ' + intToStr(profit));
writeLn('Per Hour: ' + intToStr(profitPerHour));
writeLn('========================================================');
end;

My entire script at this point is as such


:D



1) See: https://villavu.com/forum/showthread.php?t=107757&page=4&p=1302675#post1302675

2) As I said, you didn't declare the 'LoadsDone' variable. As you use it within 2 procedures (deposit & proggy) you need to declare it globally (outside a procedure).


program TAs_Teak_logs_to_bank;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

var
LoadsDone: Integer;

You're also missing an end, and you're ends don't line up in chopTeak()

Turpinator

2015-01-14 15:04:53

From: The Anihilator
As i am reading the tutorials, I have been creating a simple script to help me understand what i am reading (by creating)…

My script plan is

Start - castle Wars
run to teak tree
cut logs
run to castle bank chest
deposit logs
repeat

I been using Mayor's tutorials and have received some help in private from him… Thank you so much for all you've done mayor.

so here are some question i have

1)
In tutorial it is stated to use randoms… and was placed in script as such..

 wait(randomRange(1000, 2000));  

but below i see you have changed this to …

  wait(gaussRangeInt(1000,2000)); 

Why?

2) In my progress report Mayor told me - "Missing the global 'LoadsDone' variable" i placed and now get error -
Error: Unknown declaration "LoadsDone" at line 50
Compiling failed.


procedure depositlogs();
var
bankTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit;
if depositBox.isOpen() then
begin
bankTimer.start();
repeat
if (depositBox.count > 0) then
begin
depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);
wait(gaussRangeInt(1000,2000));
end;
until(depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 10000);

inc(LoadsDone);
end;
depositBox.close();
end;

procedure progressReport();
var
logsCut, profit, profitPerHour: integer;
begin
logsCut:= LoadsDone * 28;
profit := (logsCut * 375);
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));

writeLn('========================================================');
writeLn('TAs_Teak_logs_to_Castle_Bank');
writeLn('Time Run: ' + timeRunning);
writeLn('Logs Cut: ' + intToStr(logsCut));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('Profit Made: ' + intToStr(profit));
writeLn('Per Hour: ' + intToStr(profitPerHour));
writeLn('========================================================');
end;

My entire script at this point is as such


program TAs_Teak_logs_to_bank;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'username';
password := 'password';
isActive := true;
isMember := true;
end;
currentPlayer := 0;
end;

procedure findDepositBox();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
repeat
mainscreen.findObject(x, y, 724754, 1, colorSetting(2, 2.39, 2.71), mainscreen.playerPoint, 30, 50, 50, ['ank', 'chest'], MOUSE_LEFT);
wait(randomRange(1000, 2000));
inc(i);
until depositBox.isOpen() or (i >= 15);
end;

procedure depositlogs();
var
bankTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit;
if depositBox.isOpen() then
begin
bankTimer.start();
repeat
if (depositBox.count > 0) then
begin
depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);
wait(gaussRangeInt(1000,2000));
end;
until(depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 10000);

inc(LoadsDone);
end;
depositBox.close();
end;

procedure runToTree();
var
pathToTree: TPointArray;
begin
if not isLoggedIn() then
exit;
pathToTree :=[Point(613, 141), Point(613, 141), Point(614, 127), Point(651, 127), Point(682, 130), Point(692, 134), Point(686, 161), Point(669, 192), Point(656, 211), Point(634, 226), Point(602, 250), Point(567, 261), Point(504, 265), Point(450, 264), Point(407, 263), Point(376, 268), Point(326, 270), Point(277, 273), Point(239, 268), Point(197, 275), Point(160, 287), Point(134, 293)]
if SPS.walkPath(pathToTree) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Tree');
end;

procedure chopTeak();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
begin
if mainscreen.findObject(x, y,999465, 7, ['eak'], MOUSE_RIGHT)then
begin
writeLn('We right clicked a tree!');
chooseOption.select(['hop down']);
tabBackPack.waitForShift(5000);
end;
end;

begin
clearDebug();
setupSRL();

repeat
repeat
chopTeak();
until tabBackpack.isFull();
findDepositBox();
depositLogs();
until false;
end;



procedure hikeToBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() then
exit;
pathToBank :=[Point(133, 292), Point(161, 289), Point(183, 282), Point(207, 274), Point(244, 269), Point(288, 268), Point(327, 269), Point(373, 268), Point(412, 262), Point(467, 262), Point(522, 261), Point(584, 258), Point(628, 238), Point(662, 219), Point(695, 182), Point(701, 142), Point(675, 131), Point(621, 128), Point(612, 135)]
if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Bank');
end;
procedure progressReport();
var
logsCut, profit, profitPerHour: integer;
begin
logsCut:= LoadsDone * 28;
profit := (logsCut * 375);
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));

writeLn('========================================================');
writeLn('TAs_Teak_logs_to_Castle_Bank');
writeLn('Time Run: ' + timeRunning);
writeLn('Logs Cut: ' + intToStr(logsCut));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('Profit Made: ' + intToStr(profit));
writeLn('Per Hour: ' + intToStr(profitPerHour));
writeLn('========================================================');
end;

begin // main loop
clearDebug();
smartEnableDrawing := true;
disableSRLDebug := false;
setupSRL();
declarePlayers();
SPS.setup('TEAK_MAP', RUNESCAPE_OTHER);
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;
if tabBackpack.isFull() then
begin
hikeToBank();
findDepositBox();
depositlogs();
end;
runToTree();
chopTeak();
hikeToBank();
findDepositBox();
depositLogs();
progressReport();
end.
:D


1: Uniform Distribution vs Normal/Gaussian Distribution.
https://answers.yahoo.com/question/index?qid=20070728224920AA5BVXk

2: at the top…
program TAs_Teak_logs_to_bank;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

var
LoadsDone: Integer;

The Mayor

2015-01-14 15:10:26

From: Turpinator
1: Uniform Distribution vs Normal/Gaussian Distribution.
https://answers.yahoo.com/question/index?qid=20070728224920AA5BVXk

2: at the top…
program TAs_Teak_logs_to_bank;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

var
LoadsDone: Integer;


Just letting you know you were ninjed

Turpinator

2015-01-14 15:31:58

From: The Mayor
Just letting you know you were ninjed


Well you see what happens is…
Vist SRL
Scroll to new posts
Open all the ones that are new/interesting/etc.
Start looking them over
post finally.
Soo. when i opened it, nothing else existed.

The Anihilator

2015-01-14 20:29:49

OMG!!:spot: i think i did it!

—— Login response: Runescape has been updated
—— WARNING: RS Update: Going to call EVENT_RS_UPDATE procedure
—— sixHourFix():
——– Reset attempt #1
——– Succesfully freed SMART[5232]
——– Killed our current client. Waiting 5m & 5s before reloading

LOL but it's loading… OMG i can't wait to see if this finally actually works….. sry it's my first…

i know , i know… noobie virgins :cartman:

Turpinator

2015-01-14 20:50:03

From: The Anihilator
OMG!!:spot: i think i did it!

—— Login response: Runescape has been updated
—— WARNING: RS Update: Going to call EVENT_RS_UPDATE procedure
—— sixHourFix():
——– Reset attempt #1
——– Succesfully freed SMART[5232]
——– Killed our current client. Waiting 5m & 5s before reloading

LOL but it's loading… OMG i can't wait to see if this finally actually works….. sry it's my first…


Well, if you have a dynamic ip address, you can always 'restart' your router so that it grabs a new one. on this happening, rs will make you load a new window. so thats one way to test it.

KeepBotting

2015-01-14 20:54:13

From: Turpinator
Well, if you have a dynamic ip address, you can always 'restart' your router so that it grabs a new one. on this happening, rs will make you load a new window. so thats one way to test it.


couldn't you just comment out your mainloop and smartReloadClient() ? that way you can set your own params for the restart, so no waiting 5 minutes to see if you've done it correctly

The Anihilator

2015-01-14 21:01:50

well it works for the most part )) Woohoo… have to find the little errors now in the script so it runs smoothly ..

1) when login near tree it begins chopping - till, tree disapears - then program starts new client…
2) Backpack becomes full.. again starts new client
3) running to tree or to bank chest, final stop point is beyond vision of chest or tree ( i think this has to do with my map and waypoints)
4) where could i read and learn about login commands and SRL Player manager layout?

here again is the complete script…


program TAs_Teak_logs_to_bank;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

var
LoadsDone: Integer;

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := true;
end;
currentPlayer := 0;
end;

procedure findDepositBox();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
repeat
mainscreen.findObject(x, y, 724754, 1, colorSetting(2, 2.39, 2.71), mainscreen.playerPoint, 30, 50, 50, ['ank', 'chest'], MOUSE_LEFT);
wait(randomRange(1000, 2000));
inc(i);
until depositBox.isOpen() or (i >= 15);
end;

procedure depositlogs();
var
bankTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit;
if depositBox.isOpen() then
begin
bankTimer.start();
repeat
if (depositBox.count > 0) then
begin
depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);
wait(randomrange(1000,2000));
end;
until(depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 10000);
end;
depositBox.close();
end;

procedure runToTree();
var
pathToTree: TPointArray;
begin
if not isLoggedIn() then
exit;
pathToTree :=[Point(613, 141), Point(613, 141), Point(614, 127), Point(651, 127), Point(682, 130), Point(692, 134), Point(686, 161), Point(669, 192), Point(656, 211), Point(634, 226), Point(602, 250), Point(567, 261), Point(504, 265), Point(450, 264), Point(407, 263), Point(376, 268), Point(326, 270), Point(277, 273), Point(239, 268), Point(197, 275), Point(160, 287), Point(134, 293)]
if SPS.walkPath(pathToTree) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Tree');
end;

procedure chopTeak();

var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
begin
if mainscreen.findObject(x, y,999465, 7, ['eak'], MOUSE_RIGHT)then
begin
writeLn('We right clicked a tree!');
chooseOption.select(['hop down']);
tabBackPack.waitForShift(5000);
end;
end;

begin
clearDebug();
setupSRL();

repeat
repeat
chopTeak();
until tabBackpack.isFull();

findDepositBox();
depositLogs();
until false;
end;
end

procedure hikeToBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() then
exit;
pathToBank :=[Point(133, 292), Point(161, 289), Point(183, 282), Point(207, 274), Point(244, 269), Point(288, 268), Point(327, 269), Point(373, 268), Point(412, 262), Point(467, 262), Point(522, 261), Point(584, 258), Point(628, 238), Point(662, 219), Point(695, 182), Point(701, 142), Point(675, 131), Point(621, 128), Point(612, 135)]
if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Bank');
end;
procedure progressReport();
var
logsCut, profit, profitPerHour: integer;
begin
logsCut:= LoadsDone * 28;
profit := (logsCut * 375);
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));

writeLn('========================================================');
writeLn('TAs_Teak_logs_to_Castle_Bank');
writeLn('Time Run: ' + timeRunning);
writeLn('Logs Cut: ' + intToStr(logsCut));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('Profit Made: ' + intToStr(profit));
writeLn('Per Hour: ' + intToStr(profitPerHour));
writeLn('========================================================');
end;

begin // main loop
clearDebug();
smartEnableDrawing := true;
disableSRLDebug := false;
setupSRL();
declarePlayers();
SPS.setup('TEAK_MAP', RUNESCAPE_OTHER);
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;
if tabBackpack.isFull() then
begin
hikeToBank();
findDepositBox();
depositlogs();
end;
runToTree();
chopTeak();
hikeToBank();
findDepositBox();
depositLogs();
progressReport();
end.

KeepBotting

2015-01-14 21:04:27

From: The Anihilator
snippity snip

Username & password is in the script, might wanna remove those :P

Edit: You already did :P that was quick

The Anihilator

2015-01-14 21:07:35

lol I noticed after post and edited ty

Justin

2015-01-14 21:11:06

From: The Anihilator
lol I noticed after post and edited ty


I have also removed your username from the script.

The Anihilator

2015-01-14 22:23:18

ok, this is driving me nutz… and please don't reply with "" Read the " How to set up Simba forum""

WTF does this mean?and how do i repair so it doesn't do it any more?


—WARNING: RS Update: Going to Call EVENT_RS_UPDATE procedure
—sixHourFix90:
—–Reset attempt #1
—–Succesfully freed Smart[388344]
—–Killed our client. Waiting blah blah blah.

give me a break .. yesterday I knew nothing today I learned

begin
end;
:)

KeepBotting

2015-01-14 22:26:31

From: The Anihilator
ok, this is driving me nutz… and please don't reply with "" Read the " How to set up Simba forum""

WTF does this mean?and how do i repair so it doesn't do it any more?


—WARNING: RS Update: Going to Call EVENT_RS_UPDATE procedure
—sixHourFix90:
—–Reset attempt #1
—–Succesfully freed Smart[388344]
—–Killed our client. Waiting blah blah blah.

give me a break .. yesterday I knew nothing today I learned

begin
end;
:)

That's only supposed to happen when SRL tries to log your player in, but gets hit with the "RS has been updated" message. And that's only supposed to happen every six hours.

The Anihilator

2015-01-14 22:37:01

From: KeepBotting
That's only supposed to happen when SRL tries to log your player in, but gets hit with the "RS has been updated" message. And that's only supposed to happen every six hours.


OK.. But I have Simba running, attempting to login t the RS client for about 2 hours now… i have also restarted Simba a few times.

Is there something i am missing here?

KeepBotting

2015-01-14 22:40:47

From: The Anihilator
OK.. But I have Simba running, attempting to login t the RS client for about 2 hours now… i have also restarted Simba a few times.

Is there something i am missing here?


Explain the events leading up to the error, please. SRL will only reload the client if it fails to log your player in, and receives a specific login response.

Do you mean that SRL is never able to log you in correctly? In that case, incorrect graphics settings are the culprit 99% of the time.

The Anihilator

2015-01-14 22:55:37

From: KeepBotting
Explain the events leading up to the error, please. SRL will only reload the client if it fails to log your player in, and receives a specific login response.

Do you mean that SRL is never able to log you in correctly? In that case, incorrect graphics settings are the culprit 99% of the time.


No no, just when i start to login, or start a script i have been using.. for example i have Mayor's Miner script running for a good part of the day…shut it down for a break and restarted it after i came back from work… it now sits trying to login with that error message each time , having the client killed… I am just wondering if this is normal and is due to RS in it's self.

:duh:OK i am stumped..

please run my script as is below to see the problems i am running into and then … DO NOT tell me how to fix it , but rather direct me to
where i can find the information on how.

The Mayor

2015-01-15 01:00:09

From: The Anihilator
No no, just when i start to login, or start a script i have been using.. for example i have Mayor's Miner script running for a good part of the day…shut it down for a break and restarted it after i came back from work… it now sits trying to login with that error message each time , having the client killed… I am just wondering if this is normal and is due to RS in it's self.

—— Login response: Runescape has been updated
—— WARNING: RS Update: Going to call EVENT_RS_UPDATE procedure
—— sixHourFix():
——– Reset attempt #1
——– Succesfully freed SMART[5232]
——– Killed our current client. Waiting 5m & 5s before reloading


I'm just checking: you know you actually have to wait 5 minutes before it will spawn a new smart

The Anihilator

2015-01-15 01:14:36

yes, it is running and re spawning a new Smart every 5 min , BUT then is killed repeatedly

From: The Anihilator
:duh:OK i am stumped..

please run my script as is below to see the problems i am running into and then … DO NOT tell me how to fix it , but rather direct me to
where i can find the information on how.



Grr.. so frustrated.. I can't find out why it continues to load another client after start chopteak

Ok i got lot of the problems fixed, login, spawning extra clients,paths, map…

now i have one that i just can't figure out..

ok2

1) When chopping the logs , tree disappears and backpack not full but still runs to bank

2) when at bankchest , can not find the "empty all backpack" tab or bankchest it'self

3) how do i add bankpass to script?


program TAs_Teak_To_CastleWars_BankScript;
{$DEFINE SMART}
{$i srl-6/srl.simba}
{$i sps/lib/sps-rs3.simba}

var
loadsDone: Integer;

procedure declarePlayers();
begin
setLength(players, 1);

with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := true;
end;

currentPlayer := 0;
end;

procedure findDepositBox();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
repeat
mainscreen.findObject(x, y, 724754, 1, colorSetting(2, 2.39, 2.71), mainscreen.playerPoint, 30, 50, 50, ['ank', 'chest'], MOUSE_LEFT);
wait(randomRange(1000, 2000));
inc(i);
until depositBox.isOpen() or (i >= 15);
end;

procedure depositlogs();
var
bankTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit();

if depositBox.isOpen() then
begin
bankTimer.start();
repeat
if (depositBox.count() > 0) then
begin
depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);
wait(randomrange(1000, 2000));
end;
until (depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 10000);
end;

depositBox.close();
end;

procedure runToTree();
var
pathToTree: TPointArray;
begin
if not isLoggedIn() then
exit();
pathToTree :=[Point(520, 107), Point(523, 114), Point(517, 98), Point(517, 89), Point(549, 89), Point(588, 92), Point(598, 97), Point(591, 133), Point(579, 156), Point(568, 169), Point(543, 189), Point(519, 205), Point(477, 220), Point(422, 225), Point(370, 229), Point(333, 223), Point(288, 228), Point(241, 230), Point(188, 232), Point(145, 233), Point(108, 231), Point(91, 232)]
if SPS.walkPath(pathToTree) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Tree');
end;

procedure chopTeak();
var
x, y, i: integer;
mineTimer: TTimeMarker;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit();
mineTimer.start();
repeat
findColorsSpiralTolerance(x, y, TPA, 999465, mainScreen.getBounds(), 7, colorSetting(2, 0.17, 0.41));
if (length(TPA) < 1) then
exit();
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['Teak', 'eak'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clear();
break();
wait(randomrange(1000, 5000));
end;
end;

tabBackpack.waitForShift(5000);
claimSpinTicket();
until tabBackpack.isFull() or (mineTimer.getTime() > 300000);
end;

procedure runToBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() then
exit();
pathToBank :=[Point(79, 243), Point(113, 234), Point(167, 226), Point(209, 226), Point(253, 232), Point(282, 230), Point(326, 223), Point(356, 226), Point(388, 222), Point(435, 219), Point(467, 219), Point(504, 215), Point(538, 202), Point(566, 180), Point(590, 153), Point(608, 123), Point(605, 94), Point(588, 91), Point(522, 92), Point(514, 103), Point(533, 133)]
if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Bank');
end;

begin
clearDebug();
smartEnableDrawing := true;
disableSRLDebug := false;
setupSRL();
declarePlayers();

SPS.setup('Teak_Map1', RUNESCAPE_OTHER);

if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;

if tabBackpack.isFull() then
begin
runToBank();
findDepositBox();
depositlogs();
end;

runToTree();
chopTeak();
runToBank();
findDepositBox();
depositLogs();
end.

]Ok i got lot of the problems fixed, login, spawning extra clients,paths, map…

now i have one that i just can't figure out..

ok2

1) When chopping the logs , tree disappears and backpack not full but still runs to bank < found error and edited..

2) when at bankchest , can not find the "empty all backpack" tab or bankchest it'self << repaired with complete change of script and use of (BANK_CHEST_CW) command

3) how do i add bankpass to script? <<<Found and added with the addition of Player Manager :spot:

Now working new errors.. which i knew i would get adding Manager… LOL but this is a blast and keeps the mind working..

Any HINTS as to better controlling the end run poisitioning, so as to be in view of bank or target tree, that would help alot.

The Mayor

2015-01-17 02:11:05

From: The Anihilator
]Ok i got lot of the problems fixed, login, spawning extra clients,paths, map…

now i have one that i just can't figure out..

ok2

1) When chopping the logs , tree disappears and backpack not full but still runs to bank < found error and edited..

2) when at bankchest , can not find the "empty all backpack" tab or bankchest it'self << repaired with complete change of script and use of (BANK_CHEST_CW) command

3) how do i add bankpass to script? <<<Found and added with the addition of Player Manager :spot:

Now working new errors.. which i knew i would get adding Manager… LOL but this is a blast and keeps the mind working..

Any HINTS as to better controlling the end run poisitioning, so as to be in view of bank or target tree, that would help alot.


Probs post your updated script

The Anihilator

2015-01-17 02:16:07

ok but i am editting the Player manager to get bank pin added… looking for commands atm..

argh!!

The Anihilator

2015-01-18 01:56:35

HELP! please..

I just can't figure out the errors here.
I have removed the Player Manager as i just couldn't find enough tutorial information on how to set it all up properly and what i did have caused many errors… now after removing it i have new errors..

1)chops until tree disappears and logs out.
2)while chopping may deside to go to bank after 1 log increase in backPack.
3)While banking may logout , deposit 1 log at a time or none.
4) spawns 2 clients before fully logging in and running script.


program TAs_Teak_To_CastleWars_BankScript;
{$DEFINE SMART}
{$i srl-6/srl.simba}
{$i srl-6/lib/misc/srlplayerform.simba}
{$i sps/lib/sps-rs3.simba}

var
loadsDone: Integer;

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
BankPin := '';
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;

procedure depositLogs();
begin
if bankScreen.open(BANK_CHEST_CW) then

Begin
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomRange(1000, 2000));
bankScreen.close();
end else
writeLn('Couldn''t find the bank for some reason!');

end;
begin
clearDebug();
setupSRL();
depositLogs();
end;

procedure runToTree();
var
pathToTree: TPointArray;
begin
if not isLoggedIn() then
exit();
pathToTree :=[Point(522, 105), Point(522, 105), Point(523, 90), Point(590, 91), Point(577, 157), Point(523, 191), Point(459, 217), Point(410, 230), Point(352, 226), Point(297, 226), Point(237, 232), Point(180, 228), Point(129, 233), Point(85, 242)]
if SPS.walkPath(pathToTree) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Tree');
end;

procedure chopTeak();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
mineTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit();
mineTimer.start();
repeat
findColorsSpiralTolerance(x, y, TPA, 999465, mainScreen.getBounds(), 7, colorSetting(2, 0.17, 0.41));
if (length(TPA) < 1) then
exit();
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['hop', 'eak'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clear();
break();
end;
end;
TabBackpack.waitForShift(5000);
claimSpinTicket();
until TabBackpack.isFull() or (mineTimer.getTime() > 30000);

end;

procedure runToBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() then
exit();
pathToBank :=[Point(82, 242), Point(129, 233), Point(180, 228), Point(237, 232), Point(297, 226), Point(352, 226), Point(410, 230), Point(459, 217), Point(523, 191), Point(577, 157), Point(590, 91), Point(523, 90), Point(522, 105), Point(522, 115)]
if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Bank');
end;

begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();
SPS.setup('Teak_Map1', RUNESCAPE_OTHER);
SPSAnyAngle := False;
if not isLoggedIn() then
begin
players[currentPlayer].login();
wait(randomRange(1000,3000));
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.clickCompass();
minimap.setAngle(MM_DIRECTION_NORTH);
end;
if not TabBackPack.isfull()then
ChopTeak()

if TabBackpack.isFull() then
runToBank();
DepositLogs();
RunToTree();
end;


The Mayor

2015-01-18 02:09:47

From: The Anihilator
HELP! please..

I just can't figure out the errors here.
I have removed the Player Manager as i just couldn't find enough tutorial information on how to set it all up properly and what i did have caused many errors… now after removing it i have new errors..

1)chops until tree disappears and logs out.
2)while chopping may deside to go to bank after 1 log increase in backPack.
3)While banking may logout , deposit 1 log at a time or none.
4) spawns 2 clients before fully logging in and running script.


program TAs_Teak_To_CastleWars_BankScript;
{$DEFINE SMART}
{$i srl-6/srl.simba}
{$i srl-6/lib/misc/srlplayerform.simba}
{$i sps/lib/sps-rs3.simba}

var
loadsDone: Integer;

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'un';
password := 'pw';
BankPin := '';
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;

procedure depositLogs();
begin
if bankScreen.open(BANK_CHEST_CW) then

Begin
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomRange(1000, 2000));
bankScreen.close();
end else
writeLn('Couldn''t find the bank for some reason!');

end;
begin
clearDebug();
setupSRL();
depositLogs();
end;

procedure runToTree();
var
pathToTree: TPointArray;
begin
if not isLoggedIn() then
exit();
pathToTree :=[Point(522, 105), Point(522, 105), Point(523, 90), Point(590, 91), Point(577, 157), Point(523, 191), Point(459, 217), Point(410, 230), Point(352, 226), Point(297, 226), Point(237, 232), Point(180, 228), Point(129, 233), Point(85, 242)]
if SPS.walkPath(pathToTree) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Tree');
end;

procedure chopTeak();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
mineTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit();
mineTimer.start();
repeat
findColorsSpiralTolerance(x, y, TPA, 999465, mainScreen.getBounds(), 7, colorSetting(2, 0.17, 0.41));
if (length(TPA) < 1) then
exit();
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 10);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['hop', 'eak'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clear();
break();
end;
end;
TabBackpack.waitForShift(5000);
claimSpinTicket();
until TabBackpack.isFull() or (mineTimer.getTime() > 30000);

end;

procedure runToBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() then
exit();
pathToBank :=[Point(82, 242), Point(129, 233), Point(180, 228), Point(237, 232), Point(297, 226), Point(352, 226), Point(410, 230), Point(459, 217), Point(523, 191), Point(577, 157), Point(590, 91), Point(523, 90), Point(522, 105), Point(522, 115)]
if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the Bank');
end;

begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();
SPS.setup('Teak_Map1', RUNESCAPE_OTHER);
SPSAnyAngle := False;
if not isLoggedIn() then
begin
players[currentPlayer].login();
wait(randomRange(1000,3000));
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.clickCompass();
minimap.setAngle(MM_DIRECTION_NORTH);
end;
if not TabBackPack.isfull()then
ChopTeak()

if TabBackpack.isFull() then
runToBank();
DepositLogs();
RunToTree();
end;






Look at how your mainloop is structured, it's not even in a repeat loop, and you are missing some begins and ends. Also why do you have two setupSRL() in there?

The Anihilator

2015-01-18 18:57:45

ThankZ mayor, you've been a great help… looks like I finally have the script running as extremely basic atm… going to let it run for a little (do some house work while it runs) then I'll post a proggy. still unfinished to my liking though. going to add in player manager again as the pin won't work as is and messes the script up. also want to add in antiBan ,as the way the script is now it's very inhuman like lol.

so some links to good anti ban and Player manager tutorial would be appreciated.

========================================================
TAs Teak to CastleWars Bank
Time Run: 1 Hour, 23 Minutes and 52 Seconds
Teak Cut: 420
Loads Done: 15
Profit Made:147000
Per Hour:105148
========================================================
so far so good :)
========================================================
TAs Teak to CastleWars Bank
Time Run: 3 Hours, 17 Minutes and 34 Seconds
Teak Cut: 1120
Loads Done: 40
Profit Made:392000
Per Hour:119045
========================================================

Well here it is give it a try and let me know how it runs for you… this is my first, ran well for the length of my proggies and will test longer.. looking forward to hearing how it works for others :)


————————————————————————————————————————–

The Anihilator

2015-01-19 22:56:18

Could someone please tell me what the best would be to script the plankMaker….. I understand the chat part but then get to the buy box and was wondering if there is a command for the buy buttons like bank and backPack.

The Mayor

2015-01-20 01:46:45

From: The Anihilator
Could someone please tell me what the best would be to script the plankMaker….. I understand the chat part but then get to the buy box and was wondering if there is a command for the buy buttons like bank and backPack.


My old script might still work, if not, you can see how I did that interface anyway.

The Anihilator

2015-01-20 04:12:56

From: The Mayor
My old script might still work, if not, you can see how I did that interface anyway.


Nice, but i was thinking making for Taverly as the distance travelled is much shorter :)
But ty I'll have a look at yours to see how it's done .