SRL Archive - OSR Fishing

[COLOR][SIMPLE] PowerFisher by Eduard V1.0


Eduard

2014-05-27 20:23:32

Hello boys and girls,

Hereby I introduce you, my very simple, not random solving, beta version of a Power Fisher.

program PowerFisherEduard;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR\SRL\misc\SmartGraphics.simba}

var
x, y: Integer;
PBox: TBox;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Pin := '';
Players[0].Member := True;
Players[0].WorldInfo := [];
Players[0].Active := True;
Players[0].Nick := '';
Players[0].LampSkill := SKILL_Thieving;
end;

procedure PixelFishingTrue;
begin
SMART_DRAWTEXT(207, 120, 'UpChars', inttostr(AveragePixelShift(pBox, 250, 350)), 255);
end;

procedure DrawStatus(Text: string);
begin
SMART_ClearMS;
PixelFishingTrue;
SMART_DRAWTEXT(244, 120, 'UpChars', (Text), 16777215);
end;

procedure CustomLogin;
begin
if not LoggedIn then
begin
DrawStatus('LOGGING IN');
LogInPlayer;
MakeCompass('N');
SetAngle(0);
Wait(RandomRange(2000, 3500));
end;
end;

procedure FindFishingPool;
begin
DrawStatus('FIND FISHING POOL');
if (FindObjCustom(x, y, ['ure', 'ishin', 'ot'], [14597535, 15123609, 14794914, 14858129, 13216647, 14597268, 15123625, 14398100, 14729121], 3)) then
begin
DrawStatus('FOUND FISH SPOT');
MMouse(x, y, 2, 2);
Mouse(x, y, 2, 2, 1);
wait(1000 + random(50));
end
else
begin
DrawStatus('NO FISH SPOT FOUND');
end;
end;

function IsFishing: boolean;
begin
if (InvCount = 28) then
begin
DrawStatus('INV FULL');
Exit;
end;
begin
if (AveragePixelShift(pBox, 250, 350) > 60) then
begin
result := true;
FTWait(100 + random(10));
end
else
begin
DrawStatus('NOT FISHING');
result := false;
FTWait(100 + random(10));
end;
end;
end;

procedure mainloop;
begin
DrawStatus('MAIN LOOP');
repeat
DrawStatus('CHECKING RANDOMS');
FindNormalRandoms;
if (InvCount = 28) then
begin
DrawStatus('INV FULL');
break;
end;
if (InvCount < 2) then
begin
DrawStatus('NO RODS AVAILABLE');
LogOut;
end;
if not (isFishing) then
begin
DrawStatus('NOT FISHING');
FindFishingPool;
end;
while (isFishing = true) do
begin
FTWait(randomrange(2000, 3000));
end;
until (InvCount = 28) DrawStatus('INV FULL');
DropAllExcept([1, 2, 3, 4, 5, 6]);
DrawStatus('INV EMPTY');
MakeCompass('N');
FindFishingPool;
end;

begin
DeclarePlayers;
SetupSRL;
CustomLogin;
ClearDebug;
PBox := IntToBox(233, 149, 292, 193);
FindFishingPool;
repeat
if not (LoggedIn) then
begin
CustomLogin;
end;
mainloop;
until (not LoggedIn)
end.

Known bugs:

- Will not switch places when no fishing spot is available.
- No detailed failsafes.
- No Banking just fish / drop
- Very Very basic version. Will expand soon.

Flight

2014-05-27 21:02:24

Awesome, a fully color script; keep up the good work my friend! :smile:

iBlank

2014-05-28 04:35:28

Are you planning/wanting to implement moving from spot to spot? Guess it wouldn't hurt to implement with the ability to turn on or off since it is pretty dependent on where you are fishing!

Eduard

2014-05-28 07:47:00

I'm going to release a very advanced version. Just see this as the most basic babysittable version off the full script. ( I had to make one for Recipe for disaster on my rune pure lol ).

Expect the following:
- Extreme failsafes using pixelshift and reflection.
- Banking / dropping
- Cooking the fish
- random event solving (getting rod back etc.)

and many more things.

Thanks Flight and iBlank!

P1nky

2014-05-28 07:59:03

Congrats on the release! Hope to see you to continue to work on this project Mate, good luck!

Eduard

2014-05-28 08:25:02

Thanks my friend

Solar

2014-05-28 14:46:27

Congrats on release. Nice to see a base script to build on.
Nice one. :)

Superman_

2014-12-28 18:40:57

Congratz!

I got this

2014-12-28 21:22:09

From: Superman_
Congratz!


This thread hasn't been posted on in over six months, please don't grave-dig.

vashanddou

2015-01-08 02:35:15

Really slow on fishing detection,
Should also try and add in if no fishing spots found to run to the next spawn area.

You did say simple fisher but just having it detect it's location and moving up or down
on the minimap if no location found, and increasing the fishing spot detection a bit would make this flawless :)

If the script doesn't get me banned by tomorrow morning I'll probably just add it in myself and pm you it lol.