Guest Apogee Posted April 11, 2014 Share Posted April 11, 2014 I want the script to detect Tin and Copper rocks. I would do it easily by name, but the name and interaction options stay the same when it is already mined. I noticed that the object ID changes when it is mined, so i thought it would be easier to tell the script to mine only certain ID's (of rocks that are not mined.)I had : final String TIN_ID = "Tin"; Would i change it to: final int TIN_ID = "1234, 1234, 1234, 1234";? or final int TIN_ID[] = "1234, 1234, 1234, 1234";? Do i need an array for this? Or am i entirely wrong?Also, if i need to use an array, how would i set that up? final int array TIN_ID = "1234, 1234, 1234, 1234," Sorry for all of the questions. I'm looking to help the community out by starting small and learning as effectively as i can. Thanks Link to comment Share on other sites More sharing options...
KMJT Posted April 11, 2014 Share Posted April 11, 2014 (edited) final int[] TIN_IDS = {1234, 1234, 1234, 1234}; Edited April 11, 2014 by KMJT Link to comment Share on other sites More sharing options...
Guest Apogee Posted April 11, 2014 Share Posted April 11, 2014 final int[] TIN_IDS = {1234, 1234, 1234, 1234}; Perfect, Thank you! Another question, If the ID changes from those to something else, (assuming the ID's for a steaming rock are different than the un-mined rocks), then how do i make the script stop mining the rock? Link to comment Share on other sites More sharing options...
YinZ Posted April 11, 2014 Share Posted April 11, 2014 RS2Object rock = closestObjectForName("rock"); if(rock != null) { if(rock.interact("mine") { RS2Object temp = closestObjectForName("rock"); //basically scans if the closest object is the same object you interacted with while(rock == temp && rock.exists()) { sleep(500); } } Something like that i believe Link to comment Share on other sites More sharing options...
Guest Apogee Posted April 11, 2014 Share Posted April 11, 2014 RS2Object rock = closestObjectForName("rock"); if(rock != null) { if(rock.interact("mine") { RS2Object temp = closestObjectForName("rock"); //basically scans if the closest object is the same object you interacted with while(rock == temp && rock.exists()) { sleep(500); } } Something like that i believe Sweet! Thanks Link to comment Share on other sites More sharing options...
Swizzbeat Posted April 11, 2014 Share Posted April 11, 2014 Rock ID's change, you're going to have to update this every week. Link to comment Share on other sites More sharing options...
Guest Apogee Posted April 11, 2014 Share Posted April 11, 2014 Rock ID's change, you're going to have to update this every week. What other ways can i do it? If i do it by name, i won't be able to differ the mined from the un-mined rocks. I don't mind updating it weekly if i have to. Link to comment Share on other sites More sharing options...
Swizzbeat Posted April 11, 2014 Share Posted April 11, 2014 (edited) What other ways can i do it? If i do it by name, i won't be able to differ the mined from the un-mined rocks. I don't mind updating it weekly if i have to. If you know the exact location of the rocks you're mining, you can just grab the rocks on those specific locations and store the ID. The rocks of course will have to be full of ore so it doesn't grab the ID of the mined rock. Edited April 11, 2014 by Swizzbeat Link to comment Share on other sites More sharing options...