Results 1 to 16 of 16

Thread: Dropping Inventory.

  1. #1
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Dropping Inventory.

    At the moment i am powermining on my character, but i'm doing the powermining manually and not with a script, what i'm trying to make is a simple dropper, something that i can keep minimized until i need it, so when i get a full inventory, i open it, click start, and it goes to the runescape screen and drops my inventory.

    Code:
    program Dropper;
    {.include srl/srl.scar}
    
    
    procedure DropOre;
    var
     OreDTM, x, y : Integer;
    begin
      OreDTM:= DTMFromString('78DA63B4666060D0674001E60A120CA2409A1' +
           '188FF0301631890A1CA801530C268172021895D16AE06648F2C01' +
           '35D240C284801A0B20E143408D279070C0EF6600757F077D');
      repeat
      If FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
      begin
        Mouse(x,y,2,2,False);
        wait(random(300));
        ChooseOption('Drop');
        wait(200 + random(200));
      end;
     until not FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2);
     FreeDTM(OreDTM);
    end;
    
    begin
    SetupSRL;
    ActivateClient;
    DropOre;
    end.
    but every time i run it, it just says srl compiled and successfully executed, i'm sure there is some noob mistake i'm making but i don't know what it is.

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Your dtm is probably faulty. Just use "DropAll;" or "DropArray(InvSlots: TIntegerArray);"

  3. #3
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i tried the dropall, and when i clicked run, it went to the bottom right portion of my screen and just sat there, even when i had my rs window selected.

  4. #4
    Join Date
    Feb 2009
    Location
    AZ, USA
    Posts
    460
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Are you using standard detail in fixed mode?

    also, here are your standards corrected, you really should try to use correct standards, it helps

    SCAR Code:
    program Dropper;
    {.include srl/srl.scar}

    procedure DropOre;
    var
     OreDTM, x, y : Integer;
    begin
      OreDTM:= DTMFromString('78DA63B4666060D0674001E60A120CA2409A1' +
           '188FF0301631890A1CA801530C268172021895D16AE06648F2C01' +
           '35D240C284801A0B20E143408D279070C0EF6600757F077D');
      repeat
        If FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        begin
          Mouse(x,y,2,2,False);
          wait(random(300));
          ChooseOption('Drop');
          wait(200 + random(200));
        end;
      until not FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2);
      FreeDTM(OreDTM);
    end;

    begin
      SetupSRL;
      ActivateClient;
      DropOre;
    end.
    Is your account in an old-school random? Help SRL-OSR solve randoms!

  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    It's most likely what mormanman said. A good and easy way to check is simply add in Writeln's that tells you if you've found the DTM or not. Something like this should work fine:
    SCAR Code:
    program Dropper;
    {.include srl/srl.scar}

    procedure DropOre;
    var
     OreDTM, x, y : Integer;
    begin
      OreDTM:= DTMFromString('78DA63B4666060D0674001E60A120CA2409A1' +
           '188FF0301631890A1CA801530C268172021895D16AE06648F2C01' +
           '35D240C284801A0B20E143408D279070C0EF6600757F077D');
      repeat
        If FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        begin
          Writeln('Found ore DTM!'); // Here.
          Mouse(x,y,2,2,False);
          wait(random(300));
          ChooseOption('Drop');
          wait(200 + random(200));
        end else
          Writeln('Didn''t find ore DTM :('); // And here.
      until not FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2);
      FreeDTM(OreDTM);
    end;

    begin
      SetupSRL;
      ActivateClient;
      DropOre;
    end.
    That should help you clear out your problem.

    Coh3n

  6. #6
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    alright, so i copied your revision coh3n, and it said it didn't find it, so i went to the wiki, and followed how to find a dtm, and while in the editor it did find the dtm just fine, so i used that, and the same thing happened, it still didn't find it.

  7. #7
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Did you add tolerance to your DTM?

  8. #8
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yep, i just did another dtm with tolerance of 20, and it found the ore just fine in the editor, and the same thing happened, couldn't find it in game.

  9. #9
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    This may sound dumb, but did you drag the crosshairs? Also, try adding a 1-2 second wait after ActivateClient. That may do the trick. If you still can't figure it out, look at the DTM tutorial in my AIO Guide (Link in signature), there may be a small step you're missing when making your DTM. You could also try making a bitmap as they are faster, but it's up to you.

  10. #10
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yea, i've been dragging the crosshairs, and i looked at your guide and followed it word for word, and still nothing

    Edit: i'm gonna go through your guide again and try the bitmap.

  11. #11
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by mcnollend View Post
    yea, i've been dragging the crosshairs, and i looked at your guide and followed it word for word, and still nothing

    Edit: i'm gonna go through your guide again and try the bitmap.
    Could you post your new code that's looking for the DTM? Also, good luck with bitmaps. If you post your code, post it in "scar" tags. -> [hello][/hello]. Replace "hello" with "scar" (without quotes).

  12. #12
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program Dropper;
    {.include srl/srl.scar}

    procedure DropOre;
    var
     OreDTM, x, y : Integer;
    begin
      OreDTM := DTMFromString('78DA635462606090614001964A920CFC409A1' +
           '1CA67D40512A20C6880118904D28A408297801A0120214E408D24' +
           '9050C7AF0600CBD301A7');
      repeat
        If FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        begin
          Writeln('Found ore DTM!'); // Here.
          Mouse(x,y,2,2,False);
          wait(random(300));
          ChooseOption('Drop');
          wait(200 + random(200));
        end else
          Writeln('Didn''t find ore DTM :('); // And here.
      until not FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2);
      FreeDTM(OreDTM);
    end;

    begin
      SetupSRL;
      ActivateClient;
      wait(5000);
      DropOre;
    end.


    That's the one with the dtm i got from following your guide, and i'm still working on the bitmap, other things cause distraction, so it should be done pretty soon.
    SCAR Code:
    program New;
    {.include srl/srl.scar}


    function DropOres: Integer;
    var
     Ore, x, y : Integer;
    begin
     Ore := BitmapFromString(7, 7, 'beNpTkFAVEzCUFQMiPWkRBhjQkBA' +
           'CipjIi5srSABJiKC2pDBQEChiqSQJQQwMjEBdEEEbZSkgAgoC2RC9' +
           'QDayIMQ0NEGgCegqAajYEeM=');
     GameTab(tab_Inv);
     if FindBitMapToleranceIn(Ore, x, y, MIX1, MIY1, MIX2, MIY2, 15)then
     begin
      Writeln('Found iron ore');
      wait(200);
      Mouse(x, y, 3, 3, False);
      wait(500 + random(500));
      ChooseOption('Drop');
      repeat
     until not FindBitmapToleranceIn(Ore, x, y, MIX1, MIY1, MIX2, MIY2, 15);
     end;
    end;


    begin
    SetupSRL;
    ActivateClient;
    wait(5000);
    DropOres;
    end.

    ok, so this is the bitmap one, and it did more this time, when i clicked run, it would go to the rs screen, wait like i told it do, then it would move the mouse over to the right side of my desktop and just slowly move up and down.
    Last edited by mcnollend; 09-12-2009 at 02:35 AM.

  13. #13
    Join Date
    Oct 2006
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try testing it using SMART. Then you won't get any client issues.
    Also, when making the DTM use 250 tolerance for the first point of the DTM.

  14. #14
    Join Date
    Mar 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i tried the bitmap version in smart and it would compile but wouldn't actually find the ore, so it would just end.

    i'll remake a dtm with a tolerance of what you said, then try it in smart.

    SCAR Code:
    program Dropper;
    {.include srl/srl.scar}

    procedure DropOre;
    var
     OreDTM, x, y : Integer;
    begin
       OreDTM := DTMFromString('78DA639467606090664001964A920CBF80342' +
           '310FF0702464D204380010D302291405A104888125003B2478380' +
           '1A7520A1885F0D00A067069D');
      repeat
        If FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        begin
          Writeln('Found ore DTM!'); // Here.
          Mouse(x,y,2,2,False);
          wait(random(300));
          ChooseOption('Drop');
          wait(200 + random(200));
        end else
          Writeln('Didn''t find ore DTM :('); // And here.
      until not FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2);
      FreeDTM(OreDTM);
    end;

    begin
      SetupSRL;
      ActivateClient;
      wait(5000);
      DropOre;
    end.

    so i put smart into both bitmap and dtm, the bitmap didn't work but on the bright side, the dtm did work after i remade the dtm with a tolerance change, and it worked just fine in smart and dropped all the ores, after that i took smart out of the script and tried it on a browser and it didn't work, so i thought it could be google chrome messing it up somehow and it was, it works just fine in internet explorer so i guess i'll use that.
    So i thank everyone who helped me out on this one.
    Last edited by mcnollend; 09-12-2009 at 04:25 AM.

  15. #15
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why dont you just make it loop untill the inventory is full then drop?. That way its automatic. You mine untill your full manually, then the script will drop?. No need to start or restart the script.

    SCAR Code:
    DropItemsByIdentifier('dtm', OreDTM, 50);

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  16. #16
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by rogeruk View Post
    Why dont you just make it loop untill the inventory is full then drop?. That way its automatic. You mine untill your full manually, then the script will drop?. No need to start or restart the script.

    SCAR Code:
    DropItemsByIdentifier('dtm', OreDTM, 50);
    Yes, there is also a whole selection of dropping functions you can use in Inventory.scar. I'm glad to hear you got it working. Also, I think Firefox is the best client to use for RS, rather than Chrome or IE. But that's just what I've heard.

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •