Studentcoder 0 Share Posted June 9, 2016 Hey guys, so currently I have these line of codes in my script to detect iron ore rocks and mine them, and then wait till they appear in the inventory https://gyazo.com/a0d65b1beca8d958ce9edd5d4a22b670 the problem is that it click the rock even when it is depleted. What can I change to make it only click the rock when it's not depleted? (Color is brown when it has iron ore, when depleted its gray) also, is there a way in which i can make it left click on the iron ore instead of right click -> option mine? I tried iron.click() but it didn't accept that Link to comment Share on other sites More sharing options...
Impensus 5 Share Posted June 9, 2016 public boolean interactForceLeft(java.lang.String action) Now I do not code Java at all or use the API but at a quick look this can be used to force left click with an ingame object such as ores. public int[] getModelIds() Also this could be used to check if the ore is depleted as the ID should change between the depleted or none depleted. This can be used to only click when the ID is the non depleted version. Like I said I could be wrong but give it a go it does no harm Link to comment Share on other sites More sharing options...
Dreamlicker 749 Share Posted June 9, 2016 The ID of the rock changes, as well as it being a completely new object. You can use both of those pieces of knowledge to fix it Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.