SRL Archive - First Scripts

Jail break, oak cutter


blink

2012-04-08 11:02:58

I will no longer be updating this thread, All future updates will be located here

http://villavu.com/forum/showthread.php?t=80100



UPGRADED to V3


longest run - 4 hours-

I have been working on this for the past week, and added a few things.
I will continue to work on this until it is flawless.

Start Bot in Draynor bank, or oaks

-bot currently cuts oak logs by the draynor jail
-supports banking
-has antibans
-auto logins

help on bugs would be appreciated.

Known Bugs.
-cuts normal logs as well as oaks


Changed walking to DTM,
walks better and more accurately.



keep in mind this is my first script.

Sockz

2012-04-13 10:05:24

Awesome script! nice start I reckon.

Few things i noticed however

- you needa call up your antiban procedure, probably whilst you are waiting for it to chop down the tree
-you need a failsafe for like if it can't find a tree, if it can't your inventory will never be full and it will just keep on looping.
-thats all :P good script i reckon

If you need any help with these issues just ask :D and ill do my best…. tutorial section is great too!

Joe

2012-04-13 10:39:54

With your post count this is your first script, Good job. Looks better than most first scripts!

EDIT: Why do you have the ObjDTM include when you use SPS?

EDIT 2:
 repeat
WalkToTree;
ChopTree;
WalkToBank;
Banking;




WalkToTree;
ChopTree;
WalkToBank;
Banking;

Until (AllPlayersInactive);
WriteLn('until next time.');

Why do you do that 2x in the main loop.. its the same as calling it up once…

Abu

2012-04-13 11:10:33

Fixed your script for you :)

You had poor standards and were missing some begin and end statements which would've stopped your script from working.

program Jailbait_V1;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

Procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
//start script west of the jail in draynor.
Players[0].Name :=''; //username
Players[0].Pass :=''; //password
Players[0].Pin := ''; //bankpin
Players[0].Member := False; //put true= members

end;

procedure WalkToTree;
var
ToTrees:TPointArray;
begin
if(not(LoggedIn))then
Exit;
SPS_Areas := ['10_9'];
ToTrees := [Point(4193, 3666), Point(4188, 3649), Point(4202, 3644), Point(4231, 3641), Point(4255, 3672), Point(4270, 3665)];
SPS_WalkPath(ToTrees);
Wait(4232+random(354));
end;

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
MakeCompass('S');
Wait(40+random(133));
HoverSkill('Woodcutting', false);
Wait(2453+Random(432));
end;

procedure ChopTree;
var
x, y: Integer;
begin
FindNormalRandoms
MakeCompass('N');
SetAngle(SRL_ANGLE_LOW);
repeat
repeat
if FindObj(x, y, 'hop',1517609, 34) then
begin
Mouse(x, y, 0, 0, true);
ChooseOption('hop');
MakeCompass('E');
Wait(1100+ random(1010));
MakeCompass('W');
Wait(1007+ random(1003));
MakeCompass('N');
Wait(1200+ random(250));
end;
until not IsUpText('ak') or (InvFull);
until(InvFull);
end;

procedure WalkToBank;
var
ToBank, ToTrees:TPointArray;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;

SPS_Areas := ['10_9'];
ToBank:= [Point(4252, 3672), Point(4228, 3659), Point(4200, 3646), Point(4193, 3666)];
SPS_WalkPath(ToBank);
Wait(5075+random(953));

SPS_Areas := ['10_9'];
ToTrees:= [Point(4191, 3663), Point(4188, 3646), Point(4203, 3643), Point(4228, 3661), Point(4244, 3673), Point(4272, 3662)];
SPS_WalkPath(ToTrees);

Wait(1354+random(254));
FindNormalRandoms;
end;


procedure Banking;
begin
if(InvFull) then
begin
repeat
OpenBankFast('db');
if(PinScreen)then
InPin(Players[CurrentPlayer].Pin );

if(BankScreen) then
begin
DepositAll;
CloseBank;
end;

until(InvEmpty);
end;
end;

begin

SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;


repeat
WalkToTree;
ChopTree;
WalkToBank;
Banking;
until (not LoggedIn);
WriteLn('until next time.');
end.


It's very good though for a first script, can't wait for your seconds one. :)

Joe

2012-04-13 11:12:47

From: abu_jwka
Fixed your script for you :)

You had poor standards and were missing some begin and end statements which would've stopped your script from working.

program Jailbait_V1;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

Procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
//start script west of the jail in draynor.
Players[0].Name :=''; //username
Players[0].Pass :=''; //password
Players[0].Pin := ''; //bankpin
Players[0].Member := False; //put true= members

end;

procedure WalkToTree;
var
ToTrees:TPointArray;
begin
if(not(LoggedIn))then
Exit;
SPS_Areas := ['10_9'];
ToTrees := [Point(4193, 3666), Point(4188, 3649), Point(4202, 3644), Point(4231, 3641), Point(4255, 3672), Point(4270, 3665)];
SPS_WalkPath(ToTrees);
Wait(4232+random(354));
end;

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
MakeCompass('S');
Wait(40+random(133));
HoverSkill('Woodcutting', false);
Wait(2453+Random(432));
end;

procedure ChopTree;
var
x, y: Integer;
begin
FindNormalRandoms
MakeCompass('N');
SetAngle(SRL_ANGLE_LOW);
repeat
repeat
if FindObj(x, y, 'hop',1517609, 34) then
begin
Mouse(x, y, 0, 0, true);
ChooseOption('hop');
MakeCompass('E');
Wait(1100+ random(1010));
MakeCompass('W');
Wait(1007+ random(1003));
MakeCompass('N');
Wait(1200+ random(250));
end;
until not IsUpText('ak') or (InvFull);
until(InvFull);
end;

procedure WalkToBank;
var
ToBank, ToTrees:TPointArray;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;

SPS_Areas := ['10_9'];
ToBank:= [Point(4252, 3672), Point(4228, 3659), Point(4200, 3646), Point(4193, 3666)];
SPS_WalkPath(ToBank);
Wait(5075+random(953));

SPS_Areas := ['10_9'];
ToTrees:= [Point(4191, 3663), Point(4188, 3646), Point(4203, 3643), Point(4228, 3661), Point(4244, 3673), Point(4272, 3662)];
SPS_WalkPath(ToTrees);

Wait(1354+random(254));
FindNormalRandoms;
end;


procedure Banking;
begin
if(InvFull) then
begin
repeat
OpenBankFast('db');
if(PinScreen)then
InPin(Players[CurrentPlayer].Pin );

if(BankScreen) then
begin
DepositAll;
CloseBank;
end;

until(InvEmpty);
end;
end;

begin

SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;


repeat
WalkToTree;
ChopTree;
WalkToBank;
Banking;
until (not LoggedIn);
WriteLn('until next time.');
end.


It's very good though for a first script, can't wait for your seconds one. :)


What does Abu do? He reads my post and makes changes…

White bear. Now.

Abu

2012-04-13 11:14:28

From: JOEbot
What does Abu do? He reads my post and makes changes…

White bear. Now.


Haha I was already fixing it. But then again I didn't realise he included ObjectDTM until you said it :whistling:

Joe

2012-04-13 11:20:22

From: abu_jwka
Haha I was already fixing it. But then again I didn't realise he included ObjectDTM until you said it :whistling:


Like I said.
Bear. Now.

blink

2012-04-14 09:42:47

thanks, I put {$i ObjectDTM\ObjDTMInclude.simba} cause i was trying something, i guess i forgot to remove when it didnt work lol

blink

2012-04-16 10:47:34

Updated

04/16/2012

blink

2012-04-17 15:12:29

I will no longer be updating this thread, All future updates will be located here

http://villavu.com/forum/showthread.php?t=80100