don't even remember what I changed

but there's a lot of stuff, like fishing images instead of just text, and mining levels
master
Lan 3 years ago
parent 105d6c82b5
commit 75095f36a5
  1. 1
      Kehyeedra3/ApplicationDbContext.cs
  2. 108
      Kehyeedra3/Bot.cs
  3. 126
      Kehyeedra3/Commands.cs
  4. 51
      Kehyeedra3/Commands/Admin.cs
  5. 266
      Kehyeedra3/Commands/Economy.cs
  6. 71
      Kehyeedra3/Commands/Help.cs
  7. 331
      Kehyeedra3/Commands/Interactive.cs
  8. 104
      Kehyeedra3/Commands/Stuff.cs
  9. 102
      Kehyeedra3/Extensions.cs
  10. 156
      Kehyeedra3/Helpers.cs
  11. 4
      Kehyeedra3/Kehyeedra3.csproj
  12. 253
      Kehyeedra3/Migrations/20210410172129_MiningUpdate.Designer.cs
  13. 64
      Kehyeedra3/Migrations/20210410172129_MiningUpdate.cs
  14. 253
      Kehyeedra3/Migrations/20210410173200_MiningUpdateYeah.Designer.cs
  15. 34
      Kehyeedra3/Migrations/20210410173200_MiningUpdateYeah.cs
  16. 256
      Kehyeedra3/Migrations/20210411195647_FishingUpdateYeah.Designer.cs
  17. 44
      Kehyeedra3/Migrations/20210411195647_FishingUpdateYeah.cs
  18. 39
      Kehyeedra3/Migrations/ApplicationDbContextModelSnapshot.cs
  19. 0
      Kehyeedra3/Services/AudioService.cs
  20. 132
      Kehyeedra3/Services/Models/Fishing.cs
  21. 19
      Kehyeedra3/Services/Models/Mining.cs
  22. 9
      Kehyeedra3/Services/Models/User.cs

@ -13,5 +13,6 @@ namespace Kehyeedra3
public DbSet<Fishing> Fishing { get; set; } public DbSet<Fishing> Fishing { get; set; }
public DbSet<StoreFront> StoreFronts { get; set; } public DbSet<StoreFront> StoreFronts { get; set; }
public DbSet<User.BattleFishObject> Battlefish { get; set; } public DbSet<User.BattleFishObject> Battlefish { get; set; }
public DbSet<Mining> Mining { get; set; }
} }
} }

