Log in

View Full Version : Fishing spots?



mysterious123
05-19-2010, 09:22 PM
I've been trying for a long time now finding a way for a script to find them.
There is too much white on the screen meaning color won't work, I can grid it all up since I want the character to move.

A lot of people told me to use TPAs, but I don't know how to use it for the fishing spots?

Thanks in advance.

Blumblebee
05-19-2010, 09:58 PM
take a look in my script, Powerskills. It does a good job on fishing spot identification. If that is too confusing, look at my edgeville fisher.

bbri06
05-19-2010, 09:59 PM
I suggest you
1. Make an autocolor for the fishing bubbles using ACA(Auto Color Aid). That should be somewhere in your scar folder.
2. Collect the colors found from your autocolor in a TPA. (FindColorSpiralTolerance)

If you don't know how to use TPAs go here:
http://villavu.com/forum/showthread.php?t=21786
http://villavu.com/forum/showthread.php?t=26006

Sir R. M8gic1an
05-19-2010, 10:00 PM
http://villavu.com/repositories/srl-opendev/SRL/skiall/Fishing.scar


// * function FindFishSpotsTPA(var VTPA:TPointArray): Boolean; // by Rasta Magician, fixed by Marpis
// * Function FindFishSpot(var xx, yy: integer; which: string): Boolean; // by Rasta Magician

{************************************************* ******************************
function FindFishSpotsTPA(var VTPA:TPointArray): Boolean;
By: Rasta Magician, fixed by Marpis
Description: Finds all possible Fish Spots and stores them in the given TPA
Returns true if found at least one, false if none
************************************************** *****************************}
function FindFishSpotsTPA(var VTPA:TPointArray): Boolean;
var
TPA, tempTPA: TPointArray;
ATPA: T2DPointArray;
i, tmpCTS, VTPASize, T: Integer;
TP: TPoint;

begin
Result := False;
if (not LoggedIn) then exit;

tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.12, 0.27);

T := GetSystemTime + 700;
repeat
FindColorsSpiralTolerance(MSCX, MSCY, tempTPA, 11117214, MSX1, MSY1, MSX2, MSY2, 3);
TPA := CombineTPA(tempTPA, TPA);
until(GetSystemTime > T);

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (Length(TPA) < 1) then exit;

VTPASize := 1;
SetLength(VTPA, 1);
ATPA := SplitTPA(TPA, 10);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
for i := 0 to High(ATPA) do
begin
TP := MiddleTPA(ATPA[i]);

VTPA[VTPASize - 1] := TP;
Inc(VTPASize);
SetLength(VTPA, VTPASize);
end;
Result := (VTPASize > 1);
end;

{************************************************* ******************************
function FindFishSpot(var xx, yy: integer; which: string): Boolean;
By: Rasta Magician
Description: Finds a fishing spot, according to your needs.
Stores (x, y) coordinates to the given variables.
which:
'harpoon' -> Harpoon fishing
'cage', 'lobster' -> Cage Fishing
'fly', 'flyfish' -> Fly Fishing
'rod', 'bait' -> Bait Fishing
'net' -> Net Fishing
************************************************** *****************************}
function FindFishSpot(var X, Y: Integer; Which: string): Boolean;
var
TPA: TPointArray;
s: string;
i: integer;
begin
if (not FindFishSpotsTPA(TPA)) then exit;

case lowercase(which) of
'harpoon': S := 'arpoon Fis';
'cage', 'lobster': S := 'age Fis';
'fly', 'flyfish': S := 'ure Fis';
'rod', 'bait': S := 'ait Fis';
'net': S := 'et Fis';
end;

for i := 0 to High(TPA) do
begin
MMouse(TPA[i].x, TPA[i].y, 5, 5);
if WaitUpText(S, 375) then
begin
GetMousePos(X, Y);
Wait(Random(100));
Result := True;
Exit;
end else
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
if WaitOptionEx(S, 'all', Nothing, 375) then
begin
ChooseOption('ancel');
Result := True;
Exit;
end;
ChooseOption('ancel');
end;
end;
end;


~RM

mysterious123
05-20-2010, 09:29 AM
Thanks, one more thing:

I tried uptext(), though it couldn't find any.

Is there a way maybe configuring it to work?
Or maybe find on the whole screen or in a certain box certain text?
I think it's the same font as RS has.

bbri06
05-20-2010, 01:58 PM
Use

MMouse(x, y, 3, 3);//mousing over the thing that will make the uptext
Wait(150 + random(50)); // this is needed because the uptext takes a small amount of time before it appears.
IsUpText('part of text here')