SRL Archive - OSR Help

First ever attempt at something i didn't copy paste.


Poweraids

2012-04-26 01:29:00

Alright i followed the "Script down your first rs tree! " Tutorial in the guide section and its working fine, what i now am trying to do is make it bank, i have.


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

Procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;

Procedure Antiban;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(313));
MakeCompass('S');
wait (10+random(80));
MakeCompass('N');
FindNormalRandoms
end;
end;
end;


Procedure Bank;
var x, y: integer;
begin
if (InvFull)=True then
FindObj (x, y, 'anker', 2977939, 100);
Mouse(x, y, 2, 2, false);
Wait(1200);
ChooseOption('ank Banker');
Wait(1200);
FindObj (x, y, 'eposit', 1854330, 100)
Mouse(x, y, 2, 2, false);
ChooseOption('eposit');


end;






Procedure ChopTree;
var x, y: integer;
begin
repeat
FindNormalRandoms
if FindObj(x, y, 'hop', 4153202, 150) then
Mouse(x, y, 2, 2, false);
ChooseOption('hop');
repeat
Wait(1200+random(250));
Antiban;
Until not isUpText('ree') or (InvFull);
until(InvFull);
Bank;
end;












begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
Loginplayer;
ChopTree;
Bank;
end..

It chops logs till full invent then ends, how do i make it start another inv?

Neznam

2012-04-26 01:29:40

remove your pass mate….

Poweraids

2012-04-26 01:30:49

I don't think my post makes much sense but..if anyone understood it i'd appreciate any feed back at all greatly.

Fuck my life -.-

Sigh somone on my char already >.<

Got my account back, still appreciate any link or feedback or help with script.

Neznam

2012-04-26 02:18:48

I believe banking is a bit more complicated than that mate, but ive been wrong before…
P.s Im sry about your account and glad you got it back =]
P.p.s Hope you had bank pin… =/

EDIT: Id love to comment more useful but I too am learning, and just did the chop your own tree script recently too.

weequ

2012-04-26 02:20:11

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
Loginplayer;
repeat
ChopTree;
Bank;
until(false); //Until false means it will never stop repeating those steps.
end.


Edit:
Procedure Bank;
var x, y: integer;
begin
if (InvFull)=True then //This will now only execute ONE line after (FindObj), then it will do Mouse(.. regardless of if your inventory was full.
FindObj (x, y, 'anker', 2977939, 100);
Mouse(x, y, 2, 2, false);
Wait(1200);
ChooseOption('ank Banker');
Wait(1200);
FindObj (x, y, 'eposit', 1854330, 100)
Mouse(x, y, 2, 2, false);
ChooseOption('eposit');


end;
Do it like this instead
Procedure Bank;
var x, y: integer;
begin
if (InvFull)=True then
begin // Use begin like this
FindObj (x, y, 'anker', 2977939, 100);
Mouse(x, y, 2, 2, false);
Wait(1200);
ChooseOption('ank Banker');
Wait(1200);
FindObj (x, y, 'eposit', 1854330, 100)
Mouse(x, y, 2, 2, false);
ChooseOption('eposit');
end; //And end; like this.
end;

Poweraids

2012-04-26 02:26:19

Oh great thanks alot :D, one more thing, how can i move the camera angle to highest point? When login its pretty much horizontal.

Abu

2012-04-26 02:27:36

What weequ is trying to say is… replace it(false) with (not LoggedIn) so that once your player logs out, the script will stop.

Camera Angle highest is ClickNorth(0);

Poweraids

2012-04-26 02:36:16

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

Procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;

Procedure Antiban;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1:
begin
MakeCompass('N');
wait(100+random(313));
MakeCompass('S');
wait (10+random(80));
MakeCompass('N');
FindNormalRandoms
end;
end;
end;


Procedure Bank;
var x, y: integer;
begin
if (InvFull)=True then
begin
FindObj (x, y, 'anker', 2758428, 1000);
Mouse(x, y, 2, 2, false);
Wait(1200);
ChooseOption('ank Banker');
Wait(1200);
FindObj (x, y, 'eposit', 1854330, 1000)
Mouse(x, y, 2, 2, false);
ChooseOption('eposit');

end;
end;

Procedure Compass;
var x, y: integer;
begin
Wait(1200)
FindObj (x, y, 'ace North', 2241726, 1000);
Mouse(x, y, 0, 0, true);
ClickNorth(0);
end;





Procedure ChopTree;
var x, y: integer;
begin
repeat
FindNormalRandoms
if FindObj(x, y, 'hop', 4357491, 1500) then
Mouse(x, y, 2, 2, false);
ChooseOption('hop');
repeat
Wait(1200+random(250));
Antiban;
Until not isUpText('ree') or (InvFull);
until(InvFull);
end;












begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
Loginplayer;
Compass;
repeat
ChopTree;
Bank;
until(not LoggedIn);
end.


Looking much better? Cheers for the interest and help ^.^


Edit: Getting about 100 of these errors, how do i fix that?
Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.

weequ

2012-04-26 02:56:25

Poweraids those "errors" are just warnings and they mean that a coordinate outside of your client window is being used somewhere. It could be in the SRL include so you can just ignore them.

@abu_jwka
I think you mean ClickNorth(SRL_ANGLE_HIGH); although it does the same thing it's better to use that constant variable because it's easier to read and the numbers might change meaning.

Poweraids

2012-04-26 03:02:09

I've really gotta remember to edit my pass out >.<

Getdropped

2012-04-26 08:24:39

Also another idea for you is your most likely going to need to make some sort of path to the bank because as far as i know where are no banks in the same screen as the tree would be. Therefore it mostlikly will never find and bank. Heres what i would do:

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
Loginplayer;
Compass;
repeat
repeat
ChopTree;
until(Invfull);
PathtoBank;//Then add your path procedure above (sps, dtm)
Bank;
PathtoTree;//Add the path to the tree...(if you want you can just reverse your path to the bank.
until(not LoggedIn);
end.

Hope that helped you out a bit ;)

J J

2012-04-26 13:29:32

EDIT: Oh this has been posted already, didn't read any further than the second post lol. Didn't know that others have responded already. Oh well. Had my screen resized and didn't notice that I wasn't at the bottom yet, weird. Anyways, here is my original reply:

Repeat 
ChopTree
Until(InvFull)
Bank;
Will keep chopping until your inventory is full. Once your inventory is full, it will stop the loop and bank. I'm not sure where you are planning to chop, but you can't bank on every spot. So you would also need to make a walking procedure, that walks to the bank.