@ -32,26 +32,26 @@ namespace Kehyeedra3
public static string PathToUserData; public static string PathToUserData;
public static WebClient WeebClient; public static WebClient WeebClient;
public static ReminderService RmService; public static ReminderService RmService;
string[] rcsounds = new string[] //string[] rcsounds = new string[]
{ //{
Environment.CurrentDirectory + @"Audio\goblin_death.wav", // Environment.CurrentDirectory + @"Audio\goblin_death.wav",
Environment.CurrentDirectory + @"Audio\cough1.wav", // Environment.CurrentDirectory + @"Audio\cough1.wav",
Environment.CurrentDirectory + @"Audio\cough2.wav", // Environment.CurrentDirectory + @"Audio\cough2.wav",
Environment.CurrentDirectory + @"Audio\wilhelmcough.wav", // Environment.CurrentDirectory + @"Audio\wilhelmcough.wav",
Environment.CurrentDirectory + @"Audio\trapcough1.wav", // Environment.CurrentDirectory + @"Audio\trapcough1.wav",
Environment.CurrentDirectory + @"Audio\trapcough2.wav", // Environment.CurrentDirectory + @"Audio\trapcough2.wav",
Environment.CurrentDirectory + @"Audio\h3h3cough1.wav", // Environment.CurrentDirectory + @"Audio\h3h3cough1.wav",
Environment.CurrentDirectory + @"Audio\h3h3cough2.wav", // Environment.CurrentDirectory + @"Audio\h3h3cough2.wav",
Environment.CurrentDirectory + @"Audio\h3h3cough3.wav", // Environment.CurrentDirectory + @"Audio\h3h3cough3.wav",
Environment.CurrentDirectory + @"Audio\h3h3cough4.wav", // Environment.CurrentDirectory + @"Audio\h3h3cough4.wav",
Environment.CurrentDirectory + @"Audio\h3h3cough5.wav", // Environment.CurrentDirectory + @"Audio\h3h3cough5.wav",
Environment.CurrentDirectory + @"Audio\sodocough.mp3", // Environment.CurrentDirectory + @"Audio\sodocough.mp3",
Environment.CurrentDirectory + @"Audio\dbzscream.wav", // Environment.CurrentDirectory + @"Audio\dbzscream.wav",
Environment.CurrentDirectory + @"Audio\healthycough1.wav", // Environment.CurrentDirectory + @"Audio\healthycough1.wav",
Environment.CurrentDirectory + @"Audio\poohcough1.wav", // Environment.CurrentDirectory + @"Audio\poohcough1.wav",
Environment.CurrentDirectory + @"Audio\jontronooh.wav", // Environment.CurrentDirectory + @"Audio\jontronooh.wav",
Environment.CurrentDirectory + @"Audio\deep.wav" // Environment.CurrentDirectory + @"Audio\deep.wav"
}; //};
public async Task CreateBot() public async Task CreateBot()
{ {
@ -91,8 +91,8 @@ namespace Kehyeedra3
EventHandlers.InstallEventHandlers(); EventHandlers.InstallEventHandlers();
InstallChatService(); InstallChatService();
Clockboy.Elapsed += Clockboy_Elapsed; //Clockboy.Elapsed += Clockboy_Elapsed;
Clockboy.Interval = SRandom.Next(3600000, 14400000); //Clockboy.Interval = SRandom.Next(3600000, 14400000);
//1200000 = 20 minutes //1200000 = 20 minutes
RmService = new ReminderService(); RmService = new ReminderService();
@ -106,38 +106,38 @@ namespace Kehyeedra3
).Start(); ).Start();
} }
private async void Clockboy_Elapsed(object sender, ElapsedEventArgs e) //private async void Clockboy_Elapsed(object sender, ElapsedEventArgs e)
{ //{
foreach(var Guild in _bot.Guilds) // foreach(var Guild in _bot.Guilds)
{ // {
foreach(var VoiceChannel in Guild.VoiceChannels) // foreach(var VoiceChannel in Guild.VoiceChannels)
{ // {
if (VoiceChannel.Users.Count > 1) // if (VoiceChannel.Users.Count > 1)
{ // {
try // try
{ // {
await AudioService.JoinAudio(Guild, VoiceChannel); // await AudioService.JoinAudio(Guild, VoiceChannel);
var file = rcsounds[_rnd.Next(rcsounds.Length - 1)]; // var file = rcsounds[_rnd.Next(rcsounds.Length - 1)];
Console.WriteLine("File exists? " + File.Exists(file)); // Console.WriteLine("File exists? " + File.Exists(file));
Console.WriteLine("Playing file: " + file); // Console.WriteLine("Playing file: " + file);
await AudioService.SendAudioAsync(Guild, null, file); // await AudioService.SendAudioAsync(Guild, null, file);
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
Console.WriteLine(ex); // Console.WriteLine(ex);
} // }
finally // finally
{ // {
await AudioService.LeaveAudio(Guild); // await AudioService.LeaveAudio(Guild);
} // }
} // }
} // }
} // }
Clockboy.Start(); // Clockboy.Start();
} //}
public async Task StartBot() public async Task StartBot()
{ {

@ -1,126 +0,0 @@
using System;
using System.Threading.Tasks;
using Discord.Commands;
using Discord;
using System.IO;
using Kehyeedra3.Preconditions;
using System.Net;
using System.Linq;
using System.Data;
using Kehyeedra3.Services;
using Kehyeedra3.Services.Models;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Internal;
using Discord.Addons.Interactive;
using System.Threading.Channels;
namespace Kehyeedra3
{
//public class Audio_module : ModuleBase<ICommandContext> ////////////////////////
//{
// [Command("join", RunMode = RunMode.Async)]
// public async Task JoinCmd()
// {
// await Bot.AudioService.JoinAudio(Context.Guild, (Context.User as IVoiceState).VoiceChannel);
// }
// [Command("leave", RunMode = RunMode.Async)]
// public async Task LeaveCmd()
// {
// await Bot.AudioService.LeaveAudio(Context.Guild);
// }
// [Command("play", RunMode = RunMode.Async)]
// public async Task PlayCmd([Remainder] string song)
// {
// await Bot.AudioService.SendAudioAsync(Context.Guild, Context.Channel, song);
// }
//}
//public class Event : ModuleBase<ICommandContext> /////////////////////////
//{
// [Command("coof"), Ratelimit(1, 1, Measure.Minutes)]
// public async Task Coof([Remainder] IGuildUser name)
// {
// var user = await Context.Guild.GetUserAsync(Context.User.Id).ConfigureAwait(false); ;
// if (user.RoleIds.Any(id => id == 672517021732438026))
// {
// var role = Context.Guild.GetRole(672517021732438026);
// var hearole = Context.Guild.GetRole(672759930666876991);
// if (name.RoleIds.Any(id => id == 672755435454988294))
// {
// await ReplyAsync($"{name.Username}'s hazmat suit is protecting them from the corona");
// }
// else
// {
// await name.AddRoleAsync(role).ConfigureAwait(false);
// await name.RemoveRoleAsync(hearole).ConfigureAwait(false);
// Console.WriteLine($"{Context.User.Username} has infected {name.Username}");
// await ReplyAsync($"{Context.User.Username} has infected {name.Username}");
// await ReplyAsync($"Corona has been cured for now haha yeah");
// }
// }
// }
// [Command("cure"), Ratelimit(3, 30, Measure.Minutes)]
// public async Task Cure([Remainder] IGuildUser name)
// {
// var user = await Context.Guild.GetUserAsync(Context.User.Id).ConfigureAwait(false); ;
// if ((user.RoleIds.Any(id => id == 672755435454988294)) || (user.RoleIds.Any(id => id == 672759930666876991)))
// {
// var role = Context.Guild.GetRole(672759930666876991);
// var infrole = Context.Guild.GetRole(672517021732438026);
// if (name.RoleIds.Any(id => id == 672785044699611139))
// {
// await ReplyAsync($"{name.Username} absolutely refuses to be vaccinated");
// }
// else
// {
// if (name.RoleIds.Any(id => id == 672517021732438026))
// {
// await name.AddRoleAsync(role).ConfigureAwait(false);
// await name.RemoveRoleAsync(infrole).ConfigureAwait(false);
// Console.WriteLine($"{Context.User.Username} has cured {name.Username}");
// await ReplyAsync($"{Context.User.Username} has vaccinated {name.Username}");
// }
// else
// {
// await ReplyAsync($"{name.Username} is not infected??? are you super retarded???");
// }
// }
// }
// }
//}
//public class _ : ModuleBase
//{
// [RequireRolePrecondition(AccessLevel.BotOwner)]
// [Command("embedtest")]
// public async Task Embedthing(bool inline, [Remainder]string text)
// {
// var BotUser = await Bot._bot.GetApplicationInfoAsync();
// EmbedBuilder embed = new EmbedBuilder();
// EmbedAuthorBuilder author = new EmbedAuthorBuilder();
// EmbedFooterBuilder footer = new EmbedFooterBuilder();
// //author stuff
// author.Name = BotUser.Name;
// author.IconUrl = BotUser.IconUrl;
// embed.Author = author;
// //footer stuff
// footer.Text = "Given at";
// embed.Footer = footer;
// //embed stuff
// embed.Timestamp = DateTime.Now;
// embed.AddInlineField("test 1", "test 1");
// embed.AddInlineField("test 2", "test 2");
// embed.AddField(x =>
// {
// x.IsInline = inline;
// x.Name = "Test Embed";
// x.Value = text;
// });
// await ReplyAsync("This is an embed test, I think I did it...", false, embed);
// }
//}
}

@ -6,6 +6,7 @@ using Kehyeedra3.Preconditions;
using Kehyeedra3.Services.Models; using Kehyeedra3.Services.Models;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
@ -379,13 +380,10 @@ namespace Kehyeedra3.Commands
{ {
string path = Path.Combine(Environment.CurrentDirectory, "btextures"); string path = Path.Combine(Environment.CurrentDirectory, "btextures");
string avatar = ""; string avatar = "";
string rod = "";
string tier = ""; string tier = "";
ulong lvl = 0; ulong lvl = 0;
ulong xp = 0; ulong xp = 0;
int total = 0; int total = 0;
int minc = 0;
int maxc = 0;
Fishing fuser; Fishing fuser;
User user; User user;
Dictionary<FishSpecies, int[]> inv = new Dictionary<FishSpecies, int[]>(); Dictionary<FishSpecies, int[]> inv = new Dictionary<FishSpecies, int[]>();
@ -397,7 +395,6 @@ namespace Kehyeedra3.Commands
} }
if (fuser == null || user == null) if (fuser == null || user == null)
{ {
rod = "rod1.png";
tier = "tier1.png"; tier = "tier1.png";
} }
else else
@ -409,25 +406,21 @@ namespace Kehyeedra3.Commands
{ {
case 0: case 0:
{ {
rod = "rod1.png";
tier = "tier1.png"; tier = "tier1.png";
} }
break; break;
case 1: case 1:
{ {
rod = "rod2.png";
tier = "tier2.png"; tier = "tier2.png";
} }
break; break;
case 2: case 2:
{ {
rod = "rod3.png";
tier = "tier3.png"; tier = "tier3.png";
} }
break; break;
case 3: case 3:
{ {
rod = "rod4.png";
tier = "tier4.png"; tier = "tier4.png";
} }
break; break;
@ -478,14 +471,6 @@ namespace Kehyeedra3.Commands
card.Composite(frame, 5, 5, CompositeOperator.Over); card.Composite(frame, 5, 5, CompositeOperator.Over);
} }
//using (MagickImage frame = new MagickImage(Path.Combine(path, rod), new MagickReadSettings //rod
//{
// BackgroundColor = MagickColors.None
//}))
//{
// card.Composite(frame, 79, 79, CompositeOperator.Over);
//}
using (MagickImage frame = new MagickImage(Path.Combine(path, "frame.png"), new MagickReadSettings //frame using (MagickImage frame = new MagickImage(Path.Combine(path, "frame.png"), new MagickReadSettings //frame
{ {
BackgroundColor = MagickColors.None BackgroundColor = MagickColors.None
@ -511,10 +496,7 @@ namespace Kehyeedra3.Commands
using (MagickImage stats = new MagickImage($"label:" + using (MagickImage stats = new MagickImage($"label:" +
$"\nFishing Lv : {lvl}" + $"\nFishing Lv : {lvl}" +
$"\nXP : {xp}" + $"\nXP : {xp}", new MagickReadSettings
$"\nMax catch : {maxc}" +
$"\nMin catch : {minc}" +
$"\nTotal Fish : {total}", new MagickReadSettings
{ {
BackgroundColor = MagickColors.None, BackgroundColor = MagickColors.None,
FillColor = MagickColors.White, FillColor = MagickColors.White,
@ -528,9 +510,38 @@ namespace Kehyeedra3.Commands
outputStream.Position = 0; outputStream.Position = 0;
await Context.Channel.SendFileAsync(outputStream, "profile.png"); await Context.Channel.SendFileAsync(outputStream, "profile.png");
} }
}
[RequireRolePrecondition(AccessLevel.ServerAdmin)]
[Command("fc")]
public async Task MakeFishCard(string fishName = null)
{
List<Fish> fishes = Fishing.GetFishList();
Fish fish;
if (string.IsNullOrEmpty(fishName))
{
fish = fishes[SRandom.Next(fishes.Count)];
}
else
{
fish = fishes.FirstOrDefault(f => f.Name.ToLowerInvariant() == fishName.ToLowerInvariant());
if (fish == null)
{
await Context.Channel.SendMessageAsync("No fish with that name retarb, chenk input and try again, or cry to mommy");
return;
}
}
var (cardCollection, outFormatEnum, outFormat) = await Helpers.MakeFishCardAsync(fish, 0, 0, 0, "", 0, 0, 0);
MemoryStream outputStream = new MemoryStream();
cardCollection.Write(outputStream, outFormatEnum);
outputStream.Position = 0;
await Context.Channel.SendFileAsync(outputStream, $"card.{outFormat}");
} }
} }
} }

@ -12,6 +12,7 @@ using ImageMagick;
using System.Threading.Channels; using System.Threading.Channels;
using System.Threading.Tasks; using System.Threading.Tasks;
using Kehyeedra3.Preconditions; using Kehyeedra3.Preconditions;
using System.IO;
namespace Kehyeedra3.Commands namespace Kehyeedra3.Commands
{ {
@ -98,7 +99,7 @@ namespace Kehyeedra3.Commands
readonly string n = "<:no:677091514249248778>"; readonly string n = "<:no:677091514249248778>";
readonly string ye = "<:ya:677179974154715146>"; readonly string ye = "<:ya:677179974154715146>";
[Command("mine"), Ratelimit(6, 2, Measure.Minutes), Summary("Mines %coins.")] [Command("mine"), Ratelimit(10, 2, Measure.Minutes), Summary("Mines %coins.")]
public async Task Mine() public async Task Mine()
{ {
ulong time = ulong.Parse(DateTime.Now.ToString("yyyyMMddHHmm")); ulong time = ulong.Parse(DateTime.Now.ToString("yyyyMMddHHmm"));
@ -106,73 +107,92 @@ namespace Kehyeedra3.Commands
using (var Database = new ApplicationDbContextFactory().CreateDbContext()) using (var Database = new ApplicationDbContextFactory().CreateDbContext())
{ {
var user = Database.Users.FirstOrDefault(x => x.Id == Context.User.Id); var user = Database.Users.FirstOrDefault(x => x.Id == Context.User.Id);
lastmine = user.LastMine; var muser = Database.Mining.FirstOrDefault(x => x.Id == Context.User.Id);
user.LastMine = time; if (muser == null)
{
muser = new Mining
{
Id = Context.User.Id
};
Database.Mining.Add(muser);
}
lastmine = muser.LastMine;
muser.LastMine = time;
user.Username = Context.User.Username; user.Username = Context.User.Username;
await Database.SaveChangesAsync();
} if (lastmine < time)
if (lastmine < time) {
{ int res = SRandom.Next((int)muser.Lvl, 101);
int res1 = SRandom.Next(0, 101); long end = 0;
int res2 = SRandom.Next(0, 101); string marks = $"{n}{n}{n}";
int res3 = SRandom.Next(0, 101); int num = SRandom.Next(ores.Length);
long end = 0; int numd = SRandom.Next(discards.Length);
string marks = $"{n}{n}{n}"; string bns = "";
int num = SRandom.Next(ores.Length); string lucky = "";
int numd = SRandom.Next(discards.Length); string ore = ores[num];
string ore = ores[num]; string discard = discards[numd];
string discard = discards[numd]; if (res >= 20)
if (res1 > 20)
{
end = 1;
marks = $"{o}{n}{n}";
if (res2 > 50)
{ {
res += SRandom.Next(0, 101);
end = 2; end = 2;
marks = $"{o}{o}{n}"; marks = $"{o}{n}{n}";
if (res3 > 80) if (res >= 100)
{ {
marks = $"{o}{o}{o}"; res += SRandom.Next(0, 101);
string bonus = ""; end += 2;
int res4 = SRandom.Next(0, 6) * 2; marks = $"{o}{o}{n}";
int res5 = res4 / 2; if (res >= 200)
end = (long)res4 + 3;
for (int i = 0; i < 5; i++)
{ {
if (i < res5) res = SRandom.Next(0, 6) * 4;
marks = $"{o}{o}{o}";
string bonus = "";
end += (long)res + 3;
for (int i = 0; i < 5; i++)
{ {
bonus += $"{ye}"; if (i < res / 2)
{
bonus += $"{ye}";
}
else
{
bonus += $"{n}";
}
}
bns = $" **+** {bonus}";
if (res == 0)
{
lucky = $" **Lucky strike!** Bonus: {ore}";
} }
else else
{ {
bonus += $"{n}"; lucky = $" **Lucky strike!** Bonus: {res},";
} }
} }
if (res4 == 0)
{
await Context.Channel.SendMessageAsync($"{marks} **+** {bonus}\n{Context.User.Mention} **Lucky strike!** Bonus: {ore} You earned {end.ToYeedraDisplay()}%");
}
else
{
await Context.Channel.SendMessageAsync($"{marks} **+** {bonus}\n{Context.User.Mention} **Lucky strike!** Bonus: {res4}, You earned {end.ToYeedraDisplay()}%");
}
} }
} }
}
if (end <= 0)
{
await Context.Channel.SendMessageAsync($"{marks}\n{Context.User.Mention} You have found {ore} {discard}.");
return;
}
else if(end < 3)
{
await Context.Channel.SendMessageAsync($"{marks}\n{Context.User.Mention} You found {end.ToYeedraDisplay()}% while mining");
}
using (var Database = new ApplicationDbContextFactory().CreateDbContext()) string levelup = $"\nYou gain **{end+1}**xp.\n";
{
var user = Database.Users.FirstOrDefault(x => x.Id == Context.User.Id); muser.TXp += (ulong)end+1;
if (muser.TXp >= muser.Xp)
{
muser.Lvl += 1;
ulong leXp = 50;
for (ulong i = 0; i < muser.Lvl; i++)
{
if (i <= muser.Lvl)
{
leXp += Convert.ToUInt64(Math.Round((leXp * 0.05d + 50d), 0, MidpointRounding.ToEven));
}
}
muser.Xp = leXp;
levelup += $"You leveled up. You are now **Lvl {muser.Lvl}**";
}
else
{
levelup += $"You need **{muser.Xp - muser.TXp}**xp more to reach Lvl **{muser.Lvl+1}**";
}
if (!user.GrantMoney(Database.Users.FirstOrDefault(x => x.Id == 0), end)) if (!user.GrantMoney(Database.Users.FirstOrDefault(x => x.Id == 0), end))
{ {
@ -181,16 +201,25 @@ namespace Kehyeedra3.Commands
} }
await Database.SaveChangesAsync(); await Database.SaveChangesAsync();
}
} if (end <= 0)
else {
{ await Context.Channel.SendMessageAsync($"{marks}\n{Context.User.Mention} You have found {ore} {discard}.{levelup}");
await Context.Channel.SendMessageAsync($"{Context.User.Mention} wait 1 minute ok next minute yeah? yeah buddy?"); }
else
{
await Context.Channel.SendMessageAsync($"{marks}{bns}\n{Context.User.Mention}{lucky}\nYou earned **{end.ToYeedraDisplay()}**%{levelup}");
}
}
else
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention} wait 1 minute ok next minute yeah? yeah buddy?");
}
} }
} }
[Command("fish"), Ratelimit(6, 2, Measure.Minutes), Summary("Cast your line into the abyss, see if something bites?")] [Command("fish"), Ratelimit(6, 2, Measure.Minutes), Summary("Cast your line into the abyss, see if something bites?")]
public async Task FishCommand() public async Task FishCommand(string nocard = "")
{ {
ulong time = ulong.Parse(DateTime.Now.ToString("yyyyMMddHHmm")); ulong time = ulong.Parse(DateTime.Now.ToString("yyyyMMddHHmm"));
ulong totalXp = 0; ulong totalXp = 0;
@ -513,7 +542,14 @@ namespace Kehyeedra3.Commands
if (weight >= (1000 - Convert.ToInt32(level * 2))) //second weight roll if (weight >= (1000 - Convert.ToInt32(level * 2))) //second weight roll
{ {
weight = SRandom.Next(100, 2001) + Convert.ToInt32(level * 5 + (Convert.ToUInt64(prestige * 500))); if (level < 100)
{
weight = SRandom.Next(300, 2001 + prestige * 500) + Convert.ToInt32(level * 5);
}
else
{
weight = SRandom.Next(300, 2001 + prestige * 500) + 500;
}
} }
if (fish.Rarity == FishRarity.Legendary) if (fish.Rarity == FishRarity.Legendary)
@ -547,9 +583,9 @@ namespace Kehyeedra3.Commands
if (fish.Rarity == FishRarity.Legendary) if (fish.Rarity == FishRarity.Legendary)
{ {
if (xp < 100) if (xp < 50+50*(ulong)fish.Tier)
{ {
xp = 100; xp = 50+50*(ulong)fish.Tier;
} }
} }
} }
@ -597,7 +633,23 @@ namespace Kehyeedra3.Commands
toNextLvl = user.Xp - user.TXp; toNextLvl = user.Xp - user.TXp;
int times = 0; int times = 0;
if (user.TXp > 50 && user.FXp == 0)
{
lvlXp = 50;
for (ulong i = 0; i < user.Lvl; i++)
{
if (i <= user.Lvl)
{
lvlXp += Convert.ToUInt64(Math.Round((lvlXp * 0.05d + 50d), 0, MidpointRounding.ToEven));
}
if (i == user.Lvl - 2)
{
user.FXp = lvlXp;
}
}
}
if (user.TXp >= user.Xp) if (user.TXp >= user.Xp)
{ {
ulong leXp = 50; ulong leXp = 50;
@ -620,12 +672,19 @@ namespace Kehyeedra3.Commands
user.Lvl += 1; user.Lvl += 1;
times += 1; times += 1;
lvlXp = 50; lvlXp = 50;
for (ulong i = 0; i < user.Lvl; i++) for (ulong i = 0; i < user.Lvl; i++)
{ {
if (i <= user.Lvl) if (i <= user.Lvl)
{ {
lvlXp += Convert.ToUInt64(Math.Round((lvlXp * 0.05d + 50d), 0, MidpointRounding.ToEven)); lvlXp += Convert.ToUInt64(Math.Round((lvlXp * 0.05d + 50d), 0, MidpointRounding.ToEven));
} }
if (i == user.Lvl - 2)
{
user.FXp = lvlXp;
}
} }
user.Xp = lvlXp; user.Xp = lvlXp;
} }
@ -633,52 +692,71 @@ namespace Kehyeedra3.Commands
level = user.Lvl; level = user.Lvl;
if (leTrig) if (leTrig)
{ {
lvlUp = $"**Your level was recalculated to match your xp.** You are now **Level {level}**"; lvlUp = $"**Your level was recalculated\n to match your xp.** \nYou are now **Level {level}**";
} }
else if (times > 1) else if (times > 1)
{ {
lvlUp = $"**You leveled up {times} times!** You are now **Level {level}.**"; lvlUp = $"**You leveled up {times} times!** \nYou are now **Level {level}.**";
} }
else else
{ {
lvlUp = $"**You leveled up!** You are now **Level {level}**"; lvlUp = $"**You leveled up!** \nYou are now **Level {level}**";
} }
} }
else else
{ {
lvlUp = $"You need **{toNextLvl}**xp more to reach Level **{level + 1}**"; lvlUp = $"You need **{toNextLvl}**xp to reach Level **{level + 1}**";
} }
await Database.SaveChangesAsync().ConfigureAwait(false); await Database.SaveChangesAsync().ConfigureAwait(false);
}
string baited = ""; string baited = "";
string baiRa = ""; string baiRa = "";
string baiBi = ""; string baiBi = "";
string baiLe = ""; string baiLe = "";
if (bRar || bBig) if (bRar || bBig)
{
baited += "\nYou used bait. ";
if (bRar)
{ {
baiRa = "(+)"; baited += "\nYou used bait. ";
if (bRar)
{
baiRa = "(+)";
}
if (bBig)
{
baiBi = "(+)";
}
} }
if (bBig) if (bLet)
{ {
baiBi = "(+)"; baited += "\nYou ate lettuce. ";
baiLe = "(+10%)";
} }
}
if (bLet) if (nocard.ToLowerInvariant() != "nocard")
{ {
baited += "\nYou ate lettuce. "; var (cardCollection, outFormatEnum, outFormat) = await Helpers.MakeFishCardAsync(fish, user.TXp, user.FXp, user.Xp, lvlUp, weight, xp, dcatch);
baiLe = "(+10%)";
} MemoryStream outputStream = new MemoryStream();
if (dcatch == 1)
{ cardCollection.Write(outputStream, outFormatEnum);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}{baited}\n{fish.Emote} You have caught a {weight / 100d}kg{baiBi} **{fish.Name}**, rarity: {fish.Rarity}{baiRa}\nYou gain **{xp}**xp{baiLe}.\n{lvlUp}");
} outputStream.Position = 0;
else
{ await Context.Channel.SendFileAsync(outputStream, $"fish.{outFormat}");
await Context.Channel.SendMessageAsync($"{Context.User.Mention}{baited}\n{fish.Emote} You have caught **{dcatch}** {weight / 100d}kg{baiBi} **{fish.Name}**, rarity: {fish.Rarity}{baiRa}\nYou gain **{xp}**xp{baiLe}.\n{lvlUp}");
}
else
{
if (dcatch == 1)
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}{baited}\n{fish.Emote} You have caught a {weight / 100d}kg{baiBi} **{fish.Name}**, rarity: {fish.Rarity}{baiRa}\nYou gain **{xp}**xp{baiLe}.\n{lvlUp}");
}
else
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}{baited}\n{fish.Emote} You have caught **{dcatch}** {weight / 100d}kg{baiBi} **{fish.Name}**, rarity: {fish.Rarity}{baiRa}\nYou gain **{xp}**xp{baiLe}.\n{lvlUp}");
}
}
} }
} }
@ -1498,6 +1576,7 @@ namespace Kehyeedra3.Commands
{ {
var user = database.Fishing.FirstOrDefault(x => x.Id == Context.User.Id); var user = database.Fishing.FirstOrDefault(x => x.Id == Context.User.Id);
var muser = database.Users.FirstOrDefault(x => x.Id == Context.User.Id); var muser = database.Users.FirstOrDefault(x => x.Id == Context.User.Id);
var minuser = database.Mining.FirstOrDefault(x => x.Id == Context.User.Id);
string pres = ""; string pres = "";
double cawe = 0; double cawe = 0;
if (user.Prestige == 1) if (user.Prestige == 1)
@ -1515,12 +1594,13 @@ namespace Kehyeedra3.Commands
cawe = user.Lvl * 5d + 10d; cawe = user.Lvl * 5d + 10d;
} }
await Context.Channel.SendMessageAsync($"{Context.User.Mention}'s stats\nFishing level: **{user.Lvl}{pres}**\nMax catch weight: **{(user.Lvl * 5 + 2000d + user.Prestige*500d) / 100}kg**\nMin catch weight: **{cawe /100}kg**\n" + await Context.Channel.SendMessageAsync($"{Context.User.Mention}'s stats\nFishing level: **{user.Lvl}{pres}**\nMax catch weight: **{(user.Lvl * 5 + 2000d + user.Prestige*500d) / 100}kg**\nMin catch weight: **{cawe /100}kg**\n" +
$"Fishing xp: **{user.TXp}**\nTotal fish: **{scount + mcount + lcount}** *(Large: {lcount} Medium: {mcount} Small: {scount})*\nBalance: **{muser.Money.ToYeedraDisplay()}%**"); $"Fishing xp: **{user.TXp}**\nTotal fish: **{scount + mcount + lcount}** *(Large: {lcount} Medium: {mcount} Small: {scount})*\nMining level: **{minuser.Lvl}**\nMining xp: **{minuser.TXp}**\nBalance: **{muser.Money.ToYeedraDisplay()}%**");
} }
else else
{ {
var user = database.Fishing.FirstOrDefault(x => x.Id == otherUser.Id); var user = database.Fishing.FirstOrDefault(x => x.Id == otherUser.Id);
var muser = database.Users.FirstOrDefault(x => x.Id == otherUser.Id); var muser = database.Users.FirstOrDefault(x => x.Id == otherUser.Id);
var minuser = database.Mining.FirstOrDefault(x => x.Id == otherUser.Id);
string pres = ""; string pres = "";
double cawe = 0; double cawe = 0;
if (user.Prestige > 0) if (user.Prestige > 0)
@ -1533,7 +1613,7 @@ namespace Kehyeedra3.Commands
cawe = user.Lvl * 5d + 10d; cawe = user.Lvl * 5d + 10d;
} }
await Context.Channel.SendMessageAsync($"{otherUser.Mention}'s stats\nFishing level: **{user.Lvl}{pres}**\nMax catch weight: **{(user.Lvl * 5 + 2000d + user.Prestige*500d) / 100}kg**\nMin catch weight: **{cawe / 100}kg**\n" + await Context.Channel.SendMessageAsync($"{otherUser.Mention}'s stats\nFishing level: **{user.Lvl}{pres}**\nMax catch weight: **{(user.Lvl * 5 + 2000d + user.Prestige*500d) / 100}kg**\nMin catch weight: **{cawe / 100}kg**\n" +
$"Fishing xp: **{user.TXp}**\nTotal fish: **{scount + mcount + lcount}** *(Large: {lcount} Medium: {mcount} Small: {scount}*)\nBalance: **{muser.Money.ToYeedraDisplay()}%**"); $"Fishing xp: **{user.TXp}**\nTotal fish: **{scount + mcount + lcount}** *(Large: {lcount} Medium: {mcount} Small: {scount}*)\nMining level: **{minuser.Lvl}**\nMining xp: **{minuser.TXp}**\nBalance: **{muser.Money.ToYeedraDisplay()}%**");
} }
} }
} }

@ -17,76 +17,6 @@ namespace Kehyeedra3.Commands
{ {
_service = service; _service = service;
} }
/*[Command("commands"), Alias("coomands")]
public async Task HelpAsync()
{
string debug = null;
string prefix = Configuration.Load().Prefix;
var builder = new EmbedBuilder()
{
Color = new Color(114, 137, 218),
Description = "These are the commands you can use"
};
foreach (var module in _service.Modules)
{
string description = null;
debug += $"{module.Name}\n";
foreach (var cmd in module.Commands)
{
var result = await cmd.CheckPreconditionsAsync(Context);
if (result.IsSuccess)
description += $"{prefix}{cmd.Aliases.First()}\n";
debug += $"{prefix}{cmd.Aliases.First()}\n";
}
if (!string.IsNullOrWhiteSpace(description))
{
builder.AddField(x =>
{
x.Name = module.Name;
x.Value = description;
x.IsInline = false;
});
}
}
await ReplyAsync(debug);
}
[Command("command"), Alias("coomand")]
public async Task HelpAsync(string command)
{
var result = _service.Search(Context, command);
if (!result.IsSuccess)
{
await ReplyAsync($"Sorry, I couldn't find a command with the name **{command}**.");
return;
}
string prefix = Configuration.Load().Prefix;
var builder = new EmbedBuilder()
{
Color = new Color(0, 255, 0),
Description = $"Here are some commands like **{command}**"
};
foreach (var match in result.Commands)
{
var cmd = match.Command;
builder.AddField(x =>
{
x.Name = string.Join(", ", cmd.Aliases);
x.Value = $"Parameters: {string.Join(", ", cmd.Parameters.Select(p => p.Name))}\n" +
$"Remarks: {cmd.Remarks}";
x.IsInline = false;
});
}
await ReplyAsync("", false, builder.Build());
}*/
[Command("help"), Summary("Shows this thing")] [Command("help"), Summary("Shows this thing")]
public async Task HelpCommand([Remainder] string command = null) public async Task HelpCommand([Remainder] string command = null)
@ -94,7 +24,6 @@ namespace Kehyeedra3.Commands
if(command == null) if(command == null)
{ {
EmbedBuilder embed = new EmbedBuilder(); EmbedBuilder embed = new EmbedBuilder();
embed.AddField("AIMLbot", "Mention me to talk with me (don't expect intelligence)");
foreach (var module in Bot._cmds.Modules) foreach (var module in Bot._cmds.Modules)
{ {
StringBuilder coommands = new StringBuilder(""); StringBuilder coommands = new StringBuilder("");

@ -850,7 +850,7 @@ namespace Kehyeedra3.Commands
value *= amount; value *= amount;
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYou're about to sell **{amount} {fish.Name}** for **{((long)value).ToYeedraDisplay()}**.\nType 'ok' to confirm."); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYou're about to sell **{amount} {fish.Name}** for **{((long)value).ToYeedraDisplay()}**.\nType 'ok' to confirm.");
inp = await NextMessageAsync(); inp = await NextMessageAsync(timeout: TimeSpan.FromMinutes(2));
if (inp.Content.ToLowerInvariant() == "ok") if (inp.Content.ToLowerInvariant() == "ok")
{ {
@ -882,162 +882,187 @@ namespace Kehyeedra3.Commands
} }
} }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//else if (input == "bulksell") else if (input == "bulksell")
//{ {
// int value = 0; int value = 0;
// int count = 0; int count = 0;
// FishSize size; FishTier ftier = FishTier.T1;
// if (fuser.Inventory.Length < 3) if (fuser.Inventory.Length < 3)
// { {
// await Context.Channel.SendMessageAsync($"Your inventory is empty. Try fishing more."); await Context.Channel.SendMessageAsync($"Your inventory is empty. Try fishing more.");
// return; return;
// } }
// await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nSpecify the tier.\n"); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nSpecify the tier.\n");
// var inp = await NextMessageAsync(); var inp = await NextMessageAsync(timeout: TimeSpan.FromMinutes(2));
// int tier = int.Parse(inp.Content); int tier = int.Parse(inp.Content);
// if (tier > 0 && tier < 5) if (tier > 0 && tier < 5)
// { {
// switch (tier) switch (tier)
// { {
// case 1: case 1:
// { {
// fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T1).ToList(); ftier = FishTier.T1;
// } }
// break; break;
// case 2: case 2:
// { {
// fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T2).ToList(); ftier = FishTier.T2;
// } }
// break; break;
// case 3: case 3:
// { {
// fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T3).ToList(); ftier = FishTier.T3;
// } }
// break; break;
// case 4: case 4:
// { {
// fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T4).ToList(); ftier = FishTier.T4;
// } }
// break; break;
// } }
// rarfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Rare).ToList(); }
// uncfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Uncommon).ToList(); else if (tier < 1 || tier > 4)
// comfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Common).ToList(); {
// } await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nTier not available.");
// else if (tier < 1 || tier > 4) return;
// { }
// await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nTier not available."); foreach (var f in fishinv)
// return; {
// } int[] amounts;
// foreach (var f in fishinv) if (!fishinv.TryGetValue(f.Key, out amounts))
// { {
// int[] amounts; amounts = new int[] { 0, 0, 0 };
// if (!fishinv.TryGetValue(f.Key, out amounts)) fishinv.Add(f.Key, amounts);
// { }
// amounts = new int[] { 0, 0, 0 };
// fishinv.Add(f.Key, amounts); if (f.Value[0] < 0)
// } {
f.Value[0] = 0;
}
// fish = fishes.FirstOrDefault(i => i.Id == f.Key);
// if (fish.Rarity != FishRarity.Legendary) if (f.Value[1] < 0)
// { {
// count += f.Value[0] + f.Value[1] + f.Value[2]; f.Value[1] = 0;
}
// switch (fish.Rarity) //small
// { if (f.Value[2] < 0)
// case FishRarity.Common: {
// { f.Value[2] = 0;
// value += (int)fish.Tier * 1 * 1; }
// }
// break; fish = fishes.FirstOrDefault(i => i.Id == f.Key);
// case FishRarity.Uncommon:
// { if (fish.Tier == ftier && fish.Rarity != FishRarity.Unreasonable && fish.Rarity != FishRarity.Legendary)
// value += (int)fish.Tier * 1 * 3; {
// }
// break; if (f.Value[0] > 0)
// case FishRarity.Rare: {
// { switch (fish.Rarity)
// value += (int)fish.Tier * 1 * 6; {
// } case FishRarity.Common:
// break; {
// } value += (int)fish.Tier * 1 * 1 * f.Value[0];
// //// }
// switch (fish.Rarity) //med break;
// { case FishRarity.Uncommon:
// case FishRarity.Common: {
// { value += (int)fish.Tier * 1 * 3 * f.Value[0];
// value += (int)fish.Tier * 2 * 1; }
// } break;
// break; case FishRarity.Rare:
// case FishRarity.Uncommon: {
// { value += (int)fish.Tier * 1 * 6 * f.Value[0];
// value += (int)fish.Tier * 2 * 3; }
// } break;
// break; }
// case FishRarity.Rare: count += f.Value[0];
// { f.Value[0] = 0;
// value += (int)fish.Tier * 2 * 6; }
// } if (f.Value[1] > 0)
// break; {
// } switch (fish.Rarity)
// //// {
// switch (fish.Rarity) //large case FishRarity.Common:
// { {
// case FishRarity.Common: value += (int)fish.Tier * 2 * 1 * f.Value[1];
// { }
// value += (int)fish.Tier * 3 * 1; break;
// } case FishRarity.Uncommon:
// break; {
// case FishRarity.Uncommon: value += (int)fish.Tier * 2 * 3 * f.Value[1];
// { }
// value += (int)fish.Tier * 3 * 3; break;
// } case FishRarity.Rare:
// break; {
// case FishRarity.Rare: value += (int)fish.Tier * 2 * 6 * f.Value[1];
// { }
// value += (int)fish.Tier * 3 * 6; break;
// } }
// break; count += f.Value[1];
// } f.Value[1] = 0;
}
// await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYou're about to sell **{count} Fish** for **{((long)value).ToYeedraDisplay()}**.\nType 'ok' to confirm."); if (f.Value[2] > 0)
// inp = await NextMessageAsync(); {
// if (inp.Content.ToLowerInvariant() == "ok") switch (fish.Rarity)
// { {
case FishRarity.Common:
// fuser.SetInventory(fishinv); {
value += (int)fish.Tier * 3 * 1 * f.Value[2];
// if (!user.GrantMoney(Database.Users.FirstOrDefault(x => x.Id == 0), value)) }
// { break;
// await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nBank has no money, buy more bait."); case FishRarity.Uncommon:
// return; {
// } value += (int)fish.Tier * 3 * 3 * f.Value[2];
// await Database.SaveChangesAsync(); }
break;
// await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nThanks, seaman, enjoy your moolah."); case FishRarity.Rare:
{
// } value += (int)fish.Tier * 3 * 6 * f.Value[2];
// else }
// { break;
// await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nI guess I'm starving tonight. :["); }
// } count += f.Value[2];
// } f.Value[2] = 0;
}
}
// } }
if (count < 1)
{
//} await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYou have nothing to sell in this tier. Try ;finv.");
return;
}
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYou're about to sell **{count} Fish** for **{((long)value).ToYeedraDisplay()}%**.\nType 'ok' to confirm.");
inp = await NextMessageAsync(timeout: TimeSpan.FromMinutes(2));
if (inp.Content.ToLowerInvariant() == "ok")
{
fuser.SetInventory(fishinv);
if (!user.GrantMoney(Database.Users.FirstOrDefault(x => x.Id == 0), value))
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nBank has no money, buy more bait.");
return;
}
await Database.SaveChangesAsync();
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nThanks, seaman, enjoy your moolah.");
}
else
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nI guess I'm starving tonight. :[");
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} }
} }
} }
} }

