Results 1 to 5 of 5

Thread: Yew Cutter NEED Procedures

  1. #1
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default Yew Cutter NEED Procedures

    anyones got a yew chopping function, i cant get mine to work fully 100%.
    it will be for my edge yew cutter i have the walking done 100%. also autocolor.
    Then i just need one procedure more i need a function or procedure that will click a symbol in the NORTH and South if anyone haves one..


    EDIT: i got them all thanks

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  2. #2
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    This is the new procedure I will use in my next version of my Yew Retriever :

    SCAR Code:
    function FindYew(var x, y: integer): Boolean;
    var
      Points: TPointArray;
      I, Ci, Tol: Integer;
    begin
      repeat
       if FindMSColorTol(x, y, 598048, Tol) then Break else Tol := Tol +2
      until Tol > 15
      if Tol > 15 then
      begin
        Result := False;
        exit;
        Tol := 0
      end else
      begin
        FindColorsSpiralTolerance(MSCX, MSCY, Points, 598048, MSX1 + 50, MSY1 + 30, MSX2 - 50, MSY2 - 50, tol)
        ci := 0;
        for I := 1 to GetArrayLength(Points) - 1 do
        begin
          if (Distance(Points[ci].x, 0, Points[i].x, 0) >= 2) and
            (Distance(0, Points[ci].y, 0, Points[i].y) >= 2) then
            ci := I
          else
          begin
            Points[I].x := 0;
            Points[I].y := 0;
          end;
        end;
        for i := 0 to GetArrayLength(Points) - 1 do
        begin
          if (Points[i].x <> 0) then
          if FindColorTolerance(x, y, 2373688, Points[i].x -5, Points[i].y -5, Points[i].x +5, Points[i].y +5, 5 +Tol) then
          if FindColorTolerance(x, y, 4159600, Points[i].x -5, Points[i].y -5, Points[i].x +5, Points[i].y +5, 5 +Tol) then
          if FindColorTolerance(x, y, 2900024, Points[i].x -5, Points[i].y -5, Points[i].x +5, Points[i].y +5, 5 +Tol) then
          begin
            //TempColor := GetColor(Points[i].x, Points[i].y); This is 1 thing i use to see if the Yew is gone.. Don't know if you gonne use it..
            MMouse(Points[i].x, Points[i].y, 0, 0)
              Wait(50);
            if (IsUpText('Yew')) then
            begin
              WriteLn('Yew found at a Tol of ' +IntToStr(Tol));
              Result := True;
              Break;
            end;
          end;
        end;
        if (Result) then
        begin
          x := Points[i].x;
          y := Points[i].y;
          //TreeX := x; Also an extra failsafe, don't know if you wanna use it
          //TreeY := y; Same as above..
        end;
      end;
      Tol := 0;
    end;

    If you use this, plz credit me..
    Hup Holland Hup!

  3. #3
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    thank you very much, ill add big credits to joo!

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  4. #4
    Join Date
    Mar 2006
    Location
    United States, -7:00 GMT
    Posts
    1,790
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by nielsie95 View Post
    This is the new procedure I will use in my next version of my Yew Retriever :

    SCAR Code:
    function FindYew(var x, y: integer): Boolean;
    var
      Points: TPointArray;
      I, Ci, Tol: Integer;
    begin
      repeat
       if FindMSColorTol(x, y, 598048, Tol) then Break else Tol := Tol +2
      until Tol > 15
      if Tol > 15 then
      begin
        Result := False;
        exit;
        Tol := 0
      end else
      begin
        FindColorsSpiralTolerance(MSCX, MSCY, Points, 598048, MSX1 + 50, MSY1 + 30, MSX2 - 50, MSY2 - 50, tol)
        ci := 0;
        for I := 1 to GetArrayLength(Points) - 1 do
        begin
          if (Distance(Points[ci].x, 0, Points[i].x, 0) >= 2) and
            (Distance(0, Points[ci].y, 0, Points[i].y) >= 2) then
            ci := I
          else
          begin
            Points[I].x := 0;
            Points[I].y := 0;
          end;
        end;
        for i := 0 to GetArrayLength(Points) - 1 do
        begin
          if (Points[i].x <> 0) then
          if FindColorTolerance(x, y, 2373688, Points[i].x -5, Points[i].y -5, Points[i].x +5, Points[i].y +5, 5 +Tol) then
          if FindColorTolerance(x, y, 4159600, Points[i].x -5, Points[i].y -5, Points[i].x +5, Points[i].y +5, 5 +Tol) then
          if FindColorTolerance(x, y, 2900024, Points[i].x -5, Points[i].y -5, Points[i].x +5, Points[i].y +5, 5 +Tol) then
          begin
            //TempColor := GetColor(Points[i].x, Points[i].y); This is 1 thing i use to see if the Yew is gone.. Don't know if you gonne use it..
            MMouse(Points[i].x, Points[i].y, 0, 0)
              Wait(50);
            if (IsUpText('Yew')) then
            begin
              WriteLn('Yew found at a Tol of ' +IntToStr(Tol));
              Result := True;
              Break;
            end;
          end;
        end;
        if (Result) then
        begin
          x := Points[i].x;
          y := Points[i].y;
          //TreeX := x; Also an extra failsafe, don't know if you wanna use it
          //TreeY := y; Same as above..
        end;
      end;
      Tol := 0;
    end;

    If you use this, plz credit me..
    Thats a good function for a non-srl member

    hakuna matata ;)

  5. #5
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    Thank you Ejj
    Hup Holland Hup!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using Procedures in Procedures?
    By Geebly in forum OSR Help
    Replies: 4
    Last Post: 03-14-2008, 07:33 AM
  2. Help with procedures :s
    By Macro_FTW in forum OSR Help
    Replies: 1
    Last Post: 05-02-2007, 02:15 AM
  3. better procedures?
    By lilboy543 in forum OSR Help
    Replies: 3
    Last Post: 04-25-2007, 01:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •