Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.util.*;
- import org.rsbot.bot.Bot;
- import org.rsbot.script.*;
- import org.rsbot.script.wrappers.*;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.event.listeners.ServerMessageListener;
- import org.rsbot.event.events.ServerMessageEvent;
- import java.util.logging.*;
- import java.io.*;
- @ScriptManifest(authors = { "IDominateAll", "XScripting Inc" }, category = "Money Making", name = "ClaySoftener", version = 1.0, description = "Start in Varrock east bank with buckets and clay visible in bank.")
- public class ClaySoftener extends Script implements PaintListener {
- //---------------------------------------------------//
- public int bankID = 11402;
- //---------------------------------------------------//
- public int SoftClayID = 1761;
- //---------------------------------------------------//
- public int ClayID = 434;
- //---------------------------------------------------//
- public int EmptyBucketID = 1925;
- //---------------------------------------------------//
- public int bucketWaterID = 1929;
- //---------------------------------------------------//
- public long startTime = System.currentTimeMillis();
- //---------------------------------------------------//
- public boolean onStart() {
- startTime = System.currentTimeMillis();
- }
- public void onRepaint(Graphics g) {
- if (isLoggedIn()) {
- long millis = System.currentTimeMillis() - startTime;
- long hours = millis / (1000 * 60 * 60);
- millis -= hours * (1000 * 60 * 60);
- long minutes = millis / (1000 * 60);
- millis -= minutes * (1000 * 60);
- long seconds = millis / 1000;
- long minutes2 = minutes + (hours * 60);
- g.setColor(Color.red);
- g.drawString("Time running: " + hours + ":" + minutes + ":"
- + seconds + "." , 9, 315);
- g.drawString("Status : " + status , 9, 299);
- g.drawString(" " , 9, 327);
- }
- }
- public void Bank() {
- status = "Banking";
- getNearestObjectByID(bankID);
- atObject(bankID, "use-quickly");
- wait(random(700, 900));
- if (bank.isOpen()) {
- bank.depostAll;
- if (getInventoryCount(ClayID, bucketWaterID) == 0) {
- WithDraw();
- }
- wait(random(500, 700));
- }
- }
- public void Withdraw() {
- status = "Withdrawing";
- if (getInventoryCount(ClayID, bucketWaterID) == 0) {
- if (bank.isOpen()) {
- getNearestObjectByID(bankID);
- atObject(bankID, "use-quickly");
- bank.withdraw(bucketWaterID, 14);
- && bank.withdraw(ClayID, 14);
- wait(1000);
- bank.close();
- }
- }
- }
- public void Soften() {
- status = "Softening Clay";
- if(getInventoryCount(ClayID) == 14) {
- && if(getInventoryCount(bucketWaterID) == 14);
- atInventoryItem(bucketWaterID, "Use");
- atInventoryItem(ClayID, "Use");
- if(getMenuActions().contains("Make All")) {
- atMenu("Make All");
- wait(random(5000,6000));
- }
- }
- }
- public int loop() {
- if(getInventoryCount(SoftClayID) == 14) {
- && if(getInventoryCount(EmptyBucketID) == 14);
- return Bank;
- }
- if (getInventoryCount(ClayID, bucketWaterID) == 0) {
- return Withdraw;
- }
- }
- if(getInventoryCount(ClayID) == 14) {
- && if(getInventoryCount(bucketWaterID) == 14);
- return Soften;
- }
- }
Add Comment
Please, Sign In to add comment