Results 1 to 7 of 7

Thread: Find a color and store in it a var?

  1. #1
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default Find a color and store in it a var?

    Can i use FindColorTolerance(x, y, color, 0, 0, 1280, 1024, 15);

    And then assign that color to a var/something and then, e.x if i name the color var 'Stone':

    SCAR Code:
    FindColorTolerance(x, y, color, 0, 0, 1280, 1024, 15);
    // Somewhere here mention it that the color is used as var
    RadialWalk(Stone{=The color}, 270, 450, 72, 99, 99);

    (How) Is it done?
    Ce ne sont que des gueux


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

    Default

    TheFoundColor := GetColor(X, Y);


  3. #3
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Thx

    Edit:

    I might still not get it 100%..
    This wont work:

    SCAR Code:
    FindColorTolerance(x, y, 3628673, 0, 0, 1280, 1024, 15)
       3628673 := GetColor(x, y);
     RadialWalk(Stone, 0, 90, 72, 99, 99)


    Soz for being t3h n00b
    Ce ne sont que des gueux


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

    Default

    But, 3628673 isn't a variable, that's the color you were looking for in the first place.

    Make a new var "Stone" as you have there, and do

    Stone := GetColor(X, Y);

    and then the radialwalkings

    Also, if you are finding one of those gray stones, I suggest using FindStoneColor, and if you are finding a brown/orange one, those you mine, use FindRockColor

    With the above, you can do straight

    RadialWalk(FindStoneColor, 0, 90, 72, 99, 99)

  5. #5
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    O , w8 now i get it.. i think :P

    Btw, its the stone next to Al Karhid bank


    Wud this work:

    SCAR Code:
    Stone := GetColor(x, y);
     RadialWalk(Stone, 0, 90, 72, 99, 99)

    But how it knows wich color Stone is?
    How do i interact that with FindColorTolerance?
    Ce ne sont que des gueux


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

    Default

    Hehe, FindColorTolerance returns the coordinates of the closest color to the 3628673 you had there and stores it's coordinates to X and Y.

    Then, we do GetColor(X, Y) so it gets the color there

  7. #7
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    O, w8! So nooby of me :P I know it thanks very much!
    Ce ne sont que des gueux


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 07-31-2007, 07:23 PM
  2. Find Color
    By Hamish in forum OSR Help
    Replies: 7
    Last Post: 03-12-2007, 05:56 PM
  3. How im find a color
    By bevert in forum OSR Help
    Replies: 3
    Last Post: 11-09-2006, 10:43 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
  •