Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Picking up MY loot, is it possible?


    Krugiztar
     Share

    Recommended Posts

    So I am currently working on my first script, I got it to kill cows itäs working just fine.

    The only thing is I want it to pickup the bones that my cow drops and not the bones all around the cow pen.

     

    Is there anything in the API that is specific to this? Like npc.loot or something?

    New to this API, really appriciate the answers C:

    Link to comment
    Share on other sites

    You need to define what object you want and then interact with the object. Look at game-object in the api.

    Edited by swift
    Link to comment
    Share on other sites

    There are a few ways to somewhat do this.

     

    -Get the cows tile and loot the tile when it dies, although cows are 2 tiles wide so you'd have to set a area.

    -Set a radius around your player to loot.

    -Wait until you kill a cow then only loot once before killing another cow.

    Link to comment
    Share on other sites

    i usually just set a boolean shouldLoot to true whenever i attack a cow and then when it successfully loots i set shouldLoot false.  this way it only loots 1ce per kill.  

     

    theres no real easy way to make it loot only your own drops, but i dont see why it would be necessary.  

    Edited by rickkkkkkkkkk
    Link to comment
    Share on other sites

    declare the npc , interact with it , sleep till it's dead , declare a groundObject as closest bones , pick the bones then repeat . you will need something like a boolean or something similar to make it pick only 1 set of bones .

    Edited by ozeki6
    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.