Results 1 to 5 of 5

Thread: FindRockColor..

  1. #1
    Join Date
    Apr 2007
    Location
    California
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindRockColor..

    So i was messing around with some stuff, and used FindRockColor. I never had any problems with it until now..It said RockColor = 6910053 (which wasn't a color on the rocks) To see where it was getting the number, i had it move the mouse to that spot. Turns out it thought the color of the pickhead on the symbol for the mining spot was the color of the rock. I did it a few more times to see if it kept happening, and it did. Is this a flaw in FindRockColor, or am i using it wrong or something?

    Basically, it picked a color out of the mining symbol instead of the rock on the minimap.

    Edit: It seems like it's not happening anymore, but if it does again i'll ask again.
    Edit2: Yeah, it happened again. Any idea what i should do?

  2. #2
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, autocoloring is an in-exact science.

    9 times out of 10 or 99 times out of 100 it will work correctly, but it is still prone to errors.

    Reload the RS client or change worlds and it will probably start working correctly.

    If you want to help improve the autocolors, the best thing to do is make a post like you did, but include the CORRECT color value as well as the INCORRECT color value that it actually found.

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by tarajunky View Post
    Well, autocoloring is an in-exact science.

    9 times out of 10 or 99 times out of 100 it will work correctly, but it is still prone to errors.

    Reload the RS client or change worlds and it will probably start working correctly.

    If you want to help improve the autocolors, the best thing to do is make a post like you did, but include the CORRECT color value as well as the INCORRECT color value that it actually found.
    Tara, I think you can find a great use for XYZ when Autocoloring..



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    Apr 2007
    Location
    California
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I cleared the debug box or i'd post the other color, but thanks for letting me know I just wanted to make sure i wasn't doing anything wrong. I was just using it for the dynamic DTMs i was making, and i was already unsure if i was doing the dynamic DTMs right to begin with, so it just threw me off more.

    Edit: This time is gave me RockColor = 6316136 Which happened to be the color of the road nearby..

    Edit2: In case it interests anybody, I'm using this to help ensure it works:

    SCAR Code:
    procedure CheckRockColor;
    begin
      if (MMRockColor = TheColor) or (MMRockColor = 6910053) then
      begin
        repeat
          MMRockColor := FindRockColor
        until not ((MMRockColor = TheColor) and (MMRockColor = 6910053))
      end;
    end;

    and at another part in the script (that comes before this part) i have The Color := FindRoadColor

    Basically if the rock color it picks is the same as the road color it finds, or if its the same as 6910053, it'll keep picking the rock color until it gets one that doesn't equal either of those. Seems to work for me. Feel free to use/ alter it in anyway, as long as you mention my name.

  5. #5
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    tara I know this will slow it down a teensy bit but I think

    FastDrawClear(tmpbmp,testcolor)
    if FindBitmapIn(tmpbmp,x,y,mmx1,mmy1,mmx2,mmy2) then
    begin
    Result := TestColor;
    WriteLn('Bridge Color = ' +
    IntToStr(TestColor));
    Exit;
    end;

    is needed for the last step. And a not(findbmp for the rock color, where the bitmap is bigger than the rock.

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
  •