First AddOn - Auto restock style materials
Hello Everyone,
I am fairly new to writing AddOns and wanted to start with something that I thought is an easy first task. The idea is to create an AddOn which automatically restocks style materials once I visit a vendor/ merchant and if I am below a given threshold. At the moment I am at the point where the addon reacts to the on_open_store event and checks for the stack size of each style material that is used for daily writs. Until now I was not able to find a function to buy from the merchant. From searching the web I found the functions zo_storemanager:buymultiplepurchase() and zo_storemanager:getstoreitems() which seem to be promising but unfortunately I was not able to find any description on the usage of these functions, especially how to the the function which Item tom by (using the ItemLink?). Is anyone able to help? Any other functions that might do the trick? Thanks in advance! |
Hello TeilzeitLegende, welcome :-)
I have not tested them, but listed in the API there are the following functions: BuyStoreItem(number entryIndex, number quantity) GetNumStoreItems() GetStoreItemLink(number entryIndex, number LinkStyle linkStyle) So you should be able to iterate over all the items in a store and buy the ones you need. https://wiki.esoui.com/API https://wiki.esoui.com/APIVersion |
Randactyl had once created such type of addon already, maybe it helps if you watch his code:
https://www.esoui.com/downloads/info705-StockUp.html |
thanks to both of you.
For the mentioned API functions as well as for the example addon. |
I've found another addon doing the same:
https://www.esoui.com/downloads/info...ndorMagic.html |
All times are GMT -6. The time now is 10:41 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI