Honeycomb Posted June 3, 2013 Share Posted June 3, 2013 What's a good method for avoiding Exploding rocks? Link to comment Share on other sites More sharing options...
Kati2 Posted June 3, 2013 Share Posted June 3, 2013 Does it turn into an NPC? Or does it giveout an animation? Link to comment Share on other sites More sharing options...
Articron Posted June 3, 2013 Share Posted June 3, 2013 your rock id changes, make a constant check on what your player is interacting with. Link to comment Share on other sites More sharing options...
Honeycomb Posted June 3, 2013 Author Share Posted June 3, 2013 Does it turn into an NPC? Or does it giveout an animation? I believe it has an animation, and I've noticed that it has a verticeCount > 128 (due to the added animation), while regular rocks have a verticeCount < 128, so I tried while (client.getMyPlayer().isAnimating()) { if (closestRock.getModel().getVerticeCount() > 128) { walkMiniMap(new Position(client.getMyPlayer().getPosition().getX() + random(-1, 1), client.getMyPlayer().getPosition().getY() + random(-1, 1), 0)); this.MRT = random(2048, 4096); sleep(this.MRT); } } , but it isn't working... your rock id changes, make a constant check on what your player is interacting with. Can you point me to the method that allows me to get the object that my character is interacting with? Link to comment Share on other sites More sharing options...
Velocity Posted June 4, 2013 Share Posted June 4, 2013 It turns into an NPC. See the rock's name change to yellow as if you hover an NPC. Link to comment Share on other sites More sharing options...
Wizard Posted June 4, 2013 Share Posted June 4, 2013 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); } } } Cheap method i use Link to comment Share on other sites More sharing options...
TheSaint Posted June 4, 2013 Share Posted June 4, 2013 (edited) As an example, when I successfully click on a tree and begin cutting, I set a global RS2Object named currentTree to the tree I just cut. Then I have it constantly check to see if the ID changes. When a tree turns into an ent my script changes to a different tree (automatic), or if there is none, walks away to stop cutting (extra method). I imagine you could do the same with exploding rock. Edited June 4, 2013 by TheSaint Link to comment Share on other sites More sharing options...