Untitled
By: a guest | Mar 13th, 2010 | Syntax:
Java | Size: 1.10 KB | Hits: 79 | Expires: Never
import impsoft.bots.ColorBot;
import impsoft.scripting.ibot.builtin.itemrec.ItemSlot;
import impsoft.scripting.types.ColorScript;
import java.util.logging.Level;
import java.util.logging.Logger;
public class threadTest extends ColorScript {
public threadTest(ColorBot c) {
super(c);
}
public void script() throws InterruptedException, Exception {
eatThread.run();
while (true) {
sleep(1000);
}
}
Thread eatThread = new Thread() {
public void run() {
setPriority(MAX_PRIORITY);
setName("AutoEat");
while (true) {
try {
while (theMiniMapIndicators.getHealthPoints() < 80) {
ItemSlot foodName = theTabs.Inventory.findItemSlot("Tuna");
mouseClickLeft(foodName.getArea());
}
} catch (InterruptedException ex) {
Logger.getLogger(threadTest.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
};
}