Results 1 to 10 of 10

Thread: FastFindMonster by n3ss3s

  1. #1
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default FastFindMonster by n3ss3s

    This time we find any monster, found hair dresser in 15ms..

    MainC = maincolor of the monster, hair dresser's would be pink, then colors, fill there like [onecolor, second, etc] and Mx and My are the ones the coords return to if results true.

    SCAR Code:
    Function FastFindMonster(MainC: Integer; Colors: TIntegerArray; Var Mx, My: Integer): Boolean;
    Var
      I, C, CTS, L, X, Y, T: Integer;
    Var
      TPAA: TPointArrayArray;
    Var
      FinalTPA: TPointArray;
    Begin
      T := GetSystemTime;
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      L := GetArrayLength(Colors);
      SetArrayLength(TPAA, L);
      If(FindColorTolerance(X, Y, MainC, MSX1, MSY1, MSX2, MSY2, 10))Then
      begin
        For I := 0 To L - 1 Do
        Begin
          FindColorsTolerance(TPAA[i], Colors[i], X - 15, Y - 15, X + 15, Y + 15, 10);
          If(GetArrayLength(TPAA[i]) <= 0)Then
          Begin
            ColorToleranceSpeed(CTS);
            Exit;
          End;
        End;
        SetArrayLength(FinalTPA, L);
        For C := 0 To L - 1 Do
        Begin
          FinalTPA[c] := MiddleTPA(TPAA[c]);
        End;
        MiddleTPAEx(FinalTPA, Mx, My);
        Result := True;
      End;
      Writeln(IntToStr(GetSystemTime - T));
      ColorToleranceSpeed(CTS);
    End;

    As usual free to use if credits to me..

  2. #2
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks interesting! no use of uptext? <- important for monsters surely? and does this return the closet one to you?
    The truth finally came out...


  3. #3
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    The uptext is not needed, though if there are many monsters with same like colors, then you can add...

    To return the closest one just add "SortTPAFrom..."

  4. #4
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks very nice... if i ever need to find monsters ill be sure to use this (if it tests out well 4 me)

    and be sure to credit you of course (wait am i allowed?)
    ~ Metagen

  5. #5
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Yes, you can use as long as I get the credit for it.

  6. #6
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    I'll whoop you with the plugin I'm making, N3ss3s. Just wait...


    Remember? I swore to kick your ass .


    P.S.: Yours is pretty good though, I like the 1337ne55. But remember what I said about whitespace?
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  7. #7
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    15ms, amazing. Could be used in pc scripts (where speed counts a lot).

    But, yeah wtf no uptext?

    But then again, wouldnt uptext slow it down a bit?

  8. #8
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by R0b0t1 View Post
    I'll whoop you with the plugin I'm making, N3ss3s. Just wait...


    Remember? I swore to kick your ass .


    P.S.: Yours is pretty good though, I like the 1337ne55. But remember what I said about whitespace?
    Plugin.. Plugin.. You can't compare Plugins with SCAR.. Plugins are way to fast.. Where SCAR takes seconds, plugin can do it in 6ms..
    Verrekte Koekwous

  9. #9
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    N3ss3s, CTS 2 isn't always the best. Sometimes it's the worst. I think you should either have the CTS as a parameter, or make it CTS 1, since that's usually in the middle: almost never best, almost never worst.

  10. #10
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Bullzeye ofcourse I test it with the diff cts, though thanks..
    Rofl @ your sig

    Remember? I swore to kick your ass .
    Lets agree with raymond, kick my ass in SCAR oke kid?

    EDIT: Dw r0b0t, my next obj finder has white spaces

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. n3ss3s
    By t3hl33tn00b in forum RuneScape News and General
    Replies: 8
    Last Post: 11-07-2007, 12:48 AM
  2. n3ss3s your tag
    By HyperSecret in forum Graphics and Multimedia
    Replies: 17
    Last Post: 09-25-2007, 03:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •