SRL Archive - First Scripts

Auto Picker: Wheat


BlueAchilles

2008-06-08 00:56:07

this is my first working script:) all it does is pick wheat until the Inv is full the drops it all then starts picking agian. i know is kinda point less but its good practice for me and it works. plz post comments and tips. also i was wondering if there is a faster way to drop the wheat if anybody could help me with that they would be greatly thank for it.

program AutoPicker;
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/users.scar}


var
x, y, i, Tries: Integer;


procedure PickTheWheat;
begin
Tries := 0
repeat
if findobjTPA(x, y, 6334376, 7, -1, 3, 3, 5 , ['ick', 'hea']) then
begin
MouseFlag(x,y,1,1);
wait(200+random(100));
end else if not findobjTPA(x, y, 6334376, 7, -1, 3, 3, 5 , ['ick', 'hea']) then
begin
repeat
Tries := Tries + 1;
Wait(random(1000) + 1000);
until(Tries = 1);
if Tries = 1 then
begin
WriteLn('Cannot Find Wheat Trying Agian');
repeat
begin
PickTheWheat;
end;
until(false);
end;
end;
until(InvFull);
if InvFull then
for i := 1 to 28 do
begin
DropItem(i)
end;
if InvEmpty then
begin
WriteLn('InvEmpty');
begin
repeat
PickTheWheat;
until(false);
end;
end;
end;

procedure AntiRandoms;
begin
FindNormalRandoms;
end;

begin
SetupSRL;
SRLPlayerForm(true, [], [], [], []);
LoginPlayer;
PickTheWheat;
AntiRandoms;
end.

Qauters

2008-06-08 07:28:01

Please use a for statement when you are dropping, so use this:

for i := 1 to 28 do
begin
DropItem(i)
end
and in your var line, add "i" (without the quotes)

BlueAchilles

2008-06-08 11:18:17

Ok so i just needed to put a integer in there. thats a lot easier thx:)

noidea

2008-06-08 12:06:49

I'm not going to test it, not enough time. but you should ad the download file instead of the scar tabs. It's easier for people that are lazy like me and faster to put in a thumb drive or some thing:f:

good job on using the findobjtpa!

noidea

BlueAchilles

2008-06-08 12:31:39

From: noidea
I'm not going to test it, not enough time. but you should ad the download file instead of the scar tabs. It's easier for people that are lazy like me and faster to put in a thumb drive or some thing:f:

good job on using the findobjtpa!

noidea


will do.

ShowerThoughts

2008-06-08 14:16:43

Meh, that's good, but you should make the name better, lmao :p

FreakyMonkey

2008-06-08 18:10:07

I'd love to see you expand on this, I'm sure it would be handy with some radial walking, or just map walking in particular.

Make sure you post in SCAR tags next time :p

vampmoon

2009-02-12 19:08:21

From: BlueAchilles
this is my first working script:) all it does is pick wheat until the Inv is full the drops it all then starts picking agian. i know is kinda point less but its good practice for me and it works. plz post comments and tips. also i was wondering if there is a faster way to drop the wheat if anybody could help me with that they would be greatly thank for it.

program AutoPicker;
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/users.scar}


var
x, y, i, Tries: Integer;


procedure PickTheWheat;
begin
Tries := 0
repeat
if findobjTPA(x, y, 6334376, 7, -1, 3, 3, 5 , ['ick', 'hea']) then
begin
MouseFlag(x,y,1,1);
wait(200+random(100));
end else if not findobjTPA(x, y, 6334376, 7, -1, 3, 3, 5 , ['ick', 'hea']) then
begin
repeat
Tries := Tries + 1;
Wait(random(1000) + 1000);
until(Tries = 1);
if Tries = 1 then
begin
WriteLn('Cannot Find Wheat Trying Agian');
repeat
begin
PickTheWheat;
end;
until(false);
end;
end;
until(InvFull);
if InvFull then
for i := 1 to 28 do
begin
DropItem(i)
end;
if InvEmpty then
begin
WriteLn('InvEmpty');
begin
repeat
PickTheWheat;
until(false);
end;
end;
end;

procedure AntiRandoms;
begin
FindNormalRandoms;
end;

begin
SetupSRL;
SRLPlayerForm(true, [], [], [], []);
LoginPlayer;
PickTheWheat;
AntiRandoms;
end.


how does this one work?? it doesn't work.. need further and complete info.
:fiery:

Cy an id 3

2009-02-19 13:31:59

Yes, you are right this is pointless. The script works right and its good practice; one day it will lead to something useful =)

Heavenzeyez1

2009-02-19 13:42:46

From: Cy an id 3
Yes, you are right this is pointless. The script works right and its good practice; one day it will lead to something useful =)


One day it will lead to your suspending, :)
Please follow the rules and don't spam, it's outdated like half a year+ ? :)
Have a nice day,
~Eerik~