SRL Archive - First Scripts

FishSmiter


Silent

2008-07-16 22:04:41

SCRIPT IS DOWN TILL I FIGURE OUT ERRORS. You can still download the script, and give me tips on how i should code it better. Any help would be much appreciated.

Ok this is my first script, which is surprising to me at least considering how long i've been a member at srl. Anyway, this took about 2 days of learning, and scripting.

So with out more talk.

 {----------------------Fish Smiter V 1.0beta----For DRAYNOR-------------|

The instructions are in the script.

Comments, tips, criticism, and anything else you want to say, please. Say it!

Oh, and its made for SCAR v15b and SRL 4.0 Rev #19.:)

lukedavison

2008-07-17 00:16:49

Got this error when i went to compile.

Failed when compiling
Line 480: [Error] (5953:73): Type mismatch in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Mapwalk.scar

Whats that mean ?

Silent

2008-07-17 01:10:52

Do you have the latest srl? Not sure man, i just started scripting myself.

Script temp down to fix errors.

Nitrox

2008-07-17 03:08:11

MMouse(x, y, 0, 0);
Mouse(x, y, 2, 2, true);

Mouse moves and clicks mouse at the same time so mmouse is not needed.
And the login details should be more organized (look at free for all scripts, they all have clear detailed declareplayer procedures

Silent

2008-07-17 11:42:38

yes, i agree, thats one of the things i'm working on. Along with making the script work in general :p

StrikerX

2008-07-24 16:38:39

Try and add standards (neatness) to your script its easier to read and find out certain procedures when you make a mistake. Btw i added it for you.

program FishSmiter;
{.include SRL/SRL.scar}
{.include SRL\SRL\Skill\Fishing.scar}
{----------------------Fish Smiter V 1.0beta-------------------|
This is FishSmiter version 1.0 beta by Nathanator22.
This script will only fish shrimps from the fishing spot
by the draynor bank. Be sure to set your player up in the
south part of the bank, or with in view of the
fishing spot, WITH NET IN 1st SPOT in INVINTORY.
Thank you for using this script!
|--------------------------------------------------------------|
~ Features: | Things to come in 2.0|
~ AutoLogin | Anti-ban |
~ Anti-randoms | Set number of loads |
| Easier Setup |
| Proggress report |
| Banking |
\-------------------------/
|--------------------------------------------------------------|
|Set up lines 82(just the long # its the color!, and 37,38|
|--------------------------------------------------------------}
var
x, y: Integer;
DTMF: Integer;
FoundSymbol: Boolean;


//const
//FishingSpotColor='';//not important right now.

procedure ClickLogIn;
begin
Mouse(358, 166, 1, 1, true)
end;

procedure LogPlayerIn;
begin
TypeSend('example'); //YOUR USERNAME HERE
TypeSend('example'); //YOUR PASSWORD HERE
Wait(6000 + Random(200));
Mouse(371, 349, 5, 5, true);
Writeln('Logged in properly..');
end;


procedure SetMSpeed;
begin
MouseSpeed := 10; //set mouse speed.
end;

procedure FindFishingS; //finds the fishing symbol
begin
DTMF := DTMFromString('78DA630C666260E8674001B275FFC1342394C' +
'FE807543319550D1FBF14A69A1E026A7C816AFA08A801B9A78380' +
'9A50A09A6904D40402D54C25A0268C08734289700FC8AE4EFC6A0' +
'018CC0C79');
if FindDTM(DTMF, x, y, 525, 2, 761, 167) then
FoundSymbol := true;
begin
if (FoundSymbol = false) then
logout;
MMouse(x, y, 0, 0);
Wait(200 + random(25));
Mouse(x, y, 1, 1, true);
end;
end;

procedure RunAntiRandoms; //Credit to JAD for this =)
begin
FindTalk;
FindNormalRandoms;
if (FindFight = true) then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
end;
end;


procedure Fish;
begin
if FindColor(x, y, 11840678, 0, 0, 517, 336) then
begin
MMouse(x, y, 0, 0);
Mouse(x, y, 2, 2, true);
RunAntiRandoms;
until (InvFull);
end;
end;

procedure DropFish;
begin
DropTo(2, 28);
end;


{----main loop starts below this----}
begin
SetupSRL;
ClearDeBug;
SetMSpeed;
ClickLogIn;
Wait(3000 + Random(200));
LogPlayerIn;
Wait(3000 + Random(100));
MakeCompass('N');
Wait(2000 + Random(100));
FindFishingS;
repeat
Wait(7000 + Random(100));
Fish;
DropFish;

end.

WithoutFear

2008-07-26 01:07:14

i haven't tested this…and i'm not a very good scripter but i'm positive that your login procedure won't work. SRL has it's own login function (not sure why you didn't use that) and TypeSend only works for in-game chat. Also i'm pretty sure 1 specific color will not work for a fishing spot, as it is surrounded by the same colors. Hope this advice helps, but you have your work cut out for you