Robby99 2 Share Posted January 20, 2018 Hello, I'm new to programming here so I'm still learning the API. I'm making a Rouge Den cooker for my first script. I'm pretty much done with it except for paint and GUI. One thing I don't know how to do better is the best way to use food on the fire. This is currently what I'm doing: getInventory().interact(typeOfFood, "Use"); Thread.sleep(200); getGameObjects().closest(26185).interact(); The problem is if someone is on top of the fire it can't use the food on fire. I'm guessing the fix would be to right click then select fire, but I'm not sure how to do that. Link to comment Share on other sites More sharing options...
Hashtag 8688 Share Posted January 20, 2018 https://dreambot.org/javadocs/org/dreambot/api/wrappers/items/Item.html#useOn-org.dreambot.api.wrappers.interactive.Entity- Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted January 20, 2018 Item#useOn(Entity e) Link to comment Share on other sites More sharing options...
Robby99 2 Author Share Posted January 20, 2018 I tried this earlier, but the script doesn't do anything. I got the syntax wrong or something. getInventory().get(typeOfFood).useOn(26185); Nvm I figured it out. I had to declare the entity. I'm still new to OOP and Java is all about OOP. Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted January 20, 2018 I tried this earlier, but the script doesn't do anything. I got the syntax wrong or something. getInventory().get(typeOfFood).useOn(26185); Nvm I figured it out. I had to declare the entity. I'm still new to OOP and Java is all about OOP. Yes, the value 26185 needs to be declared as an entity (object/npc/player). Good job on sussing it out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.