Metallicblank 0 Share Posted September 27, 2015 I am trying to interact with an object in my inventory so that it will be right clicked and then the option selected. The problem is the when I use getInventory().interact("use for example") function it will not compile telling me there is no suitable method found. Is there a way to make IntelliJ recognize this method? Sorry I am very new to scripting. Link to comment Share on other sites More sharing options...
Nuclear Nezz 1996 Share Posted September 27, 2015 Make sure you're including the client.jar in your build path. You can find the client.jar in C:\users\username\dreambot\botdata Link to comment Share on other sites More sharing options...
Metallicblank 0 Author Share Posted September 27, 2015 It is there. Everything else is recognized except the .interact it doesn't even show up in the red text in IntelliJ like it has no idea what I am talking about. Mind if I PM the code and see if I did anything wrong? It isn't finished, but this is where I ran into the issue. Link to comment Share on other sites More sharing options...
lily 487 Share Posted September 27, 2015 (edited) Be sure you're specifying which item to interact with. You have written getInventory().interact("use for example") so idk if that's just a typo, but the proper code to interact with, say a Bronze bar would be: getInventory().interact("Bronze bar", "Use"); Basically you pass both the name (or ID iirc) of the inventory item, and then the action you wish to perform in the second string. Hopefully that works, but the error you're getting is strange, like nothing I've ever seen before. Edited September 27, 2015 by lily Metallicblank 1 Link to comment Share on other sites More sharing options...
Metallicblank 0 Author Share Posted September 27, 2015 lily you are brilliant thank you. I feel dumb now. Link to comment Share on other sites More sharing options...
lily 487 Share Posted September 27, 2015 lily you are brilliant thank you. I feel dumb now. No problem! Everyone makes silly mistakes, especially when coding, and especially when that person is me =p Link to comment Share on other sites More sharing options...
Metallicblank 0 Author Share Posted September 27, 2015 No problem! Everyone makes silly mistakes, especially when coding, and especially when that person is me =p =) I sent a PM to you if you wouldn't mind taking a look at it. Link to comment Share on other sites More sharing options...
Recommended Posts