Well, I've developed a little bit on it since the scripting competition, but I need your help to make it the ultimate Fishing Spot Finder. I've gotten it to be great and now I need your help to make the Ultimate Fishing Spot Finder. From my experience it is 100% accurate and very reliable although not many people other than myself have gotten to test it yet, so you may see some problems that I don't.
If you have any suggestions on how to make it more efficient please tell me! I also need stress and situation testers, I need people who could dedicate a few minutes to run this 100 + times to see how many times it missed and what its average Work Time was. As for the situation testers I need you to try to bring up strange or different situations you'd encounter while running this procedure and see if it can still find the Fishing Spot or what happens to its Work Time in certain situations.
This is one of many progress reports that I've had this thing run.
This is an actual progress report that I've gotten multiples of times, this particular report was made standing in the square next to a fishing spot, although I've gotten many progress report standing away from it with people fishing on the spots with an average of 20 - 30ms. If you don't believe it or even if you do give it a try!Code:WorkTime [FindFish]: 0 WorkTime [FindFish]: 16 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 16 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 16 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 16 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 15 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 WorkTime [FindFish]: 0 Average Time: 2
SCAR Code:program New;
{.include SRL/SRL.scar}
var
FishingArea: TBox;
Fx, Fy, AvgTime, i: Integer;
function FindFish(var Fx, Fy: Integer; Area: Integer; SkipBox: Boolean): Boolean;
var
FPx, FPy, FPCount, FPColor, CCN, WorkTime, Top, Bottom, Right, Left, a: Integer;
i: Byte;
ClosestSpot, NewColor, TempColor: Boolean;
Sear: TBox;
FS: array of TPoint;
FSx, FSy: array of Integer;
label Start;
begin
if(not(LoggedIn))then Exit;
MarkTime(WorkTime);
ColorToleranceSpeed(0);
FPColor:= 14858393;
Start:
for i:= 1 to Area do
begin
Sear.x1:= MSCX - Ceil(i * 51.3);
Sear.y1:= MSCY - Ceil(i * 33.5);
Sear.x2:= MSCX + Ceil(i * 51.3);
Sear.y2:= MSCY + Ceil(i * 33.5);
if(SkipBox)then
TempColor:= FindColorSkipBoxTolerance(FPx, FPy, 14858393, Sear.x1, Sear.y1, Sear.x2, Sear.y2, 33, FishingArea);
if(not(SkipBox))then
TempColor:= FindColorSpiralTolerance(FPx, FPy, 14858393, Sear.x1, Sear.y1, Sear.x2, Sear.y2, 33);
if(TempColor)then
begin
FishingArea.x1:= (FPx - 15);
FishingArea.y1:= (FPy - 15);
FishingArea.x2:= (FPx + 15);
FishingArea.y2:= (FPy + 15);
FindColorsTolerance(FS, FPColor, FishingArea.x1, FishingArea.y1, FishingArea.x2, FishingArea.y2, 33);
FPCount:= GetArrayLength(FS) - 1;
if(FPCount < 2)then
begin
Wait(200 + Random(50));
ClosestSpot:= False;
NewColor:= True;
Break;
end;
if(FPCount > 100)then
begin
if(CCN > 9)then
begin
Result:= False;
Exit;
end;
NewColor:= True;
Wait(200 + Random(50));
CCN:= CCN + 1;
Break;
end;
CCN:= 0;
if((FPCount > 1)and(FPCount < 100))then
begin
ClosestSpot:= True;
NewColor:= False;
Break;
end;
end;
end;
if(ClosestSpot)then
begin
SetArrayLength(FSx, Length(FS));
SetArrayLength(FSy, Length(FS));
for a:= 0 to Length(FS) - 1 do
begin
FSx[a]:= FS[a].x;
FSy[a]:= FS[a].y;
end;
BubbleSort(FSx);
BubbleSort(FSy);
Left:= FSx[0];
Right:= FSx[Length(FS) - 1];
Top:= FSy[0];
Bottom:= FSy[Length(FS) - 1];
Fx:= (Left + Right) div 2;
Fy:= (Top + Bottom) div 2;
FishingArea.x1:= Left - 6;
FishingArea.y1:= Top - 6;
FishingArea.x2:= Right + 6;
FishingArea.y2:= Bottom + 6;
Result:= True;
end else Result:= False;
if(NewColor)then goto Start;
ColorToleranceSpeed(1);
Writeln('WorkTime [FindFish]: ' + inttostr(TimeFromMark(WorkTime)));
AvgTime:= AvgTime + (TimeFromMark(WorkTime));
end;
begin
SetupSRL;
Wait(1000);
repeat
FindFish(Fx, Fy, 10, False);
Wait(500);
Inc(i);
until(i = 100);
Writeln('Average Time: ' + inttostr(AvgTime div 100));
end.
Please! Any ideas or suggestions post them! Anything that could increase performance is worth saying because I want to see if it is even possible to get the WorkTime below what it is even now!
EDIT: For those of you who may be thinking to themselves "This guy must have an amazing computer or something" your not entirely correct although I do take some pride in my computer because I can keep it running as new. Below are my computer statistics...
Manufacturer: MSI [Coincidental?]
Processor: AMD Athlon(tm) 64 Processor 3700+, MMX, 3DNow, ~2.2GHz
Memory: 1024MB RAM
Hard Drive: 80 GB
Video Card: NVIDIA GeForce 6600
Monitor: Plug and Play Monitor
Sound Card: Realtek AC97 Audio
Speakers/Headphones:
Keyboard: USB Root Hub
Mouse: USB Root Hub
Mouse Surface:
Operating System:
Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_gdr.050301-1519)
P.S. Honestly I'm not trying to brag but I though it was kinda funny, I just realized I was listening to music "Dragonforce" while this was running, so I'm almost positive we can get the average down to 1ms!







Reply With Quote


