It seems that calling server.GetStoreItems from CloudScript gives an error.
The API is documented in the "client" and "admin" sections, not in "server".
I need to check some prices in the store from Cloudscript, how can I do ?
It seems that calling server.GetStoreItems from CloudScript gives an error.
The API is documented in the "client" and "admin" sections, not in "server".
I need to check some prices in the store from Cloudscript, how can I do ?
Actually, wait. There's a fairly significant issue with this model. That is, once you have defined a price for an item - whether in the Catalog or Store - the item can be purchased for that price. So while your intent is to sell the item for VCa + VCb, a hacker could use the PurchaseItem call to buy the item for VCa or VCb. That's clearly not desirable.
What I would recommend is to put the information on the combined VCs needed to purchase the item in Title Data or Custom Data for the Catalog item. Then, you can read that in Cloud Script and apply the appropriate price using the calls to subtract the VCs and Grant the item.
We'll be adding an alchemy/crafting system later (where you specify one or more VCs/items on the input and output sides of the equation), but we don't have a date for that right now, so the Title Data/Custom Data route would be best for now.
Correct - there's no Server version of GetStoreItems, as it's not possible to make purchases from Cloud Script (since the player has to confirm any purchase action). And since all the custom data (attributes) are at the Catalog level, it wasn't seen as needed in the Server API. What's the scenario you have for which you would need that call in Cloud Script, if you don't mind?
I'm currently writing a Cloudscript handler to be able to buy an item with 2 virtual currencies.
So I just want to check that the prices given by the client are correct compared to the store.
Unfortunately, short of a custom development contract (which we would still need to budget time for), we're not able to prioritize things out-of-band. We do track on the requests coming from the developer community, so that we can prioritize more highly things which have been asked for by higher numbers of developers, but to date this feature has only been asked for a couple of times. For now, I would have to recommend using the method described above.
No one has followed this question yet.