Results 1 to 7 of 7

Thread: LesserDemon finder by n3s...

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

    Default LesserDemon finder by n3s...

    Yeh, Im trying to do lil mage tower demon caster as a side project, but its not very interesting so I thought I just release the finder...

    I left the function that got me the good color instead of just putting the color there if someone wants to find out how to get very good middle of light and dark

    Umm finding the demon takes 78 milliseconds (time of one FindColors), so use this baby with health and care

    SCAR Code:
    Function GetRed: Integer; // Very useful for getting middle of light and dark
    Var
      HSL: Array of Array of Extended;
    Var
      H, S, L: Extended;
    Var
      Colors: TIntegerArray;
    Var
      C: Integer;
    Begin
      Colors := [3162500, 5700];
      SetArrayLength(HSL, 2);
      SetArrayLength(HSL[0], 3);
      SetArrayLength(HSL[1], 3);
      For C := 0 To 1 Do
      Begin
        ColorToHSL(Colors[c], HSL[c][0], HSL[c][1], HSL[c][2]);
      End;
      H := HSL[1][0] - ((HSL[1][0] - HSL[0][0])/4);
      S := HSL[1][1] - ((HSL[1][1] - HSL[0][1])/4);
      L := HSL[1][2] - ((HSL[1][2] - HSL[0][2])/2);
      Result := HSLToColor(H, S, L);
    End;
       
    Function FindLDemon(Var GDX, GDY: Integer): Boolean;
    Var
      X, Y, I, C, CTS, D: Integer;
    Var
      TPA: TPointArray;
    Begin
      If(Not(LoggedIn))Then Exit;
      Begin
        CTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        D := GetRed;
        FindColorsTolerance(TPA, D, MSX1, MSY1, MSX2, MSY2, 20);
        MiddleTPAEx(TPA, X, Y);
        FindColorsTolerance(TPA, D, X - 20, Y - 20, X + 20, Y + 20, 15);
        If(GetArrayLength(TPA) >= 20)Then
        Begin
          MiddleTPAEx(TPA, GDX, GDY);
          Result := True;
        End Else
        Begin
          GDX := 0;
          GDY := 0;
        End;
        ColorToleranceSpeed(CTS);
      End;
    End;

    Enjoy!


    You may use these but only if you credit me

  2. #2
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice one n3ss3s. you're making a lot obj find fucntions atm

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

    Default

    Yes, object finding is stealing my soul, but actually Im selling it xD

    Its just too fun to be true

    and dont think you people get away this easy, atleast one more coming today


    EDIT: + listening to DevilDriver's new album, having a sugar overload gets brain and fingers work faster

    EDIT EDIT: Sugar rush also gives nice reflexs for cs

  4. #4
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    n3sses, you're weird, I'm weird. What do you say: We make a kickass project together? One rule: It has to be weird.

    -Knives

  5. #5
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by King of Knives View Post
    n3sses, you're weird, I'm weird. What do you say: We make a kickass project together? One rule: It has to be weird.

    -Knives
    He's not weird... just high on sugar...

  6. #6
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I think he's weird, but in a good way

    Right now he's high on sugar, yes, but also weird

    -Knives

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

    Default



    I ate salty food (spaghetti) and drank water, went out... Now Im only 1/4 of the 5 hours ago xD

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. need help with my lesserdemon killer
    By trojan in forum OSR Help
    Replies: 5
    Last Post: 02-02-2009, 09:33 PM
  2. Creating a pick head finder, and gas finder
    By Tom_Gower in forum OSR Help
    Replies: 7
    Last Post: 11-07-2008, 07:06 AM
  3. My Ent Finder
    By skilld u in forum OSR Help
    Replies: 3
    Last Post: 02-11-2008, 04:13 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
  •