public async Task IncomingPlayerCopperRemeltingRequest() { //Checking commands if (CharactersData.GetCharacterCopperOre(Context.User.Id) < 5) { RemeltingEmbed.WithColor(Color.Blue); RemeltingEmbed.AddField("<:Iron:603979800092344340>```You don't have enought copper to remelt it!```", $"```You need {5 - CharactersData.GetCharacterCopperOre(Context.User.Id)} more units of copper ore```"); await Context.Channel.SendMessageAsync("", false, RemeltingEmbed.Build()); return; } //Execution of command RemeltingEmbed.WithColor(Color.Blue); int TotalBarsToGive = 0, TotalOreToTook = 0; for (int i = CharactersData.GetCharacterCopperOre(Context.User.Id); i >= 5; i -= 5) { int ChanceToGetBonusBars = random.Next(0, 10); int RemeltedBarsToGive; if (ChanceToGetBonusBars > (7 - CharactersData.GetCharacterOreMeltingSkill(Context.User.Id) / 10)) { RemeltedBarsToGive = random.Next(2, 3); } else { RemeltedBarsToGive = 1; } TotalBarsToGive += RemeltedBarsToGive; TotalOreToTook += 5; } RemeltingEmbed.AddField("<:Iron:603979800092344340>```Success!```", $"```You have received {TotalBarsToGive} copper bars!```"); await Context.Channel.SendMessageAsync("", false, RemeltingEmbed.Build()); //Save data if (CharactersData.GetCharacterOreMeltingSkill(Context.User.Id) <= 2) { await CharactersData.SaveCharacterRemeltedCopper(Context.User.Id, TotalBarsToGive, 0.3f, TotalOreToTook); } else { await CharactersData.SaveCharacterRemeltedCopper(Context.User.Id, TotalBarsToGive, 0.3f / CharactersData.GetCharacterOreMeltingSkill(Context.User.Id), TotalOreToTook);; } return; }