Burner Bot 0 Share Posted June 23, 2017 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 More sharing options...
Noidlox 11 Share Posted June 23, 2017 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 More sharing options...
Genius 49 Share Posted June 23, 2017 (edited) 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 June 23, 2017 by Genius Link to comment Share on other sites More sharing options...
Burner Bot 0 Author Share Posted June 23, 2017 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. 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 More sharing options...
Xephy 237 Share Posted June 24, 2017 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 More sharing options...
bardone99 0 Share Posted July 9, 2022 if you have a working lighting burner bots ill pay for w.e for it i need it so badly. please save me. Link to comment Share on other sites More sharing options...
Tier3 8 Share Posted July 19, 2022 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 More sharing options...
camelCase 236 Share Posted July 19, 2022 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 More sharing options...
Tier3 8 Share Posted July 19, 2022 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 More sharing options...
camelCase 236 Share Posted July 20, 2022 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now