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
  • Try asking for help in the chatbox
  • DreamBot v3.6.8


    Pandemic
     Share

    Recommended Posts

    Hello everyone!

    A new version of DreamBot is now live!

    Changes:

    • Clan tab fixed
    • Clan#joinChat/leaveChat fixed
    • Entity interactions will now close any open interfaces if it fails once
    • Won't show an account warning if logged out when selecting a script

    Always remember, to be on the latest version of our client you must run DBLauncher.jar! The client does NOT update itself!

    Thanks,

    The Dream Team

    Link to comment
    Share on other sites

    What the hell with widgets!

    I am new at this.
    with this update my script has stopped

    It turns out that my script goes to a player's house, and inside, it interacts with the nexus portal and then writes the letter to the place where to teleport, and since the teleport is to the wild, accept the danger of going to the wild.

    Well now when you open the nexus teleport menu, it automatically closes the widget.

    case Teleport:
    			WorldHopper.openWorldHopper();
                sleepUntil(() -> {
                return WorldHopper.isWorldHopperOpen();
                    }, 3000);
                GameObject NEXUS = (GameObject)GameObjects.closest(new String[]{"Portal Nexus"});
            	WidgetChild NEXUS2 = Widgets.getWidgetChild(new int[]{17,1,1});
                if (NEXUS != null) {
                	sleep(Calculations.random(1500, 2000));
                    NEXUS.interact("Teleport Menu");
                    
                }
                if (NEXUS2.isVisible()) {
                	Keyboard.type(this.YAnnakarl);
                    sleep(Calculations.random(1500, 2000));
                    Mouse.setAlwaysHop(true);
                    Mouse.move(this.Enter);
                    Mouse.click();
                    Mouse.move(this.MundoHopeo);
                    Mouse.click();
                    Mouse.setAlwaysHop(false);
                }
            
    			break; 

     

     

     

    Link to comment
    Share on other sites

    54 minutes ago, Kefaros said:

    What the hell with widgets!

    I am new at this.
    with this update my script has stopped

    It turns out that my script goes to a player's house, and inside, it interacts with the nexus portal and then writes the letter to the place where to teleport, and since the teleport is to the wild, accept the danger of going to the wild.

    Well now when you open the nexus teleport menu, it automatically closes the widget.

    case Teleport:
    			WorldHopper.openWorldHopper();
                sleepUntil(() -> {
                return WorldHopper.isWorldHopperOpen();
                    }, 3000);
                GameObject NEXUS = (GameObject)GameObjects.closest(new String[]{"Portal Nexus"});
            	WidgetChild NEXUS2 = Widgets.getWidgetChild(new int[]{17,1,1});
                if (NEXUS != null) {
                	sleep(Calculations.random(1500, 2000));
                    NEXUS.interact("Teleport Menu");
                    
                }
                if (NEXUS2.isVisible()) {
                	Keyboard.type(this.YAnnakarl);
                    sleep(Calculations.random(1500, 2000));
                    Mouse.setAlwaysHop(true);
                    Mouse.move(this.Enter);
                    Mouse.click();
                    Mouse.move(this.MundoHopeo);
                    Mouse.click();
                    Mouse.setAlwaysHop(false);
                }
            
    			break; 

     

     

     

    Hmm, the only way it would close an open interface is if it failed to interact with an entity (npc, player, gameobject).

    You might need to change your script's logic, as it looks like it will interact with that portal then instantly check if the interface is open (which it isn't), then on the next loop it would try to interact with the portal again, but since that interface is now blocking the screen it'll close it and click on it. If I were you I would change this line:

     if (NEXUS != null) {

    to this to make sure it doesn't try to interact if the interface is already open:

     if (NEXUS != null && !NEXUS2.isVisible()) {

     

    Link to comment
    Share on other sites

    Friend I have hours trying and I can't, can you help me? In this case, I am inside the player's house, and I want him to click on the nexus portal and when opening the menu press the "Annakarl" key that I enter as a user, then the warning will appear that he is going to the wilderness and clicks on the button to go. I changed the code, but I'm too noob.

    Try and keep closing the widget, before the update it was working fine for me.

    case Teleport:
    			WidgetChild MenuNexus = Widgets.getWidgetChild(new int[]{17,1,1});			
                GameObject PortalNexus = (GameObject)GameObjects.closest((c) -> {
                    return c != null && c.getID() == 33410;
                });
                PortalNexus.interact("Teleport Menu");
                sleep(Calculations.random(1000, 2000));       
                
                if (MenuNexus.isVisible() && !PortalNexus.isOnScreen()) {                                           
                Keyboard.type(Annakarl);
                sleep(Calculations.random(1500, 2000));
                Mouse.setAlwaysHop(true);
                Mouse.move(this.Enter);//Point in screen
                Mouse.click();     
                Mouse.setAlwaysHop(false);
                }               
                
            
    			break; 

     

     

    Link to comment
    Share on other sites

    12 hours ago, Kefaros said:

    Friend I have hours trying and I can't, can you help me? In this case, I am inside the player's house, and I want him to click on the nexus portal and when opening the menu press the "Annakarl" key that I enter as a user, then the warning will appear that he is going to the wilderness and clicks on the button to go. I changed the code, but I'm too noob.

    Try and keep closing the widget, before the update it was working fine for me.

    
    case Teleport:
    			WidgetChild MenuNexus = Widgets.getWidgetChild(new int[]{17,1,1});			
                GameObject PortalNexus = (GameObject)GameObjects.closest((c) -> {
                    return c != null && c.getID() == 33410;
                });
                PortalNexus.interact("Teleport Menu");
                sleep(Calculations.random(1000, 2000));       
                
                if (MenuNexus.isVisible() && !PortalNexus.isOnScreen()) {                                           
                Keyboard.type(Annakarl);
                sleep(Calculations.random(1500, 2000));
                Mouse.setAlwaysHop(true);
                Mouse.move(this.Enter);//Point in screen
                Mouse.click();     
                Mouse.setAlwaysHop(false);
                }               
                
            
    			break; 

     

     

    Before the update it may have worked, but it would have mouse issues I'm guessing as it tried to click the portal again after the interface was open 😮

    Try this instead, I think the issue is you're getting the widget before it's actually open which sometimes doesn't work, also I'm not sure if you're sleeping long enough:

    case Teleport:
        WidgetChild MenuNexus = Widgets.getWidgetChild(17, 1, 1);
    
        if (MenuNexus == null || !MenuNexus.isVisible()) { // If the interface isn't open yet
            GameObject PortalNexus = GameObjects.closest(33410); // No need for a filter if you're just using ID or name
            PortalNexus.interact("Teleport Menu");
            // This sleepUntil will wait up to 15 seconds (15,000ms) for the interface to show up
            sleepUntil(() -> Widgets.getWidgetChild(17, 1, 1) != null && Widgets.getWidgetChild(17, 1, 1).isVisible(), 15_000, 750);
        }
    
        MenuNexus = Widgets.getWidgetChild(17, 1, 1); // Get the interface again as it might not have existed before
    
        if (MenuNexus != null && MenuNexus.isVisible()) {
            Keyboard.type(Annakarl);
            sleep(Calculations.random(1500, 2000));
            Mouse.setAlwaysHop(true);
            Mouse.move(this.Enter);//Point in screen
            Mouse.click();
            Mouse.setAlwaysHop(false);
        }
        break; 

     

    Link to comment
    Share on other sites

    It continues the same, with the code that you tell me it does exactly the same, it opens and closes the widget.

    It will have to do with the State getState () when the player is in the house it has two conditions, which depend on the Run Energy

    In the first one he takes water from the ornate pool to restore running energy, and in the second is where he must teleport.

    if (house.contains(getLocalPlayer()) && Walking.getRunEnergy() < 90)
    			return State.Drinkpool;
    		
    		if (house.contains(getLocalPlayer()) && Walking.getRunEnergy() > 90)
    			return State.Teleport;		

    Although with those conditions it worked previously.

     

    Link to comment
    Share on other sites

    1 minute ago, Kefaros said:

    It continues the same, with the code that you tell me it does exactly the same, it opens and closes the widget.

    It will have to do with the State getState () when the player is in the house it has two conditions, which depend on the Run Energy

    In the first one he takes water from the ornate pool to restore running energy, and in the second is where he must teleport.

    
    if (house.contains(getLocalPlayer()) && Walking.getRunEnergy() < 90)
    			return State.Drinkpool;
    		
    		if (house.contains(getLocalPlayer()) && Walking.getRunEnergy() > 90)
    			return State.Teleport;		

    Although with those conditions it worked previously.

     

    Then it must be trying to interact somewhere else, maybe try logging each interact and see where it's interacting where it shouldn't be.

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • 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.