Hey just wrote my first ever OSbot script after having studied Java for 2 days with no prior experience whatsoever, just wanted to ask for some feedback. It's a very basic mining script that mines Copper ore and then banks, so far it seems to work.
What I want to add next is a GUI that lets the user input what kind of ore & location they want to mine in and bank, and also add paint. However I have no idea whatsoever how to this so I will have to study more before doing this. I also read about dividing the script in multiple classes and using the switch command to make it look cleaner so that I wouldn't have to use so many if statements.
Will update you guys on the script as I add new stuff.
Edit 1:
- Cleaned up the code a little bit after reading the feedback.
- Added paint (Total runtime, xp gained, lvls gained, total gp made, gp/hour, ore mined, xp/hr.
- Added some antiban (it now randomly hovers the mining skillicon).
- Changed it to mine iron ore instead.
Picture of the bot running: https://i.gyazo.com/87b8d4cf40e87cb4f054b9825d4eae38.png
Updated code:
Future updates:
- Will add a GUI that will let you choose whether you want to powermine or bank, and also lets you choose which ore to mine that supports more locations and not just the Al-Kharid mine.
- Will have to implement some kind of method that gets the GE prices for different ores to calculate the gp/hour.
- For the powermining part, I want it to use shift-click to drop if possible.
Appreciate further feedback, thanks!
Edit 2:
- Script now remembers starting position so you can start it from any mine and it will automatically walk to the closest bank.
- Filtered deposit item to bank everything that ends with ore so skillers can have pickaxe in inventory.
Edit 3:
- Added a GUI that lets you choose which ores you want to mine (based on color).
- Cleaned up the code a little bit.
Thanks @Vilius for the help!
Edit 4:
- Added a powermining checkbox in GUI that supports shift dropping.
- Script is now finished!!! :-)
Code: