Results 1 to 13 of 13

Thread: 2 "new" AutoColor Functions

  1. #1
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    2 "new" AutoColor Functions

    Well, while I was woking on my new guild miner, I needed an auto-color, first for the buildings in fally, and second for the rocks in the mining guild, for the existing function never picked the right rock, so I decided to quickly code my own. It is very reliable as far as I tested it (20/20 so far), and it is simple enough for others to understand. Now, the chances of this one going astray if you are in a wrong place are quite high, but my walking simply doesn't fail, so there is no need for me to change anything, but feel free, if you use this, to adjust it to your own needs. Well, without further ado, here is my Fally building color finder (on the minimap):

    SCAR Code:
    Function FindFallyBuildingColor: Integer;
    var
      FallyBuilding: Integer;
    Begin
      FallyBuilding := BitmapFromString(14, 12, 'beNpb27Fx7SgaeQg' +
           'ApXY/AA==');
      Begin
        Result := AutoColorThis(FallyBuilding,50,mmx1,mmy1,mmx2,mmy2);
        Writeln('FallyBuildingColor = ' +IntToStr(result));
      End;
    End;

    That one was also pretty safe, the only problem is if you stand somewhere other than fally, because it has quite a big tolerance, but once again, my walking is never wrong.

    Now, here is my mining guild mining rock finder:
    SCAR Code:
    var
      x,y,MiningRockColor: Integer;
      MineRockMDTM, MRDTMTol, MRDTMArea:Integer;
      MineRockMP: TDTMPointDef;
      MineRockSP: array[0..3] of TDTMPointDef;
      MineRockDTMSkel: TDTM;

    Procedure MiningRockPoints;
    Begin
      MineRockMP.x:= 657;
      MineRockMP.y:= 86;
      MineRockMP.areasize:= 1;
      MineRockMP.areashape:= 0;
      MineRockMP.color:= 6511200;
      MineRockMP.tolerance:= 70;

      MineRockSP[0].x:= 657;
      MineRockSP[0].y:= 90;
      MineRockSP[0].areasize:= 1;
      MineRockSP[0].areashape:= 0;
      MineRockSP[0].color:= 3089708;
      MineRockSP[0].tolerance:= 70;

      MineRockSP[1].x:= 654;
      MineRockSP[1].y:= 85;
      MineRockSP[1].areasize:= 1;
      MineRockSP[1].areashape:= 0;
      MineRockSP[1].color:= 4405568;
      MineRockSP[1].tolerance:= 70;

      MineRockSP[2].x:= 657;
      MineRockSP[2].y:= 83;
      MineRockSP[2].areasize:= 1;
      MineRockSP[2].areashape:= 0;
      MineRockSP[2].color:= 5063241;
      MineRockSP[2].tolerance:= 70;

      MineRockSP[3].x:= 660;
      MineRockSP[3].y:= 86;
      MineRockSP[3].areasize:= 1;
      MineRockSP[3].areashape:= 0;
      MineRockSP[3].color:= 6511200;
      MineRockSP[3].tolerance:= 70;

      MineRockDTMSkel.MainPoint:=MineRockMP;
      MineRockDTMSkel.SubPoints:=MineRockSP;
      MineRockMDTM:=AddDTM(MineRockDTMSkel);
    End;

    Function FindMiningRockColor: Integer;
    Begin
      For Z:=1 To 5 Do
      Begin
        MRDTMTol := MRDTMTol+3;
        MRDTMArea := MRDTMArea+2;
        if (DTMRotated(MineRockMDTM,x, y,MMX1,MMY1,MMX2,MMY2)) Then
        begin
          Result := GetColor(x,y);
          Writeln('MiningRockColor = ' +IntToStr(Result));
          Exit;
        End;
      End;
      Writeln('Nothing Found');
      Result := 0;
    End;

    Now, I might have forgotten to add a variable or two, because I copied this out of my script and edited the other stuff out to make this easier to understand, and to not reveal my little members or junior members script.

    BTW: These might have already been created, and if so, then I am sorry, but I couldn't find working ones in the srl manual, so I just made some myself. I put them up here mainly for others to learn how DDTMs could be used, and to also gain a little experience myself in making Auto coloring functions.

    EDIT: I just remembered, I need to credit Yoho, because wihtout his tut, I would never have gotten this far with DDTMs, sorry for only adding that now...
    There is nothing right in my left brain and there is nothing left in my right brain.

  2. #2
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    looks nice

    good work dude
    METAL HEAD FOR LIFE!!!

  3. #3
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks! *feels like it was worth the effort*
    There is nothing right in my left brain and there is nothing left in my right brain.

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

    Default

    Quote Originally Posted by Stur Pure View Post
    Thanks! *feels like it was worth the effort*
    Every experience is worth the effort.
    Looks fine.



    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)

  5. #5
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Man I'm glad that that this is actually gaining some approval, I thought it would get some Medium comments, and then after three or four of those comments, this thread would be history.
    There is nothing right in my left brain and there is nothing left in my right brain.

  6. #6
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Ha, nice


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  7. #7
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    The rock one looks good

    About the Fally building color one... large areas like roads, building colors, etc. can be flawlessly autocolored using Tarajunky's method, which you can find in the autocoloring part of SRL. It's a pretty nice method... could be sped up a little, but it works perfectly. You might want to base yours off of his methods

  8. #8
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just plain typical! Here I thought my autocoloring works perfekt, now it starts to locate the red rock on the minimap in the fally mine, even though it should have a completely different tolerance in order to find it... I'll redo the different points, and maybe add something else, too, in order to make it safer. This is just plain messing with my script.
    EDIT: The fally building still works perfectly, never had anything wrong up to this point...
    There is nothing right in my left brain and there is nothing left in my right brain.

  9. #9
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i think your Tolerance and area size for to do doesnt do anything, but im not exactly sure??
    SCAR Code:
    Function FindMiningRockColor: Integer;
    Begin
      For Z:=1 To 5 Do
      Begin
        MRDTMTol := MRDTMTol+3;//I dont see these variables used anywhere so
        MRDTMArea := MRDTMArea+2;//idk if they work or not??
        if (DTMRotated(MineRockMDTM,x, y,MMX1,MMY1,MMX2,MMY2)) Then
        begin
          Result := GetColor(x,y);
          Writeln('MiningRockColor = ' +IntToStr(Result));
          Exit;
        End;
      End;
      Writeln('Nothing Found');
      Result := 0;
    End;

    but anyways good job i could never get AutoColorThis to work well

  10. #10
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    interesting functions i mite use with your credits if thats ok

  11. #11
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sure, I wouldn't post this in the public test corner if you couldn't (of course only if you credit )
    There is nothing right in my left brain and there is nothing left in my right brain.

  12. #12
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Hey Stur Pure does this work in the fally guild mine?

  13. #13
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That is the place this was created for. dunno if it works anywhere else, or if it still works, because Runescape had quite a lot of updates in the laast couple of days, but yes, it should.
    If it does not work, please leave a messsage, then I will update it as soon as I have time.
    There is nothing right in my left brain and there is nothing left in my right brain.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. action="www.site.com" method="post"
    By Jason2gs in forum General
    Replies: 4
    Last Post: 05-17-2007, 11:50 PM
  2. Replies: 3
    Last Post: 04-19-2007, 03:44 AM
  3. Replies: 5
    Last Post: 10-26-2006, 11:30 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
  •