SRL Archive - SRL Archives

FindClosestFire by n3ss3s


n3ss3s

2007-10-18 08:16:59

:stirthepot:

This one finds closest fire…



Function FindClosestFire(Var FiX, FiY: Integer): Boolean;
Var
I, CTS, X, Y, M: Integer;
Var
TPA: TPointArray;
Begin
M := GetSystemTime;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
X := MSCX;
Y := MSCY;
If(FindColorSpiralTolerance(X, Y, 3577775, MSX1, MSY1, MSX2, MSY2, 10))Then
Begin
FindColorsTolerance(TPA, 3577775, X - 15, Y - 15, X + 15, Y + 15, 15);
Writeln(IntToStr(Length(TPA)));
If(GetArrayLength(TPA) >= 10)Then
Begin
MiddleTPAEx(TPA, Fix, Fiy);
Result := True;
End;
End;
Writeln(IntToStr(GetSystemTime - M));
ColorToleranceSpeed(CTS);
End;

About 20ms usually..

Buahahaha - rs is like teh infinite source for finding diff objects! :stirthepot: more coming!


EDIT: Crap I cant stop making these, next one is monster finder..

King of Knives

2007-10-18 08:26:15

Stop is n3s! You end up not being able to sleep, 'cause you need to make a something-finder!! Make a template instead, where all you have to do is insert a few colors, and it finds it.

d00d st0pz0r s3ri0usly.

-Knives

n3ss3s

2007-10-18 08:34:01


d00d st0pz0r s3ri0usly.


The problem is I cant! :O xz0mg

The Claw

2007-10-18 08:38:48

FindObjTPA? lol

n3ss3s

2007-10-18 08:41:55

No shit


it checks the uptext… must… find… perfect… no… uptext… needed…

ZephyrsFury

2007-10-18 08:49:06

Why aren't my functions getting this much attention? :( Besides maybe you should release a generic function and say: "add colour here, add number of people that should be found, add tolerance", etc.

Rikje

2007-10-18 08:54:49

omg n3ss3s :p

n3ss3s

2007-10-18 09:02:16

"add colour here, add number of people that should be found, add tolerance"
Dont make me to ;)

ZephyrsFury

2007-10-18 09:05:35

From: n3ss3s
Dont make me to ;)


Woops I said people… I meant points. "add the number of points that should be found here…".

King of Knives

2007-10-18 09:07:51

This is why I love the SRL Members forum - Spam legally :D The newbs don't get any bad ideas from it anyways :D

But n3s ends up somewhere bad if he keeps scripting like crazy. Maybe he ends up in his closet

-Knives

n3ss3s

2007-10-18 09:08:54

Dont make me to


Too late to stop me, already making general object finder.

Function iSpyWithMyLittleEye(ObjColors: TIntegerArray; ObjWidht, ObjHeight: Integer; HowMany: Integer): TPointArray;

King of Knives

2007-10-18 09:12:55

Zephyrs, be ashamed…

PS: Welcome back Zeph

-Knives

King of Knives

2007-10-18 09:18:57

Oh n3s… What if the person doesn't know the size of the object ;) :D :P

EDIT: LOL! I couldn't see my last post!! WTF! Then I can after I post the new one. Omg SRY

-Knives

ZephyrsFury

2007-10-18 09:48:09

From: King of Knives
Zephyrs, be ashamed…

PS: Welcome back Zeph

-Knives


I'm only back for a day, then I'm going again lol.

n3ss3s

2007-10-18 12:10:29

Uhmkay, the iSpyWithMyLittleEye is almost ready..

GoF

2007-10-18 12:14:11

Wow, what a spamfest going on here.

Looks nice… Like the other 10 similar functions/procedures you've released today. Also, you don't check uptext because it'd make it slower?

n3ss3s

2007-10-18 12:37:53

Because it yes, wastes time and b) unnecassary.

ShowerThoughts

2007-10-18 12:51:35

ehm n3ss3s why not make a thread

''my functions/ procedures and spam-posts''

n3ss3s

2007-10-18 12:56:17

spam-posts


Im sorry mister "Absolutely no spam 100 posts in 3 days"

Bobarkinator

2007-10-18 13:02:32

You're reverting back to your old ways…

ShowerThoughts

2007-10-18 13:06:08

From: Bobarkinator
You're reverting back to your old ways…

me?

n3ss3s

2007-10-18 13:24:55

You're reverting back to your old ways…


Nope, this was NOT about getting post count, I was sugar high, hyperactive.

Think about what happens when I drink 1,5 litr pommac, 1 litr coke, eat 1/2 chocolate cake, eat 2 packages of cookies and just too much candy in less than 24 hours? :p

Anyways, now I made a general object finder which will be my last object finder post for looong time…

but I am not reverting back to my old ways