Results 1 to 9 of 9

Thread: My simple power miner script... y isnt it wrking properly?

  1. #1
    Join Date
    Nov 2006
    Location
    Uk
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    My simple power miner script... y isnt it wrking properly?

    hey ive finished my Power Mining script and have no more errors. only problem is it dosent repeat and often missies the rock's what do i need 2 change??


    Code:
    program PowerMiner;
    {.include srl/srl.scar}
    {.include SRL\SRL\Skill\Mining.scar}
    
    
    
    
    
    const
            RockChangingInterval = 50;//how long til u change rock's ( in milli secs)
            RockColour           = 4615831;//Colour of rock,
            //you can use your own or the one give above (copper)
    
    
    
      var
      load:integer;
    
    procedure Orefinding;
      begin
       load:=0
    
      if (findcolor(x,y,RockColour,5,6,516,342))then
      holdmouse (x,y,true);
      wait(50);
      releasemouse(x,y,true);
      load :=load+1
      wait(RockChangingInterval);
    
       repeat    until load=27
    
        end;
    
          
         procedure DropOre;
    begin
    MouseSpeed:=10
    DropTo(3,28)
    
    end;
    
      procedure OpenInv;
     begin
      if (findcolor(x,y,1986438,5,6,516,342)) then
      holdmouse (x,y,true);
      wait(50);
      releasemouse(x,y,true);
      end;
      
    
       //***************************MAIN LOOP****************************//
    begin
    SetUpSRL;
    OpenInv
    Orefinding
    DropOre
    end.

  2. #2
    Join Date
    Oct 2006
    Location
    England
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here fixed it up for ya.
    PHP Code:
    program PowerMiner;
    {.include 
    srl/srl.scar}
    {.include 
    SRL\SRL\Skill\Mining.scar}





    const
            
    RockChangingInterval 50;//how long til u change rock's ( in milli secs)
            
    RockColour           4615831;//Colour of rock,
            //you can use your own or the one give above (copper)



      
    var
      
    load integer;

    procedure Orefinding;
      
    begin
     load
    :=0
    repeat
      
    if (findcolor(x,y,RockColour,5,6,516,342))then
      Mmouse
    (x,y,1,1)
      
    wait(50);
      
    Mouse(x,y,1,1,True)
      
    load := load 1
      wait
    (RockChangingInterval);
      
    Until(load 27)
        
    end;

          
         
    procedure DropOre;
    begin
    MouseSpeed
    :=10
    DropTo
    (3,28)

    end;

      
    procedure OpenInv;
     
    begin
    GameTab
    (4)
      
    end;
      

       
    //***************************MAIN LOOP****************************//
    begin
    SetUpSRL
    ;
    OpenInv
    Orefinding
    DropOre
    end

    you should really use Mmouse and Mouse they are way less detecable and instead of havimg until(Load = 27) you could just make it Until(invfull) and for the openinv procedure you could jsut have GameTab(4).
    Thanks.

    -Arr0w

  3. #3
    Join Date
    Nov 2006
    Location
    Uk
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    kk thanks arrow ill edit it soon ty for the help

  4. #4
    Join Date
    Oct 2006
    Location
    England
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No problem

  5. #5
    Join Date
    Nov 2006
    Location
    Uk
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    after it clicks on the inventory it just goes into the top left corner. This is the problem i had before is there something wrong with my scar??

  6. #6
    Join Date
    Oct 2006
    Location
    England
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You could try a different dropiing procedure but i dont have one atm sorry.

  7. #7
    Join Date
    Nov 2006
    Location
    Uk
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok ill try nd find 1

  8. #8
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    top left means the variables for the coords in a mmouse/mouse are 0,0. For example in mmouse(x,y,5,5) x and y are 0. This is caused by a finding function that failed, like findcoloor(x,y,color). It didn't find the color(bitmap dtm w/e) so it the variables are nothing. Which is why you need if findcolor(x,y,color) then mmouse(x,y,5,5) so it will only move the mouse if it has somewhere to move it too. Even better is moving around until something is found, then mouse/mmouse. Never assume anything will go as planned.

  9. #9
    Join Date
    Nov 2006
    Location
    Uk
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thanks boreas ill try nd get it to work

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PLM's how to make a simple power miner tut useing srl!
    By poolikemax in forum OSR Intermediate Scripting Tutorials
    Replies: 49
    Last Post: 11-16-2008, 05:44 PM
  2. My First Script - Power Miner
    By shadowrec0n in forum First Scripts
    Replies: 21
    Last Post: 07-05-2008, 11:49 AM
  3. Power Miner first script
    By dallas574 in forum First Scripts
    Replies: 4
    Last Post: 05-04-2008, 07:53 PM
  4. corl45's Power miner (2nd script)
    By corl455 in forum First Scripts
    Replies: 31
    Last Post: 01-05-2008, 07:08 AM
  5. The Lords Power Miner (h) First Script (h)
    By The Lord Ahmed in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 07-15-2007, 10:40 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
  •