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
  • DreamBot Script Skeleton


    Vlad

    Recommended Posts

    Posted

    Feel free to suggest anything I could add on to this and I'll add it. ^_^

    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.utilities.Timer;
    
    import java.awt.*;
    
    @ScriptManifest(name = "", author = "", description = "", version = 1, category = Category.MISC)
    public class Skeleton extends AbstractScript {
    
    	private Timer t = new Timer();
    
    	@Override
    	public void onStart() {
    
    	}
    
    	@Override
    	public int onLoop() {
    
    		if (!getClient().isLoggedIn()) {
    			return 600;
    		}
    
    		return Calculations.random(300, 600);
    	}
    
    	@Override
    	public void onExit() {
    
    	}
    
    	public void onPaint(Graphics2D g) {
    		g.setColor(Color.WHITE);
    		g.setFont(new Font("Arial", 1, 11));
    		g.drawString("Time Running: " + t.formatTime(), 25, 50);
    	}
    }
    
    Posted

    Feel free to suggest anything I could add on to this and I'll add it. ^_^

     

    t.formatTime(t.elapsed())
    
    According to the docs formatTime is static.

    public static java.lang.String formatTime(long timeMilliseconds)

    Posted

    According to the docs formatTime is static.

    public static java.lang.String formatTime(long timeMilliseconds)

     

    You are right, it's fixed now. I made this before I had access to the docs. :P

    Posted

    You are right, it's fixed now. I made this before I had access to the docs. :P

    And according to the docs, Arial is not a font. You must use comic sans
    Posted

    And according to the docs, Arial is not a font. You must use comic sans

     

    :troll:

    Posted

    How do I get the jar?

    Posted

    How do I get the jar?

     

    It's not released yet. I made this from all the snippets they've been posting around. :P

    Posted

    pls add more cmments. whats onstart{} ()? QQ

    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.