Results 1 to 24 of 24

Thread: Ultimate Loot Grabber

  1. #1
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default Ultimate Loot Grabber

    I see a lot of people have problems with collecting loots. I decided to make this tool letting you to pick up from ground whatever you want ,which you can use in your script and edit if you wish.
    Basically I ripped off this function from my fighting script and adjusted to be universal.
    • easy and quick to SetUp
    • it's looking for stacks ,not for particular items
    • will grab items ,even if they are covered by another
    • code is clear ,you can edit it to your purpose if you wish.


    Setup

    All you need is to make function ,which will load properties of objects. Like this. I highly recommend to use ACA for finding colors and tolerance. It doesn't matter how you name this function. Remember to put SetLength ( Result , x ) at beginning ,where x is amount of items you declare.

    Simba Code:
    function SetupLoots : Array of TLoot;   // Example
    begin
     SetLength( Result, 3 );   // Second parameter here should be amount of items you want to find

     Result[0].name := ['bone','ones','one'];
     Result[0].color := 13948895;
     Result[0].tol := 5;
     Result[0].CTS := 2;
     Result[0].cts2Hue := 0.76;
     Result[0].cts2Sat := 1.22;

     Result[1].name := ['egg','gg'];
     Result[1].color := 65535;
     Result[1].tol := 3;
     Result[1].CTS := 1;
     Result[1].cts2Hue := 0.1;  // If you use CTS other then 2 just ignore this
     Result[1].cts2Sat := 1.1;

     Result[2].name := ['third','item']; // it's example
     Result[2].color := 65535;
     Result[2].tol := 7;
     Result[2].CTS := 1;
     Result[2].cts2Hue := 0.1;  
     Result[2].cts2Sat := 1.1;

    end;
    Now load this function into LootGrabber ,like this:

    Simba Code:
    LootGrabber(SetupLoots,TRUE,['hicken','icken','aw','chick']);

    as you see there are two additional parameters.
    • Debug - TRUE/FALSE - it's obvious
    • ['hicken','icken','aw','chick'] - ListOfUndesirable - TStringArray - it needs explanation:
    You write here names of objects ,which could cover your potential loot. For example ,you want to collect bones ,but not raw chickens. Nevertheless bones are below chicken ,so if you hover mouse on stack uptext will show 'Raw chicken' - like on a picture. So you add chicken to the list ,and it will be ok - script will click on stack ,and take only bones from it. Obviously it will not find or clicks on a chickens alone.




    Example Script


    This simple script shows Grabber in action. First download grabber.simba and put it in Simba\Includes. Leave your character in Varock's hen house ,run script and see ,how it's collecting full inventory of bones.

    Simba Code:
    program HenHouseBones;
    {$DEFINE SMART}
    {$I SRL/srl.simba}
    {$i SRL/SRL/MISC/PAINTSMART.simba}
    {$I grabber.simba}

    function SetupLoots : Array of TLoot;
    begin
     SetLength(Result,1);
     Result[0].name := ['one','ones'];
     Result[0].color := 13948895;
     Result[0].tol := 5;
     Result[0].CTS := 2;
     Result[0].cts2Hue := 0.76;
     Result[0].cts2Sat := 1.22;
    end;
    procedure start;
    begin
      Smart_Server := 10;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
    end;
    begin
      start;
      declareplayers;
      MakeCompass('E');
      repeat
        LootGrabber(SetupLoots,TRUE,['cken','fea','ath']);
      until not LootGrabber(SetupLoots,TRUE,['cken','fea','ath']);
    end.
    Last edited by bg5; 03-02-2012 at 10:40 AM.

  2. #2
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Basic instruction

    1. Download Grabber.simba
    2. Put Grabber.simba inside Simba/Includes
    3. On the top of your script include it ,example:
      Simba Code:
      program new;
        {$define SMART}
        {$i srl/srl.simba}
        {$i Grabber.simba} // always include grabber after srl.simba
    4. In your script make function SetupLoots : Array of TLoot; and fill it properly. How to fill it read SETUP in post above.
    5. Now add grabing procedure to your MainLoop ,example

      Simba Code:
      procedure MainLoop;
      begin
        FightMonster; //your fighting procedure

        repeat  // now repeat grabbing until don't find any more loots on ground
            LootGrabber(SetupLoots,TRUE,['cken','fea','ath']);
        until not LootGrabber(SetupLoots,TRUE,['cken','fea','ath']);

        {...}
      end;
    Last edited by bg5; 06-01-2012 at 03:45 AM.

  3. #3
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Update Log

    • fixed one bigger bug ,and SMART is clean after function
    Last edited by bg5; 03-02-2012 at 10:46 AM.

  4. #4
    Join Date
    Jan 2012
    Posts
    1,104
    Mentioned
    18 Post(s)
    Quoted
    211 Post(s)

  5. #5
    Join Date
    Oct 2011
    Location
    England
    Posts
    401
    Mentioned
    10 Post(s)
    Quoted
    176 Post(s)

    Default

    Thanks, this will help me a lot

  6. #6
    Join Date
    Dec 2011
    Location
    Kosovo
    Posts
    831
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Simba Code:
    Result[0].cts2Hue := 0.76; // What's this for?
    Result[0].cts2Sat := 1.22; // What's this for too?

    Those are what I don;t understand. Check the code. It's written What's this for.

    Anyway goodjob
    Goals:
    Understanding TPAs
    Making Proggy for fighting
    Getting on SRL members
    Get 500 posts

  7. #7
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Result[0].cts2Hue := 0.76; // What's this for?
    Result[0].cts2Sat := 1.22; // What's this for too?
    There are for cts2 tolerance ,if you use other tolerance ,just ignore them.

  8. #8
    Join Date
    Feb 2012
    Posts
    438
    Mentioned
    1 Post(s)
    Quoted
    16 Post(s)

    Default

    Thanks for the useful post, been trying to find something like this for a while My blue dragon killer will now loot!
    Cheers
    Anubis
    Ski-U-Mah

  9. #9
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    You can clean up the code by doing:

    Simba Code:
    with Result[0] do
      // settings here
    end;

    That will make it easier to add/update things in the future, and make it easier to read.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  10. #10
    Join Date
    Feb 2012
    Location
    canada
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ima try this out tomorrow

  11. #11
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    You can clean up the code by doing:

    Simba Code:
    with Result[0] do
      // settings here
    end;

    That will make it easier to add/update things in the future, and make it easier to read.
    I would write function similar to a constructor

    Simba Code:
    AddLoot({settings in one line});
    Either way should be nice
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

  12. #12
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    You can clean up the code by doing:

    Simba Code:
    with Result[0] do
      // settings here
    end;

    That will make it easier to add/update things in the future, and make it easier to read.
    You can make this function in the way you wish I had few ideas how to load data ,but I decided to use the simplest syntax as example ,to make it easier to understand for ppl with basic knowladge. It's only data loader ,technically it's not even part of the include. You can use for it other function or even several functions ,as long as you at the end put array of TLoot into main grabber function.

  13. #13
    Join Date
    Dec 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you! My item looter will now loot items -- which I believe goes without saying is a crucial part of my script. Thanks for this, it helped so much.

    Would you know if there's a way to only search a specific area for a stationary, respawning item (instead of the whole screen)? Right now it's detecting a bunch of trees. It still gets the item though.
    Last edited by sfs; 05-15-2012 at 08:10 PM.

  14. #14
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    2,254
    Mentioned
    21 Post(s)
    Quoted
    238 Post(s)

    Default

    Very handy, thanks for this.

  15. #15
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    THis is pretty genius, just thinking if. We use mmtiles (cant remember it's name) for wildy and add a boundary we could make a wildy looter :3 just sayin

  16. #16
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Quote Originally Posted by xtrapsp View Post
    THis is pretty genius, just thinking if. We use mmtiles (cant remember it's name) for wildy and add a boundary we could make a wildy looter :3 just sayin
    I've made wildy looter once using MMtiles and canny core (because all items have different colors), but there was 2 problems: first - it's not possible to distinguish between players and loots, because how to tell script which object is what?
    Secondly MMtiles was precise only at close distance, because MMtiles can't include such parameter as altitude of ground.

    To fix the first problem I've made algoryth:
    Get MS tile from MM -> Extract all objects on this tile from background using cannycore -> iterate throught each object by pressing right mouse button (it can't be based on uptext because player's name is showed over item) and finding item on list.

    This procedure makes script quite slow, normal players can grab loot faster, not even mentioning reflection bots. So, as you see, color-based wildy looter isn't a good idea.

  17. #17
    Join Date
    Aug 2013
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Thanks for posting this! I always wanted to include a looter for a hill giant/moss giant bot i am planning to make, but I did not know how the proper code to do it. I will hopefully get this to work one day.

  18. #18
    Join Date
    Aug 2013
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Quote Originally Posted by alkorith View Post
    Thanks for posting this! I always wanted to include a looter for a hill giant/moss giant bot i am planning to make, but I did not know how the proper code to do it. I will hopefully get this to work one day.
    When i was trying to implement the looter to try and test out to get it to pick up big bones, this error popped up before the script even executed

    Error: Unknown declaration "IsMoving" at line 38

  19. #19
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by alkorith View Post
    When i was trying to implement the looter to try and test out to get it to pick up big bones, this error popped up before the script even executed

    Error: Unknown declaration "IsMoving" at line 38
    Have you considered that this snippet is from 3 years ago? SRL has changed significantly since then and I doubt any code written 3 years ago will still compile.

    Luckily @bg5; is still active here so maybe he can mention if it's an easy fix to make this work or not.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  20. #20
    Join Date
    Aug 2013
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Have you considered that this snippet is from 3 years ago? SRL has changed significantly since then and I doubt any code written 3 years ago will still compile.

    Luckily @bg5; is still active here so maybe he can mention if it's an easy fix to make this work or not.
    Thanks for the info.

  21. #21
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Loot Grabber was created for old SRL. I'm currently working on the new version, because I've got few requests, but since that time Runescape has changed a lot and SRL even more. I've already rewritten include to Lape, which was an easy part, but now I'm struggling with SRL-6 equivalents of old methods. I haven't played RS for few years and I'm not familiar with it anymore, so my progress is very slow.

    I would need some help from someone who knows Runescape and knows SRL-6.

  22. #22
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    Will help allot of ppl with the bonsai fighter i've seen so many Posts about it there..

  23. #23
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Beta version of new [SRL-6]Grabber is done.

    Now I'm looking for testers! Preferably junior+ members with at least intermediate experience in botting and scripting. Please PM if you are interested.

  24. #24
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    Feel free to send me the grabber, might be usefull for me. Got a few members accounts I can train some combat on.

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
  •