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.