Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.quirlion.script.*;
- public class TestBank extends Script {
- private final java.util.Random random = new java.util.Random();
- public static String scriptDescription = "<html><i>Bank Test</i><br><br>"
- + "Test Subject #1</html>";
- @Override
- public int loop() {
- if (needtobank()){
- return random(200,500);
- }
- return 0;
- }
- public boolean needtobank(){
- if (inventory.getCount()!=0){
- if (players.getCurrent().getLocation()!=npcs.getNearestByID(7605).getLocation()){
- players.getCurrent().walkTileMM(npcs.getNearestByID(7605).getLocation());
- Input.wait(random(200,500));
- }
- }
- for (int i=0;i<npcs.getNearestByID(7605).getActions().length; i++){
- log(npcs.getNearestByID(7605).getActions()[i]);
- }
- try {
- npcs.getNearestByID(7605).click("Bank Banker"); } catch (Exception e){log(""+e);}
- Input.wait(random(700,900));
- bank.close();
- isStopped=true;
- return true;
- }
- public int random(final int min, final int max) {
- final int n = Math.abs(max - min);
- return Math.min(min, max) + (n == 0 ? 0 : random.nextInt(n));
- }
- }
Add Comment
Please, Sign In to add comment