Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • [FREE] Al Kharid Bronze Bar Smelter


    Before

    Recommended Posts

    I used this script privately (as with my other scripts), but I haven't used it recently so I've decided to release it. Depending on the price of copper/tin ore, this can be upwards to 60k /hr in f2p (except not right now, WHAT THE FUCK IS UP with this tin ore!??).

     

    Anyways, here it is:

     

    Source code:

     

    package main;
    
    
            import org.dreambot.api.methods.input.Keyboard;
            import org.dreambot.api.methods.map.Area;
            import org.dreambot.api.methods.widget.Widget;
            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.Menu;
            import org.dreambot.api.wrappers.widgets.WidgetChild;
    
            import java.lang.reflect.Type;
            import java.util.Random;
    
    @ScriptManifest(category = Category.SMITHING, name = "Bronze Bar Smelter", author = "B4", version = 1.14)
    public class Main extends AbstractScript
    {
        Area smeltHouse = new Area(3274, 3187, 3278, 3185, 0);
        Area bank = new Area(3269, 3169, 3269, 3165, 0);
        boolean isSmelting = false;
        Random randGen = new Random();
    
        @Override
        public int onLoop()
        {
            if (getDialogues().canContinue())//if you leveled up, get dat shit outta here
            {
                if(getDialogues().continueDialogue())
                {
                    sleepUntil(() -> !getDialogues().canContinue(), 3000);
                }
            }
    
            if (getInventory().containsAll("Tin ore", "Copper ore") && isSmelting == false)
            {
                if (!smeltHouse.contains(getLocalPlayer()))
                {
                    walkies(smeltHouse);
                }
    
                smeltBars();
            }
            else if (isSmelting == false)
            {
                if (!bank.contains(getLocalPlayer()))
                {
                    walkies(bank);
                }
                goBank();
            }
    
            return randGen.nextInt(200) + 400;
        }
    
    
        public void walkies(Area e)
        {
            if (getWalking().walk(e.getRandomTile()))
            {
                sleep(randGen.nextInt(1000) + 1500);
            }
        }
    
        public void goBank()
        {
            if (getBank().isOpen())
            {
                if (getBank().contains("Tin ore") && getBank().contains("Copper ore"))
                {
                    sleep(randGen.nextInt(100)+400);
                    getBank().withdraw("Tin ore", 14);
                    sleep(randGen.nextInt(100)+300);
                    getBank().withdraw("Copper ore", 14);
                    sleep(randGen.nextInt(100));
                    getBank().close();
                }
                else
                {
                    sleep (383883838);//terminate the script
                }
            }
            else
            {
                GameObject bankBooth = getGameObjects().closest("Bank booth");
                getMouse().move(bankBooth.getClickablePoint());
                sleep(randGen.nextInt(100)+30);
                getMouse().click(false);//click on the bank
                sleep(randGen.nextInt(300)+100);
                sleepUntil(() -> getBank().isOpen(), randGen.nextInt(2000)+8000);
                getBank().depositAllItems();
            }
        }
    
        public void smeltBars()
        {
            GameObject furnace = getGameObjects().closest("Furnace");
            getMouse().move(furnace.getClickablePoint());
            sleep(randGen.nextInt(100)+100);
            getMouse().click(false);
            sleep(randGen.nextInt(200)+2000);
            isSmelting = true;
            WidgetChild furnaceWidget = getWidgets().getChildWidget(311, 16);
            if (furnaceWidget != null)//this shit is messy AF, just remember this was my first script and the fucking widgets weren't working
            {
                getMouse().move(furnaceWidget.getRectangle());
                sleep(randGen.nextInt(100)+100);
                getMouse().click(true);
                sleep(randGen.nextInt(100)+100);
                getClient().getMenu().clickIndex(3);
                sleep(randGen.nextInt(100)+600);
                getKeyboard().type("33");
                sleepUntil(() -> !getInventory().containsAll("Tin ore", "Copper ore"), 50000);//sleepUntil(() ->
                log("Done smithin.");
            }
            isSmelting = false;
        }
    }
    
    

     

     

     

    Script download: http://upx.nz/waT562

    (it won't let me attach at the bottom of the thread :L)

     

    Virus scan: https://www.virustotal.com/en/file/af8493b5af0682136d711df564c90799c93cc045c3ceb53b50537815af0cf326/analysis/1462916746/


    edit: This was my first script. A lot of that shit is disgusting as hell, but it works.

    edit2: fixed download

    Link to comment
    Share on other sites

    • 2 months later...

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.