I've made a pretty-well working script today. It has good fishing-spot-detection, and a good build. Now, I'm wondering how to get a good Whirlpool-detection and handling, and a good Shark-detection and handling.
Thanks in advance,
-Knives
I've made a pretty-well working script today. It has good fishing-spot-detection, and a good build. Now, I'm wondering how to get a good Whirlpool-detection and handling, and a good Shark-detection and handling.
Thanks in advance,
-Knives
You can detect a whirlpool by Counting the light colors in the water, if there're more than a certain amount: you got a whirlpool.. And you can do the same with the shark, but then with dark colors.
I've never tried that before... Could you make an example?
Or just answer me if this is correct:
SCAR Code:Function GotWhirlpool;
var a,b: Integer;
begin
if(CountColor(SomeLightColor,Cx1,Cy1,Cx2,Cy2) >= SomeNumber)then
begin
Result:= True;
end;
end;
procedure HandleWhirlpool;
begin
If(GotWhirlPool)then
begin
//Do Some stuff
end;
end;
EDIT: Wouldn't it be better to use CountColorTolerance? Because the whirlpool is, after all, not only 1 color.
-Knives
PS: Thanks for the idea. I'll try and do some tests.
you can use dtms for the sharks, and perhaps for the Whirlpool
Too late :P I have tried making a DTM. The script found nothing. So I'm going for Nielsie's idea, which I have already developed a few functions from.
Here's what I've got so far.
The first function gets how many pixels, cover the area between inserted 2 set of coordinates..SCAR Code:Function AreaSize(x1,y1,x2,y2: Integer): Integer;
Var Width, Height: Integer;
begin
Width:= Max(X1,X2) - Min(X1,X2);
Height:= Max(Y1,Y2) - Min(Y1,Y2);
Result:= Width * Height;
Writeln(IntToStr(Result))
end;
Function FillsMoreThanHalf(Color,x1,y1,x2,y2,Tol: Integer): Boolean;
begin
If(CountColorTolerance(Color,x1,y1,x2,y2,Tol) > AreaSize(x1,y1,x2,y2)/2)then
begin
Result:= True;
end;
end;
The seconds returns true, if Color with added Tolerance fills more than a half of the specified
box (2 set of coords).
Do you think that would work, if I adjusted them some more?
-Knives
Use:
SCAR Code:FindColorsSpiralTolerance(x, y, whirlpool, WHIRLPOOLCOLOR, x-20, y-20, x+20, y+20, 20);
If(GetArrayLength(WhirlPool)>15)Then
result:= True;
Something like that.
Code:
- Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
- Solarwind: Dude, you are like... t3h s3x.
- Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
- benjaa: woah.... Jukka is the man Guildminer pwns all
- NaumanAkhlaQ: And JuKKa Is my Her0!
Jukka... I don't really get that function. First you want it to find the whirlpool-color. Then you want to get the arraylength of the color?
SORRY! My bad. I thought it was FindColorSpiralTolerance. I didn't see the extra "S".
Now I understand what you want it to do.
-Knives
Array of colors maybe? Or DDTMs or multiple DTMs.
King you can also count how close the pixels are to each other. And make sure to be looking directly at the whirlpool and not be counting from the whole screen.
Yea i ve heard also something about picking the right colors i believe..
Please don't gravedig.
Formerly known as Cut em2 it
There are currently 1 users browsing this thread. (0 members and 1 guests)