Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.dreambot.api.methods.container.impl.bank.BankLocation;
- import org.dreambot.api.methods.map.Tile;
- import org.dreambot.api.script.AbstractScript;
- import org.dreambot.api.script.Category;
- import org.dreambot.api.script.ScriptManifest;
- import org.dreambot.api.wrappers.interactive.GameObject;
- import org.dreambot.api.wrappers.widgets.WidgetChild;
- import java.awt.event.KeyEvent;
- @ScriptManifest(
- author = "ZeddyBoi",
- description = "Crafting",
- category = Category.CRAFTING,
- version = 0.1,
- name = "Gold Ammy Crafter"
- )
- public class Main extends AbstractScript {
- public static int AMULET_MOULD = 1595;
- public static int GOLD_BAR = 2357;
- private static final Tile FURNACE_TILE = new Tile(3109,3499);
- @Override
- public int onLoop() {
- if (getInventory().contains(GOLD_BAR)){
- if (FURNACE_TILE.distance() >7 ){
- getWalking().walk(FURNACE_TILE);
- sleep(4000);
- } else if (getInventory().isItemSelected()){
- getInventory().deselect();
- }else {
- WidgetChild makeAllWidg = getWidgets().getWidgetChild(446,34);
- if (makeAllWidg != null && makeAllWidg.isVisible()){
- makeAllWidg.interact();
- }
- GameObject Furnace = getGameObjects().closest("Furnace");
- if (Furnace != null){
- Furnace.interact("Smelt");
- }
- }
- } else if (getBank().isOpen()){
- if (getInventory().isFull()){
- getBank().depositAllExcept(AMULET_MOULD);
- } else if (getInventory().contains(AMULET_MOULD)){
- getBank().withdrawAll(GOLD_BAR);
- sleep(1000);
- getKeyboard().typeSpecialKey(KeyEvent.VK_ESCAPE);
- }else {
- getBank().withdraw(AMULET_MOULD);
- }
- } else {
- getBank().openClosest();
- sleep(4000);
- }
- return 1000;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement