Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.text.NumberFormat;
- import java.util.Locale;
- import java.awt.Color;
- import java.awt.Graphics;
- import xobot.script.wrappers.interactive.GameObject;
- import xobot.script.wrappers.interactive.Item;
- import xobot.script.wrappers.interactive.NPC;
- import xobot.script.methods.Widgets;
- import xobot.script.methods.input.KeyBoard;
- import xobot.script.methods.input.Mouse;
- import xobot.script.util.Time;
- import xobot.script.methods.Packets;
- import xobot.script.methods.tabs.Inventory;
- import xobot.script.methods.tabs.Skills;
- import xobot.script.methods.GameObjects;
- import xobot.script.methods.NPCs;
- import xobot.script.util.Timer;
- import xobot.script.Manifest;
- import xobot.client.callback.listeners.PaintListener;
- import xobot.script.ActiveScript;
- @Manifest(authors = { "Simmy" }, name = "LarderMaker", description = "Will make diffrent kind of larders in your own house!")
- public class OakLarderMaker extends ActiveScript implements PaintListener
- {
- private Timer timer;
- private int ConExp;
- public static int Count = 0;
- public static int LardersMade = 0;
- public boolean Sent = false;
- String status;
- public boolean onStart() {
- timer = new Timer();
- ConExp = Skills.CONSTRUCTION.getCurrentExp();
- status = "Loading Data..";
- return true;
- }
- public int loop() {
- //Add Variables Here
- //Back Dialog: 4882 || Means Pay Butler
- GameObject Empty = GameObjects.getNearest(15403);
- GameObject Made = GameObjects.getNearest(13566);
- Item OakPlank = Inventory.getItem(8778);
- Item Saw = Inventory.getItem(8794);
- Item Hammer = Inventory.getItem(2347);
- NPC Butler = NPCs.getNearest(4243);
- if (Saw != null & Hammer != null & OakPlank != null & Empty != null & Butler != null) {
- status = "Building The Larder!";
- Empty.interact("Build");
- Time.sleep(650, 850);
- Packets.sendAction(632, 8234, 0, 39601);
- Time.sleep(()-> Made != null , 1250);
- Sent = false;
- }
- if (Saw != null & Hammer != null & OakPlank != null & Made != null & Butler != null) {
- status = "Trying To Remove The Larder";
- Made.interact("Remove");
- Time.sleep(1700 , 1750);
- KeyBoard.typeWord("1", false);
- Time.sleep(1400 , 1750);
- LardersMade += 1;
- }
- if (Saw != null & Hammer != null & OakPlank == null & Butler != null & Widgets.getBackDialogId() == -1 || Widgets.getBackDialogId() == 2480 & Sent == false) {
- status = "Getting Banks From Plank!";
- Butler.interact("Fetch-from-bank");
- Time.sleep(() -> Widgets.getBackDialogId() == 2492, 1500);
- Packets.sendAction(315, 995, -1, 2495);
- Time.sleep(3500);
- KeyBoard.typeWord("24", 100, true);
- Time.sleep(3750);
- }
- if (Saw != null & Hammer != null & OakPlank == null & Butler == null & Made != null) {
- status = "Quickly Removing The Larder";
- Made.interact("Remove");
- Time.sleep(() -> Widgets.getBackDialogId() == 2459, 1000);
- KeyBoard.typeWord("1", false);
- Time.sleep(2750);
- LardersMade += 1;
- Sent = true;
- }
- if (Saw != null & Hammer != null & OakPlank == null & Butler == null & Made == null) {
- status = "We Are Waiting For The Butler!";
- Time.sleep(() -> Butler != null, 3500);
- }
- if (Saw != null & Hammer != null & OakPlank == null & Butler != null & Widgets.getBackDialogId() == 4882) {
- status = "Need To Pay The Butler!";
- Butler.interact("Talk-to");
- Time.sleep(2500);
- Packets.sendAction(679, 317, -17, 4886);
- Time.sleep(2500);
- KeyBoard.typeWord("1", 200, false);
- Time.sleep(2500);
- Butler.interact("Talk-to");
- Time.sleep(2500);
- KeyBoard.typeWord(" ", 200, false);
- Time.sleep(2500);
- }
- return 1;
- }
- @Override
- public void repaint(final Graphics g) {
- final int lardersmade = (int)(LardersMade * 3600000.0 / this.timer.getElapsed());
- int ConExps = Skills.CONSTRUCTION.getCurrentExp() - ConExp;
- g.setColor(Color.white);
- g.drawString("Status: " + status, 15, 210);
- g.drawString("Runtime: " + this.timer.toElapsedString(), 15, 225);
- g.drawString("Larders Made: " + LardersMade, 15, 240);
- g.drawString("Larders(hr): " + NumberFormat.getNumberInstance(Locale.US).format(lardersmade), 15, 255);
- g.drawString("Construction Exp Gained: " + NumberFormat.getNumberInstance(Locale.US).format(ConExps), 15, 270);
- g.drawString("Larder Maker by Simmy", 15, 285);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement