Results 1 to 20 of 20

Thread: TreeWalk!

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

    Default TreeWalk!

    I was playing around with walking function when i came up with an idea.
    As we know more than 60% of runescape are full of trees and there is still no function that walks to the trees
    Problem solved

    I proudly present...


    TreeWalk!!

    SCAR Code:
    {********************************************************************************
    Function TreeWalk(WhatTree: String; x1, y1, x2, y2: Integer) : Boolean;
    By: NaumanAkhlaQ
    Description: Walks to a tree in a specified area, for use in the MiniMap
    Direction: In the string 'WhatTree' the valid arguments are 'RareTree' and 'Tree'
    ********************************************************************************}


    Function TreeWalk(WhatTree: String; x1, y1, x2, y2: Integer) : Boolean;
    Var
     Tree : array [0..2] of Integer;
     i : Integer;
    // x,y : Integer;
    begin
      Tree[0] := 2250789;
      Tree[1] := 2315315;
      Tree[2] := 2442328;
    Begin
    Case WhatTree of
     'Tree': Begin
               For i:= 0 to 2 do
                If FindColorSpiralTolerance(x,y,Tree[i],x1,y1,x2,y2,48) then
                  Begin
                   Writeln('Tree Found!')
                   Result:= True;
                   Exit;
                  end else
                Writeln('Tree Not Found, Exiting');
                Exit;
             end;
     'RareTree' : Begin
                    If FindSymbolIn(x,y,'Tree',x1,y1,x2,y2) then
                      Begin
                       Writeln('Tree Found!')
                       Result:= True
                       Exit;
                      end else
                    Writeln('Tree Not Found, Exiting');
                    Exit;
                   end;
                end;
            end;
        end;

    Usage:
    SCAR Code:
    If TreeWalk('Tree',603, 38,609, 44) then

    or

    SCAR Code:
    If TreeWalk('RareTree',605, 31,659, 4) then


    A Quick example:

    SCAR Code:
    If TreeWalk('Tree',603, 38,609, 44) then
      Begin
        Location := Yews;
        Mouse(x,y,1,1,true)
      end;

    Please post comments and suggestions.
    Thanks
    NaumanAkhlaQ!!!

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

    Default

    Uhm... Umm... I don't want to insult you or your code but... you made a function that is the same as Result := FindSymbol(X, Y, 'tree')?

    Also, are those colors brown or green ones?

    Either case, the RuneScape colors are dynamic, and if I would now go to rs, use those colors, they most likely wouldn't find what I want to.

    You need to make an autocolor procedure, I suggest a similar one to the SRL ones.

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

    Default

    maybe you could add :
    SCAR Code:
    function Function TreeWalk(WhatTree: String;var X,Y : Integer;  x1, y1, x2, y2: Integer) : Boolean;
    then you use :
    SCAR Code:
    if TreeWalk('Tree',x,y,343,134,43,23) then
    begin
      Wreiteln('We are at the tree');
      Exit;
    end;
    blabla


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

    Default

    Whats so good about the vars?
    True they look good and they give the position? but useage?
    And n3ss3s im deeply insulted j/k
    The colors work hence the high tol
    What autocoloring BruteForce? RGB? XYZ? HSL?

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

    Default

    Well I know HSL the most, but all the SRL ones seem to be made with RGB. Your choice.

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

    Default

    which would you think is the easiest?

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

    Default

    He will think hsl because almost every function he makes has it... But I think rgb

  8. #8
    Join Date
    Jun 2007
    Location
    Ohio
    Posts
    341
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    is this like radialwalking? or does it just find any tree in a certain area? if its like radialwalking ill try it. and maybe use it.

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

    Default

    Quote Originally Posted by malotthouse View Post
    is this like radialwalking? or does it just find any tree in a certain area? if its like radialwalking ill try it. and maybe use it.
    I think it either searches by either using the Symbol on the minimap, or or little trees that you can see on the minimap

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

    Default

    Yes guys it does use the small trees, It's very handy i'm using it im my script.
    I figured never use a DTM as the tree's refresh every 1 second

    Thx for the FeedBack

  11. #11
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Ooo, I could so use this for the walking script I'm working on. I was actually looking for something like this.

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

    Default

    No problem happy to help

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

    Default

    Btw, different trees often have different little "symbols", the willow one looks like a minimized willow, the dead trees are only brown (something which might need to be edited, cause it might not find these), oaks also have a slightly "rounder" shape to them, so maybe you can use something to differ tree from tree... just an idea.
    Overall good idea, but needs some work.
    There is nothing right in my left brain and there is nothing left in my right brain.

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

    Default

    Yea the annoying problem is that the tree's keep changing the only thing i can think of is autocoloring and just plain coloring.
    Or making arrays like iv'e done

    Thx for the feedback anyways.

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

    Default

    Oh, btw, my comment was meant as a compliment, in case that sorta slipped under the carpet (like the saying goes).
    But yeah, they vary greatly in shape... maybe someday it will be possible to create programs which work similar to the human mind, capturing the bitmap of the tree while running the program, running a category check to see into which category it applies, and then acts accordingly. *keeps dreaming* (of course, that would probably require huge ram to work fluently, lol)
    There is nothing right in my left brain and there is nothing left in my right brain.

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

    Default

    no really. It pretty easy if you use a java based pogram (Kyab). lol
    But in delphi it would be hard but not impossible..

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

    Default

    you should make this like radial walk and search with angles, because what if you were walking right since it searches from left to right it might find a tree before that and start going left... just a thought

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

    Default

    Yes i could do that.

  19. #19
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by stampede10343 View Post
    you should make this like radial walk and search with angles, because what if you were walking right since it searches from left to right it might find a tree before that and start going left... just a thought
    Ok. Nauman, use FindColorSpiralTolerance then xD.

    Try some rgb/hsl autocoloring + radialwalk and that should work..

    If you can find a static color (or colors that are found very often) fora MM tree, you could be able to make this function to work

    -Tsn.
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

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

    Default

    KK thanks TSN.
    Thanks for sharing your ub3r knowledge

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
  •