Results 1 to 4 of 4

Thread: FindMMColorCentreTol and FindSmallestColorTol

  1. #1
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default FindMMColorCentreTol and FindSmallestColorTol

    I have two here I just whipped up.
    FindMMColorCentreTol was something I used in my sweet walking procedures, it's really good for clicking right in the middle of a particular floor colour. (I spelt colour the american way due to popularity)
    FindSmallestColorTol is an idea that just popped into my head, if a colour is visable within the given co-ords then it will find the lowest possible tolerance for that colour. (The closest matching colour) It's really quite quick for the job it does
    PHP Code:
    {*******************************************************************************
    Function 
    FindMMColorCentreTol(var xIntegercolourtol Integer): Boolean;
    ByKrazy_Meerkat
    Description
    Searches for a color on the minimap using tolerance and then finds the centre
    *******************************************************************************}
    function 
    FindMMColorCentreTol(var xIntegercolourtol Integer): Boolean;
    begin
      
    if(FindMMColorTol(xycolourtol))then
      begin
        FindColorSpiral2
    (xy, (getcolor(xy)), MMX1MMY1MMX2MMY2);
        
    Result:= True
      end
    ;
    end;

    {*******************************************************************************
    Function 
    FindSmallestColorTol(var xyfinaltol Integercolourxsysxeye Integer): Boolean;
    ByKrazy_Meerkat
    Description
    Searches for a color finding the least amount of tolerance possible
    *******************************************************************************}
    function 
    FindSmallestColorTol(var xyfinaltol Integercolourxsysxeye Integer): Boolean;
    var
      
    tolrange Integer;
    begin
      tol
    := 50
      range
    := tol div 4
      repeat
        
    if(not(FindColorSpiralTolerance(xycolourxsysxeyetol)))then
          begin
            repeat
              tol
    := tol range
            until
    (FindColorSpiralTolerance(xycolourxsysxeyetol))
            
    tol:= tol - (range div 2)
            
    range:= (range div 2)
          
    end;
          
    tol:= tol range
      until
    (range 0)
        
    Result:= True;
        
    finaltol:= tol;
    end

  2. #2
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat
    I have two here I just whipped up.
    FindMMColorCentreTol was something I used in my sweet walking procedures, it's really good for clicking right in the middle of a particular floor colour. (I spelt colour the american way due to popularity)
    FindSmallestColorTol is an idea that just popped into my head, if a colour is visable within the given co-ords then it will find the lowest possible tolerance for that colour. (The closest matching colour) It's really quite quick for the job it does
    Oh Sweet, the 2nd one is leet. I'm going to examine it so can learn a bit more.


    Um American way is colour? I never knew that, and I live in America too. 8-P

  3. #3
    Join Date
    Feb 2006
    Location
    Las Vegas, NV
    Posts
    939
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    nice!

    lol whiteshadow.. COLOR is the american way.. look at the names of the functions.. he used colour because its his way (not sure where his way is from)
    Busy with real life. I'll still be around occasionally.
    Current Mood:


  4. #4
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Australia XD I don't mind spelling words differently.. Thanks a lot, I hope this was useful

Thread Information

Users Browsing this Thread

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

Posting Permissions

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