Results 1 to 7 of 7

Thread: Trees... Fishing... Problems fixed?

  1. #1
    Join Date
    Jun 2006
    Location
    USA
    Posts
    428
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Trees... Fishing... Problems fixed?

    I want to get back into scripting and all, but I'm confused on some stuff that I've never figured out, and was hoping some new functions could help me out.



    I've always had trouble finding a tree, because they look so similar, and once you find it, how do you know when it's chopped? DTM? What if there are several chopped trees around it?


    Same with fishing? How do you know when the spot has moved? There are many spots around you.



    If I could get these clarified it would greatly extend my scripting ability!
    Thanks,
    Abyssal

  2. #2
    Join Date
    Nov 2006
    Location
    belgium
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well Abyssal i can't help you on the tree i have rather the same prob but i could help you whit the fishing problem...
    for the fishing spot use this:
    SCAR Code:
    function AvailableSpots: Boolean;
    var ASX, ASY: Integer;
    begin
         Result := FindColorSpiralTolerance(ASX,ASY,FishColour,60,68,410,336,15);
    end;

    and to check if you are still fishing use this:
    SCAR Code:
    function IsFishing: Boolean;
    var IFX, IFY: Integer;
    begin
         Result:= FindColorSpiralTolerance(IFX,IFY,RodColour,250,145,330,180,3);
    end;

    Now thse aren't my procedures some1 else wrote them but just take a look at it use while fishing repeat until not (IsFishing).I prefer to make your own procedure of function it is easier to use stuff you made by yourself (h)

  3. #3
    Join Date
    Jun 2006
    Location
    USA
    Posts
    428
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cool, thanks for showing me that!


    That will help a ton!

  4. #4
    Join Date
    Feb 2006
    Location
    Locked in RAM's closet !
    Posts
    2,001
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    for trees you could use dtms... or color.

    if you get your mouse over the tree check to make sure you are on the tree using isuptext (i heard that wizzy is updating it?)
    Darky has stopped by to say hello :).
    10-21-2010
    Updated-
    10-09-2012

  5. #5
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    for trees use this ( since your srl member you'll prolly understand it );
    SCAR Code:
    function IsTreeThere(rx, ry : integer) : boolean;//rx and ry = randomx and randomy
    var
      PZTreeX, PZTreeY : integer;
    begin
    If(IsUpTextMulti('hop','op','Chop'))then
      begin
        GetMousePos(PZTreeX, PZTreeY);
        //<<<<<Add AntiBan Here
        //<<<<<
        //<<<<<
        //<<<<<
        repeat
        If(MMouse(PZTreeX,PZTreeY,rx,ry))then result := true;
        If not(MMouse(PZTreeX,PZTreeY,rx,ry))then result := false
        until(result = false);
      end;
    end;

    This will wait until the tree is chopped and move on. It uses words so if you cant see the word completely, make the compass move before it checks the words.

    Join the fastest growing merchanting clan on the the net!

  6. #6
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Generic Function for finding any kind of tree. (Taken directly from Ratz.)

    SCAR Code:
    //----------------------------------------------------------------------------//

    function FindTreeDeformed(var ObjX, ObjY :integer; UpText1, UpText2: String; BMP, a, b, c, d: integer): Boolean;
    var
      acc, ref : Extended;
    var
      XT, YT,times,tol : Integer;
    begin
      ref := 0.9;
      tol := 0;
      for times := 1 to 4 do
      begin
        FindDeformedBitmapToleranceIn(BMP, XT, YT, a, b, c, d, tol, 2, True, acc);
        if (acc >= ref) then
        begin
          MMouse(XT + 8, YT, 0, 0);
          if (IsUpText(UpText1) or IsUpText(UpText2)) then
          begin
            ObjX := XT;
            ObjY := YT;
            Result := True;
            Exit;
          end;
        end;
        ref := ref - 0.1;
        tol := tol+10;
        if FawkiDebug then Status('A '+FLoatToStr(acc)+'. R '+ FLoatToStr(ref)+ '. T '+IntToStr(tol));
        FTWait(1);
      end;
    end;



    And this is the Bitmap I work with. It is a "slice" 8*1, that works very well for "static" objects, both horizontal as well as vertical. Provided your PC is very fast, you will notice some lag in operation, but I take that for granted because I wish to click 100% accurate. I use this method for detecting anvils, furnaces, doors, banks, trees, minimap objects etc.
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  7. #7
    Join Date
    Jun 2006
    Location
    USA
    Posts
    428
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you for the help.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 04-16-2009, 06:40 AM
  2. Where to chop magic trees?
    By Harry in forum RuneScape News and General
    Replies: 10
    Last Post: 08-28-2007, 01:55 AM
  3. regarding ID of trees with DTM's
    By someone in forum OSR Help
    Replies: 2
    Last Post: 06-24-2007, 05:33 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
  •