Results 1 to 11 of 11

Thread: Power miner

  1. #1
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Power miner

    This is my first script.
    There is a lot of problems whit it like no anti gas and It constantly bounces the mouse around to find the rock color and some times it cant find it for a couple of seconds.It is an Power mine use for mining iron in the fally mine.



    Code:
    Time Running : 9 Minutes and 32 Seconds. 
    Gained 1750 xp.
    and running...

    This does not need color editing as far as I know...just fill out your name and pass.

    SCAR Code:
    program PowerMiner;
    {.Include SRL/SRL.Scar}

       Var
       x, y, i, timer, Dropped, Symbolcolor, OreDTM: Integer;
       
       Mining: Boolean;
       
       Rockcolor: array [0..2] of Integer;
       
       Rockmound: array [0..2] of Integer;

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

            Players[0].Name := 'Kasmember18';
            Players[0].Pass := 'Password';
            Players[0].Nick := 'smem'; // 3-4 letters of username
            Players[0].Active := True; // Is the player active?

        end;
       
       Procedure Inti;
       begin
         Rockcolor[0]:= 2107972;//Color of rock vein
         Rockcolor[1]:= 2108231;//Color of rock vein
         Rockcolor[2]:= 2371662;//Color of rock vein
         Rockmound[0]:= 5600126;//Color of the actual rock it self
         Rockmound[1]:= 6785687;
         Rockmound[2]:= 7510182;
         SymbolColor := 11381427;//Color of the oblesk on minimap grey part
         Mining:=False;
         Dropped:=0;
         
       
      OreDTM := DTMFromString('78DA63DCCBC4C0B09991011978E92A31D83BF' +
           '1338044FF0301E341A09AA5A86A1818189148207D0CA866270135' +
           'A7806AD61050B306A8661301355B816AF61250B303A8660901359' +
           'B806A56E3570300625F10A9');
           
       end;
       
       Procedure Angle;
       begin
       KeyDown(Vk_Up);
       Wait(1000+Random(500));
       KeyUp(Vk_Up);
       MakeCompass('S');
       end;
       

       Procedure Antirandom;
       begin
         lampskill:='smithing';
         FindNormalRandoms;
         FindTalk;
         if FindFight=true then
         begin
         RunAway('W',true,1,4000+random(2000));
         if FindColorSpiralTolerance(x, y, Symbolcolor, MMX1, MMY1, MMX2, MMY2,5) then
         begin
           MMouse(x, y, 3, 3);
           ClickMouse(x, y, True);
           Wait(2000+random(1000));
         end else RunAway('E',true,1,4000+random(2000));
         end;
       end;



       Procedure Antiban;
       begin
        Case Random(10) of
          0:PickupMouse;
          1:BoredHuman;
          2:HoverSkill('Mining', False);
          3:RandomMovement;
          4:RandomRClick;
          5:Writeln('Nothing');
          6:Writeln('Nothing');
          7:Writeln('Nothing');
          8:Writeln('Nothing');
          9:Writeln('Nothing');
          end;
       end;
       

       Procedure Mineore;
       begin
         repeat
         if FindObjCustom(x, y,['ock','rock','roc'], [Rockmound[1],Rockmound[2],Rockmound[0]],0) then
         begin
         MMouse(x, y, 5, 5);
         end;
         
           For i:=0 to 2 do
           begin
             if FindObjTPA(x, y, Rockcolor[i], 5, 5, MSX2, MSY2, 0, ['ock','rock','roc']) then
             begin
             MMouse(x, y, 3, 3);
             ClickMouse(x, y, True);
             Mining:=True;
             Antiban;
             AntiRandom;
             Wait(4000+random(100));
             Mining:=False;
             AntiRandom;
             end;
           end;
         until(Invfull);
       end;
       
       Procedure Dropore;
       begin
       repeat
       begin
       FindDTM(OreDTM, x, y, 550, 205, 735, 460);
       MMouse(x, y, 3, 3);
       ClickMouse(x, y, False);
        Wait(100+random(10));
       ChooseOption('Dro');
       Dropped:=Dropped+1
       Wait(300+random(10));
       AntiRandom;
       end;
       until( not FindDTM(OreDTM, x, y, 550, 205, 735, 460) );
        end;
       
        procedure ProgressReport;
    begin
      ClearDebug;
      Writeln('Time Running : ' + TimeRunning +'. ');
      Writeln('Gained '+ IntToStr(Dropped*35) +' xp.');


    end;

       
    begin
      Cleardebug;
      Inti;
      setupsrl;
      DeclarePlayers;
      loginplayer;


      repeat
      Angle;
      Mineore;
      Dropore;
      Mineore;
      Dropore;
      Logout;
      ProgressReport;
      Wait(20000+random(1000));
      LoginPlayer;
      until(false);


    end.

  2. #2
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would add some fail safes to your untils:false and invfull. Change it to until(invfull or condition);
    Make condition a boolean and make it true if it cannot find the rock a certain amount of times in a row.

  3. #3
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm new how do I do that? I originally want to make it so if it couldn't find it a certain number of times then Make Compass('N'); and try again. Idk I'll mess around with it and try to figure it out.
    Code:
    Time Running : 14 Minutes and 14 Seconds. 
    Gained 3290 xp.

  4. #4
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    if not FindObjTPA(x, y, Rockcolor[i], 5, 5, MSX2, MSY2, 0, ['ock','rock','roc']) then
    begin
      Inc(MissedFind);
      if (MissedFind > ({ammount of colors in your array}) then NoFind: = True;



    until(InvFull or NoFind);

    Something to that extent. Make sure you declare NoFind (or whatever you use as a variable)

    you could also do

    SCAR Code:
    if (MissedFind > ({ammount of colors in your array}) then end;

    Look up on terminate script. You might want to have that.

  5. #5
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How would I make the loop star back up again?

    Like

    until(InvFull or NoFind);
    If Nofind then
    Makecompass('N');//Try to find the color again angled north
    (Go back to begining of loop and try again)// <-----That's what I need to find

  6. #6
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    until(InvFull or NoFind);
    If Nofind then
    Makecompass('N');//Try to find the color again angled north
    FindOre;

  7. #7
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Kasmember13 View Post
    How would I make the loop star back up again?

    Like

    until(InvFull or NoFind);
    If Nofind then
    Makecompass('N');//Try to find the color again angled north
    (Go back to begining of loop and try again)// <-----That's what I need to find
    Look for a tut with GoTo and Labels in it. Nvm here.

    Under the procedure name
    put Label Start;
    SCAR Code:
    Procedure lolz;
    label DoSt00f;
    begin
      DoSt00f:
      begin
        repeat
          omglolminingorecrap;
        until InvFull or NoFind;
      end;
      if NoFind then
      begin
        inc(NofindsOres);
        if nofindsOres < 10 then GoTo DoSt00f
        else exit;
      end;
    end;
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  8. #8
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why wouldn't my solution work? Wondering so I can learn to post better help.

  9. #9
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Type mismatch in script

    until Invfull or Trys > 9 ;

  10. #10
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    until(InvFull or (Trys > 9));

    How about now?

  11. #11
    Join Date
    Oct 2008
    Posts
    59
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure Mineore;
       begin
         repeat
         if FindObjCustom(x, y,['ock','rock','roc'], [Rockmound[1],Rockmound[2],Rockmound[0]],0) then
         begin
         MMouse(x, y, 5, 5);
         end;
         
           For i:=0 to 2 do
           begin
             if FindObjTPA(x, y, Rockcolor[i], 5, 5, MSX2, MSY2, 0, ['ock','rock','roc']) then
             begin
             MMouse(x, y, 3, 3);
             ClickMouse(x, y, True);
             Mining:=True;
             Antiban;
             AntiRandom;
             Wait(4000+random(100));
             Mining:=False;
             AntiRandom;
             end;
           end;
         until(Invfull);
       end;
    what is the 3 in the mmouse parts i know x,y are variables and also the 5+msxsomething in
    SCAR Code:
    if FindObjTPA(x, y, Rockcolor[i], 5, 5, MSX2, MSY2, 0, ['ock','rock','roc']) then
    ~~ziggy~~
    if anyone would mind teaching me over MSN how to make scripts please copy and paste:
    zimmermannjake@hotmail.com
    thank you

    also will test scripts just send them to me and instructions

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. power miner
    By loliker123 in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 08-28-2008, 09:12 PM
  2. Power Miner help
    By Harkonnen in forum OSR Help
    Replies: 6
    Last Post: 07-14-2008, 02:12 AM
  3. I need help with my power miner
    By dallas574 in forum OSR Help
    Replies: 3
    Last Post: 04-27-2008, 04:26 PM
  4. Power miner??????
    By dewituwont in forum OSR Help
    Replies: 4
    Last Post: 06-18-2007, 03:34 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
  •