Results 1 to 2 of 2

Thread: PowerMiner Function help

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

    Default PowerMiner Function help

    Hello, i have written the function of the powerminer that i am making that clicks on the ores to mine them, but for some reason i dont understand if it has clicked all three of the veins in range before the first one has respawned again, it just sits there. Would be grateful if someone could help me correct this (:

    Simba Code:
    Function MineIronOre:Boolean
    ;Var
      X, Y, PlusOne: Integer;
    Begin
      PlusOne:=InvCount+1
      If FindObjCustom(x, y, ['ine', 'ocks', 'e R'], [2898786, 3557497], 10) Then
      Begin
      StatsGuise('Found ore')

      GetMousePos(x, y);
      Mouse(x, y, 5, 5, True);


      End;

        Repeat
         Until InvCount=PlusOne
         If InvCount=PlusOne Then
         Writeln('Successfully Mined')

    End;
    Last edited by Synikk; 12-19-2011 at 12:00 PM. Reason: wrong function

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

    Default

    Does this work? It's off the top of my head, so it may need tweaking.

    Simba Code:
    function MineIronOre : Boolean;
    var
      x, y, prevInvCount : Integer;
    begin
      prevInvCount := InvCount;
      if(FindObjCustom(x, y, ['ine', 'ocks', 'e R'], [2898786, 3557497], 10))then
      begin
        StatsGuise('Found ore');
        repeat
          GetMousePos(x, y);
          Mouse(x, y, 5, 5, True);
          Wait(1000 + RandomRange(250, 750));
          Result := (InvCount > prevInvCount);
        until(Result);
        if(Result)then
          WriteLn('Sucessfully Mined');
      end;
    end;
    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.


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
  •