SRL Archive - First Scripts

Albis Ivy


Albi

2011-12-31 23:57:54

This is my first ever script, I've never ever programmed and have only been doing this for like an hour now, so please don't flame. I don't mind constructive critisim that will help me learn.

Setup


Simply start the script anywhere that has ivys!


Things to do

  • Write basic skeleton of script.
  • Write chopping procedure.
  • Make the script a lot more efficient and less bot like.
  • Make an antiban.
  • Improve antiban.
  • Add nest pick up.
  • Fix inventory clicking bug.
  • Add a paint of some sort to allow users to track XP/H

Things I need help with/need to learn

  • Figuring out why the inventory is clicked on right after it finds/clicks on ivy (Stopping the script from hovering over ivy to check when cut so it simply reclicks which is annoying.)
  • Learning how to pick items up more effciently.
  • Learning how to check if you are logged into Runescape on start up & if not, to login.
  • Learn how to add S.M.A.R.T into the script.
  • Find out why the mouse is skipping around the screen instead of moving smoothly when looking for ivy/nests.

Versions


  • 1.0 - This is the basic first script with not a lot of features, but is fully functioning.
  • 1.1 - I have updated my methods to make them more efficient and look more human, I have a larger sense of randomization to the script and have improved the clicking and added support for S.M.A.R.T.
  • 1.2 - I have added full birds nest support and improving the clicking on the Ivy so it does not spam click it and end up misclicking.

PatDuffy

2012-01-01 00:00:16

Well without looking at your script or anything, checking if LoggedIn is simple

if not LoggedIn then
LoginPlayer;

Albi

2012-01-01 00:08:31

From: PatDuffy
Well without looking at your script or anything, checking if LoggedIn is simple

if not LoggedIn then
LoginPlayer;


Thank you, added and updated :)

Sin

2012-01-01 00:09:07

Nice!
Took a quick look at your script and saw that you're using

procedure ChopIvy;
var x, y: integer;
begin
FindNormalRandoms
if FindObj(x, y, 'hop',4358754,35) then
begin
Mouse(x, y, 3, 3, true);
ChooseOption('hop');
repeat
Wait(800+random(300));
Until not IsUpText('vy');
end;
end;
You could do -
procedure ChopIvy;
var x, y: integer;
begin
FindNormalRandoms
if FindObj(x, y, 'hop',4358754,35) then
MMouse(x, y, 2, 2);
begin
Mouse(x, y, 3, 3, true);
repeat
Wait(800 + RandomRange(200, 400));
Until(Not IsUpText('Chop'));
end;
end;

Obviously not a whole lot different, but it's a bit more efficient ;)

Albi

2012-01-01 00:13:12

From: S1N
Nice!
Took a quick look at your script and saw that you're using

procedure ChopIvy;
var x, y: integer;
begin
FindNormalRandoms
if FindObj(x, y, 'hop',4358754,35) then
begin
Mouse(x, y, 3, 3, true);
ChooseOption('hop');
repeat
Wait(800+random(300));
Until not IsUpText('vy');
end;
end;
You could do -
procedure ChopIvy;
var x, y: integer;
begin
FindNormalRandoms
if FindObj(x, y, 'hop',4358754,35) then
MMouse(x, y, 2, 2);
begin
Mouse(x, y, 3, 3, true);
repeat
Wait(800 + RandomRange(200, 400));
Until(Not IsUpText('Chop'));
end;
end;

Obviously not a whole lot different, but it's a bit more efficient ;)


Can I ask what the difference is apart from obviously the random waiting is set between a range of 200-400 instead of a huge random range :P and Chop has been replaced and I noticed the UpText is slightly different.

Sin

2012-01-01 00:17:01

From: Albi
Can I ask what the difference is apart from obviously the random waiting is set between a range of 200-400 instead of a huge random range :P and Chop has been replaced and I noticed the UpText is slightly different.


FINALLY! Someone who asks questions and just doesn't blindly follow instructions! Props to you mate!
On Topic:

procedure ChopIvy;
var x, y: integer;
begin
FindNormalRandoms
if FindObj(x, y, 'hop',4358754,35) then
MMouse(x, y, 2, 2); //what this does - it MOVES the mouse to the ivy
begin
Mouse(x, y, 3, 3, true); //this CLICKS the ivy
repeat
Wait(800 + RandomRange(200, 400)); //self explanatory
Until(Not IsUpText('Chop')); //OCD soz, everything MUST be bracketed. In your script, "Ivy" is chosen as the uptext. The uptext is ONLY the "Chop", "walk-across" and stuff like that, NOT the objects :)
end;
end;

Albi

2012-01-01 00:21:44

From: S1N
FINALLY! Someone who asks questions and just doesn't blindly follow instructions! Props to you mate!
On Topic:

procedure ChopIvy;
var x, y: integer;
begin
FindNormalRandoms
if FindObj(x, y, 'hop',4358754,35) then
MMouse(x, y, 2, 2); //what this does - it MOVES the mouse to the ivy
begin
Mouse(x, y, 3, 3, true); //this CLICKS the ivy
repeat
Wait(800 + RandomRange(200, 400)); //self explanatory
Until(Not IsUpText('Chop')); //OCD soz, everything MUST be bracketed. In your script, "Ivy" is chosen as the uptext. The uptext is ONLY the "Chop", "walk-across" and stuff like that, NOT the objects :)
end;
end;


