Results 1 to 23 of 23

Thread: Chop procedure help!!!

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

    Default Chop procedure help!!!

    Ok so heres the deal...

    ive been trying to make my chop procedure more advanced so there are less run-time problems that occur. One major problem ive noticed is that when powerchopping there is always a normal tree by the tree you want to cut and it always (most of the time atleast) has one of the colors you picked for the tree. The script goes to click it but is halted by the IsUpText failsafe....HOWEVER it is stuck there once it does that.

    How I had planned to fix this problem has not been working due to my noobish scripting ablity. But here is my plan anyway:

    Divide the mainscreen into four quadrants and if(not(IsUpText(TreeType)))then
    search one of the quadrents for the color (most likely a NEW tree) and if that doesnt find the correct tree it moves on to the next until it reaches the 4th quadrant. Here i want it to MakeCompass('random') and then restart the whole chop procedure until it finds the correct tree.

    Ive tried this a few ways but neither seem to work.
    1. I made 4 procedures called NotTreeType1,2,3,and 4 and had it repeat search for the color in each quadrant until it found the color with the correct tree or it timed out.
    2. I built in a similar thing directly into the procedure where i used 'end else'

    Both ways delivered the same problem...it would hover over the correct tree and just sit there (i think its a problem with the 'end else' parts but not sure)

    Im asking for any help on this matter and any sample procedures/ideas that could put my idea into motion....

    Thanks
    METAL HEAD FOR LIFE!!!

  2. #2
    Join Date
    Jun 2007
    Location
    Kentucky, United States of America
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your idea would probably work. Can you post the script here or PM it to me?

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

    Default

    well actually i just found out about findobj3 and that is works pretty well do you think im better off using that or trying this out?

    heres what i have anyway:

    SCAR Code:
    procedure NotTreeType1;
    var WaitTime: Integer;

    begin
      if (not(IsUpTextMulti('hop','own',TreeType))) then
      begin
        MarkTime(WaitTime);
        repeat
          if (IsUpTextMulti('hop','own',TreeType)) then
            Break;
            if (FindColorTolerance(x,y,TreeColor1,0,0,263,154,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor2,0,0,263,154,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor3,0,0,263,154,TreeTol)) then
            begin
              MMouse(x,y,3,3);
            end;
        until(IsUpTextMulti('hop','own',TreeType)) or (TimeFromMark(WaitTime) > 5000 + random(2000))
      end;
    end;

    procedure NotTreeType2;
    var WaitTime: Integer;

    begin
      if (not(IsUpTextMulti('hop','own',TreeType))) then
      begin
        MarkTime(WaitTime);
        repeat
          if (IsUpTextMulti('hop','own',TreeType)) then
            Break;
            if (FindColorTolerance(x,y,TreeColor1,263,0,512,154,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor2,263,0,512,154,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor3,263,0,512,154,TreeTol)) then
            begin
              MMouse(x,y,3,3);
            end;
        until(IsUpTextMulti('hop','own',TreeType)) or (TimeFromMark(WaitTime) > 5000 + random(2000))
      end;
    end;
    procedure NotTreeType3;
    var WaitTime: Integer;

    begin
      if (not(IsUpTextMulti('hop','own',TreeType))) then
      begin
        MarkTime(WaitTime);
        repeat
          if (IsUpTextMulti('hop','own',TreeType)) then
            Break;
            if (FindColorTolerance(x,y,TreeColor1,0,154,263,0,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor2,0,154,263,0,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor3,0,154,263,0,TreeTol)) then
            begin
              MMouse(x,y,3,3);
            end;
        until(IsUpTextMulti('hop','own',TreeType)) or (TimeFromMark(WaitTime) > 5000 + random(2000))
      end;
    end;


    procedure NotTreeType4;
    var WaitTime: Integer;

    begin
      if (not(IsUpTextMulti('hop','own',TreeType))) then
      begin
        MarkTime(WaitTime);
        repeat
          if (IsUpTextMulti('hop','own',TreeType)) then
            Break;
            if (FindColorTolerance(x,y,TreeColor1,263,154,512,337,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor2,263,154,512,337,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor3,263,154,512,337,TreeTol)) then
            begin
             MMouse(x,y,3,3);
            end;
        until(IsUpTextMulti('hop','own',TreeType)) or (TimeFromMark(WaitTime) > 5000 + random(2000))
      end;
    end;

    //CHOPPING PROCEDURE//
    procedure Chop;
    var WaitTime: Integer;

    begin
      repeat
      if(not(LoggedIn)) or (IsChatMessage('ou do not have an axe'))then
      NextPlayer(True);
      if(FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,TreeTol))or
        (FindColorTolerance(x,y,TreeColor2,MSX1,MSY1,MSX2,MSY2,TreeTol))or
        (FindColorTolerance(x,y,TreeColor3,MSX1,MSY1,MSX2,MSY2,TreeTol))then
        begin
        case random(2) of
          0: begin
             MMouse(x,y,3,3);
             if (not(IsUpTextMulti('hop','own',TreeType))) then
             begin
             repeat
               if(IsUpTextMulti('hop','own',TreeType))then
                 Break;
                 NotTreeType1;
                 NotTreeType2;
                 NotTreeType3;
                 NotTreeType4;
                 MakeCompass('random');
             until(IsUpTextMulti('hop','own',TreeType));
               if (FindColorTolerance(x,y, 65535, 6,6,117,27,10)) or
                  (FindColorTolerance(x,y, 383705,6,6,117,27,10)) or
                  (FindColorTolerance(x,y, 55769, 6,6,117,27,10)) and
                  (IsUpTextMulti('hop','own',TreeType)) then
                begin
                  Writeln('Ent Found RUNNING!');
                  RunAwayDirection(RunDir);
                  Wait(20000 + random(15000));
                  RunBack;
                  EntsAvoided:= EntsAvoided + 1;
                end else
               if (IsUpTextMulti('hop','own',TreeType)) then
                 Mouse(x,y,3,3,True);
                 MarkTime(WaitTime);
                 if(InvFull) or (FindFastRandoms) or                                                 if(not(FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,3)))then
                 Break;
                 while(TimeFromMark(WaitTime) < ChopTime * 1000)do
                 begin
                   Randoms;
                   DontGetBanned;
                 end;
               end;
             end;
          1: begin
               MMouse(x,y,3,3);
               if (not(IsUpTextMulti('hop','own',TreeType))) then
               begin
               repeat
                 if(IsUpTextMulti('hop','own',TreeType))then
                   Break;
                   NotTreeType1;
                   NotTreeType2;
                   NotTreeType3;
                   NotTreeType4;
                   MakeCompass('random');
               until(IsUpTextMulti('hop','own',TreeType));
               if (FindColorTolerance(x,y, 65535, 6,6,117,27,10)) or
                  (FindColorTolerance(x,y, 383705, 6,6,117,27,10)) or
                  (FindColorTolerance(x,y, 55769, 6,6,117,27,10)) and
                  (IsUpTextMulti('hop','own',TreeType)) then
               begin
                 Writeln('Ent Found RUNNING!');
                 RunAwayDirection(RunDir);
                 Wait(20000 + random(15000));
                 RunBack;
                 EntsAvoided:= EntsAvoided + 1;
               end else
               if (IsUpTextMulti('hop','own',TreeType)) then
                 Mouse(x,y,3,3,False);
                 ChooseOption(x,y,'own');
                 MarkTime(WaitTime);
                 if(InvFull) or (FindFastRandoms) or (not(FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,3)))then
                   Break;
                   while(TimeFromMark(WaitTime) < ChopTime * 1000)do
                   begin
                     Randoms;
                     DontGetBanned;
                   end;
                end;
              end;
            end;
          end;
      until(InvFull);
    end;

    SRY if the standards are messy cuz i posted it from notepad since i deleted out the the scar version to try new things...
    METAL HEAD FOR LIFE!!!

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

    Default

    If you are planning to use your NotTreeType procedures you could do this:

    SCAR Code:
    procedure NotTreeType(Quadrant);
    var WaitTime, x1, y1, x2, y2: Integer;

    begin
      case (Quadrant) of
        1:  begin
               x1 := 0;
               y1 := 0;
               x2 := 263;
               y2 := 154;
             end;
        2:  begin
               x1 := 263;
               y1 := 0;
               x2 := 512;
               y2 := 154;
             end;
        3:  begin
               x1 := 0;
               y1 := 154;
               x2 := 263;
               y2 := 0;
             end;
        4:  begin
               x1 := 263;
               y1 := 154;
               x2 := 512;
               y2 := 337;
             end;
      end;

      if (not(IsUpTextMulti('hop','own',TreeType))) then
      begin
        MarkTime(WaitTime);
        repeat
          if (IsUpTextMulti('hop','own',TreeType)) then
            Break;
            if (FindColorTolerance(x,y,TreeColor1, x1, y1, x2, y2,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor2, x1, y1, x2, y2,TreeTol)) or
               (FindColorTolerance(x,y,TreeColor3, x1, y1, x2, y2,TreeTol)) then
            begin
              MMouse(x,y,3,3);
            end;
        until(IsUpTextMulti('hop','own',TreeType)) or (TimeFromMark(WaitTime) > 5000 + random(2000))
      end;
    end;

    So when you want to call the procedure you type in NotTreeType() and then in the brackets put the quadrant you want. This will save a whole heap of space.

    Also, the main screen is already split by SCAR. (MSX1, MSY1) are the coords of the top left corner of the main screen and (MSX2, MSY2) are the coords of the bottom right corner. (MSCX , MSCY) are the coords of the centre of the main screen. So you can use a use these instead of the coordinates you already have. Similarly, the minimap is divided the same way just use MM instead of MS eg. MMX1 instead of MSX1, etc.

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

    Default

    ooo cool i didnt know you could do that ty

    and yes i knew about the MS and MM divisions i just think it looks better when its all numbers

    that helps in the space saving aspect however the script will still just mess up and not click the tree at all...

    any thoughts?
    METAL HEAD FOR LIFE!!!

  6. #6
    Join Date
    Jun 2007
    Location
    Kentucky, United States of America
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Does it find the tree though? And just hover over it? Or can it not even find it? Doesn't MMouse just move the mouse and not click it? Or I could be horribly wrong. . .

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

    Default

    yea it just hovers over the tree, but when its the correct tree it just hovers over it and doesnt click it like my main chop procedure tells it to do...

    im probably just going to have to revamp the entire procedure with something new involving this... =(

    maybe ill just break it up a whole bunch and have the NotTreeType click the tree as well if its the right tree and have the regular chop procedure as a different procedure and then make a MAIN chop procedure that includes all of them and see if it works. How does that sound? lol i know is that FindObj3 works decent but is very bot like and if this works it will be pretty undetectable.

    open to all thoughts and suggestions on this PLZ!!!!!!
    METAL HEAD FOR LIFE!!!

  8. #8
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    i dont see what the point would be of dividing it into different quadrants, other than to narrow the search for cutting your tree again...but most people dont only cut one tree
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    lol no offence, but did u read my first post at all?

    the point is that if it moves the mouse onto the wrong tree (AKA a normal tree) then it will just sit there and hover over that tree and freeze up the procedure cuz it wont find the NEXT tree it just sits there. Ok so if it is divided up into four quadrants it is more likely to find the correct tree/ look a lil more human like going from tree to tree instead of the same tree the whole time. Understand?

    If you have any constructive criticism i am open to it!

    thanks!
    METAL HEAD FOR LIFE!!!

  10. #10
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    so u wont let it use the same quadrant as the last time?(if not its useless)
    just use FindObj and telll it to look for a different color

    SCAR Code:
    repeat
    if FindObj(firstcolor)then
    begin
      Mouse(x,y,2,2,true)
    end else
    if FindObj(secondcolor)then
    begin
      Mouse(x,y,2,2,true)
    end else
    if FindObj(thirdcolor)then
    begin
      Mouse(x,y,2,2,true)
    end else
    tries:=tries+1
    until tries >=5
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    ok i think you are missing the point here...

    first off:

    this is a failsafe for if the program finds the correct color on the WRONG tree type. It would go like so...

    1st it would look for the color...next it would check the uptext...if it was the wrong tree then it would search quadrent 1...if it finds the color in quad 1 then it will check the uptext...if the uptext isnt right then it moves to quad 2 and so on until it finds the color with the correct uptext.

    WHY this is good:

    because findobj does alot of whacky mouse movement if it cant finds the color with the wrong up text (VERY UNHUMAN LIKE) it is more human like to move the mouse slowly from tree to tree and not freak out when its the wrong one...not bashing findobj b/c its the one im currently using...BUT i want to improve the capability of my script and this is one area i want to attack.

    personally i dont care if you think its usefull or not. when i fully test it i will decide that. all im asking is for feedback on the best way to execute this technique and not people debating wether it is usefull or not.

    thanks
    METAL HEAD FOR LIFE!!!

  12. #12
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Then either make two loops using the coords of each quadrant (one for the top two, one for the bottom two) then insert them into a procedure, or use a procedure for each quadrant, then call them into one procedure.

    It's a very rough outline, but should serve well.
    I guess the holidays are over - no sig for now.

  13. #13
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    wondering if this would work

    SCAR Code:
    program New;
    {.Include SRL\SRL.SCAR}
    type
        TCoord = record //as in T-Ore
        QuadX : Array of integer;
        QuadY : Array of integer;
      end;

    procedure go
    var
      Coords : TCoord; //the variable that holds what we should get
      i,treetol,TreeColor1,TreeColor2,TreeColor3: integer;
    var WaitTime: Integer;
    begin
      case 4 of
        1: begin
                      Coords.Quadx:= [993,343];
                      Coords.Quadx:= [533,863];
                    end;
        2: begin
                        Coords.Quadx:= [993,343];
                        Coords.Quadx:= [533,863];
                      end;
        3: begin
                       Coords.Quadx:= [993,343];
                       Coords.Quadx:= [533,863];
                     end;
        4: begin
                     Coords.Quadx:= [993,343];
                     Coords.Quadx:= [533,863];
                   end;
      end;
      for i := 0 to GetArrayLength(Coords.Quadx) - 1 do
      begin
        if not IsUpTextMulti('hop','own','op') then
        begin
          MarkTime(WaitTime);
          repeat
            if (IsUpTextMulti('hop','own','op')) then
            Break;
            if (FindColorTolerance(x,y,TreeColor1,Coords.Quadx[i],Coords.Quady[i],Coords.Quadx[i+1],Coords.Quady[i+1],TreeTol)) or
            (FindColorTolerance(x,y,TreeColor2,Coords.Quadx[i],Coords.Quady[i],Coords.Quadx[i+1],Coords.Quady[i+1],TreeTol)) or
            (FindColorTolerance(x,y,TreeColor3,Coords.Quadx[i],Coords.Quady[i],Coords.Quadx[i+1],Coords.Quady[i+1],TreeTol)) then
            begin
              MMouse(x,y,3,3);
            end;
          until(IsUpTextMulti('hop','own','op')) or (TimeFromMark(WaitTime) > 5000 + random(2000))
        end;
      end;
    end;

    begin
    go;
    end;
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    lol i have nvr used types or arrays but it looks pretty solid

    if you could i would like you to explain it to me cuz i really know nothing about types and arrays . I pretty much get that it gets the coords of the quad and then tries to find the color in that quad...then does it search the next one?

    i also dont understand why these specific numbers are in this part of the code:

    SCAR Code:
    begin
      case 4 of
        1: begin
                      Coords.Quadx:= [993,343];
                      Coords.Quadx:= [533,863];
                    end;
        2: begin
                        Coords.Quadx:= [993,343];
                        Coords.Quadx:= [533,863];
                      end;
        3: begin
                       Coords.Quadx:= [993,343];
                       Coords.Quadx:= [533,863];
                     end;
        4: begin
                     Coords.Quadx:= [993,343];
                     Coords.Quadx:= [533,863];
                   end;
      end;

    soooo yeaah try to explain it to me slowly if you could since im a NOOB in this area. thanks for posting your idea and ill try to implement it once i know what it all means and how it works =p

    thanks!
    METAL HEAD FOR LIFE!!!

  15. #15
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    well the case is supposed to give it the information from the first quad, then to the others in turn. the numbers in the type are examples you fill them in. the first x and first y are for the top left corner, and the secondof both are for the bottom right
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    yea this is a pretty sweet idea ill try to tweak it out to fit my procedure when i get the chance and see how it runs

    still open to all ideas on this!!!!
    METAL HEAD FOR LIFE!!!

  17. #17
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    remember to credit me

    because findobj does alot of whacky mouse movement if it cant finds the color with the wrong up text (VERY UNHUMAN LIKE)
    i dont remember where i saw it but it said that jagex cant track mousemovements(only clicks), so ha
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    lol i will if i use it

    i thought that certain mouse movements were detectable which is why we cant use like movemouse and movemousesmooth anymore right? idk i just thought that it was detectable if your mouse is fliping out between two trees really fast back and forth...

    but if your right then it doesnt matter and WHY the hell am i doing this lol...

    hehe ill still make something out of this anyway
    METAL HEAD FOR LIFE!!!

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

    Default

    It shouldn't flick unless you got the tree closest to you has the wrong colour or it can't read the uptext. As long as you have the correct colours or use autocolouring you should be fine.

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

    Default

    the problem is tho...

    trees all have colors that are the same at least normal trees and oaks for the most part but i know willows have a few in common as well.

    so if you have two different types of trees near the ones you are cutting it IS going to flick and move the mouse back and forth fast.

    this is working pretty good

    heres wat i got so far:

    SCAR Code:
    procedure LoadVars;
    begin
      Quad[0].x1:= 170;   //Nearest tree (prevents running around)
      Quad[0].y1:= 80;
      Quad[0].x2:= 350;
      Quad[0].y2:= 200;

      Quad[1].x1:= 0;    //Quadrant I
      Quad[1].y1:= 0;
      Quad[1].x2:= 263;
      Quad[1].y2:= 154;
     
      Quad[2].x1:= 263;  //Quadrant II
      Quad[2].y1:= 0;
      Quad[2].x2:= 512;
      Quad[2].y2:= 0;
     
      Quad[3].x1:= 0;    //Quadrant III
      Quad[3].y1:= 154;
      Quad[3].x2:= 263;
      Quad[3].y2:= 0;
     
      Quad[4].x1:= 263;   //Quadrant IV
      Quad[4].y1:= 154;
      Quad[4].x2:= 512;
      Quad[4].y2:= 337;
    end;

    //TREE FINDING & CHOPPING PROCEDURES//
    Function FindTree: Boolean;

    var i: integer; Quad: array [0..4] of TBox;

    begin
      if (not(IsUpText(TreeType))) then
      begin
        for i:= 0 to 4 do
        begin
          MarkTime(WaitTime);
            if (IsUpText(TreeType)) then
              Break;
              if (FindColorSpiralTolerance(x,y,TreeColor1,Quad[i].x1,Quad[i].y1,Quad[i].x2,Quad[i].y2,TreeTol))or
                 (FindColorSpiralTolerance(x,y,TreeColor2,Quad[i].x1,Quad[i].y1,Quad[i].x2,Quad[i].y2,TreeTol))or
                 (FindColorSpiralTolerance(x,y,TreeColor3,Quad[i].x1,Quad[i].y1,Quad[i].x2,Quad[i].y2,TreeTol))then
              begin
                MMouse(x,y,3,3);
                if (IsUpText(TreeType)) then
                Result:= True;
              end;
          end;
       end;
    end;

    procedure CutIt;
      begin
        case random(2) of
          0: begin
               MMouse(x,y,3,3);
               Wait(500 + random(100));
               Mouse(x,y,3,3,True);
               MarkTime(WaitTime);
               if(InvFull) or (FindFastRandoms) or (not(FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,3)))then
                 Exit;
                 while(TimeFromMark(WaitTime) < ChopTime * 1000)do
                   begin
                     Randoms;
                     CheckNFix;
                     DontGetBanned;
                   end;
                 end;
          1: begin
               MMouse(x,y,3,3);
               Wait(500 + random(100));
               Mouse(x,y,3,3,False);
               ChooseOption(x,y,'own');
               MarkTime(WaitTime);
               if(InvFull) or (FindFastRandoms) or (not(FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,3)))then
                 Exit;
                 while(TimeFromMark(WaitTime) < ChopTime * 1000)do
                 begin
                   Randoms;
                   CheckNFix;
                   DontGetBanned;
                 end;
               end;
             end;
           end;

    procedure Chop;
    begin
      repeat
        if (not(LoggedIn)) then
          NextPlayer(True);
          if (FindColorTolerance(x,y, 65535, 6,6,117,27,10)) or
             (FindColorTolerance(x,y, 383705,6,6,117,27,10)) or
             (FindColorTolerance(x,y, 55769, 6,6,117,27,10)) and
             (IsUpTextMulti('hop','own',TreeType)) then
          begin
            Writeln('Ent Found RUNNING!');
            RunAwayDirection(RunDir);
            Wait(40000 + random(15000));
            RunBack;
            EntsAvoided:= EntsAvoided + 1;
          end else
          if (FindTree) then
          begin
            CutIt;
          end;
        until(InvFull);
      end;
    METAL HEAD FOR LIFE!!!

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

    Default

    It looks impressive! The thing is though, if you use FindObj and only tell it to look for the particular tree type in the uptext, then I will keep searching until it finds the correct tree, regardless of colour or anything.

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

    Default

    Thanks

    yes i do know that the findobj does find the tree regardless of color but i just want to cut out the whacky mouse movement which this did

    thanks for all your help guys i really appreciate it and if any1 has a better way of doing this let me know im open for more suggestions still
    METAL HEAD FOR LIFE!!!

  23. #23
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    you should change ur vars to

    SCAR Code:
    procedure LoadVars;
    begin
      Quad[0].x1:= 170;   //Nearest tree (prevents running around)
      Quad[0].y1:= 80;
      Quad[0].x2:= 350;
      Quad[0].y2:= 200;
     
      Quad[1].x1:= msx1;    //Quadrant I
      Quad[1].y1:= msy1;
      Quad[1].x2:= mscx;
      Quad[1].y2:= mscy;
     
      Quad[2].x1:= mscx;  //Quadrant II
      Quad[2].y1:= msy1;
      Quad[2].x2:= mscy;
      Quad[2].y2:= msx2;
     
      Quad[3].x1:= msx1;    //Quadrant III
      Quad[3].y1:= mscy;
      Quad[3].x2:= mscx;
      Quad[3].y2:= msy1;
     
      Quad[4].x1:= mscx;   //Quadrant IV
      Quad[4].y1:= mscy;
      Quad[4].x2:= msx2;
      Quad[4].y2:= msy2;
    end;
    im pretty sure thats all right...and its neater and looks more impressive
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Chop Chop 2.0
    By NiCbaZ in forum RS3 Outdated / Broken Scripts
    Replies: 246
    Last Post: 09-09-2009, 07:39 PM
  2. chop chop 2.0
    By ashender in forum OSR Help
    Replies: 3
    Last Post: 03-02-2009, 10:05 PM
  3. GrettleNet SMART CHOP CHOP!!!
    By Fosscape in forum First Scripts
    Replies: 3
    Last Post: 01-19-2009, 03:59 PM
  4. Can someone help me with my chop procedure?
    By mikevskater in forum OSR Help
    Replies: 11
    Last Post: 01-24-2008, 08:18 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
  •