If you want to but 20 stones, just buy 20 stones.
Code: Select all
player:openStore("npcname")
store:buyItem("Random Fusion Stone",20)
Personally, I just buy/send 9 belts and stones per 13 charges. Keeps their inventory neat with no left over t4s or t5s. Just t6s and higher.
But here is a run down of the fusion functions.
Fusion_NumberToBuy(_beltTierLevel)
Like the description says, "Calculates minimum number to buy for belts and fusion stones to
use up all your charges." So if you have 10 charges, for example, it will return 8. Because with 8 items you would use up 8 charges then merge 3 and 3 together to use up the last 2 charges. It also takes into account what mana stones the character might already have. eg. say you have 3 t4 mana stones and 10 charges, then it would return 7. That's 7 charges to fuse the 7 items, 1 charge to merge those first 3 mana stones and 2 charges to merge 6 of the other 7. You would only use this if you want the character to use up all it's charges the most efficient way such as if you level new characters to level 10, use their 10 charges then discard them.
Fusion_NumberToMake(_beltTierLevel)
List basically just makes a table of values to populate the fusion "number to make" buttons. I looks at the amount of charges you have and manastones you have and calculates what number to put in each box. Works well but assumes you have enough items and fusion stones to use up all the charges so it is only useful after using the function above to buy the correct number of items. You wouldn't use this yourself. It is used by 'Fusion_MakeMaxStones'.
Fusion_MakeMaxStones(_beltNameOrId, _beltTierLevel)
This, again, assumes you have enough items and stones to use up all your charges and sets the exact values to fuse everything. This function doesn't work with the curent version of fusion. It needs to be updated.
Fusion_Config(setting, value)
This just allows you to change the fusion config settings
BuyItemByName(itemname, num)
This is obsolete. Use 'store:buyItem' instead.
Because I don't make the maximum possible anymore, I actually don't use any of these functions. I should probably add some new basic functions.