Results 1 to 4 of 4

Thread: Color Finding Help

  1. #1
    Join Date
    Oct 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Color Finding Help

    Im wondering how I could find a color and check if the name is the same as it is put in the script.
    Thanks

  2. #2
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You would use this:
    SCAR Code:
    if FindObjCustom(x,y,['NPC Name'],[Colors],Tolerance) then
    begin
      //Content
    end;

  3. #3
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Try this

    SCAR Code:
    {.include srl/srl.scar}
    Program New;

    const
    color = 12345;
    Name = 'name';
    tolerance = 5;//

    function Check: boolean;
    begin
      if FindColorTolerance(x,y,color,msx1,msy1,msx2,msy2,tolerance) then
      begin
        Mmouse(x,y,1,1);
        if isuptext(name) then
        result:=true;
      end;
    end;

    begin
      setupsrl;
      if check then writeln('Found col + uptext');
    end.

  4. #4
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Look at the SRL Wiki: http://www.villavu.com/wiki/index.php/Finding_Colors
    The next you have a question like this, use the search button, search for tutorials(There are tutorials for this, many) or use the SRL Wiki .


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
  •