Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import com.rsbuddy.event.listeners.PaintListener;
- import com.rsbuddy.script.ActiveScript;
- import com.rsbuddy.script.Manifest;
- import com.rsbuddy.script.methods.Bank;
- import com.rsbuddy.script.methods.Camera;
- import com.rsbuddy.script.methods.Environment;
- import com.rsbuddy.script.methods.Inventory;
- import com.rsbuddy.script.methods.Magic;
- import com.rsbuddy.script.methods.Mouse;
- import com.rsbuddy.script.methods.Skills;
- import com.rsbuddy.script.util.Random;
- import com.rsbuddy.script.util.Timer;
- import java.text.NumberFormat;
- @Manifest(authors={"Remi"}, name="RHumidify", keywords={"magic, humidify, clay, money, making, remi"}, version=1, description="Start at any bank or chest.")
- public class RHumidify extends ActiveScript implements PaintListener {
- private long startXP;
- private int startLevel;
- private long startTime;
- private long seconds = 0, minutes = 0, hours = 0;
- long runTime = System.currentTimeMillis() - startTime;
- final Font comicPlain10 = new Font("Comic Sans MS", Font.PLAIN, 10);
- final Color black = new Color(0, 0, 0);
- private void idle() {
- if (Random.nextInt(0, 500) == 0) {
- Mouse.setSpeed(10);
- int rand2 = Random.nextInt(1, 3);
- for (int i = 0; i < rand2; i++) {
- Mouse.move(Random.nextInt(100, 700), Random.nextInt(100, 500));
- sleep(Random.nextInt(200, 700));
- }
- Mouse.move(Random.nextInt(0, 800), 647, 50, 100);
- sleep(Random.nextInt(100, 1500));
- Mouse.move(Random.nextInt(75, 400), Random.nextInt(75, 400), 30);
- Mouse.setSpeed(Random.nextInt(3, 5));
- }
- if (Random.nextInt(0, 500) == 0) {
- Mouse.setSpeed(10);
- Point curPos = Mouse.getLocation();
- Mouse.move(Random.nextInt(0, 750), Random.nextInt(0, 500), 20);
- sleep(Random.nextInt(100, 300));
- Mouse.move(curPos, 20, 20);
- Mouse.setSpeed(Random.nextInt(3, 5));
- }
- if (Random.nextInt(0, 500) == 0) {
- int angle = Camera.getCompassAngle();
- int rand = Random.nextInt(0, 40);
- if (Random.nextInt(0, 2) == 0) {
- angle += rand;
- } else {
- angle -= rand;
- }
- if (angle < 0) {
- angle += 359;
- }
- if (angle > 359) {
- angle -= 359;
- }
- Camera.setCompassAngle(angle);
- }
- if (Random.nextInt(0, 500) == 0) {
- if (Random.nextInt(0, 4) == 0) {
- Camera.setPitch(Random.nextInt(50, 80));
- } else {
- Camera.setPitch(true);
- }
- }
- }
- @Override
- public int loop() {
- if (Inventory.contains(434)) {
- humidify();
- } else
- if (Inventory.contains(1761)) {
- bank();
- } else
- if (Inventory.contains(9075) && !Inventory.contains(434) && !Inventory.contains(1761)) {
- bank();
- }
- return 500;
- }
- public void humidify() {
- if (Inventory.isFull() && Inventory.contains(434)) {
- } else {
- bank();
- }
- }
- private void bank() {
- Bank.open();
- sleep(300, 600);
- Bank.depositAllExcept(9075);
- Bank.withdraw(434, 27);
- Bank.close();
- }
- @Override
- public boolean onStart() {
- idle();
- Mouse.setSpeed(1);
- t = new Timer(0);
- startTime = System.currentTimeMillis();
- startXP = Skills.getCurrentExp(Skills.MAGIC);
- startLevel = Skills.getMaxLevel(Skills.MAGIC);
- return true;
- }
- @Override
- public void onFinish() {
- Environment.saveScreenshot(true);
- }
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D)g1;
- seconds = runTime / 1000;
- if (seconds >= 60) {
- minutes = seconds / 60;
- seconds -= (minutes * 60);
- }
- if (minutes >= 60) {
- hours = minutes / 60;
- minutes -= (hours * 60);
- }
- int levelGain = (Skills.getMaxLevel(Skills.MAGIC) - startLevel);
- int expGain = (int)(Skills.getCurrentExp(Skills.MAGIC) - startXP);
- g.drawString("lol", 30, 30);
- }
- }
Add Comment
Please, Sign In to add comment