Pro Posted April 1, 2015 Posted April 1, 2015 (edited) I've been working on a crafting bot for a few hours now and I can't seem to get interacting with the interfaces quite down. Basically I want the bot to select "Make-X" ruby amulets in the interface but I don't know how to get it to do that. Any and all help will be appreciated! Thanks! This is about as close as I've gotten: interfaces.interactWithChild(446, 35, "Make-X"); Unfortunately interfaces is deprecated here.. Edited April 1, 2015 by Pro
FrostBug Posted April 1, 2015 Posted April 1, 2015 1. Use widgets instead of interfaces 2. Make sure you've got the right widget hiearchy of IDs. If it's a grandchild widget, the IDs would go parentID -> childID -> grandchildID 3. Make sure your action string is an exact match with the ingame action 1
Pro Posted April 1, 2015 Author Posted April 1, 2015 Thanks for the response! What are widgets? I'm not familiar with them, could you explain?
Khaleesi Posted April 1, 2015 Posted April 1, 2015 Use RS2Widget instead of interfaces Almost the same, RS2Widget can be a parent, child or grandchild.
FrostBug Posted April 1, 2015 Posted April 1, 2015 Thanks for the response! What are widgets? I'm not familiar with them, could you explain? Like khal said, it's basically the same. http://osbot.org/api/org/osbot/rs07/api/Widgets.html http://osbot.org/api/org/osbot/rs07/api/ui/RS2Widget.html
Pro Posted April 1, 2015 Author Posted April 1, 2015 Awesome, thanks guys. I've put my developing on hold for tonight since its 4 am but I'll take another crack at it in the morning and let you know how it goes!
Apaec Posted April 1, 2015 Posted April 1, 2015 RS2Widget w = widgets.get(parentid,childid); if (w != null && w.exists()) w.interact("action"); 1