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
  • So close to making my first script work! Need last bit of help pls!


    TheScripter

    Recommended Posts

    So i almost got my pump Furnace bot working just need some help tweaking the timer or walking method. Not sure which is causing the problem. i have the bot clicking the furnace and then clicking on emotes, however it doesn't doesn't reset after the timer has ended( moving away towards the area ). heres what I currently have,

     

    import org.dreambot.api.methods.emotes.Emote;
    import org.dreambot.api.methods.map.Area;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.utilities.Timer;
    
    
    
    @ScriptManifest(category = Category.COMBAT, name = "UltimateXp", author = "TheScripter", version = 0.01)
    public class Main extends AbstractScript {
    
    
        Timer timer = new Timer(10000);
        private long hour = 10000;
        Area resetArea = new Area(1951, 4962, 1953, 4959, 0);
    
        @Override
        public void onStart(String... strings) {
            timer.formatTime(10000);
            timer.setRunTime(hour);
    
        }
    
        @Override
        public int onLoop() {
            {
                if (timer.remaining() == 0) {
                    getWalking().walk(resetArea.getCenter());
                    sleepUntil(() -> getLocalPlayer().isMoving(), 1000);
                    timer.reset();
                } else if (!getLocalPlayer().isAnimating() && timer.remaining() != 0) {
                    getGameObjects().closest("Pump").interact("Operate");
                } else if (getLocalPlayer().isAnimating() && timer.remaining() != 0) {
                    getEmotes().doEmote(Emote.BECKON);
                    sleepUntil(() -> timer.remaining() == 0, 2000);
                }
            }
    
            return 1000;
        }
    }
    Link to comment
    Share on other sites

    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.