Results 1 to 4 of 4

Thread: help with my power miner...

  1. #1
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default help with my power miner...

    the problem is when it start it says: Line 16: [Error] (16:7): Unknown identifier 'InvFull' in script.
    SCAR Code:
    program MineMiner;

    const
    IronOre =1844540;
    var
    x, y: Integer;
    procedure StartMining;
    begin
    if (FindColor(x,y,1844540,0,0,360,360)) then
    begin
    MoveMouseSmoothEx(x,y+random(0),20,40,45,25,20);
    Wait(1000+random(100));
    ClickMouse(x,y,false);
    begin
    repeat
    until(InvFull);
    end;
    end;
    end;
    procedure Dropping;
    begin
    if (InvFull) then
    DropTo(2,28);
    end;
    function FindFastRandoms: Boolean;    // By WT-Fakawi.
    var
      i: Integer;
    begin
      for i:=1 to 10 do
      begin
        case I of
           1:  If FindDead then
               begin
                 Result := True;
                 Loc('Dead');
                 Logout;
               end;
           2:  If FindTalk Then Result := True;
           3:  If FindMime then
               begin
                 Result := True;
                 Loc('Mime');
                 Logout;
               end;
           4:  If FindMaze then
               begin
                 result:= true;
                 Loc('Maze');
                 logout;
               end;
           5:  If FindQuiz then
               begin
                 Result := True;
                 Loc('Quiz');
                 Logout;//Solve quiz in next SRL
               end;
           6:  If FindDemon then
               begin
                 Result := True;
                 Loc('Demon');
               end;
           7: begin
                 if NoGameTab then
                 begin
                   Result := True;
                   Players[CurrentPlayer].rand := 'No GameTab';
                   Logout;
                   Exit;
                 end;
               end;
           8: begin
                 If InBlack then
                 begin
                   Result := True;
                   Players[CurrentPlayer].rand := 'InBlack';
                   Logout;
                   Exit;
                 end;
               end;
           9 : If FindTalk Then Result := True;
           10: if FindFight then
               begin
                 RunTo(RunDir, false);
                 FTWait(RunWaitTime);
                 RunBack;
               end;
        end;
        Wait(1);
      end;
    end;
    end.

    help

  2. #2
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    The problem you get from line 16 is because "InvFull" is a function in the SRL-Include, not SCAR. You have to include SRL like this:
    SCAR Code:
    Program Whatever_Your_Script_Is_Called;
    {.include SRL/SRL.scar}

    I fixed your whole script up, and I've added comments here and there pointing to some notes I have made further down this post:
    SCAR Code:
    program MineMiner;
    {.include SRL/SRL.scar}

    const
     IronOre =1844540;

    var
     x, y: Integer;
     
    procedure StartMining;
    begin
      if (FindColor(x,y,1844540,0,0,360,360)) then
      begin
        // Next 3 lines = Note #1
        MoveMouseSmoothEx(x,y+random(0),20,40,45,25,20);
        Wait(1000+random(100));
        ClickMouse(x,y,false);
        {To here}
        begin
          repeat           { This line and the one below = Note #2 }
          until(InvFull);
        end;
      end;
    end;

    procedure Dropping;
    begin
      if (InvFull) then
      DropTo(2,28);      // This line = Note #3
    end;

    function FindFastRandoms: Boolean;    // By WT-Fakawi.
    // This whole procedure = Note #4
    var
      i: Integer;
    begin
      for i:=1 to 10 do
      begin
        case I of
           1:  If FindDead then
               begin
                 Result := True;
                 Loc('Dead');
                 Logout;
               end;
           2:  If FindTalk Then Result := True;
           3:  If FindMime then
               begin
                 Result := True;
                 Loc('Mime');
                 Logout;
               end;
           4:  If FindMaze then
               begin
                 result:= true;
                 Loc('Maze');
                 logout;
               end;
           5:  If FindQuiz then
               begin
                 Result := True;
                 Loc('Quiz');
                 Logout;//Solve quiz in next SRL
               end;
           6:  If FindDemon then
               begin
                 Result := True;
                 Loc('Demon');
               end;
           7: begin
                 if NoGameTab then
                 begin
                   Result := True;
                   Players[CurrentPlayer].rand := 'No GameTab';
                   Logout;
                   Exit;
                 end;
               end;
           8: begin
                 If InBlack then
                 begin
                   Result := True;
                   Players[CurrentPlayer].rand := 'InBlack';
                   Logout;
                   Exit;
                 end;
               end;
           9 : If FindTalk Then Result := True;
           10: if FindFight then
               begin
                 RunTo(RunDir, false);
                 FTWait(RunWaitTime);
                 RunBack;
               end;
        end;
        Wait(1);
      end;
    end;

    begin  // From here and to "end." = Note #5
      StartMining;
      Dropping;
    end.

    Note #1: Those 3 lines can be replaced with a much safer and better procedure from SRL. It's called "Mouse" and will move you mouse to the specified location and click there.
    SCAR Code:
    Mouse(100,100,5,5,true)
    will move and click the mouse on the coordinates 100,100 with 5 pixels randomness on both the x- and the y-axis.

    Note #2: Here you have a loop that will not work. You set the script to click one color and then do nothing until your inventory is full. You have to incorporate the whole color-clicking part into the loop. Like this:
    SCAR Code:
    procedure StartMining;
    begin
      repeat
        if (FindColor(x,y,1844540,0,0,360,360)) then
        begin
          Mouse(x,y,0,0,true) // I told you about this procedure before.
        end;
      until(InvFull); // I actually recommend using "InvCount=28" instead.
    end;

    Note #3: The procedure you are looking to use is "DropToPosition". A simple typo by you.

    Note #4: That whole procedure ("FindFastRandoms") can be replaced with "FindNormalRandoms" from SRL.

    Note #5: You must ALWAYS have a "main-loop" in a script. A mainloop begins with "begin" and ends (as the only thing at all!) with "end."
    I would be a good idea to read more about main-loops. I strongly believe there is a Main-loop-tutorial in the "Tutorial Island" section.

    If you have read and followed these notes, the script should compile. It might not work as you intend it to, but it will compile which is a good thing

    Enjoy, and good luck!

    -Knives

  3. #3
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if you want to include anything done in srl with your script, you must tell scar that.

    invfull returns a boolean value and is part of srl.
    SCAR Code:
    {.include srl/srl.scar}
    is what you need at the top.
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  4. #4
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks you king of knives and you too LordGreeGree

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
  •