public int setOthersCurrency(int amount)
  {
    othersCurrency = amount;

    int overflow = othersCurrency - 3904;

    int large = (int)Math.floor(othersCurrency / largeCurrency);

    if (large > 0)
      inventory.setItem(8, new ItemStack(largeCurrencyItem.getType(), large));
    else {
      inventory.clear(8);
    }

    int medium = (int)Math.floor((othersCurrency - largeCurrency * large) / mediumCurrency);

    if (medium > 0)
      inventory.setItem(7, new ItemStack(mediumCurrencyItem.getType(), medium));
    else {
      inventory.clear(7);
    }

    int small = (int)Math.floor(othersCurrency - largeCurrency * large - mediumCurrency * medium) / smallCurrency;

    if (small > 0)
      inventory.setItem(6, new ItemStack(smallCurrencyItem.getType(), small));
    else {
      inventory.clear(6);
    }

    return overflow;
  }