Results 1 to 5 of 5

Thread: Script continuously clicking

  1. #1
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Script continuously clicking

    hey guys, im making a powerminer and when i begin mining the script causes it to continuously click the ore, how do i make it so that there is a 4-6 second break between each click? here is the function

    Simba Code:
    Function MineIronOre:Boolean
    ;Var
      X, Y: Integer;
    Begin
         //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x, y, ['ine', 'ocks', 'e R'], [2766942,3162219], 10) Then
      Begin
      StatsGuise('Found ore')

      GetMousePos(x, y);
      Case Random(2) Of
        0: Mouse(x, y, 5, 5, True);
        1: Begin
            Mouse(x, y, 5, 5, False);
            WaitOption('Mine', 500);

           End;

      End;

      End;
    End;

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    You could do something like this:

    Simba Code:
    StatsGuise('Found ore')
    Wait(4000 + RandomRange(500, 2000));
    GetMousePos(x, y);
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    hey there i tried including that wait string that you suggested but now it waits 5 seconds before starting and then waits 5 seconds after clicking. Then for some reason it click the empty vein that it has just mined again. Could you take a look at this code, maybe run it and advise me what to do? thanks (:
    Simba Code:
    program ArdongueIronPowerMiner;

    //{$DEFINE SMART}
    {$i SRL\SRL.scar}
    {$i SRL\SRL\Misc\Debug.SCAR}
    {$i SRL\SRL\Misc\Stats.simba}


    Const
     SRLStats_Username = ''; // Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     BreakEvery        = 120; // How many minutes you want to break after
     BreakFor          = 5;  // How long to break for
     Version=       '1.00'; // Dont need to change
     NumbOfPlayers= 1;  // How many players you are botting
     StartPlayer= 0;  //Player to start autoing with (0 means 1st player)



     procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['oins', 'XP'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Nick        := ''; //Player nickname - 3-4 letters of Player username.
        Active      := True;
        Integers[1] := 4;      //Seconds to try mining rock before clicking another.
      end;

    end;


    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;


    Procedure Antiban;
    Begin
      Case Random (140) of
        0: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        1: Begin StatsGuise('Antiban') GameTab(Tab_Stats) HoverSkill('Mining', False) GameTab(28); End;
        End;
    End;


    Procedure FailSafe(Reason:String);
    Begin
      Players[CurrentPlayer].Loc := Reason;
      Logout;
      Stats_Commit;
      //ProgressReport;
      TerminateScript;
    End;



    Function MineIronOre:Boolean
    ;Var
      X, Y: Integer;
    Begin
         //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x, y, ['ine', 'ocks', 'e R'], [2766942,3162219], 10) Then
      Begin
      StatsGuise('Found ore')
      Wait(4000 + RandomRange(500, 2000));

      GetMousePos(x, y);
      Case Random(2) Of
        0: Mouse(x, y, 5, 5, True);
        1: Begin
            Mouse(x, y, 5, 5, False);
            WaitOption('Mine', 500);

           End;

      End;

      End;
    End;


    Begin

      SetupSRL;
      DeclarePlayers;
      Repeat
        MineIronOre;
      Until(false);

    End.

  4. #4
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add Wait(x time)
    So it should look like this:
    Wait(2000) for example.

  5. #5
    Join Date
    Dec 2011
    Location
    P2P :)
    Posts
    561
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    You will want to put
    Simba Code:
    Wait(2000+Random(400));
    After the click on the rock.

    Here is an example of what my first iron miner did to mine iron.
    Simba Code:
    procedure MiningIron;//Mining process
    var
      x, y:Integer;

    begin
      if not LoggedIn then Exit;

      if (FindObjCustom(X, Y, ['Mine','ne Ro','cks'], [2503511,2569562,3360116 ], 10)) then
        ClickMouse2(true);//Clicks the rock once found.

      if DidRedClick then//Makes sure it was a red click and not a yellow.
        Wait(2000+Random(300))//Waits for the ore to be mined(adjust by level).
        else

          While IsMoving do//If the player is moving to another rock it will wait instead of clicking again
            Writeln('Moving to rock');
            Wait(2000+random(500));
            FindNormalRandoms;
            exit;
    end;
    I wear my scars like the rings on a pimp
    I live life like the captain of a sinking ship
    Always sell your product for ATLEAST mid to ensure that the market doesn't drop.

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
  •