SRL Archive - First Scripts

First Auto Fisher


fusion

2007-10-07 11:43:42

Alright so i have a work in progress. I used to script back in rs classic but that was much much easier and i quite wow and decided to get back to autoing in runescape for a sorta hobby. I began last week looking over all the pascal and what not and i began my first script. Now this isnt suppose to be anything fancy and its not going to be thats for sure but with help from the community and about 100 edits i hope to be left with something decent.

So I have this currently. My first question is, simply, is there any other way simplier to have it right click and select harpoon ( for fishing sharks ), other than clickmouse(x, Y+40, true); ?
Second question is, how come i have to put end; end; begin catchfish; end. for the last 5 lines? when even i try to put end; end; end. after wait(1000 +random(25)); it says unexpected end, when i erase the last end. it says expects beginning.
Now I did have a second part to this that checked for a shark color in the last slot of your invetory as a way to determine when to stop fishing but that wasnt working so i erased it im going to script it back in really quick and see if anyone can help me with that. Thanks for all the help guys.

program catchfish;
procedure catchfish;
var x, y: integer;
begin
if findcolor(x, y, 14858129, 337, 163, 412, 474) then
begin
clickmouse(x, y, false);
wait(1000 + random(250));
clickmouse(x, y+40 ,true);
wait(1000 + random(250));
end;
end;
begin
catchfish;
end.

Sir R. M8gic1an

2007-10-07 13:33:19

ok here's many things for you:
learn the standards for scripting,
download SRL? if you already have it i'd suggest you had a look around the srl files and basically read most of it, because you can find amazing functions there.

clickmouse is detectable, so i suggest you use SRL's Mouse(x, y, randomx, randomy:integer; LeftClick: boolean)

in SRL you also have InvFull
so you could have
repeat
catchfish
until(InvFull)

i'd suggest you spend about a week looking at tutorials, that should get you enought questions to make 10 useful posts and enought knowledge to do a decent script ;)

welcome back, n Good Luck
RMagician :)

JuKKa

2007-10-07 14:28:48

After "program catchfish;" You should have this:

{.Include SRL/SRL.Scar}

Your main loop should then look like this:


Begin
SetupSRL;
CatchFish;
End.

SetupSRL Loads all the needed items for example FindSymbol(X, Y, Symbol);
FindSymbol wont work without SetupSRL;

This includes the Scar Resource Library AKA SRL.

Then your "Procedure CatchFish;"
Should Be:



procedure catchfish;
var x, y: integer;
begin
if findcolor(x, y, 14858129, 337, 163, 412, 474) then
begin
Mouse(X, Y, 3, 3, False);
wait(1000 + random(250));
ChooseOption('Cage');
wait(1000 + random(250));
end;
end;

Mouse(X, Y, RandX, RandY, Left);
X And Y Is the cordinates to click
RandX and Randy is random cordinates that it adds to the point it clicks.
Left obvious Left button or right? Left False is a right click. Left True is a left Click.

ChooseOption(txt);
The chooseoption procedure is used after a "Mouse(X, Y, RandX, RandY, False); To make it click the Text you specify. ChooseOption('Walk here'); Would click Walk Here when u left click on screen.

Hope it helped

-JuKKa

fusion

2007-10-08 22:00:05

Sweet thanks guys, I understand how repeatative some of these things are and the fact that alot can be solved by diving in and studying everything you can first, but unfortunity I have enough work on my hands as well so please bear with me, and thanks alot for both good advice and bad.

mobe7

2007-10-15 12:46:51

very nice

Cruel100

2007-10-23 16:07:34

Don“t work for me!

maywyue

2007-10-25 03:26:13

wao.. that's really basics