SRL Archive - RS3 Help

Newbie questions


beefman

2014-06-17 14:10:26

1. why is my script not ending when back pack is full?
begin
disableSRLDebug := true;
smartEnableDrawing := true;
setupSRL();
SPS.setup('MAP', RUNESCAPE_OTHER);
declarePlayers();

if not isLoggedIn() then
begin
players[currentPlayer].login();

minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
mainScreen.setZoom(true)
end;
repeat
if chopTree() = false then
begin
WalkToCords();
end;
until tabBackpack.isFull();

end.




2. How do i make the camera view change up and down?

KeepBotting

2014-06-17 14:22:55

1. I'm guessing you have an infinite loop somewhere that's preventing the script from reaching the until. Post the rest of the script and we'll be able to help you better.

2. Use
mainScreen.setAngle(MS_ANGLE_HIGH);
and
mainScreen.setAngle(MS_ANGLE_LOW);

beefman

2014-06-17 14:47:18

program scriptTemplate;

{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files

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

function choptree(): boolean;
var
x, y: integer;
begin // colour, tol CTS, hue, sat
if mainscreen.findObject(x, y, 992285, 10, colorSetting(2, 0.33, 1.12), mainscreen.getCenterPoint(), 86, 50, 40, ['down Ever','last','ever'], MOUSE_LEFT) then
begin
result := true;
writeLn('Yay we clicked a tree');
wait(1500);
case Random(3) of
0: randomCompass(0, 360, false);
1: mainScreen.setAngle(MS_ANGLE_HIGH);
2: mainScreen.setAngle(MS_ANGLE_LOW);
end;
end else
writeLn('COULDN''T FIND TREE.');


if tabBackPack.waitForShift(3000) then
writeLn('We got a log');
end;




procedure WalkToCords();
begin
writeLn('WALKING TO CORDS.');
SPS.walkToPos(point(randomRange(173, 236), randomRange(145,196)));

end;


// main loop
begin
disableSRLDebug := true;
smartEnableDrawing := true;
setupSRL();
SPS.setup('MAP', RUNESCAPE_OTHER);
declarePlayers();

if not isLoggedIn() then
begin
players[currentPlayer].login();

minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
mainScreen.setZoom(true)
end;
repeat
if chopTree() = false then
begin
WalkToCords();
end;
until tabBackpack.isFull();

end.

KeepBotting

2014-06-17 15:38:19

From: beefman
program scriptTemplate;

{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files

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

function choptree(): boolean;
var
x, y: integer;
begin // colour, tol CTS, hue, sat
if mainscreen.findObject(x, y, 992285, 10, colorSetting(2, 0.33, 1.12), mainscreen.getCenterPoint(), 86, 50, 40, ['down Ever','last','ever'], MOUSE_LEFT) then
begin
result := true;
writeLn('Yay we clicked a tree');
wait(1500);
case Random(3) of
0: randomCompass(0, 360, false);
1: mainScreen.setAngle(MS_ANGLE_HIGH);
2: mainScreen.setAngle(MS_ANGLE_LOW);
end;
end else
writeLn('COULDN''T FIND TREE.');


if tabBackPack.waitForShift(3000) then
writeLn('We got a log');
end;




procedure WalkToCords();
begin
writeLn('WALKING TO CORDS.');
SPS.walkToPos(point(randomRange(173, 236), randomRange(145,196)));

end;


// main loop
begin
disableSRLDebug := true;
smartEnableDrawing := true;
setupSRL();
SPS.setup('MAP', RUNESCAPE_OTHER);
declarePlayers();

if not isLoggedIn() then
begin
players[currentPlayer].login();

minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
mainScreen.setZoom(true)
end;
repeat
if chopTree() = false then
begin
WalkToCords();
end;
until tabBackpack.isFull();

end.

Are you sure you have your interfaces set up correctly?

Edit: shit, just realized your username and password are still in the script. remove them!

beefman

2014-06-17 16:19:21

From: KeepBotting
Are you sure you have your interfaces set up correctly?

Edit: shit, just realized your username and password are still in the script. remove them!



Shit, just removed it. Going to change my password. opps!! lol, i keep doing that :/. I'm pretty sure my interface is set up correctly.

[ATTACH=CONFIG]23409[/ATTACH]

KeepBotting

2014-06-17 16:29:16

From: beefman
Shit, just removed it. Going to change my password. opps!! lol, i keep doing that :/. I'm pretty sure my interface is set up correctly.

[ATTACH=CONFIG]23409[/ATTACH]
Attachment is invalid.

Don't use Villavu's file storage for posting screenshots anyway, use a tool like puush.

beefman

2014-06-17 17:05:06

From: KeepBotting
Attachment is invalid.

Don't use Villavu's file storage for posting screenshots anyway, use a tool like puush.


https://www.sendspace.com/file/jpmsy4

The Mayor

2014-06-17 17:58:26

From: beefman
https://www.sendspace.com/file/jpmsy4



You know your backack has to be open for it to count the items?

KeepBotting

2014-06-17 18:35:28

From: The Mayor
You know your backack has to be open for it to count the items?


This. isFull() doesn't open the backpack, in fact it exits(false) if it's not already open.

Change
repeat
if chopTree() = false then
begin
WalkToCords();
end;
until tabBackpack.isFull();
to
repeat
if not tabBackpack.isOpen() then tabBackpack.open();
if chopTree() = false then
begin
WalkToCords();
end;
until tabBackpack.isFull();
and it should work.

beefman

2014-06-18 05:32:25

From: KeepBotting
This. isFull() doesn't open the backpack, in fact it exits(false) if it's not already open.

Change
repeat
if chopTree() = false then
begin
WalkToCords();
end;
until tabBackpack.isFull();
to
repeat
if not tabBackpack.isOpen() then tabBackpack.open();
if chopTree() = false then
begin
WalkToCords();
end;
until tabBackpack.isFull();
and it should work.



Thanks, it started working randomly last night. However, this will be handy to add in :)

KeepBotting

2014-06-18 08:25:32

From: beefman
Thanks, it started working randomly last night. However, this will be handy to add in :)
It was probably because you started the script with your backpack already open :D