@ -38,34 +38,89 @@ namespace Kehyeedra3.Commands
[Command("ratenuts"), Summary("Rates your or another person's sack.")] [Command("ratenuts"), Summary("Rates your or another person's sack.")]
public async Task RateTrap( string name = null) public async Task RateTrap( string name = null)
{ {
int nutRating = SRandom.Next(0, 301);
string nuts = "nuts";
if (name == null) if (name == null)
{ {
Random rando = new Random(); if (Context.User.Id == 534859726090010672)
Random rando1 = new Random(); {
int trapRating0 = rando.Next(0, 201); nutRating -= 60;
if (trapRating0 > 100 || trapRating0 < 120) }
if (Context.User.Id == 318478574325596163)
{
nutRating = SRandom.Next(1000000, 10000000);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nWarning: King, your african scale boss nuts have reached critical mass at {nutRating}g.");
return;
}
if (Context.User.Id == 242040333309837327 || Context.User.Id == 194538583649026049)
{
nutRating += 10000;
}
if (nutRating > 160 && nutRating < 200)
{
nutRating += SRandom.Next(nutRating, 10001);
nuts = "boss nuts";
if (nutRating > 10000)
{
nutRating = SRandom.Next(nutRating, nutRating + 100101);
nuts = "king size boss nuts";
}
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nCongrats king, your {nuts} weigh {nutRating}g.");
return;
}
if (nutRating < 10)
{ {
int trapRating1 = rando1.Next(0, 10001); nutRating = SRandom.Next(100, 2001);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nCongrats king, your boss nuts weigh {trapRating1}g."); nuts = "tiny lady nuts";
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nHope you get better soon, your {nuts} weigh 0.{nutRating}g.");
} }
else else
{ {
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYour nuts weigh {trapRating0}g."); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYour {nuts} weigh {nutRating}g.");
} }
} }
else else
{ {
Random rando = new Random(); if (name.Contains("534859726090010672"))
Random rando1 = new Random(); {
int trapRating0 = rando.Next(0, 101); nutRating -= 60;
if (trapRating0 == 100) }
if (name.Contains("318478574325596163"))
{
nutRating = SRandom.Next(1000000, 10000000);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nWarning: {name}'s african scale boss nuts have reached critical mass at {nutRating}g.");
return;
}
if (name.Contains("242040333309837327") || name.Contains("194538583649026049"))
{ {
int trapRating1 = rando1.Next(100, 10001); nutRating += 10000;
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nCongrats {name}, your boss nuts weigh {trapRating1}g."); }
if (nutRating > 180 && nutRating < 200)
{
nuts = "boss nuts";
nutRating += SRandom.Next(nutRating, 10001);
if (nutRating > 10000)
{
nutRating = SRandom.Next(nutRating, nutRating + 100101);
nuts = "king size boss nuts";
}
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nCongrats {name}, your {nuts} weigh {nutRating}g.");
return;
}
if (nutRating < 10)
{
nutRating = SRandom.Next(100, 2001);
nuts = "tiny lady nuts";
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nSorry to hear about {name}, those {nuts} weigh 0.{nutRating}g.");
} }
else else
{ {
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\n{name}'s nuts weigh {trapRating0}g."); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\n{name}'s {nuts} weigh {nutRating}g.");
} }
} }
@ -322,6 +377,27 @@ namespace Kehyeedra3.Commands
} }
} }
} }
[Command("changenick")]
public async Task ChangeNickname(IGuildUser usr = null, [Remainder]string name = null)
{
if (Context.Guild.Id != 691361760300761139)
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nWrong server retard");
return;
}
if (usr == null || usr == Context.User || name == null)
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYeah you gotta ping someone and write a name, retard");
return;
}
else
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nLet's fucking goooo");
await usr.ModifyAsync(x => x.Nickname = $"{name}");
}
}
} }
} }

