Results 1 to 14 of 14

Thread: clicking

  1. #1
    Join Date
    Aug 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default clicking

    The script is able to make the character walk up to the tree but is unable to click on it

    SCAR Code:
    program YewCutter;
    {.include SRl/SRl.scar}
    {.include SRL/SRL/Skill/WoodCutting.scar}

    const
      LoadsPerPlayer = 10;

    var x, y: Integer;
        Tries: integer;

    procedure DeclarePlayers;

    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0

      Players[0].Name   := '';
      Players[0].Pass   := '';
      Players[0].Nick   := '';
      Players[0].Active := True;

    end;

    Procedure AntiRandoms;
    begin
      If(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
      FindLamp('Woodcutting');
    end;

    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        1: RandomRClick;
        2: HoverSkill('Woodcutting', False);
        3: RandomMovement;
        4: BoredHuman;
        5: AlmostLogout;
        6: DoEmote(400 +Random(90));
      end;
    end;

    Procedure FixCamera;
    begin
      Highestangle;
      MakeCompass('N');
      Wait(1000 + (random(150)));
    end;

    procedure WalkToTree;
    begin
      RoadColor := FindVarrockRoadColor;
      begin
        if not RadialWalk(RoadColor, 330, 335, 70, 2, 2) then
        RadialWalk(RoadColor, 335, 340, 70, 2, 2);
        FFlag(2);
        Wait(1000);
        if FindSymbol(x, y, 'water') then
        begin
          if not RadialWalk(RoadColor, 345, 350, 70, 2, 2) then
          RadialWalk(RoadColor, 350, 355, 70, 2, 2);
          FFlag(2);
          Wait(1000);
          if FindSymbol(x, y, 'dungeon') then
          begin
            if not RadialWalk(RoadColor, 340, 345, 60, 2, 2) then
            RadialWalk(RoadColor, 345, 355, 60, 2, 2);
            if (findSymbol(x, y, 'tree')) then
            begin
              Writeln ('Found Yew Tree.');
              Wait(1000);
              Mouse(x, y, 2, 2, true);
              end else
              begin
              Writeln ('Did not find Yew Tree.');
            end;
          end;
        end;
      end;
    end;

    function ChooseClick: Integer;
    var
      x, y: Integer;
    begin
      case random(2) of
        0: Mouse(x, y, 3, 3, true);
        1: begin
              Mouse(x, y, 4, 4, false);
              ChooseOption('hop');
          end;
      end;
    end;

    procedure ChopTree;
    begin
      repeat
      if (FindObjCustom(x, y, ['yew', 'tre'], [997166, 2250829, 996652], 5)) then
      begin
        ChooseClick;
        if(IsUpText('hop')) then
        begin
          Wait(1000 + (random(150)));
          ChooseOption('hop')
          Wait(1000 + (random(150)));
          AntiBan;
          AntiRandoms;
          if (not (FindObjCustom(x, y, ['yew', 'tre'], [997166, 2250829, 996652], 5))) then
          begin
            Wait(100 + (random(100)));
            Tries := Tries + 1;
            if(Tries = 20) then
            begin
              Writeln ('Yew Tree not found. Switching Players.');
              Logout;
              NextPlayer(False);
              Exit;
            end;
          end;
        end;
      end;
      until(InvFull)
    end;


    begin
      setupSRL;
      Declareplayers;
      if Loggedin then Logout;
      LoginPlayer;
      FixCamera;
      WalkToTree;
      ChopTree;
     end.

  2. #2
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

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

    Default

    The tolerance of your tree finder is too low. 20 - 30 is good enough


  4. #4
    Join Date
    Aug 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Chill.... The first thread I made didn't show up so I created a new one 5 mins after... and after I came back from soccer it was there... I deleted it ok...

    And increasing the tolerance was a bad idea... Before it was hovering the mouse over the tree... Now it's hovering all around the grass and tree...it also doesn't come up with "could not find Yew tree" so the problem is obviously the tree clicking...

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

    Default

    Use the old FindObjCustom. I.E downgrade to Rev #14 and copy the ObjCustom from there.
    Then upgrade to rev #16 and use the version of FindObj you coppied instead.
    Basically The New FindObjCustom doesn't really work.

    Hope I Helped

  6. #6
    Join Date
    Aug 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmmm...havn't tried yet... but I still think it finds the tree...why else would the mouse be hovering over the tree... trying now though

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

    Default

    Yeah I had the same problem whils't it was trying to find the sailor.

  8. #8
    Join Date
    Aug 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeh it work... and btw... Have I done my spacing correctly?

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

    Default

    Yeah Looks Fine

  10. #10
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    SCAR Code:
    function ChooseClick: Integer;
    var
      x, y: Integer;
    begin
      case random(2) of
        0: Mouse(x, y, 3, 3, true);
        1: begin
              Mouse(x, y, 4, 4, false);
              ChooseOption('hop');
          end;
      end;
    end;

    Would never work, this will click 0+random(3), 0+random(3) or 0+random(4), 0+random(4), and move the mouse(since it dont find the option 'hop')

    you should take out the var x, y : integer; and set it at the top of ur script (after you include srl)

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

    Default

    ^^ that function does work ive used it 100% it works

  12. #12
    Join Date
    Aug 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haven't I put it at the top under variables? and even if I took out the function and changed the procedure to mouse (x, y, 2, 2, true) it still does the same thing... so I think theres nothing wrong with the function

  13. #13
    Join Date
    Apr 2007
    Posts
    994
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function ChooseClick: Integer;
    var
      x, y: Integer;    //<-- Procedure specific variable
    begin
      case random(2) of
        0: Mouse(x, y, 3, 3, true);
        1: begin
              Mouse(x, y, 4, 4, false);
              ChooseOption('hop');
          end;
      end;
    end;

    I think I know what he means. Because the variable is proceudre specific, it will not use the variable that your findtree? function returned it. Because x,y is set inside the procedure, it will be 0,0.
    [QUOTE]<GoF`> oh no its Raymooond
    <Raymooond> Heya
    <GoF`> is it ray or some other ray?
    <LeeLokHin> No idea
    <LeeLokHin> Raymond, what's the game you like the most?
    <Raymooond> Runescape
    <-- LeeLokHin has kicked Raymooond from #srl (Faker.)[/QUOTE]

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

    Default

    Yes tis true you should set it as a global variable .
    Also you might aswell call it after you've MMoused and checked for ent

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with clicking?
    By Kyle Undefined in forum OSR Help
    Replies: 20
    Last Post: 11-12-2008, 07:17 AM
  2. clicking on an npc
    By patman16 in forum OSR Help
    Replies: 3
    Last Post: 07-29-2008, 03:19 PM
  3. Dmt clicking help
    By MetalancA in forum OSR Help
    Replies: 7
    Last Post: 06-11-2008, 04:06 AM
  4. Not Clicking :(
    By skilld u in forum OSR Help
    Replies: 23
    Last Post: 06-09-2008, 10:20 PM
  5. Clicking
    By axel23 in forum OSR Help
    Replies: 3
    Last Post: 04-17-2007, 06:58 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
  •