Results 1 to 3 of 3

Thread: FindSymbolCustomColorIn

  1. #1
    Join Date
    Jan 2007
    Location
    BC, Canada
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    FindSymbolCustomColorIn

    Capable of Finding Symbol to 99% Accuracy. For the most part its the same as "FindSymbol" but instead of using the default Color from includes, you choose.

    Ok. so say your using "FindSymbol" it can sometimes find a different symbol instead of the one your looking for. and then you turn up the SymbolAccuracy and dont find anything, darn. and then your script will probably logout the current player or make some feeble attempt at find it some other way. double darn. Well this function can turn up the SymbolAccuracy and still easly find the Symbols.

    plus rep me if you like it.

    SCAR Code:
    {*******************************************************************************
    function FindSymbolCustomColorIn(var rx, ry, Color: Integer; Name: string; xs, ys, xe, ye: Integer): Boolean;
    By: fORCE_wORKS Modified from (Starblaster100, based on the ideas of Stupid3ooo)
    Description: Finds a minimap Symbol and returns a Boolean if True.
    Searches a selected area of the Minimap, More Accurate than FindSymbolColorIn
    *******************************************************************************}

    function FindSymbolCustomColorIn(var rx, ry, Color: Integer; Name: string; xs, ys, xe, ye: Integer): Boolean;
    var
      c, Speed, x, y: Integer;
      acc: Extended;
    begin
      Speed := GetColorToleranceSpeed;
      ColorToleranceSpeed(1);
      LoadSymbolBitmapColor(LowerCase(Name));
      if (SymbolBitmap <> 0) then
      begin
        FindDeformedBitmapToleranceIn(SymbolBitmap, x, y, xs, ys, xe, ye, 70, 0, True, acc);
        if (acc > SymbolAccuracy) then
        begin
          repeat
            c := c + 5;
            FindColorTolerance(x, y, Color, x, y, x + 15, y + 5, c);
          until (GetColor(x,y) > 0) or (c > 70);
          Result:= True;
          rx := x;
          ry := y;
        end;
      end else
        Writeln('Please Enter a Valid Symbol Name!');
      try
        FreeBitmap(SymbolBitmap);
      finally
        ColorToleranceSpeed(Speed);
      except
        Result := False;
      end;
    end;

    As well.
    SCAR Code:
    {*******************************************************************************
    function FindSymbolCustomColorIn(var rx, ry, Color: Integer; Name: string; xs, ys, xe, ye: Integer): Boolean;
    By: fORCE_wORKS Modified from (Starblaster100, based on the ideas of Stupid3ooo)
    Description: Finds a minimap Symbol and returns a Boolean if True.
    Searches the whole Minimap, More Accurate than FindSymbol
    *******************************************************************************}

    function FindSymbolCustomColor(var rx, ry, Color: Integer; Name: string): Boolean;
    begin
      Result := (FindSymbolCustomColorIn(rx, ry, Color, LowerCase(Name), 570, 5, 725, 166);
    end;

    this will grab the new symbol color then search for it.
    if there no people in the way it can find a bank at 99% Accuracy.
    SCAR Code:
    begin
      SymbolAccuracy:= 0.99;
      writeln('Default Bank Color: '+IntToStr(LoadSymbolBitmapColor('bank')));
      NewBankColor:= (GetSymbolColorIn(x,y,'bank',570, 5, 725, 166));
      writeln('New Bank Color: '+IntToStr(NewBankColor));
      writeln(BoolToStr(FindSymbolCustomColorIn(x,y,NewBankColor,'bank',570, 5, 725, 166)));
      MoveMouse(x,y);
    end;

  2. #2
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    rep ++!!! I like this, but, findsymbol always works for me. Would you mind if I used this in my includes?
    Formerly known as Cut em2 it

  3. #3
    Join Date
    Jan 2007
    Location
    BC, Canada
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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
  •