PDA

View Full Version : [Fishing] [COLOR][SIMPLE] PowerFisher by Eduard V1.0



Eduard
05-28-2014, 12:23 AM
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
05-28-2014, 01:02 AM
Awesome, a fully color script; keep up the good work my friend! :smile:

iBlank
05-28-2014, 08:35 AM
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
05-28-2014, 11:47 AM
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
05-28-2014, 11:59 AM
Congrats on the release! Hope to see you to continue to work on this project Mate, good luck!

Eduard
05-28-2014, 12:25 PM
Thanks my friend

Solar
05-28-2014, 06:46 PM
Congrats on release. Nice to see a base script to build on.
Nice one. :)

Superman_
12-28-2014, 11:40 PM
Congratz!

I got this
12-29-2014, 02:22 AM
Congratz!

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

vashanddou
01-08-2015, 07:35 AM
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.

Vizual
01-19-2016, 01:29 AM
Short and simple. Looks good man.

Hodor123
01-31-2016, 03:08 AM
Doesn't work anymore for me atleast.