Nation 11 Share Posted July 5, 2016 National Draynor Willows I'm new to DreamBot so to learn the API I decided to write this script! Start with axe equipped or in Inventory Features: Chops and banks Willow logs in Draynor Reliable - (Ran for several hours without any issues) Fast - Get upwards of 40k xp/hour with a good axe and Woodcutting level AntiBan Great way to train Woodcutting in F2P Progress Reports: (Feel free to post your own!) Download: Download Link Source code for anyone interested: Source code Link to comment Share on other sites More sharing options...
Cardozz 46 Share Posted July 5, 2016 Nice release! Can you explain me what anti-ban features you have added into this script? Link to comment Share on other sites More sharing options...
Nation 11 Author Share Posted July 5, 2016 Nice release! Can you explain me what anti-ban features you have added into this script? Thanks! Simple stuff. Mouse exiting screen, checking Woodcutting XP, checking friends list, right clicking on players, moving mouse, moving camera. Link to comment Share on other sites More sharing options...
Cardozz 46 Share Posted July 5, 2016 Thanks! Simple stuff. Mouse exiting screen, checking Woodcutting XP, checking friends list, right clicking on players, moving mouse, moving camera. aight! Link to comment Share on other sites More sharing options...
Before 95 Share Posted July 5, 2016 Great release! Thanks for posting source, I like to read how other scripters format their code :3 Btw I found in your code you had this: GameObject willow = getGameObjects().closest("Willow"); if(getLocalPlayer().getAnimation() != 867) { if(willow != null) { Instead you can write it as GameObject willow = getGameObjects().closest(GO -> GO.getName.equals("Willow") && o!=null); if(getLocalPlayer().getAnimation() != 867) { //Don't need this anymore//if(willow != null) { It's this new Lambda thing people seem to like. It seems weird at first, but it's kinda fun oh oh (yay I'm helpful?) I also saw this: getTabs().open(Tab.FRIENDS); sleep(500, 1500); getTabs().open(Tab.INVENTORY); sleep(10, 300); break; (in your Antiban) thing, it's really neat, but when you use getTabs().open(Tab.TAB), it uses hotkeys (sometimes), but sometimes the hotkeys are messed up because people change them. Instead I like to use getTabs().openwithmouse(Tab.TAB), because then the bot can't mess up Oo one final thing, I saw you made your own Random function, I just want to share mine (because I haven't yet ^.^) private Random Rand = new Random(); void sleepie(int x, int y) { sleep(Rand.nextInt((x+y)/2)+Rand.nextInt((x+y)/2)) } What this does is it makes the bot more likely to sleep at the number inbetween, less likely to sleep a little more but still probably and the same for a little less. I find it's a lot more like a human Link to comment Share on other sites More sharing options...
Nation 11 Author Share Posted July 5, 2016 Great release! Thanks for posting source, I like to read how other scripters format their code :3 Btw I found in your code you had this: GameObject willow = getGameObjects().closest("Willow"); if(getLocalPlayer().getAnimation() != 867) { if(willow != null) { Instead you can write it as GameObject willow = getGameObjects().closest(GO -> GO.getName.equals("Willow") && o!=null); if(getLocalPlayer().getAnimation() != 867) { //Don't need this anymore//if(willow != null) { It's this new Lambda thing people seem to like. It seems weird at first, but it's kinda fun oh oh (yay I'm helpful?) I also saw this: getTabs().open(Tab.FRIENDS); sleep(500, 1500); getTabs().open(Tab.INVENTORY); sleep(10, 300); break; (in your Antiban) thing, it's really neat, but when you use getTabs().open(Tab.TAB), it uses hotkeys (sometimes), but sometimes the hotkeys are messed up because people change them. Instead I like to use getTabs().openwithmouse(Tab.TAB), because then the bot can't mess up Oo one final thing, I saw you made your own Random function, I just want to share mine (because I haven't yet ^.^) private Random Rand = new Random(); void sleepie(int x, int y) { sleep(Rand.nextInt((x+y)/2)+Rand.nextInt((x+y)/2)) } What this does is it makes the bot more likely to sleep at the number inbetween, less likely to sleep a little more but still probably and the same for a little less. I find it's a lot more like a human Thanks for the tips! I'm still getting used to the API but I really like it so far! Link to comment Share on other sites More sharing options...
Pandemic 2712 Share Posted July 5, 2016 Btw I found in your code you had this: GameObject willow = getGameObjects().closest("Willow"); if(getLocalPlayer().getAnimation() != 867) { if(willow != null) { Instead you can write it as GameObject willow = getGameObjects().closest(GO -> GO.getName.equals("Willow") && o!=null); if(getLocalPlayer().getAnimation() != 867) { //Don't need this anymore//if(willow != null) { It's this new Lambda thing people seem to like. It seems weird at first, but it's kinda fun This actually isn't true, in the odd case there isn't a willow tree, closest() will return null Link to comment Share on other sites More sharing options...
Nation 11 Author Share Posted July 5, 2016 This actually isn't true, in the odd case there isn't a willow tree, closest() will return null I was thinking that was the case. Thanks for clarifying! Link to comment Share on other sites More sharing options...
Before 95 Share Posted July 6, 2016 This actually isn't true, in the odd case there isn't a willow tree, closest() will return null You just solved a problem I had like 2 months ago. Thanks! edit: Nevermind. That script is unsaveable. Link to comment Share on other sites More sharing options...
Gains 475 Share Posted July 6, 2016 Good luck scripting Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.