public async Task IncomingPlayerEagleFeathersCollectingRequest() { if (CharactersData.GetCharacterHuntingSkill(Context.User.Id) >= 30) { //Checking commands if (CharactersData.GetCharacterEagleCarcass(Context.User.Id) < 1) { LeatherEmbed.WithColor(Color.Blue); LeatherEmbed.AddField("<:Knife:607575664987734026>```You don't have enough eagle carcasses to collect feathers from them!```", "```At least 1 eagle carcass required```"); await Context.Channel.SendMessageAsync("", false, LeatherEmbed.Build()); return; } //Execution of command LeatherEmbed.WithColor(Color.Blue); int TotalLeatherToGive = 0, TotalCarcassesToTook = 0, ChanceToGetBonusLeather, LeatherToGive; for (int i = CharactersData.GetCharacterEagleCarcass(Context.User.Id); i >= 1; i -= 1) { ChanceToGetBonusLeather = random.Next(0, 10); if (ChanceToGetBonusLeather > (7 - CharactersData.GetCharacterHuntingSkill(Context.User.Id) / 22)) { LeatherToGive = random.Next(3, 4); } else { LeatherToGive = random.Next(1, 2); } TotalLeatherToGive += LeatherToGive; TotalCarcassesToTook += 1; } LeatherEmbed.AddField("<:Knife:607575664987734026>```Success!```", $"```You have received {TotalLeatherToGive} eagle feathers!```"); await Context.Channel.SendMessageAsync("", false, LeatherEmbed.Build()); //Save data await CharactersData.SaveCharacterEagleFeathers(Context.User.Id, TotalLeatherToGive, 0.3f / CharactersData.GetCharacterHuntingSkill(Context.User.Id), TotalCarcassesToTook);; return; } else { LeatherEmbed.WithColor(Color.Blue); LeatherEmbed.AddField($"<:Knife:607575664987734026>```Hunting skill comes with time, {CharactersData.GetCharacterName(Context.User.Id)}```", "```Required level of skill is: [30]\n" + $"Your current skill level is: [{CharactersData.GetCharacterHuntingSkill(Context.User.Id)}]```"); await Context.Channel.SendMessageAsync("", false, LeatherEmbed.Build()); return; } }
public async Task IncomingPlayerEagleMeatCollectingRequest() { if (CharactersData.GetCharacterCookingSkill(Context.User.Id) >= 30) { //Checking commands if (CharactersData.GetCharacterEagleCarcass(Context.User.Id) < 1) { CookingEmbed.WithColor(Color.Blue); CookingEmbed.AddField("<:Meat:607579880569307146>```You don't have enough eagle carcasses to collect meat from them!```", "```At least 1 eagle carcass required```"); await Context.Channel.SendMessageAsync("", false, CookingEmbed.Build()); return; } //Execution of command CookingEmbed.WithColor(Color.Blue); int TotalMeatToGive = 0, TotalCarcassesToTook = 0, ChanceToGetBonusMeat, MeatToGive; for (int i = CharactersData.GetCharacterEagleCarcass(Context.User.Id); i >= 1; i -= 1) { ChanceToGetBonusMeat = random.Next(0, 10); if (ChanceToGetBonusMeat > (7 - CharactersData.GetCharacterCookingSkill(Context.User.Id) / 22)) { MeatToGive = random.Next(3, 6); } else { MeatToGive = random.Next(2, 4); } TotalMeatToGive += MeatToGive; TotalCarcassesToTook += 1; } CookingEmbed.AddField("<:Meat:607579880569307146>```Success!```", $"```You have received {TotalMeatToGive} eagle meat!```"); await Context.Channel.SendMessageAsync("", false, CookingEmbed.Build()); //Save data await CharactersData.SaveCharacterEagleMeat(Context.User.Id, TotalMeatToGive, 0.3f / CharactersData.GetCharacterCookingSkill(Context.User.Id), TotalCarcassesToTook);; return; } else { CookingEmbed.WithColor(Color.Blue); CookingEmbed.AddField($"<:Meat:607579880569307146>```Cooking skill comes with time, {CharactersData.GetCharacterName(Context.User.Id)}```", "```Required level of skill is: [30]\n" + $"Your current skill level is: [{CharactersData.GetCharacterCookingSkill(Context.User.Id)}]```"); await Context.Channel.SendMessageAsync("", false, CookingEmbed.Build()); return; } }