@ -4,6 +4,9 @@ using System.Runtime.CompilerServices;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using ImageMagick;
using System.Threading.Tasks;
using System.Drawing;
namespace Kehyeedra3 namespace Kehyeedra3
{ {
@ -23,7 +26,14 @@ namespace Kehyeedra3
return numb.ToString("N4"); return numb.ToString("N4");
} }
public static double Remap(this int value, double min1, double max1, double min2, double max2)
=> ((double)value).Remap(min1, max1, min2, max2);
public static double Remap(this ulong value, double min1, double max1, double min2, double max2)
=> ((double)value).Remap(min1, max1, min2, max2);
public static double Remap(this double value, double min1, double max1, double min2, double max2)
=> min2 + (max2 - min2) * ((value - min1) / (max1 - min1));
//https://stackoverflow.com/a/1262619 //https://stackoverflow.com/a/1262619
public static void Shuffle<T>(this IList<T> list) public static void Shuffle<T>(this IList<T> list)
@ -44,5 +54,97 @@ namespace Kehyeedra3
} }
} }
} }
public static async Task<MagickImageCollection> GifPngMergeAsync(MagickImage pngFile, string gifFile, Rectangle rect, PixelInterpolateMethod interpolateMethod = PixelInterpolateMethod.Bilinear, bool trimEmpty = false)
=> await GifPngMergeAsync(pngFile, new FileStream(gifFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite), rect, interpolateMethod, trimEmpty);
public static async Task<MagickImageCollection> GifPngMergeAsync(Stream pngFile, string gifFile, Rectangle rect, PixelInterpolateMethod interpolateMethod = PixelInterpolateMethod.Bilinear, bool trimEmpty = false)
=> await GifPngMergeAsync(new MagickImage(pngFile), new FileStream(gifFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite), rect, interpolateMethod, trimEmpty);
public static async Task<MagickImageCollection> GifPngMergeAsync(string pngFile, Stream gifFile, Rectangle rect, PixelInterpolateMethod interpolateMethod = PixelInterpolateMethod.Bilinear, bool trimEmpty = false)
=> await GifPngMergeAsync(new MagickImage(pngFile), gifFile, rect, interpolateMethod, trimEmpty);
public static async Task<MagickImageCollection> GifPngMergeAsync(string pngFile, string gifFile, Rectangle rect, PixelInterpolateMethod interpolateMethod = PixelInterpolateMethod.Bilinear, bool trimEmpty = false)
=> await GifPngMergeAsync(new MagickImage(pngFile), new FileStream(gifFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite), rect, interpolateMethod, trimEmpty);
public static async Task<MagickImageCollection> GifPngMergeAsync(MagickImage pngFile, Stream gifFile, Rectangle rect, PixelInterpolateMethod interpolateMethod = PixelInterpolateMethod.Bilinear, bool trimEmpty = false)
{
try
{
MagickImageCollection pngCollection = new MagickImageCollection();
using MagickImageCollection gifCollection = new MagickImageCollection(gifFile);
int[] delay = new int[gifCollection.Count];
int indx = 0;
foreach (var frame in gifCollection)
{
MagickImage pngTemplate = new MagickImage(pngFile);
using MagickImage gifFrame = new MagickImage(frame);
gifFrame.Alpha(AlphaOption.Set);
if (trimEmpty)
{
gifFrame.BackgroundColor = MagickColors.None;
gifFrame.ColorFuzz = new Percentage(1);
gifFrame.Trim();
gifFrame.RePage();
}
var size = GetSize(gifFrame, rect);
gifFrame.InterpolativeResize(size.Width, size.Height, interpolateMethod);
size.X = (rect.Width + rect.X) / 2 - (gifFrame.Width / 2);
size.Y = (rect.Height + rect.Y) / 2 - (gifFrame.Height / 2);
pngTemplate.Composite(gifFrame, size.X, size.Y, CompositeOperator.Over);
pngCollection.Add(pngTemplate);
delay[indx] = gifFrame.AnimationDelay;
indx++;
}
pngCollection[0].AnimationDelay = 0;
for (int index = 1; index < pngCollection.Count - 1; index++)
{
pngCollection[index].AnimationDelay = delay[index];
}
if (pngCollection.Count > 1)
{
QuantizeSettings settings = new QuantizeSettings()
{
Colors = 2048
};
pngCollection.Quantize(settings);
}
return pngCollection;
}
catch (Exception ex)
{
Console.WriteLine($"Error processing; Exception = {ex}");
}
return null;
}
static Rectangle GetSize(MagickImage img, Rectangle rect)
{
Rectangle output = new Rectangle(rect.X, rect.Y, 0, 0);
double aspectRatio = (double)img.Width / img.Height;
double otherAspect = (double)img.Height / img.Width;
output.Width = (int)Math.Min(Math.Round(rect.Width - rect.X * aspectRatio), rect.Width - rect.X);
output.Height = (int)(output.Width * otherAspect);
return output;
}
} }
} }

