Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AutoMiner extends Script {
- int sleepAt = 90;
- int[] rockStart = new int[]{75, 544};
- int mineRadius = 20;
- int[] bankArea = new int[]{100, 512};
- public AutoMiner(Extension e) {
- super(e);
- }
- public void init(String params) {
- if(!params.equals(""))
- sleepAt = Integer.parseInt(params);
- }
- public int main() {
- System.out.println(getInventoryCount() + " : inventory slots are used up ");
- int i = 0;
- if(getFatigue() > sleepAt) {
- useSleepingBag();
- return 1000;
- }
- if(isBanking()) {
- if(getInventoryCount() != 30) {
- deposit(141, 28);
- closeBank();
- return 4000;
- }else{
- }
- if(getInventoryCount() != 2) {
- closeBank();
- }
- return 4000;
- }
- if(questOptionCount() != 0) {
- answer(0);
- return 4000;
- }
- if(getInventoryCount() != 30) {
- int[] rock = getObjectById(new int[]{102, 103});
- if( rock[0] != -1 ) {
- atObject(rock[1], rock[2]);
- }
- return 1000;
- }
- if(getInventoryCount()!= 20) {
- walkTo(75, 532);
- }
- if(distanceTo(bankArea[0], bankArea[1]) < 10) {
- int banker[] = getNpcById(95);
- if(banker[0] != -1)
- talkToNpc(banker[0]);
- return 3000;
- } else
- walkTo(bankArea[0], bankArea[1]);
- return random(3000, 4000);
- }
- }
Add Comment
Please, Sign In to add comment