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
  • Incense Burner Bot


    Burner Bot

    Recommended Posts

    I'm new to java and to scripting an am trying to write a bot that would light the two incense burners of a player owned house (not the bot's house), then stand back in front of the altar after lighting them. If its inventory became empty it would un-note its noted marrentill at Phials outside the portal, then re-join the house it had just left. The only real problem I am coming across is how to light both of the burners. Lighting one is simple enough, but I'm uncertain how to have the script select the burner that is further away from the player, in order to be able to light both of them.

    Link to comment
    Share on other sites

    I would help you out but I have no idea what incense is and how it works. Can you post a video of what you're trying to do?

     

    [Apologies, but I've never been P2P in the entire time I've played OSRS, with the exception of the free P2P trial that was handed out weeks ago]

    Link to comment
    Share on other sites

    I'm new to java and to scripting an am trying to write a bot that would light the two incense burners of a player owned house (not the bot's house), then stand back in front of the altar after lighting them. If its inventory became empty it would un-note its noted marrentill at Phials outside the portal, then re-join the house it had just left. The only real problem I am coming across is how to light both of the burners. Lighting one is simple enough, but I'm uncertain how to have the script select the burner that is further away from the player, in order to be able to light both of them.

     

    Use a filter for the closest unlit burner. 

     

    Isn't unlit something like: "Incense burner"

    and lit is "Incense burner (lit)" ?

    Use the game debugger to verify this. If so something like this would work: 

            GameObject unlit = getGameObjects().closest(i -> i != null && i.getName().contains("burner") && !i.getName().contains("lit")); //If the lit burner has "(lit)" in the name, this filter will only return an unlit burner
            Item herb = getInventory().get(h -> h != null && h.getName().equals("Marrentill")); //returns an item object if it's in your inv
            if (unlit != null) { 
               if (herb.interact("Use"))
                   unlit.interact(); 
            }
    

    If this doesn't work, grab a picture of you right clicking an unlit one, and a lit one, and I'll be happy to help you.

    Edited by Genius
    Link to comment
    Share on other sites

    Ah, the goal is to light them without them ever burning out, so I'll light them manually first and then start the script. I'll grab a picture of me right-clicking a lit burner.

    PEoiu7C.png

    So, once the Incense burner is lit, the action changes from 'Light' to 'Re-light'. But still, I'm looking to select the burner that is furthest from me, after lighting the first one.

    Link to comment
    Share on other sites

    I mean, you could access the second one after the first by saying;

     

    getGameObjects().closest(g -> g != null && g.distance(getLocalPlayer()) > 2 && g.getName().equals("Incense burner")).interact("Re-light");

     

    It'll filter out the closer one because you'll be standing by it.

    Link to comment
    Share on other sites

    • 5 years later...
    • 2 weeks later...

    Could also use the Tile each one is on as a reference, they're both stationary so I'd imagine the Tile wouldn't change unless the POH owner moved the rooms around, correct? This way it doesn't matter where you're standing, you'll have the one you're looking for every time.

    Link to comment
    Share on other sites

    1 hour ago, Tier3 said:

    they're both stationary so I'd imagine the Tile wouldn't change unless the POH owner moved the rooms around, correct?

    no POHs are instances they will have different cords in every house

    Link to comment
    Share on other sites

    Does it change each time you enter/leave? Or the owner logs? I'd imagine per session they stay the same, right? So don't make them a constant, but rather grab the tile in the beginning of the script, and they should stay the same throughout the time the script is run

    Link to comment
    Share on other sites

    6 hours ago, Tier3 said:

    Does it change each time you enter/leave? Or the owner logs? I'd imagine per session they stay the same, right? So don't make them a constant, but rather grab the tile in the beginning of the script, and they should stay the same throughout the time the script is run

    idk why you even need the tile in the first place just get the gameobject :o

    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
    ×
    ×
    • 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.