PDA

View Full Version : Newbie questions



beefman
06-17-2014, 06:10 PM
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
06-17-2014, 06:22 PM
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
06-17-2014, 06:47 PM
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
06-17-2014, 07:38 PM
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
06-17-2014, 08:19 PM
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.

23409

KeepBotting
06-17-2014, 08:29 PM
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.

23409Attachment is invalid.

Don't use Villavu's file storage for posting screenshots anyway, use a tool like puush (http://www.puush.me).

beefman
06-17-2014, 09:05 PM
Attachment is invalid.

Don't use Villavu's file storage for posting screenshots anyway, use a tool like puush (http://www.puush.me).

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

The Mayor
06-17-2014, 09:58 PM
https://www.sendspace.com/file/jpmsy4


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

KeepBotting
06-17-2014, 10:35 PM
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
06-18-2014, 09:32 AM
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
06-18-2014, 12:25 PM
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