Burner Bot 0 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.
Noidlox 11 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]
Genius 50 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. 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.
Burner Bot 0 Author 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.
Xephy 237 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.
bardone99 0 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.
Tier3 9 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.
camelCase 323 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
Tier3 9 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
camelCase 323 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.