I just expanded it, put more features into it when I was using the original script for leveling my own chars' crafting skills.
ATTENTION: There's a new version 3.2beta available for download which should make the script work in all languages and should fix the error in buying ingredients.
Added Features:
- Auto-buys and learns the needed recipes at the start of the script if it detects you still haven't learned them.
- There is a user options part of the script so you can tweak several stuff there.
- You can set how many ingredients to buy every time it opens the store in the user options.
- Auto-sells the items you have crafted whenever you buy new ingredients from the store to keep your bag from filling up by default. You can turn it off in the user options.
- If you're almost at a level where you need to raise the Max Skill level or where you need to change recipes, the script auto-adjusts how much ingredients to buy. This is useful so you don't buy too much ingredients and keep on crafting without getting any exp.
- Prints some useful info on the MM Window and MM Window name. You can choose to print all available info or only the bare minimum in the user options.
- The script will pause and remind you of your total available backpack space and your total gold every time you start it. Just press Delete to resume. If you find this feature annoying, you can turn it off in the user options.
Notes:
Code: Select all
1.) Further explanation of the multipliers you see in the user options:
Let's say for example, you set your multiplier to 500 and then let's say the item you are crafting needs 3 x item A, 1 x item B and 1 x of item C. The multiplier will not just buy 500 x of item A, since you need 3 x of item A to craft one item, the multiplier will buy 3 x multiplier of item A. In short, it buys 1500 units of item A.
Also, consider that the game requires at least 2 empty bag spaces for you to craft multiple items successfully. Setting up the multiplier so that it leaves you exactly with 1 empty bag space after buying the ingredients will still stop the script from working properly.
So take this into consideration when tweaking multipliers.
2.) I recommend you don't tweak the first two multiplier options since they already work well without tweaking. As for the Level 50 and above multiplier, you can tweak it to whatever you like depending on your bag space. Probably up to 1500 is safe and good. Making this number too high will make the checks I put in the code ineffective.
3.) You will need probably around 20M gold if you are leveling from 15 to 75. And depending on your multiplier settings, you will need a considerable amount of bag space. That's why I made the script remind you of these things by default. Again, if you find it annoying, you can turn it off in the user options.
4.) The script will error if your crafting level is below 15 or level 75 and above.
5.) The calculations for Exp/Min, ETA etc are very basic and relies solely on the standard casting time for crafting an item of 5 seconds. If you are using a crafting speed skill, then the Exp/Min and ETA displayed will be way off.
6.) If all goes as intended, this should be a set-it-and-forget-it script.
Just post here any errors you encounter and I'll see what I can do about it.
Changelog:
Code: Select all
V 2.0 Changelog:
1.) Fixed error in calculating the craftstnl variable which pretty much broke the auto-adjust of items to buy feature of the script.
2.) Found out that store:buyItem still buys 1 item even if the variable was 0. So had to fix this too.
3.) Put a default value for expgained variable if it is 0.
V 2.1 Changelog:
1.) Fixed a copy paste error at line 104 of the Tailoring script. The if statement was missing an end.
V 2.2b Changelog
1.) All files now integrated to a single file.
2.) User is asked to input which skill to level upon starting the script. This is turned on by default, you can turn this off and set which skill you like to level in the user options.
3.) You can now set in the user options what level you'd like the bot to stop at and set what you want the bot to do after reaching that level.
4.) Script now checks first if you are near the Event NPCs and will give an error if you're not. It will also go to where the tools are at automatically if it detects you are pretty far from it.
5.) Added support for item-set skills (still in Beta as I do not have these skills and could not fully test it, so testers are needed). Once again, credits go to lisa for the functions needed to add support for these skills.
6.) Added support for production speed potion - 1 day. The bot will auto-use it at the start of the script if user option is set to do that. If anyone has the 7 and 30 day potions, just post the Buff ids here so I can add support for them.
7.) Added a user option yrestadjustment for you to tweak the timing of the prints and the getting of info. If you are notcing the prints come BEFORE the char finishes casting, you will have to tweak it and make it so that the prints come a little AFTER the char finishes casting. This helps the bot to calculate some needed values accurately.
V 2.3b Changelog
1.) Fixed an error in the code that detects if the char has the crafting item set skills.
2.) yrestadjustment value is explained better in this version. Make sure you tweak this value well.
V 3.0b Changelog
1.) Fixed an error in the buyItems function.
2.) Changed learnRecipes function to cope with the fixed NPC recipe vendors.
V 3.1b Changelog
1.) Should now support all languages.
2.) Added function clearStoreInfo to force store to update items.
3.) A handful of minor tweaks.
V 3.2b Changelog
1.) Fixed player:getCraftLevel() error for non-EN versions..
2.) Some more minor tweaks.