This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final RSObject Ore = objects.getNearest(oreID); //get the Object | |
if (Ore.interact("Mine")) { //Do the interaction, continue when it returns true | |
sleepWhile(new Condition() { | |
public boolean isTrue() { | |
return players.getMyPlayer().getAnimation() == -1; //The condition | |
} | |
}, Ore, 1000); //The targetObject and Threshold | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Version with no walking involved | |
private boolean sleepWhile(final Condition condition, final int Threshold) { | |
final int Irritations = Threshold / 25; | |
for (int i = 0; i < Irritations && condition.isTrue(); i++) { | |
if (game.getClientState() != 11) { | |
i = 0; | |
} | |
Methods.sleep(Methods.random(20, 30)); | |
} | |
return condition.isTrue(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Color; | |
import java.awt.Font; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Image; | |
import java.awt.Point; | |
import java.awt.Polygon; | |
import java.awt.Rectangle; | |
import java.awt.RenderingHints; | |
import java.awt.event.ActionEvent; |
NewerOlder