Results 1 to 5 of 5

Thread: repeat somewhere help thx

  1. #1
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default repeat somewhere help thx

    ok i've screwed up a repeat in my powerminer to be banker somewhere in the mineing section and i can't get it right can someone please edit. thx.
    by the way anti ban and randoms aren't mine havn't put in credits yet. this script isn't done so will get all that sorted soon. thankyou very much.

    SCAR Code:
    //////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////
    //                  THE NOOBIEST                      //
    //                   POWERMINER                      //
    //                  BY RKROXPUNK                    //
    //                                                 //
    ////////////////////////////////////////////////////
    ///////////////////////////////////////////////////
    program PowerMiner;
    {.include SRL/SRL.scar}
    {.include srl\srl\skill\Mining.scar}

    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //                  LOGIN AND SETUP                     //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////

    const StartPlayer = 0;
      VersionNumber = '2';
      OreeColor = 4484245; //put the colour of the ore you want to mine here
      WaitTime = 7000; //how long before it clicks again
      RunDirec = 'N'; //Direction you want to run in case of fight

    procedure DeclarePlayers;

    begin
      HowManyPlayers := 1; // Set Number of Players here.
      NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
      CurrentPlayer := StartPlayer;

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Loc := 'Loc1';
      Players[0].Skill := 'Mining';
      Players[0].Active := True;

      writeln(inttostr(HowManyPlayers) + ' Players');
    end;
    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //            RANDOMS AND ANTIBAN                       //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////

    procedure FindRandoms;
    var
      TimeMark: Integer;
      Talk: Integer;
    begin
      if FindGas(x, y) then
      begin
        RunAwayDirection(RunDirec);
        Wait(5000 + random(1500));
        RunBack;
      end;
      for Talk := 1 to Time do
      begin
        Wait(500 + random(100));
        FindTalk;
        FindNewBox;
        Wait(40)
          SolveBox;
        Wait(30)
      end;
      begin
        MarkTime(TimeMark);
        Wait(1500 + random(100));
        FindNormalRandoms;
        if (TimeFromMark(TimeMark) > 30000) then
          Exit;
      end;
      if (FindFight = true) then
      begin
        RunAwayDirection(RunDirec);
        Wait(10000 + random(2000));
        RunBack;
      end;
    end;

    function DoAntiBan: Boolean;
    begin
      AntiBan;
      wait(50 + random(100));
      BoredEvery(3 + random(3));
      wait(100 + random(100))
        RotateEvery(7 + random(4));
      wait(750 + random(250));
      LeaveScreenEvery(5 + random(7));
      wait(500 + random(150));
    end;
    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //                  MINEING AND DROPPING                //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////

    function FindOre: Boolean;
    begin
      if FindColorSpiral(x, y, OreeColor, 0, 0, 515, 336) then
      begin
        Result := True;
        Status('Found Ore :D');
      end else
        Status('Did not find Ore :(');
      wait(5 + random(5));
    end;

    function MouseToOre: Boolean;
    begin
      repeat
        if (FindOre) then
        begin
          MMouse(x, y, 0, 0);
          Result := True;
          Wait(20 + random(150));
          Exit;
        end;
      until (false)
    end;

    procedure ClickRock;
    begin
      if (MouseToOre = true) then
      begin
        Mouse(x, y, 0, 0, True)
          Wait(WaitTime + random(100));
      end;
    end;

    procedure Drop;
    begin
      if (InvFull) then
        DropTo(2, 28);
    end;
    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //                    MAIN LOOP                         //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////
    begin
      SetupSRL;
      SetupSRLMining;
      DeclarePlayers;
      LoginPlayer;
      begin
        LoginPlayer
          MakeCompass('N');
        HighestAngle;
        SetRun(true);
      end;
      repeat
        FindOre;
        MouseToOre;
        ClickRock;
        while (MouseToOre) do
        begin
          FindRandoms;
          DoAntiBan;
        end;
        Drop;
      until (false);
    end.

    also suggestions about what's unnecessary, could change and would like to see be added.

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

    Default

    I think here it keeps repeating FindRandoms and DoAntiban untill your mouse isn't at the ore anymore.
    Code:
        while (MouseToOre) do
        begin
          FindRandoms;
          DoAntiBan;
    So maybe you should replace it with

    Code:
    MouseToOre;
    FindRandoms;
    DoAntiBan;
    Hup Holland Hup!

  3. #3
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    nope still don't work it mines 1 ore then put mouse over the ore and says in status box "found ore " then does nothing

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

    Default

    Maybe its better to integrate most of the functions in one Big One?
    But else you could try some thing like

    Code:
    repeat
    repeat
    ClickRock; //You call the other functions automaticly by this one i think
    FindNormalRandoms; // Also add somekind of randomcheck while the script is waiting for the rock
    until(InvFull) or (not(LoggedIn)) // this makes sure it first mines a whole inv before dropping
    Drop;
    until(false)
    Hup Holland Hup!

  5. #5
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    ok got to go to school i'll check when i get home.
    thx alot.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Repeat?
    By FortAsh in forum OSR Help
    Replies: 9
    Last Post: 01-13-2009, 04:18 PM
  2. repeat until...???
    By Alligaattor in forum OSR Help
    Replies: 12
    Last Post: 10-23-2008, 12:59 AM
  3. How do I get this to repeat until?
    By Claymore in forum OSR Help
    Replies: 2
    Last Post: 07-07-2008, 04:02 PM
  4. repeat help
    By trojan in forum OSR Help
    Replies: 2
    Last Post: 06-15-2007, 03:54 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
  •