Results 1 to 7 of 7

Thread: [#45] New AutoColor.scar

  1. #1
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default [#45] New AutoColor.scar

    New AutoColor.scar

    Hey everyone,

    If you haven't noticed already, revision 510 has some new, long awaited, autocoloring functions. It has been purposely written to make it easy for the scripter. There are two functions that you'll need to worry about: AutoColorEx and AutoColor.

    AutoColorEx(which: Integer): TAutoColorInfo;
    • This function is more for the advanced scripters that want to use the different elements of the TAutoColorInfo record. See Globals.scar for the record.


    AutoColor(which: Integer): Integer;

    • This is what most of you will be using. Very simple to use as it's much like the old autocoloring.
      SCAR Code:
      procedure WalkOnVarrockRoad;
      var
        varrockRoadColor: Integer;
      begin
        varrockRoadColor := AutoColor(srl_VarrockRoadColor);
        RadialWalkTolerance(varrockRoadColor, 186, 173, 70, 2 , 1, 10);
      end;


    The parameter "which" is determined from a list of constants in AutoColor.scar.
    SCAR Code:
    srl_VarrockRoadColor   = 0;
    srl_LumbridgeRoadColor = 1;
    srl_FaladorRoadColor   = 2;
    srl_AlKharidRoadColor  = 3;
    srl_DarkDirtRoadColor  = 4;
    srl_LightDirtRoadColor = 5;
    srl_SandColor          = 6;
    srl_WaterColor         = 7;
    srl_SwampWaterColor    = 8;
    srl_LadderColor        = 9;
    srl_RockColor          = 10;
    srl_MineRockColor      = 11;
    srl_TreeColor          = 12;

    I've personally tested every color, but more testing is always appreciated. There are a few things you should be aware of before using these functions:
    • Due to the dynamically changing colors of basically everything on the minimap, it's highly recommended to use a tolerance when using functions like RadialWalking (RadialWalkTolerance). You should always use tolerance anyway, but this is just a heads up.

    • There are a few colors (water, swamp water, sand color) that may require a higher tolerance then others, so experiment.

    • I've attached a .zip file of all the .aca files that hold each array of colors. If for some reason, one of the colors isn't being found, I encourage to load the required file in ACA and add the new colors to the list. If you do this, post them here so they can be updated.


    I thinks that's everything.

    Enjoy,
    The SRL Development Team
    Last edited by Coh3n; 06-29-2010 at 11:24 PM.

  2. #2
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Yay!

  3. #3
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Are you missing the normal grey road (eg the one at Rimmington and Draynor Village)?

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Are you missing the normal grey road (eg the one at Rimmington and Draynor Village)?
    Yes sir, I am. IIRC, those roads are slightly darker than the other road colors. The other city road colors may work, but I'm not sure. If they do, that'll have to work until I (or someone else) have the time to update them.

  5. #5
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Is it confirmed that FindTreeColor works?
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  6. #6
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    Is it confirmed that FindTreeColor works?
    Worked well when I tested it. And it's AutoColor(srl_TreeColor);

  7. #7
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Worked well when I tested it. And it's AutoColor(srl_TreeColor);
    Wooo thanks!
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

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
  •