Sign In Register

How can we help you today?

Start a new topic


What is the difference between the 1,2,3,4,5,6 currencies and the other currency?:



Can anyone explain me about this? I'm also stuck on this part?>

They are just different currencies. 

@Chase Wilksch => Finally got an idea about this currencies.  Will you take a look at this query and reply about your view 

Hey Saravana? this looks like a link to a ticket, these aren't public.

oh okay. Here is my query. What if I want the user to purchase the virtual good with a combination of 2 currencies.

Let's say for purchasing some 'Equipment' user need to spend 'x' number of Currency1 and 'y' number of Currency2.

How will I achieve this??


But when testing it in Test Harness how could I include these two currencies.


  "@class": ".BuyVirtualGoodsRequest",

  "currencyShortCode": "CURRENCY_1",

  "quantity": 1,

  "shortCode": "BRONZE_COIN"


Because, when I included any of those one currency (Currency1/Currency2) itself. I can able to purchase the item. How could I test it to purchase an item with a combination of two virtual currency?

To do something like that I would use an event using something like.


var player = Spark.getPlayer();
var playerCurrencies = player.getAllBalances().named;

var virtualGood = Spark.getConfig().getVirtualGood(shortCode);
var costs = virtualGood.getCurrencyCosts();

for(var cost in costs){
    var currency = cost;
    var currencyCost = costs[cost];
    if(playerCurrencies[currency] < currencyCost){
        Spark.setScriptData("NotEnoughCurrency", currency);

for(var cost in costs){
    var currency = cost;
    var currencyCost = costs[cost];
    player.debit(currency, currencyCost, reason);


So, it is not possible to do 'combination of currencies to purchase virtual good' using BuyVirtualGoodsRequest?

Not that I know of but I have not used virtual good much, they are very static.

Thanks for the reply. 

Login to post a comment