I am new to scripting and I used this script for a bit to make some decent money in F2P. The script worked as intended and didn't snag but it also had a few features that I didn't like:
- It spends all of the money gained from selling bronze bars on copper and tin every time. This is an issue because as a F2P player with 0 quests completed you can't sell the copper or tin, so if you want to mule, you have to wait for the bot to finish smelting, which takes longer and longer after each restock.
- If coins/100 > bronze bars it spends gold on copper/tin and doesn't sell bronze bars. This is just annoying
- It tries to sell bronze bars for 1 GP each. This isn't really an issue but if you were to start a larger farm and singlehandedly crash the price of bronze bars you'd run into issues.
I WAS going to re-write the whole thing from the ground up using switches and methods to make it neater and easier to read but I got about halfway through and got bored and frustrated so instead I added one variable, adjusted a few numbers, and commented out a portion of your code and now I have it set up the way I wanted.
Now, it'll buy a MAXIMUM of 798 copper/tin and keep the rest of the wealth as coins on hand for easy muling.
It'll never spend coins on hand on copper/tin instead using only profits from selling bronze bars (this means that if you interrupt the script after it sells bronze bars it'll get stuck, the script must be started with copper/tin or bronze bars in the bank/inv)
It'll set the sell price of bronze bars at 150. Which is high enough to ensure a profit even if you are buying copper/tin at 70.
Source: