Results 1 to 13 of 13

Thread: Issues with Dropping in Powerminer

  1. #1
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default Issues with Dropping in Powerminer

    Hi there guys,

    I'm having some issues with dropping the last four inventory slots with my powerminer script. It's my first script so far, and the mining and dropping both look solid (no gas detection or anything yet, but I can work on that later) except for when it comes to drop the last row. It can't seem to find the 'Drop' text of the last four ores.

    I'm using DropToPosition(2,28); to drop the ores. I apologize if there's an answer to this somewhere. I'll take a look through the tutorials and other topics in the meantime and hopefully find an answer myself. Thanks for any help.

  2. #2
    Join Date
    Apr 2007
    Location
    Australia
    Posts
    4,163
    Mentioned
    9 Post(s)
    Quoted
    19 Post(s)

    Default

    try moving the position of runescape on your screen, or close scar then re-open it

  3. #3
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    I've moved the screen around (I'm running SCSS) and have closed and re-opened SCAR, but have had no luck with those last four ores. I tried to scope out a DTM function, but I kept receiving errors about CountItemDTM having an invalid number of arguments. Any other ideas on how to make this work?

    EDIT: I've worked out how to get the dropping done using DTMs, but each time an ore is dropped, the script clicks where it used to be before going to the next one and I'm not sure why. Any ideas how to fix this? Wait longer?

  4. #4
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so, it drops the ore and then it right clicks again on the same please. and then he drop the next ore and does the same?
    i little wait can help then. because is tooks a few seconds to remove the ore out of you invent.

  5. #5
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    try adding these to your script:

    SCAR Code:
    function DropItem2(i: Integer): Boolean;
    var
      Pr: TPoint;
    begin
      GameTab(4);
      if ExistsItem(i) then
      begin
        Pr := ItemCoords(i);
        Mouse(Pr.x, Pr.y, 3, 3, False);
        Wait(50 + Random(100));
        if (ChooseOption('Drop')) then
          Result := True;
      end;
    end;

    procedure DropToPosition2(StartPosition, EndPosition: Integer);
    var
      i: Integer;
    begin
      for i := StartPosition to EndPosition do
        DropItem(i)
    end;

    and use DropToPosition2
    all i did was change the ClickOption to ChooseOption. I'm pretty sure ClickOption won't work on the last row as for the new rs update and the right click menu. ClickOption's inventory area is the problem now that the right click menu doesn't have boundaries in that area.

  6. #6
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    rikjess: That's what I thought. I'll set the wait longer and see how it works out.

    The_Rs_Monkey: I believe I was already using ChooseOption when the problem arose.

    EDIT: My Drop function apparently broke overnight, and your dropping function can't seem to get those last 4 either, The_Rs_Monkey. Does anyone have any information as to how I can resolve this?

  7. #7
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    well as a last resort you could drag the ores up to the first spots and then drop them from there.

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  8. #8
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Okay guys, I've been able to successfully drop a load, albeit the script clicking where previous DTMs used to be almost every time (I'd say 22/27 times it clicked in a previous spot). Is there any way I can solve this? I'm not sure waiting any longer will make this better. Here's my script:

    SCAR Code:
    program AlKharidPowerMiner;
    {.include SRL/SRL.scar}

    var
      Loads, IronOres, a, b, x, y: Integer;

    const
      NumLoads = 5; //How many loads to do before switching players.
      Ore1 = 2832988; //Set these colors
      Ore2 = 1778490; //Set these colors
      Ore3 = 2569557; //Set these colors

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //How many players are mining.
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0; //Which player you are starting with.

      Players[0].Name := 'Username'
      Players[0].Pass := 'Password';
      Players[0].Nick := 'erna'; //3-4 letters of name (not CAPS)
      Players[0].Active := True; //Player is going to be mining.

      Writeln('There are ' + IntToStr(HowManyPlayers) + 'character(s) mining.');
    end;

    function FindFastRandoms: Boolean; //by WT-Fawaki
    var
      i: Integer;
    begin
      for i := 1 to 9 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindMime then
              Result := True;
          4: if FindMaze then
              Result := True;
          5: if FindQuiz then
              Result := True;
          6: if FindDemon then
              Result := True;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          8: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          9: RC;
        end;
        Wait(1);
      end;
    end;

    procedure Randoms;
    begin
      FindTalk;
      FindNormalRandoms;
      FindFastRandoms;
      if (FindFight = True) then
      begin
        RunAwayDirection('S');
        wait(1000 + random(5000));
        RunBack;
      end;
    end;

    procedure MineThoseOres;
    begin
      if(not(LoggedIn)) then
      Exit;
      else if(FindColorTolerance(a, b, Ore1, MSX1, MSY1, MSX2, MSY2, 6) and
        FindColorTolerance(a, b, Ore2, MSX1, MSY1, MSX2, MSY2, 6) or
        FindColorTolerance(a, b, Ore3, MSX1, MSY1, MSX2, MSY2, 6)) then
      begin
        Status('We''re Mining!');
        Mouse(a, b, 2, 2, true)
        wait(3000 + random(2000))
        Randoms;
        end;
    end;

    procedure Drop;
    begin
      status('Dropping the ores');
      IronOres := DTMFromString('78DA63CC636260E0646440065E3A0A601A26C' +
           'A580854F387010D30A2AAC920424D02500D33237E35B140350204' +
           'D46401D5881150534E8439554C483CEC6A00B2BD065D');
      repeat
      if(FindDTM(IronOres, x, y, MIX1, MIY1, MIX2, MIY2)) then
        wait(2000 + random(1000));
        Mouse(x, y, 3, 3, false);
        ChooseOption('rop');
        Randoms;
      until(not(FindDTM(IronOres, x, y, MIX1, MIY1, MIX2, MIY2)));
      Loads := Loads + 1;
    end;

    procedure IsInvFull;
    begin
      status('Checking Inventory');
      if(InvFull) then
      begin
        Writeln('Inventory is full, dropping ores.');
        Drop;
      end;
    end;

    procedure ProgReport;
    begin
      ClearDebug;
      Writeln('---------- Powerminer by Method ----------');
      Writeln('We have mined ' + IntToStr(Loads) + ' loads of iron so far');
      Writeln('Thanks for running this, and please post progress reports!');
      Writeln('---------- Powerminer by Method ----------');
    end;

    procedure SetUp;
    begin
      SetupSRL;
      DeclarePlayers;
      Loads := 0;
      ActivateClient;
    end;

    begin
      SetUp;
      repeat
        if(not(LoggedIn)) then
        LoginPlayer;
        NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, upchars);
        if(Players[CurrentPlayer].Active) then
        begin
        repeat
          IsInvFull;
          MineThoseOres;
          IsInvFull;
          ProgReport;
          until(Loads = NumLoads);
          Logout;
        end;
      CurrentPlayer := CurrentPlayer + 1;
      until(CurrentPlayer = Length(Players));
    end.
    :-)

  9. #9
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Well if it clicks any ores at all, that means you DTM is fine
    Problem is proablt you need a wait after each drop until the ore disappears like this
    SCAR Code:
    procedure Drop;
    begin
      status('Dropping the ores');
      IronOres := DTMFromString('78DA63CC636260E0646440065E3A0A601A26C' +
           'A580854F387010D30A2AAC920424D02500D33237E35B140350204' +
           'D46401D5881150534E8439554C483CEC6A00B2BD065D');
      repeat
      if(FindDTM(IronOres, x, y, MIX1, MIY1, MIX2, MIY2)) then
      Begin
        Mouse(x, y, 3, 3, false);
        ChooseOption('rop');
        Randoms;
        Wait(700+Random(500))
      until(not(FindDTM(IronOres, x, y, MIX1, MIY1, MIX2, MIY2)));
      Loads := Loads + 1;
    end;

    Try that and tell me how it works.

  10. #10
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Well if it clicks any ores at all, that means you DTM is fine
    Problem is proablt you need a wait after each drop until the ore disappears like this
    SCAR Code:
    procedure Drop;
    begin
      status('Dropping the ores');
      IronOres := DTMFromString('78DA63CC636260E0646440065E3A0A601A26C' +
           'A580854F387010D30A2AAC920424D02500D33237E35B140350204' +
           'D46401D5881150534E8439554C483CEC6A00B2BD065D');
      repeat
      if(FindDTM(IronOres, x, y, MIX1, MIY1, MIX2, MIY2)) then
      Begin
        Mouse(x, y, 3, 3, false);
        ChooseOption('rop');
        Randoms;
        Wait(700+Random(500))
      until(not(FindDTM(IronOres, x, y, MIX1, MIY1, MIX2, MIY2)));
      Loads := Loads + 1;
    end;

    Try that and tell me how it works.
    I had to change the DTM for Iron (no idea why...it was working earlier today). It did 3 rounds of mining and dropping flawlessly, so thanks for the help. Now that that's fixed, would you be able to help me out with gas detection? I'd appreciate that a lot.
    :-)

  11. #11
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    try putting a higher tolerance on the iron dtm.

  12. #12
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Well, you can read my DTM tut, and just make a universal ore DTM so no need for much tolerance.

  13. #13
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    All right, I've made it "universal" now. Thanks for the help YoHoJo.
    :-)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with dropping
    By dallas574 in forum OSR Help
    Replies: 3
    Last Post: 07-24-2008, 05:13 PM
  2. Dropping
    By trav280 in forum OSR Help
    Replies: 8
    Last Post: 04-26-2008, 12:09 AM
  3. Replies: 13
    Last Post: 04-12-2008, 05:32 PM
  4. Dropping
    By hardman in forum RS3 Outdated / Broken Scripts
    Replies: 10
    Last Post: 08-01-2007, 02:47 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
  •