BenjaminUC 0 Share Posted March 28, 2020 Hi, I'm quite new to the DreamBot API, however, I'm very experienced when it comes to Java. As my first project, I spent today creating a Tutorial Island Completer to get comfortable with the functionality the API provides. This project is now done and functioning. However, as I've come to learn, DreamBot only works when the game client is in fixed-static-size which is a bummer as new accounts when logged in, are in none-fixed-sized mode. Brand new accounts can't click the settings tab which is required to change it manually. This results in not being able to click the Gielinor Guide programmatically until the settings tab has been unlocked. My question is: Is there a way to programmatically set the client to fixed-static-size. Any interaction simply doesn't work otherwise. Link to comment Share on other sites More sharing options...
Zawy 838 Share Posted March 28, 2020 (edited) Look at random manager. I think it's something like: getRandomManager().enableSolver((RandomEvent.RESIZABLE_DISABLER); || RandomEvent.ZOOM_SOLVER It should already be enabled anyways Edited March 28, 2020 by Zawy yeeter 1 Link to comment Share on other sites More sharing options...
yeeter 490 Share Posted March 28, 2020 Disable the zoom solver at the start, and re-enable the solver once the account has clear the guide. @Leanche wrote some shit to make Dreambot work in resizable but not sure if it was ever published publicly. Link to comment Share on other sites More sharing options...
BenjaminUC 0 Author Share Posted March 28, 2020 6 minutes ago, Zawy said: Look at random manager. I think it's something like: getRandomManager().enableSolver((RandomEvent.RESIZABLE_DISABLER); || RandomEvent.ZOOM_SOLVER It should already be enabled anyways I'm aware of those, however, the RESIZABLE_DISABLER is based on clicking the settings tab which is not yet available and thus it doesn't work. 8 minutes ago, yeeter01 said: Disable the zoom solver at the start, and re-enable the solver once the account has clear the guide. @Leanche wrote some shit to make Dreambot work in resizable but not sure if it was ever published publicly. Tried with a brand new account. Doesn't work. Link to comment Share on other sites More sharing options...
yeeter 490 Share Posted March 28, 2020 2 minutes ago, BenjaminUC said: I'm aware of those, however, the RESIZABLE_DISABLER is based on clicking the settings tab which is not yet available and thus it doesn't work. Tried with a brand new account. Doesn't work. I am out of town atm, If you cant find the solution by tomorrow remind me and I'll check my account creator and see what I did again. BenjaminUC 1 Link to comment Share on other sites More sharing options...
AliasBots 12 Share Posted March 29, 2020 I'm feeling generous. Tut island is one of the hardest entry barriers into coding dreambot scripts IMO. You need to handle a lot of wonky stuff, but you learn a ton in doing so. NPC guide = bot.getNpcs().closest("Gielinor guide"); if(bot.getClientSettings().isResizableActive()) { Logger.info(bot, "Resizable mode is active, locating trainer."); if(guide != null) { Logger.info(bot,"Found guide, trying to click."); Point p = guide.getModel().calculateCenterPoint(); Rectangle GAME_SCREEN = new Rectangle(5, 5, 511, 333); Rectangle CANVAS = new Rectangle(0, 0, 765, 503); int heightAdjust = 80; int widthAdjust = -20; p.setLocation(p.getX() * (CANVAS.getWidth() / GAME_SCREEN.getWidth())+widthAdjust, p.getY() + (CANVAS.getHeight() / GAME_SCREEN.getHeight())+heightAdjust); bot.getMouse().hop(p); } if(bot.getClient().getMenu().contains("Talk-to")) { bot.getMouse().click(); FarmBot.sleepUntil(() -> bot.getDialogues().canContinue(), 10000); Logger.info(bot, "Successfully located trainer, navigating dialogue."); Do.continueDialogWithSpace(bot); if(bot.getDialogues().getOptions()!=null) { bot.getDialogues().chooseOption(Calculations.random(1,3)); } if(bot.getDialogues().canContinue()) { Do.continueDialogWithSpace(bot); } Logger.info("Unlocked options menu."); } } BenjaminUC, m4rr3co and k0ni 3 Link to comment Share on other sites More sharing options...
BenjaminUC 0 Author Share Posted March 29, 2020 14 hours ago, AliasBots said: I'm feeling generous. Tut island is one of the hardest entry barriers into coding dreambot scripts IMO. You need to handle a lot of wonky stuff, but you learn a ton in doing so. NPC guide = bot.getNpcs().closest("Gielinor guide"); if(bot.getClientSettings().isResizableActive()) { Logger.info(bot, "Resizable mode is active, locating trainer."); if(guide != null) { Logger.info(bot,"Found guide, trying to click."); Point p = guide.getModel().calculateCenterPoint(); Rectangle GAME_SCREEN = new Rectangle(5, 5, 511, 333); Rectangle CANVAS = new Rectangle(0, 0, 765, 503); int heightAdjust = 80; int widthAdjust = -20; p.setLocation(p.getX() * (CANVAS.getWidth() / GAME_SCREEN.getWidth())+widthAdjust, p.getY() + (CANVAS.getHeight() / GAME_SCREEN.getHeight())+heightAdjust); bot.getMouse().hop(p); } if(bot.getClient().getMenu().contains("Talk-to")) { bot.getMouse().click(); FarmBot.sleepUntil(() -> bot.getDialogues().canContinue(), 10000); Logger.info(bot, "Successfully located trainer, navigating dialogue."); Do.continueDialogWithSpace(bot); if(bot.getDialogues().getOptions()!=null) { bot.getDialogues().chooseOption(Calculations.random(1,3)); } if(bot.getDialogues().canContinue()) { Do.continueDialogWithSpace(bot); } Logger.info("Unlocked options menu."); } } Thanks - seems to work! I haven't written bot scripts before. I only just downloaded DreamBot yesterday and finished my tutorial island script which now works flawlessly thanks to your little "hack" 😀 Link to comment Share on other sites More sharing options...
AliasBots 12 Share Posted March 29, 2020 22 minutes ago, BenjaminUC said: Thanks - seems to work! I haven't written bot scripts before. I only just downloaded DreamBot yesterday and finished my tutorial island script which now works flawlessly thanks to your little "hack" 😀 Glad to hear it. I got that from somewhere else but I can't remember where. It's not perfect but it gets the job done. Link to comment Share on other sites More sharing options...
m4rr3co 67 Share Posted May 13, 2020 On 3/28/2020 at 4:31 PM, yeeter01 said: I am out of town atm, If you cant find the solution by tomorrow remind me and I'll check my account creator and see what I did again. Is this how you deal with it? VVV On 3/29/2020 at 12:00 AM, AliasBots said: I'm feeling generous. Tut island is one of the hardest entry barriers into coding dreambot scripts IMO. You need to handle a lot of wonky stuff, but you learn a ton in doing so. NPC guide = bot.getNpcs().closest("Gielinor guide"); if(bot.getClientSettings().isResizableActive()) { Logger.info(bot, "Resizable mode is active, locating trainer."); if(guide != null) { Logger.info(bot,"Found guide, trying to click."); Point p = guide.getModel().calculateCenterPoint(); Rectangle GAME_SCREEN = new Rectangle(5, 5, 511, 333); Rectangle CANVAS = new Rectangle(0, 0, 765, 503); int heightAdjust = 80; int widthAdjust = -20; p.setLocation(p.getX() * (CANVAS.getWidth() / GAME_SCREEN.getWidth())+widthAdjust, p.getY() + (CANVAS.getHeight() / GAME_SCREEN.getHeight())+heightAdjust); bot.getMouse().hop(p); } if(bot.getClient().getMenu().contains("Talk-to")) { bot.getMouse().click(); FarmBot.sleepUntil(() -> bot.getDialogues().canContinue(), 10000); Logger.info(bot, "Successfully located trainer, navigating dialogue."); Do.continueDialogWithSpace(bot); if(bot.getDialogues().getOptions()!=null) { bot.getDialogues().chooseOption(Calculations.random(1,3)); } if(bot.getDialogues().canContinue()) { Do.continueDialogWithSpace(bot); } Logger.info("Unlocked options menu."); } } Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now