@ -0,0 +1,156 @@
using ImageMagick;
using Kehyeedra3.Services.Models;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kehyeedra3
{
public static class Helpers
{
public static async Task<(MagickImageCollection cardCollection, MagickFormat outFormatEnum, string outFormat)> MakeFishCardAsync(Fish fish, ulong currentXp, ulong floorXp, ulong nextLevelXp, string levelUp, int weight, ulong xp, int dcatch)
{
string path = Path.Combine(Environment.CurrentDirectory, "btextures");
string fpath = Path.Combine(path, "fish");
string[] vowels = new string[] { "a", "e", "i", "o", "u" };
string label = $"You caught a{(vowels.Contains((fish.Name[0].ToString()).ToLower()) ? "n" : "")} {fish.Name}.\n{weight / 100d}kg {fish.Rarity} fish.\n\nYou gain {xp}xp.\n{levelUp.Replace("*", "")}.";
if (dcatch != 1)
{
label = $"You caught {dcatch} {fish.Name}.\n{weight / 100d}kg {fish.Rarity} fish.\n\nYou gain {xp}xp.\n{levelUp.Replace("*", "")}.";
}
if (levelUp.Contains("reach"))
{
label = label.Replace("\nYou gain", "\n\nYou gain");
}
string tier = "";
switch (fish.Tier)
{
case FishTier.T1:
{
tier = "tier1";
}
break;
case FishTier.T2:
{
tier = "tier2";
}
break;
case FishTier.T3:
{
tier = "tier3";
}
break;
case FishTier.T4:
{
tier = "tier4";
}
break;
}
if (fish.Rarity == FishRarity.Unreasonable)
{
tier = "tieru";
}
try
{
MagickImage tempCard = new MagickImage(Path.Combine(path, "background.png"));
DrawableFont font = new DrawableFont(Path.Combine(path, "COMIC.TTF"));
using (MagickImage frame = new MagickImage(Path.Combine(path, "scover.png"), new MagickReadSettings //cover
{
BackgroundColor = MagickColors.None
}))
{
tempCard.Composite(frame, CompositeOperator.Over);
}
//draw to tempcard
{
using (MagickImage frame = new MagickImage(Path.Combine(path, "frame.png"), new MagickReadSettings //frame
{
BackgroundColor = MagickColors.None
}))
{
tempCard.Composite(frame, CompositeOperator.Over);
}
using (MagickImage stats = new MagickImage($"label:" + label, new MagickReadSettings
{
BackgroundColor = MagickColors.None,
FillColor = MagickColors.White,
FontPointsize = 14,
Font = font.Family,
TextAntiAlias = false,
StrokeAntiAlias = false
}))
{
tempCard.Composite(stats, 139, 5, CompositeOperator.Over);
}
//draw progressbar
if (currentXp != 0)
{
using (MagickImage xpBar = new MagickImage(Path.Combine(path, "xpbar.png"), new MagickReadSettings //xpbar
{
BackgroundColor = MagickColors.None
}))
{
using (var mask = new MagickImage("xc:none", xpBar.Width, xpBar.Height))
{
var h = (int)currentXp.Remap(floorXp, nextLevelXp, 5, 128);
mask.Draw(new DrawableFillColor(MagickColors.White), new DrawableRectangle(0, 128, xpBar.Width, 128 - h));
xpBar.Composite(mask, CompositeOperator.CopyAlpha);
}
tempCard.Composite(xpBar, 405, 5, CompositeOperator.Over);
}
}
}
MagickImageCollection cardCollection = await Extensions.GifPngMergeAsync(
tempCard,
Path.Combine(fpath, fish.Texture),
new Rectangle(10, 10, 128, 128),
PixelInterpolateMethod.Nearest,
true
);
tempCard.Dispose();
foreach(var card in cardCollection)
{
using (MagickImage frame = new MagickImage(Path.Combine(path, $"{tier}.png"), new MagickReadSettings //tier glow
{
BackgroundColor = MagickColors.None
}))
{
card.Composite(frame, 5, 5, CompositeOperator.Over);
}
}
MagickFormat outFormat = MagickFormat.Png;
if (cardCollection.Count > 1)
{
outFormat = MagickFormat.Gif;
}
return (cardCollection, outFormat, outFormat.ToString().ToLowerInvariant());
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
return (null, MagickFormat.Png, MagickFormat.Png.ToString().ToLowerInvariant());
}
}
}

@ -9,9 +9,9 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Discord.Addons.Interactive" Version="2.0.0" /> <PackageReference Include="Discord.Addons.Interactive" Version="2.0.0" />
<PackageReference Include="Discord.Net" Version="2.2.0" /> <PackageReference Include="Discord.Net" Version="2.3.1" />
<PackageReference Include="dotenv.net" Version="2.1.3" /> <PackageReference Include="dotenv.net" Version="2.1.3" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="7.22.2.2" /> <PackageReference Include="Magick.NET-Q16-AnyCPU" Version="7.23.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.11"> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.11">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

@ -0,0 +1,253 @@
// <auto-generated />
using System;
using Kehyeedra3;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Kehyeedra3.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20210410172129_MiningUpdate")]
partial class MiningUpdate
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.11")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Kehyeedra3.Services.Models.Fishing", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<string>("Inventory")
.HasColumnType("LONGTEXT");
b.Property<ulong>("LastFish")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Lvl")
.HasColumnType("bigint unsigned");
b.Property<int>("Prestige")
.HasColumnType("int");
b.Property<byte>("RodOwned")
.HasColumnType("tinyint unsigned");
b.Property<byte>("RodUsed")
.HasColumnType("tinyint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Fishing");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.ItemOffer", b =>
{
b.Property<ulong>("OfferId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<ulong>("BuyerId")
.HasColumnType("bigint unsigned");
b.Property<bool>("IsPurchaseFromStore")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsSellOffer")
.HasColumnType("tinyint(1)");
b.Property<ulong>("ItemId")
.HasColumnType("bigint unsigned");
b.Property<int>("OfferAmount")
.HasColumnType("int");
b.Property<ulong?>("StoreFrontId")
.HasColumnType("bigint unsigned");
b.Property<ulong>("StoreId")
.HasColumnType("bigint unsigned");
b.HasKey("OfferId");
b.HasIndex("StoreFrontId");
b.ToTable("ItemOffer");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Mining", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("Level")
.HasColumnType("bigint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Mining");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Reminder", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("Created")
.HasColumnType("bigint unsigned");
b.Property<string>("Message")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<ulong>("Send")
.HasColumnType("bigint unsigned");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Reminders");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreFront", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("StoreItemType")
.HasColumnType("int");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("StoreFronts");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreInventory", b =>
{
b.Property<ulong>("InvId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<string>("Item")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<int>("Price")
.HasColumnType("int");
b.Property<ulong?>("StoreFrontId")
.HasColumnType("bigint unsigned");
b.HasKey("InvId");
b.HasIndex("StoreFrontId");
b.ToTable("StoreInventory");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.User", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<string>("Avatar")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<sbyte>("CurrentBattlefish")
.HasColumnType("TINYINT");
b.Property<string>("GeneralInventory")
.HasColumnType("LONGTEXT");
b.Property<ulong>("LastMine")
.HasColumnType("bigint unsigned");
b.Property<long>("Money")
.HasColumnType("bigint");
b.Property<string>("Username")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.User+BattleFishObject", b =>
{
b.Property<ulong>("FishId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<sbyte>("FishType")
.HasColumnType("TINYINT");
b.Property<int>("Lvl")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<ulong>("NextXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("FishId");
b.ToTable("Battlefish");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.ItemOffer", b =>
{
b.HasOne("Kehyeedra3.Services.Models.StoreFront", null)
.WithMany("Offers")
.HasForeignKey("StoreFrontId");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreInventory", b =>
{
b.HasOne("Kehyeedra3.Services.Models.StoreFront", null)
.WithMany("Items")
.HasForeignKey("StoreFrontId");
});
#pragma warning restore 612, 618
}
}
}

@ -0,0 +1,64 @@
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Kehyeedra3.Migrations
{
public partial class MiningUpdate : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<sbyte>(
name: "CurrentBattlefish",
table: "Users",
type: "TINYINT",
nullable: false,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<sbyte>(
name: "FishType",
table: "Battlefish",
type: "TINYINT",
nullable: false,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.CreateTable(
name: "Mining",
columns: table => new
{
Id = table.Column<ulong>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Xp = table.Column<ulong>(nullable: false),
TXp = table.Column<ulong>(nullable: false),
Lvl = table.Column<ulong>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Mining", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Mining");
migrationBuilder.AlterColumn<int>(
name: "CurrentBattlefish",
table: "Users",
type: "int",
nullable: false,
oldClrType: typeof(sbyte),
oldType: "TINYINT");
migrationBuilder.AlterColumn<int>(
name: "FishType",
table: "Battlefish",
type: "int",
nullable: false,
oldClrType: typeof(sbyte),
oldType: "TINYINT");
}
}
}

@ -0,0 +1,253 @@
// <auto-generated />
using System;
using Kehyeedra3;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Kehyeedra3.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20210410173200_MiningUpdateYeah")]
partial class MiningUpdateYeah
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.11")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Kehyeedra3.Services.Models.Fishing", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<string>("Inventory")
.HasColumnType("LONGTEXT");
b.Property<ulong>("LastFish")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Lvl")
.HasColumnType("bigint unsigned");
b.Property<int>("Prestige")
.HasColumnType("int");
b.Property<byte>("RodOwned")
.HasColumnType("tinyint unsigned");
b.Property<byte>("RodUsed")
.HasColumnType("tinyint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Fishing");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.ItemOffer", b =>
{
b.Property<ulong>("OfferId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<ulong>("BuyerId")
.HasColumnType("bigint unsigned");
b.Property<bool>("IsPurchaseFromStore")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsSellOffer")
.HasColumnType("tinyint(1)");
b.Property<ulong>("ItemId")
.HasColumnType("bigint unsigned");
b.Property<int>("OfferAmount")
.HasColumnType("int");
b.Property<ulong?>("StoreFrontId")
.HasColumnType("bigint unsigned");
b.Property<ulong>("StoreId")
.HasColumnType("bigint unsigned");
b.HasKey("OfferId");
b.HasIndex("StoreFrontId");
b.ToTable("ItemOffer");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Mining", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("LastMine")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Level")
.HasColumnType("bigint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Mining");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Reminder", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("Created")
.HasColumnType("bigint unsigned");
b.Property<string>("Message")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<ulong>("Send")
.HasColumnType("bigint unsigned");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Reminders");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreFront", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("StoreItemType")
.HasColumnType("int");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("StoreFronts");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreInventory", b =>
{
b.Property<ulong>("InvId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<string>("Item")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<int>("Price")
.HasColumnType("int");
b.Property<ulong?>("StoreFrontId")
.HasColumnType("bigint unsigned");
b.HasKey("InvId");
b.HasIndex("StoreFrontId");
b.ToTable("StoreInventory");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.User", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<string>("Avatar")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<sbyte>("CurrentBattlefish")
.HasColumnType("TINYINT");
b.Property<string>("GeneralInventory")
.HasColumnType("LONGTEXT");
b.Property<long>("Money")
.HasColumnType("bigint");
b.Property<string>("Username")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.User+BattleFishObject", b =>
{
b.Property<ulong>("FishId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<sbyte>("FishType")
.HasColumnType("TINYINT");
b.Property<int>("Lvl")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<ulong>("NextXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("FishId");
b.ToTable("Battlefish");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.ItemOffer", b =>
{
b.HasOne("Kehyeedra3.Services.Models.StoreFront", null)
.WithMany("Offers")
.HasForeignKey("StoreFrontId");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreInventory", b =>
{
b.HasOne("Kehyeedra3.Services.Models.StoreFront", null)
.WithMany("Items")
.HasForeignKey("StoreFrontId");
});
#pragma warning restore 612, 618
}
}
}

@ -0,0 +1,34 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Kehyeedra3.Migrations
{
public partial class MiningUpdateYeah : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastMine",
table: "Users");
migrationBuilder.AddColumn<ulong>(
name: "LastMine",
table: "Mining",
nullable: false,
defaultValue: 0ul);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastMine",
table: "Mining");
migrationBuilder.AddColumn<ulong>(
name: "LastMine",
table: "Users",
type: "bigint unsigned",
nullable: false,
defaultValue: 0ul);
}
}
}

@ -0,0 +1,256 @@
// <auto-generated />
using System;
using Kehyeedra3;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Kehyeedra3.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20210411195647_FishingUpdateYeah")]
partial class FishingUpdateYeah
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.11")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Kehyeedra3.Services.Models.Fishing", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("FXp")
.HasColumnType("bigint unsigned");
b.Property<string>("Inventory")
.HasColumnType("LONGTEXT");
b.Property<ulong>("LastFish")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Lvl")
.HasColumnType("bigint unsigned");
b.Property<int>("Prestige")
.HasColumnType("int");
b.Property<byte>("RodOwned")
.HasColumnType("tinyint unsigned");
b.Property<byte>("RodUsed")
.HasColumnType("tinyint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Fishing");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.ItemOffer", b =>
{
b.Property<ulong>("OfferId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<ulong>("BuyerId")
.HasColumnType("bigint unsigned");
b.Property<bool>("IsPurchaseFromStore")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsSellOffer")
.HasColumnType("tinyint(1)");
b.Property<ulong>("ItemId")
.HasColumnType("bigint unsigned");
b.Property<int>("OfferAmount")
.HasColumnType("int");
b.Property<ulong?>("StoreFrontId")
.HasColumnType("bigint unsigned");
b.Property<ulong>("StoreId")
.HasColumnType("bigint unsigned");
b.HasKey("OfferId");
b.HasIndex("StoreFrontId");
b.ToTable("ItemOffer");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Mining", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("LastMine")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Lvl")
.HasColumnType("bigint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Mining");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Reminder", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("Created")
.HasColumnType("bigint unsigned");
b.Property<string>("Message")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<ulong>("Send")
.HasColumnType("bigint unsigned");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Reminders");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreFront", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("StoreItemType")
.HasColumnType("int");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("StoreFronts");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreInventory", b =>
{
b.Property<ulong>("InvId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<string>("Item")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<int>("Price")
.HasColumnType("int");
b.Property<ulong?>("StoreFrontId")
.HasColumnType("bigint unsigned");
b.HasKey("InvId");
b.HasIndex("StoreFrontId");
b.ToTable("StoreInventory");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.User", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<string>("Avatar")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<sbyte>("CurrentBattlefish")
.HasColumnType("TINYINT");
b.Property<string>("GeneralInventory")
.HasColumnType("LONGTEXT");
b.Property<long>("Money")
.HasColumnType("bigint");
b.Property<string>("Username")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.User+BattleFishObject", b =>
{
b.Property<ulong>("FishId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<sbyte>("FishType")
.HasColumnType("TINYINT");
b.Property<int>("Lvl")
.HasColumnType("int");
b.Property<string>("Name")
.HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<ulong>("NextXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("FishId");
b.ToTable("Battlefish");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.ItemOffer", b =>
{
b.HasOne("Kehyeedra3.Services.Models.StoreFront", null)
.WithMany("Offers")
.HasForeignKey("StoreFrontId");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.StoreInventory", b =>
{
b.HasOne("Kehyeedra3.Services.Models.StoreFront", null)
.WithMany("Items")
.HasForeignKey("StoreFrontId");
});
#pragma warning restore 612, 618
}
}
}

@ -0,0 +1,44 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Kehyeedra3.Migrations
{
public partial class FishingUpdateYeah : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Level",
table: "Mining");
migrationBuilder.AddColumn<ulong>(
name: "Lvl",
table: "Mining",
nullable: false,
defaultValue: 0ul);
migrationBuilder.AddColumn<ulong>(
name: "FXp",
table: "Fishing",
nullable: false,
defaultValue: 0ul);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Lvl",
table: "Mining");
migrationBuilder.DropColumn(
name: "FXp",
table: "Fishing");
migrationBuilder.AddColumn<ulong>(
name: "Level",
table: "Mining",
type: "bigint unsigned",
nullable: false,
defaultValue: 0ul);
}
}
}

@ -14,7 +14,7 @@ namespace Kehyeedra3.Migrations
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "3.1.2") .HasAnnotation("ProductVersion", "3.1.11")
.HasAnnotation("Relational:MaxIdentifierLength", 64); .HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Kehyeedra3.Services.Models.Fishing", b => modelBuilder.Entity("Kehyeedra3.Services.Models.Fishing", b =>
@ -23,6 +23,9 @@ namespace Kehyeedra3.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned"); .HasColumnType("bigint unsigned");
b.Property<ulong>("FXp")
.HasColumnType("bigint unsigned");
b.Property<string>("Inventory") b.Property<string>("Inventory")
.HasColumnType("LONGTEXT"); .HasColumnType("LONGTEXT");
@ -89,6 +92,29 @@ namespace Kehyeedra3.Migrations
b.ToTable("ItemOffer"); b.ToTable("ItemOffer");
}); });
modelBuilder.Entity("Kehyeedra3.Services.Models.Mining", b =>
{
b.Property<ulong>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned");
b.Property<ulong>("LastMine")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Lvl")
.HasColumnType("bigint unsigned");
b.Property<ulong>("TXp")
.HasColumnType("bigint unsigned");
b.Property<ulong>("Xp")
.HasColumnType("bigint unsigned");
b.HasKey("Id");
b.ToTable("Mining");
});
modelBuilder.Entity("Kehyeedra3.Services.Models.Reminder", b => modelBuilder.Entity("Kehyeedra3.Services.Models.Reminder", b =>
{ {
b.Property<ulong>("Id") b.Property<ulong>("Id")
@ -163,15 +189,12 @@ namespace Kehyeedra3.Migrations
b.Property<string>("Avatar") b.Property<string>("Avatar")
.HasColumnType("longtext CHARACTER SET utf8mb4"); .HasColumnType("longtext CHARACTER SET utf8mb4");
b.Property<int>("CurrentBattlefish") b.Property<sbyte>("CurrentBattlefish")
.HasColumnType("int"); .HasColumnType("TINYINT");
b.Property<string>("GeneralInventory") b.Property<string>("GeneralInventory")
.HasColumnType("LONGTEXT"); .HasColumnType("LONGTEXT");
b.Property<ulong>("LastMine")
.HasColumnType("bigint unsigned");
b.Property<long>("Money") b.Property<long>("Money")
.HasColumnType("bigint"); .HasColumnType("bigint");
@ -189,8 +212,8 @@ namespace Kehyeedra3.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("bigint unsigned"); .HasColumnType("bigint unsigned");
b.Property<int>("FishType") b.Property<sbyte>("FishType")
.HasColumnType("int"); .HasColumnType("TINYINT");
b.Property<int>("Lvl") b.Property<int>("Lvl")
.HasColumnType("int"); .HasColumnType("int");

@ -30,8 +30,9 @@ namespace Kehyeedra3.Services.Models
public FishSpecies Id; public FishSpecies Id;
//public byte Ego; //public byte Ego;
//public byte Superego; //public byte Superego;
public string Name; public string Name = "Missing Name";
public string Emote; public string Emote = "<:missingLeg:682586847830081551>";
public string Texture = "missingtexture.png";
public FishRarity Rarity; public FishRarity Rarity;
public FishTier Tier; public FishTier Tier;
} }
@ -40,6 +41,7 @@ namespace Kehyeedra3.Services.Models
public ulong Id { get; set; } = 0; // this is userid incase you get alzheimers you stupid baby waa waa public ulong Id { get; set; } = 0; // this is userid incase you get alzheimers you stupid baby waa waa
public ulong LastFish { get; set; } = 0; public ulong LastFish { get; set; } = 0;
public ulong Xp { get; set; } = 50; public ulong Xp { get; set; } = 50;
public ulong FXp { get; set; } = 0;
public ulong TXp { get; set; } = 0; public ulong TXp { get; set; } = 0;
public ulong Lvl { get; set; } = 0; public ulong Lvl { get; set; } = 0;
public byte RodOwned { get; set; } = 0; public byte RodOwned { get; set; } = 0;
@ -70,8 +72,9 @@ namespace Kehyeedra3.Services.Models
new Fish() new Fish()
{ {
Id = FishSpecies.Wakasagihime, Id = FishSpecies.Wakasagihime,
Name = "Touhoufish", Name = "Freshwater Lady",
Emote = "<:wakasagihime:793084118949691433>", Emote = "<:wakasagihime:793084118949691433>",
Texture = "touhoufish.png",
Rarity = FishRarity.Unreasonable, Rarity = FishRarity.Unreasonable,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -80,6 +83,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.LuckyCatfish, Id = FishSpecies.LuckyCatfish,
Name = "Lucky Catfish", Name = "Lucky Catfish",
Emote = "<a:catfishleft:682655661422542888><a:catfishright:682655661481525284>", Emote = "<a:catfishleft:682655661422542888><a:catfishright:682655661481525284>",
Texture = "catfish.gif",
Rarity = FishRarity.Legendary, Rarity = FishRarity.Legendary,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -88,6 +92,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Doomfish, Id = FishSpecies.Doomfish,
Name = "Doomfish", Name = "Doomfish",
Emote = "<a:doomfish:704407234574155834>", Emote = "<a:doomfish:704407234574155834>",
Texture = "doomfish.gif",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -96,6 +101,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Clownfish, Id = FishSpecies.Clownfish,
Name = "Clownfish", Name = "Clownfish",
Emote = "<a:clownfishleft:715846565972934718><a:clownfishright:715846565704761424>", Emote = "<a:clownfishleft:715846565972934718><a:clownfishright:715846565704761424>",
Texture = "clownfish.gif",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -104,6 +110,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Teracrab, Id = FishSpecies.Teracrab,
Name = "Teracrab", Name = "Teracrab",
Emote = "<a:teracrableft:710925664089538691><a:teracrabright:710925663439421512>", Emote = "<a:teracrableft:710925664089538691><a:teracrabright:710925663439421512>",
Texture = "teracrab.gif",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -112,6 +119,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Blobfish, Id = FishSpecies.Blobfish,
Name = "Blobfish", Name = "Blobfish",
Emote = "<a:blobfishleft:704386995996065885><a:blobfishright:704386996369358888>", Emote = "<a:blobfishleft:704386995996065885><a:blobfishright:704386996369358888>",
Texture = "blobfish.gif",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -120,6 +128,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Psychedelica, Id = FishSpecies.Psychedelica,
Name = "Psychedelica", Name = "Psychedelica",
Emote = "<a:psychedelicaleft:704406253966721135><a:psychedelicaright:704406252125421698>", Emote = "<a:psychedelicaleft:704406253966721135><a:psychedelicaright:704406252125421698>",
Texture = "psychedelica.gif",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -128,6 +137,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Gigacrab, Id = FishSpecies.Gigacrab,
Name = "Gigacrab", Name = "Gigacrab",
Emote = "<:gigacrableft:715626112327221348><:gigacrabright:715626112537067580>", Emote = "<:gigacrableft:715626112327221348><:gigacrabright:715626112537067580>",
Texture = "gigacrab.png",
Rarity = FishRarity.Uncommon, Rarity = FishRarity.Uncommon,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -136,6 +146,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Dopefish, Id = FishSpecies.Dopefish,
Name = "Dopefish", Name = "Dopefish",
Emote = "<:dopefishleft:700422139672658009><:dopefishright:700422139643428895>", Emote = "<:dopefishleft:700422139672658009><:dopefishright:700422139643428895>",
Texture = "dopefish.png",
Rarity = FishRarity.Uncommon, Rarity = FishRarity.Uncommon,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -144,6 +155,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Stargazer, Id = FishSpecies.Stargazer,
Name = "Stargazer", Name = "Stargazer",
Emote = "<:stargazerleft:700414644774240286><:stargazerright:700413063442202684>", Emote = "<:stargazerleft:700414644774240286><:stargazerright:700413063442202684>",
Texture = "stargazer.png",
Rarity = FishRarity.Uncommon, Rarity = FishRarity.Uncommon,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -152,6 +164,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Isopod, Id = FishSpecies.Isopod,
Name = "Isopod", Name = "Isopod",
Emote = "<:isopodleft:700397032271249428><:isopodright:700397031922991206>", Emote = "<:isopodleft:700397032271249428><:isopodright:700397031922991206>",
Texture = "isopod.png",
Rarity = FishRarity.Uncommon, Rarity = FishRarity.Uncommon,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -160,6 +173,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Sheephead, Id = FishSpecies.Sheephead,
Name = "Sheephead", Name = "Sheephead",
Emote = "<:sheepheadleft:710894977944649728><:sheepheadright:710894979467444284>", Emote = "<:sheepheadleft:710894977944649728><:sheepheadright:710894979467444284>",
Texture = "sheephead.png",
Rarity = FishRarity.Uncommon, Rarity = FishRarity.Uncommon,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -168,6 +182,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Cod, Id = FishSpecies.Cod,
Name = "Cod", Name = "Cod",
Emote = "<:codleft:695304941715062887><:codright:695304941949943808>", Emote = "<:codleft:695304941715062887><:codright:695304941949943808>",
Texture = "cod.png",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -176,6 +191,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Salmon, Id = FishSpecies.Salmon,
Name = "Salmon", Name = "Salmon",
Emote = "<:salmonleft:698167269359878236><:salmonright:698167269167202324>", Emote = "<:salmonleft:698167269359878236><:salmonright:698167269167202324>",
Texture = "salmon.png",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -184,6 +200,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Shrimp, Id = FishSpecies.Shrimp,
Name = "Shrimp", Name = "Shrimp",
Emote = "<:shrimpleft:715074288788570112><:shrimpright:715074288863936552>", Emote = "<:shrimpleft:715074288788570112><:shrimpright:715074288863936552>",
Texture = "shrimp.png",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -192,6 +209,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Crayfish, Id = FishSpecies.Crayfish,
Name = "Crayfish", Name = "Crayfish",
Emote = "<:crayfishleft:715638929885495377><:crayfishright:715638929843421284>", Emote = "<:crayfishleft:715638929885495377><:crayfishright:715638929843421284>",
Texture = "crayfish.png",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -200,6 +218,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Betta, Id = FishSpecies.Betta,
Name = "Betta", Name = "Betta",
Emote = "<:bettaleft:698179217107714088><:bettaright:698179216868638851>", Emote = "<:bettaleft:698179217107714088><:bettaright:698179216868638851>",
Texture = "betta.png",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -208,6 +227,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Pufferfish, Id = FishSpecies.Pufferfish,
Name = "Pufferfish", Name = "Pufferfish",
Emote = "<:pufferfishleft:715075414179184691><:pufferfishright:715075414116007937>", Emote = "<:pufferfishleft:715075414179184691><:pufferfishright:715075414116007937>",
Texture = "pufferfish.png",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -216,6 +236,7 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Carp, Id = FishSpecies.Carp,
Name = "Carp", Name = "Carp",
Emote = "<:koicarpleft:698204388556275752><:koicarpright:698204386421374986>", Emote = "<:koicarpleft:698204388556275752><:koicarpright:698204386421374986>",
Texture = "carp.png",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
@ -224,15 +245,17 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Megacrab, Id = FishSpecies.Megacrab,
Name = "Hermit Crab", Name = "Hermit Crab",
Emote = "<:hermitcrableft:715071501996392519><:hermitcrabright:715071501971488808>", Emote = "<:hermitcrableft:715071501996392519><:hermitcrabright:715071501971488808>",
Texture = "hermitcrab.png",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T1 Tier = FishTier.T1
}, },
new Fish() //// Tier 2 new Fish() //// Tier 2
{ {
Id = FishSpecies.Hypnofish, Id = FishSpecies.Hypnofish, // replace with shrimp waifu fish when art done
Name = "Hypnofish", Name = "Hypnofish",
Emote = "<:paska:786244602440450109><:hypnoosi:786244623478947841>", Emote = "<:paska:786244602440450109><:hypnoosi:786244623478947841>",
Texture = "hypnofish.png",
Rarity = FishRarity.Legendary, Rarity = FishRarity.Legendary,
Tier = FishTier.T2 Tier = FishTier.T2
}, },
@ -240,7 +263,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.Swolefish, Id = FishSpecies.Swolefish,
Name = "Pumped Up Swolefish", Name = "Pumped Up Swolefish",
Emote = "<:missingLeg:682586847830081551>", //Texture = "",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T2 Tier = FishTier.T2
}, },
@ -248,7 +271,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.Dogfish, Id = FishSpecies.Dogfish,
Name = "Dogfish", Name = "Dogfish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T2 Tier = FishTier.T2
}, },
@ -257,6 +280,23 @@ namespace Kehyeedra3.Services.Models
Id = FishSpecies.Gunfish, Id = FishSpecies.Gunfish,
Name = "Gunfish", Name = "Gunfish",
Emote = "<:gunfishleft:793492588799590460><:gunfishright:793492625277714442>", Emote = "<:gunfishleft:793492588799590460><:gunfishright:793492625277714442>",
Texture = "gunfish.png",
Rarity = FishRarity.Uncommon,
Tier = FishTier.T2
},
new Fish()
{
Id = FishSpecies.Dingus,
Name = "Dingus",
Rarity = FishRarity.Uncommon,
Tier = FishTier.T2
},
new Fish()
{
Id = FishSpecies.Finnfish,
Name = "Fi'ish",
Rarity = FishRarity.Uncommon, Rarity = FishRarity.Uncommon,
Tier = FishTier.T2 Tier = FishTier.T2
}, },
@ -264,7 +304,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.Rockfish, Id = FishSpecies.Rockfish,
Name = "Rockfish", Name = "Rockfish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T2 Tier = FishTier.T2
}, },
@ -272,16 +312,32 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.Fishlet, Id = FishSpecies.Fishlet,
Name = "Fishlet", Name = "Fishlet",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Common,
Tier = FishTier.T2
},
new Fish()
{
Id = FishSpecies.Cavefish,
Name = "Cavefish",
Rarity = FishRarity.Common,
Tier = FishTier.T2
},
new Fish()
{
Id = FishSpecies.Neck,
Name = "Neck",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T2 Tier = FishTier.T2
}, },
new Fish() //// Tier 3 new Fish() //// Tier 3
{ {
Id = FishSpecies.SpecDoomfish, Id = FishSpecies.Circlefish,
Name = "Spectral Doomfish", Name = "Circle Fish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Legendary, Rarity = FishRarity.Legendary,
Tier = FishTier.T3 Tier = FishTier.T3
}, },
@ -289,7 +345,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.RevCrab, Id = FishSpecies.RevCrab,
Name = "Revenant Crab", Name = "Revenant Crab",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T3 Tier = FishTier.T3
}, },
@ -297,7 +353,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.SpecFlameworm, Id = FishSpecies.SpecFlameworm,
Name = "Spectral Flameworm", Name = "Spectral Flameworm",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Uncommon, Rarity = FishRarity.Uncommon,
Tier = FishTier.T3 Tier = FishTier.T3
}, },
@ -305,7 +361,15 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.SpecShrimp, Id = FishSpecies.SpecShrimp,
Name = "Spectral Shrimp", Name = "Spectral Shrimp",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Common,
Tier = FishTier.T3
},
new Fish()
{
Id = FishSpecies.Ghostie,
Name = "Ghostie",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T3 Tier = FishTier.T3
}, },
@ -315,7 +379,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.T4PH1, Id = FishSpecies.T4PH1,
Name = "Placeholder", Name = "Placeholder",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Legendary, Rarity = FishRarity.Legendary,
Tier = FishTier.T4 Tier = FishTier.T4
}, },
@ -323,7 +387,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.T4PH2, Id = FishSpecies.T4PH2,
Name = "Placeholder", Name = "Placeholder",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Rare, Rarity = FishRarity.Rare,
Tier = FishTier.T4 Tier = FishTier.T4
}, },
@ -331,7 +395,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.T4PH3, Id = FishSpecies.T4PH3,
Name = "Placeholder", Name = "Placeholder",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Uncommon, Rarity = FishRarity.Uncommon,
Tier = FishTier.T4 Tier = FishTier.T4
}, },
@ -339,7 +403,7 @@ namespace Kehyeedra3.Services.Models
{ {
Id = FishSpecies.T4PH4, Id = FishSpecies.T4PH4,
Name = "Placeholder", Name = "Placeholder",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Common, Rarity = FishRarity.Common,
Tier = FishTier.T4 Tier = FishTier.T4
}, },
@ -379,26 +443,34 @@ namespace Kehyeedra3.Services.Models
Hypnofish = 20, Hypnofish = 20,
//T2 Rare //T2 Rare
Swolefish = 21, Swolefish = 21,
Dogfish = 102, Dogfish = 22,
//T2 Uncommon //T2 Uncommon
Gunfish = 22, Gunfish = 30,
Dingus = 31,
Finnfish = 32,
//T2 Common //T2 Common
Rockfish = 23, Rockfish = 40,
Fishlet = 24, Fishlet = 41,
Cavefish = 42,
Neck = 43,
//T3 Legendary //T3 Legendary
SpecDoomfish = 25, Circlefish = 50,
//T3 Rare //T3 Rare
RevCrab = 26, RevCrab = 51,
//T3 Uncommon //T3 Uncommon
SpecFlameworm = 27, SpecFlameworm = 60,
//T3 Common //T3 Common
SpecShrimp = 28, SpecShrimp = 70,
Ghostie = 71,
//T4 //T4
T4PH1 = 29, T4PH1 = 80,
T4PH2 = 30, //r
T4PH3 = 31, T4PH2 = 90,
T4PH4 = 32, //uc
T4PH3 = 100,
//c
T4PH4 = 110,
} }
public class FishingInventorySlot public class FishingInventorySlot
{ {

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace Kehyeedra3.Services.Models
{
public class Mining
{
[Key]
public ulong Id { get; set; } = 0;
public ulong Xp { get; set; } = 50;
public ulong TXp { get; set; } = 0;
public ulong Lvl { get; set; } = 0;
public ulong LastMine { get; set; } = 0;
}
}

@ -12,7 +12,6 @@ namespace Kehyeedra3.Services.Models
public string Avatar { get; set; } = null; public string Avatar { get; set; } = null;
public string Username { get; set; } = null; public string Username { get; set; } = null;
public long Money { get; set; } = 0; public long Money { get; set; } = 0;
public ulong LastMine { get; set; } = 0;
[Column(TypeName = "LONGTEXT")] [Column(TypeName = "LONGTEXT")]
public string GeneralInventory { get; set; } = "{}"; public string GeneralInventory { get; set; } = "{}";
[Column(TypeName = "TINYINT")] [Column(TypeName = "TINYINT")]
@ -62,25 +61,25 @@ namespace Kehyeedra3.Services.Models
{ {
Id = Items.Lettuce, Id = Items.Lettuce,
Name = "Learning Lettuce", Name = "Learning Lettuce",
Price = 50 Price = 25
}, },
new Item() new Item()
{ {
Id = Items.RareBait, Id = Items.RareBait,
Name = "Rare Bait", Name = "Rare Bait",
Price = 50 Price = 25
}, },
new Item() new Item()
{ {
Id = Items.BigBait, Id = Items.BigBait,
Name = "Big Bait", Name = "Big Bait",
Price = 20 Price = 10
}, },
new Item() new Item()
{ {
Id = Items.SpecialBait, Id = Items.SpecialBait,
Name = "Master Bait", Name = "Master Bait",
Price = 100 Price = 50
}, },
new Item() new Item()
{ {

Loading…
Cancel
Save