guydatpwnz 0 Share Posted April 24, 2019 im making a tut island script and when the acc logs in for the first time after being created the client is by default in resizeable mode. dreambot automatically wants to change it off resizeable mode, but this is impossiable because the settings for it arnt avaiable right when logging in for the first time. i tried this code, but it didnt do anything public void onStart() { getClientSettings().toggleResizable(false); } can anyone help me? Link to comment Share on other sites More sharing options...
Milasoft 202 Share Posted April 25, 2019 You will have to disable the resizable solver until the settings menu is available and then re-enable it. You will also have to figure out how to interact with the npc without standard methods (npc.interact()), because they won't work normally. Check out the post below Nezz wrote on how he went about fixing it (sort of). getRandomManager().disableSolver(RandomEvent.RESIZABLE_DISABLER); getRandomManager().enableSolver(RandomEvent.RESIZABLE_DISABLER); On 11/11/2018 at 12:53 PM, Nuclear Nezz said: Update: I've pushed the fixes for the resizable solver, zoom solver, appearance screen (I think I broke that on one of my updates) and opening settings tab. Let me know if anyone has any more issues. Please note, the resizable/zoom fix will ONLY happen in the first guide section, after the settings tab has been opened once. My script WILL handle all of that, if you start it from the beginning, but if you do a few steps yourself and finish the first guide, my resizable/zoom will not activate. For anyone who has their own tut island script and wants to know how: Hide contents for opening the settings tab, when the player setting is 3 you have to click to continue for the tab setting to change, then just move to the rectangle: if(t == Tab.OPTIONS){ getScript().getMouse().move(new Rectangle(674,475,20,20)); sleep(200,500); getScript().getMouse().click(); sleepUntil(()->getScript().getTabs().isOpen(Tab.OPTIONS), rand(2000,3000)); } That's my shitty quick fix (all of these fixes are shitty and quick, mind you) for the interaction: public static final Rectangle GAME_SCREEN = new Rectangle(5, 5, 511, 333); public static final Rectangle CANVAS = new Rectangle(0, 0, 765, 503); NPC guide = getScript().getNpcs().closest("Gielinor guide"); if(guide != null){ Point p = guide.getModel().calculateCenterPoint(); p.setLocation(p.getX() * (CANVAS.getWidth() / GAME_SCREEN.getWidth()), p.getY() * (CANVAS.getHeight() / GAME_SCREEN.getHeight())); getScript().getMouse().hop(p); sleep(50, 80); getScript().getMouse().click(true); sleep(200, 400); } I threw a if(getClientSettings.isResizableactive) check before that, if it's not active I have a different interact method to call. The Point translation isn't actually 100% accurate, I think the x/y needs to be adjusted by a smidge but it's whatever, it worked well enough so far. Then obviously, since that doesn't click the menu I have before that: else if(getScript().getClient().getMenu().isMenuVisible()){ if(getScript().getClient().getMenu().contains("Talk-to")){ getScript().getClient().getMenu().clickAction("Talk-to"); sleepUntil(()->getScript().getDialogues().canContinue(), rand(2000,3000)); } else{ getScript().getClient().getMenu().close(); sleep(600,900); } } For the actual menu clicking. And for the resizable fix, above all of these under this chunk of settings (2 and 7 I think actually are the only settings for talking to the guide) if(currentConfig > 3){ if(getScript().getClientSettings().isResizableActive() || getScript().getClientSettings().getExactZoomValue() != 512){ if(getScript().getClientSettings().isResizableActive()){ //turn off resizable getScript().getMouse().move(new Rectangle(605,296,40,30)); sleep(200,500); getScript().getMouse().click(); sleepUntil(()->!getScript().getClientSettings().isResizableActive(),rand(2000,3000)); sleep(200,500); } else if(getScript().getClientSettings().getExactZoomValue() != 512){ //set default zoom getScript().getClientSettings().setDefaultZoom(); sleep(900,1200); } return rand(200,500); } else { getScript().getRandomManager().enableSolver(RandomEvent.RESIZABLE_DISABLER); getScript().getRandomManager().enableSolver(RandomEvent.ZOOM_SOLVER); } } I realize anyone who needs this code would much rather just have the client handle the resizable, which still might be something we'll add in, but because of how our models are written, it's a large pain in the ass to account for zoom and resizable, the translation doesn't work well. As you can see, my fix doesn't account for zoom, so sometimes it might miss. To account for that, you could just scroll in, as the models don't change size, so by scrolling in, the model would be inside the actual model. Just don't go too far. Don't forget to disable the resizable and zoom solvers at the beginning of your onstart. Don't put it at the end, if you have any delays in the onstart it gives the solver enough time to activate. Link to comment Share on other sites More sharing options...
guydatpwnz 0 Author Share Posted April 25, 2019 thank you so much for this information. i got the random disabler off now i just need to figure out what that codes doing lol Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.