MrScott 2 Posted January 11, 2022 I just started Dreambot coding today so don't expect greatness by any means lol. I lot of the inspiration comes from various parts of this forum and public github pages. Currently it only serves one purpose, Varrock Rooftop Agility (My test account had 30 agility so I started there) The code can be found here: https://github.com/CollinHerber/MrScottAgility/tree/master/src/MrScottAgility It features a VERY basic anti-ban, mark detection, and obstacle completing. There is no GUI at this time. Current research items: * How to detect when an obstacle has been failed. My first thought was getting the coordinates for the landing position for all the obstacles and cross reference that. Also thought about a listener that looks for if/when you took damage. Wondering some thoughts around this and how the experienced scripters would approach this. * Detecting the area the bot was started in. You'll notice here (https://github.com/CollinHerber/MrScottAgility/blob/master/src/MrScottAgility/MainClass.java#L59) I tried but it wasn't working so I forced it to use Varrock Rooftop Agility in the meantime. Anyone spot something obvious? Didn't bother to deep dive into it too much. * Additional anti-ban methods. I'll be honest I didn't browse the forums too much on this topic but I plan to in the near future. Just wanted to layout everything first. * How do you feel about the layout of https://github.com/CollinHerber/MrScottAgility/blob/master/src/MrScottAgility/Actions/RooftopAgilityActions.java ? I was going for an approach that would allow adding additional agility courses very easily. Trying to keep things organized and clean. I can be pretty OCD about my code at times, sometimes going too far with it. Anyways, hopefully I don't get absolutely roasted too badly haha. I'm only like hour 4 of scripting for dreambot. Been coding over 10 years however, my first experience with Java though so hopefully it shows a little haha. Cheers, MrScott PS. I don't plan on ever selling my scripts. Everything will be free releases. This is just a personal fun project for me. I work with bank software all day long and that can get QUITE boring. So I like to have something on the side for some fun.
Pandemic 2816 Posted January 11, 2022 Thanks for sharing, and welcome to DreamBot 1 hour ago, MrScott said: * How to detect when an obstacle has been failed. My first thought was getting the coordinates for the landing position for all the obstacles and cross reference that. Also thought about a listener that looks for if/when you took damage. Wondering some thoughts around this and how the experienced scripters would approach this. I believe in my agility script I usually just look for the next obstacle based on what's available around the player, I try and avoid relying on state too much (exactly where in the course the player is, etc). Come to think of it, I'm pretty sure my script doesn't have any course information at all outside of the starting positions, just a list of blacklisted objects. 1 hour ago, MrScott said: * Detecting the area the bot was started in. You'll notice here (https://github.com/CollinHerber/MrScottAgility/blob/master/src/MrScottAgility/MainClass.java#L59) I tried but it wasn't working so I forced it to use Varrock Rooftop Agility in the meantime. Anyone spot something obvious? Didn't bother to deep dive into it too much. It looks like your VARROCK_ROOFTOP_START area is just one small row of tiles, you'd probably want to expand it to cover a larger area. 1 hour ago, MrScott said: * Additional anti-ban methods. I'll be honest I didn't browse the forums too much on this topic but I plan to in the near future. Just wanted to layout everything first. Antiban measures usually backfire, and I try to keep things simple and functional, but this is more of a personal preference. Experiment and see what works best for you. 1 hour ago, MrScott said: * How do you feel about the layout of https://github.com/CollinHerber/MrScottAgility/blob/master/src/MrScottAgility/Actions/RooftopAgilityActions.java ? I was going for an approach that would allow adding additional agility courses very easily. Trying to keep things organized and clean. I can be pretty OCD about my code at times, sometimes going too far with it. On first glance, I think that the added abstraction of each action is actually making it less organized, and harder to expand to other courses (at least how your courses are setup right now). I'd personally remove all of those predefined actions (BalanceWall, JumpOffEdge, etc.) since it's just passing it directly to HandleObstacle while you still have to specify what object and action anyways (and I believe you're only using them once or twice each, so limited risk of mistyping, although if you're worried about that maybe make another class for constants that you could reference, idk right now as the whole setup isn't how I'd do it, I'm just spitballing ). For example, if you added a new course that didn't have that obstacle/action combo, you'd have to open up your actions file again just to add the new course obstacles, versus a simple call like RooftopAgilityActions.HandleObstacle("Some new object", "Some new action")) from the course class itself. I find this preferable not only because of avoiding editing other classes to expand, but because it's also a bit more robust against any changes or special cases you might need to handle in the future (sort of like how you already run into passing a specific object id as a parameter to an already specific action like LeapGap, it just seems like an unnecessary extra step). P.S. Feel free to join our unofficial scripting Discord if you're not in there already (https://discord.gg/wvZaH3W)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.