Oh I see, thanks for explaining, I wasn't sure what the difference between MMouse and Mouse were. Do you have any idea what's up with my inventory bug, I've tried fiddling around with a few things but it doesn't seem to fix it. and also with the 2, 2 in MMouse, what does that do? Is it like how many pixels randomized it may be on the ivy clicking point or something?

Sin

2012-01-01 00:22:29

From: Albi
Oh I see, thanks for explaining, I wasn't sure what the difference between MMouse and Mouse were. Do you have any idea what's up with my inventory bug, I've tried fiddling around with a few things but it doesn't seem to fix it. and also with the 2, 2 in MMouse, what does that do? Is it like how many pixels randomized it may be on the ivy clicking point or something?


BINGO! Got it in one.
I'll take a look :)

EDIT*
I think I found it -


1: begin
BoredHuman;
wait(10+random(5));
end;
That's probably the reason.
Take it out and try again.

Albi

2012-01-01 00:24:26

From: S1N
BINGO! Got it in one.
I'll take a look :)

EDIT*
I think I found it -


1: begin
BoredHuman;
wait(10+random(5));
end;
That's probably the reason.
Take it out and try again.



Nope, that doesn't seem to be the reason, I think it may be relating to the InvFull check at the bottom of the script, I'll try removing both and see what happens.

Sin

2012-01-01 00:25:51

Posted it in my other post.
It's sleepy time for me (12:30 AM) so if you have any other questions, post them here and i'll check back tommorow :)

Oh btw, you might want to take a look at the "PixelShift" and the "IsMoving" function, they'd be really useful to this.

Albi

2012-01-01 00:28:04

From: S1N
Posted it in my other post.
It's sleepy time for me (12:30 AM) so if you have any other questions, post them here and i'll check back tommorow :)

Oh btw, you might want to take a look at the "PixelShift" and the "IsMoving" function, they'd be really useful to this.


Alright, thanks for the help and little snippet etc..
I'll keep playing around with the script and try to improve some pieces in it and shall do :) thanks.

VillaVuFTW

2012-01-01 01:59:37

uhmm I've yet to check your script, but since you said the only nests works is the ring.. Did you try making a DTM for Seed Nests? O.o

Albi

2012-01-01 02:14:05

From: VillaVuFTW
uhmm I've yet to check your script, but since you said the only nests works is the ring.. Did you try making a DTM for Seed Nests? O.o


Nests will be working shortly, the first version sucks but I've fixed up a lot of stuff in it for the next version so it should run smoothly and pick up nests :)

Shuttleu

2012-01-01 07:31:58

take a look at my script

you can use the antiban from there if you like, and see how i use pixelshift to tell if the user is chopping or not

~shut

Albi

2012-01-01 07:42:23

From: Shuttleu
take a look at my script

you can use the antiban from there if you like, and see how i use pixelshift to tell if the user is chopping or not

~shut


Thank you for the offer but I prefer to not just out right take other peoples work as I am trying to teach myself how to script :D I'll take a look though to see how it's done and perhaps write my own.

blahs44

2012-01-12 21:31:31

best ivy cutter ive seen on the simba forums, tbh tho shuttleus looks better, I just couldnt get it to work

Albi

2012-01-12 21:59:19

Thank you, it's not amazing but it does the job ^.^

Pornoswagg123

2012-01-22 00:35:13

From: Albi
Thank you, it's not amazing but it does the job ^.^
Hey for some reasson this happens with alot of scriptsi try to compile look at thiss can you please help me ? it will be very well appriecated :)


[Error] (40:17): Type mismatch at line 39
Compiling failed.
[Error] (40:17): Type mismatch at line 39
Compiling failed.
SetAngle(True);

Albi

2012-01-25 17:25:49

From: Pornoswagg123
Hey for some reasson this happens with alot of scriptsi try to compile look at thiss can you please help me ? it will be very well appriecated :)


[Error] (40:17): Type mismatch at line 39
Compiling failed.
[Error] (40:17): Type mismatch at line 39
Compiling failed.
SetAngle(True);


Do you have SRL setup properly?

kevin33

2012-01-25 17:27:14

Needs to be fixed to SetAngle(SRL_ANGLE_HIGH) *or LOW depending on if you want it high or low.
This will make it SRL% combatible

Albi

2012-01-25 17:29:46

From: kevin33
Needs to be fixed to SetAngle(SRL_ANGLE_HIGH) *or LOW depending on if you want it high or low.
This will make it SRL% combatible


Oh I see, thank you :)

Shuttleu

2012-01-25 17:30:31

From: blahs44
best ivy cutter ive seen on the simba forums, tbh tho shuttleus looks better, I just couldnt get it to work


what was the problem?

let me know and i will help

~shut

kevin33

2012-01-25 17:30:38

Is your script all up to date with SRL5? I can help you update it if need be.

E. Looked at latest version and no it is not, I updated it and will send it to you if you want. It should work.

Albi

2012-01-25 17:33:25

From: kevin33
Is your script all up to date with SRL5? I can help you update it if need be.

E. Looked at latest version and no it is not, I updated it and will send it to you if you want. It should work.


No sir, I have barely touched it since I stopped wcing on RS.
I will fix it up soon enough :) Thanks for the offer though!

kevin33

2012-01-25 17:37:53

Ight np.