small edits

also minor improvements to fish stuff and commented bulksell because I accidentally pushed it as an incomplete thing
master
Lan 4 years ago
parent 519caa9430
commit 8b41386d07
  1. 6
      Kehyeedra3/Commands/Economy.cs
  2. 304
      Kehyeedra3/Commands/Interactive.cs
  3. 23
      Kehyeedra3/Commands/Stuff.cs
  4. 76
      Kehyeedra3/Services/Models/Fishing.cs

@ -231,9 +231,9 @@ namespace Kehyeedra3.Commands
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\narrrrr-right, ye scurby bastard, I know yer eager t' scour the seven seas but ye needs t' wait till the next minute t' pillage the booty'o'the depths, savvy?");
return;
}
if (guser.GeneralInventory != null|| guser.GeneralInventory != "{}")
if (guser.GeneralInventory != null || guser.GeneralInventory != "{}")
{
items = guser.GetGenInve(); //
items = guser.GetGenInve();
int[] subtract = { 0 };
subtract[0] = -1;
if (items.TryGetValue(Items.SpecialBait, out int[] SpecB))
@ -289,7 +289,7 @@ namespace Kehyeedra3.Commands
int rari = SRandom.Next(0, 2001);
int weigh = SRandom.Next(10, 1501+prestige*500);
int tierRoll = SRandom.Next(0, 20*rod+10*prestige+11);
int dCatchRoll = SRandom.Next(0, 1000+prestige*20);
int dCatchRoll = SRandom.Next(1, 1000)+prestige*20;
int dcatch = 1;
int rarity;

@ -880,157 +880,159 @@ namespace Kehyeedra3.Commands
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nI guess I'm starving tonight. :[");
}
}/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
else if (input == "bulksell")
{
int value = 0;
int count = 0;
FishSize size;
if (fuser.Inventory.Length < 3)
{
await Context.Channel.SendMessageAsync($"Your inventory is empty. Try fishing more.");
return;
}
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nSpecify the tier.\n");
var inp = await NextMessageAsync();
int tier = int.Parse(inp.Content);
if (tier > 0 && tier < 5)
{
switch (tier)
{
case 1:
{
fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T1).ToList();
}
break;
case 2:
{
fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T2).ToList();
}
break;
case 3:
{
fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T3).ToList();
}
break;
case 4:
{
fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T4).ToList();
}
break;
}
rarfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Rare).ToList();
uncfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Uncommon).ToList();
comfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Common).ToList();
}
else if (tier < 1 || tier > 4)
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nTier not available.");
return;
}
foreach (var f in fishinv)
{
int[] amounts;
if (!fishinv.TryGetValue(f.Key, out amounts))
{
amounts = new int[] { 0, 0, 0 };
fishinv.Add(f.Key, amounts);
}
fish = fishes.FirstOrDefault(i => i.Id == f.Key);
if (fish.Rarity != FishRarity.Legendary)
{
count += f.Value[0] + f.Value[1] + f.Value[2];
switch (fish.Rarity) //small
{
case FishRarity.Common:
{
value += (int)fish.Tier * 1 * 1;
}
break;
case FishRarity.Uncommon:
{
value += (int)fish.Tier * 1 * 3;
}
break;
case FishRarity.Rare:
{
value += (int)fish.Tier * 1 * 6;
}
break;
}
////
switch (fish.Rarity) //med
{
case FishRarity.Common:
{
value += (int)fish.Tier * 2 * 1;
}
break;
case FishRarity.Uncommon:
{
value += (int)fish.Tier * 2 * 3;
}
break;
case FishRarity.Rare:
{
value += (int)fish.Tier * 2 * 6;
}
break;
}
////
switch (fish.Rarity) //large
{
case FishRarity.Common:
{
value += (int)fish.Tier * 3 * 1;
}
break;
case FishRarity.Uncommon:
{
value += (int)fish.Tier * 3 * 3;
}
break;
case FishRarity.Rare:
{
value += (int)fish.Tier * 3 * 6;
}
break;
}
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();
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. :[");
}
}
}
}///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//else if (input == "bulksell")
//{
// int value = 0;
// int count = 0;
// FishSize size;
// if (fuser.Inventory.Length < 3)
// {
// await Context.Channel.SendMessageAsync($"Your inventory is empty. Try fishing more.");
// return;
// }
// await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nSpecify the tier.\n");
// var inp = await NextMessageAsync();
// int tier = int.Parse(inp.Content);
// if (tier > 0 && tier < 5)
// {
// switch (tier)
// {
// case 1:
// {
// fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T1).ToList();
// }
// break;
// case 2:
// {
// fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T2).ToList();
// }
// break;
// case 3:
// {
// fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T3).ToList();
// }
// break;
// case 4:
// {
// fishTiers = fishes.Where(f => (int)f.Tier == (int)FishTier.T4).ToList();
// }
// break;
// }
// rarfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Rare).ToList();
// uncfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Uncommon).ToList();
// comfish = fishTiers.Where(f => (int)f.Rarity == (int)FishRarity.Common).ToList();
// }
// else if (tier < 1 || tier > 4)
// {
// await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nTier not available.");
// return;
// }
// foreach (var f in fishinv)
// {
// int[] amounts;
// if (!fishinv.TryGetValue(f.Key, out amounts))
// {
// amounts = new int[] { 0, 0, 0 };
// fishinv.Add(f.Key, amounts);
// }
// fish = fishes.FirstOrDefault(i => i.Id == f.Key);
// if (fish.Rarity != FishRarity.Legendary)
// {
// count += f.Value[0] + f.Value[1] + f.Value[2];
// switch (fish.Rarity) //small
// {
// case FishRarity.Common:
// {
// value += (int)fish.Tier * 1 * 1;
// }
// break;
// case FishRarity.Uncommon:
// {
// value += (int)fish.Tier * 1 * 3;
// }
// break;
// case FishRarity.Rare:
// {
// value += (int)fish.Tier * 1 * 6;
// }
// break;
// }
// ////
// switch (fish.Rarity) //med
// {
// case FishRarity.Common:
// {
// value += (int)fish.Tier * 2 * 1;
// }
// break;
// case FishRarity.Uncommon:
// {
// value += (int)fish.Tier * 2 * 3;
// }
// break;
// case FishRarity.Rare:
// {
// value += (int)fish.Tier * 2 * 6;
// }
// break;
// }
// ////
// switch (fish.Rarity) //large
// {
// case FishRarity.Common:
// {
// value += (int)fish.Tier * 3 * 1;
// }
// break;
// case FishRarity.Uncommon:
// {
// value += (int)fish.Tier * 3 * 3;
// }
// break;
// case FishRarity.Rare:
// {
// value += (int)fish.Tier * 3 * 6;
// }
// break;
// }
// 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();
// 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. :[");
// }
// }
// }
//}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
}

@ -35,7 +35,7 @@ namespace Kehyeedra3.Commands
}
}
[Command("ratetrap"), Summary("Rates your or another person's trap potential as a percentage")]
[Command("ratenuts"), Summary("Rates your or another person's sack.")]
public async Task RateTrap( string name = null)
{
if (name == null)
@ -45,12 +45,12 @@ namespace Kehyeedra3.Commands
int trapRating0 = rando.Next(0, 101);
if (trapRating0 == 100)
{
int trapRating1 = rando1.Next(0, 1001);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nI'd say right now you're {trapRating1}% passable");
int trapRating1 = rando1.Next(0, 10001);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nCongrats king, your boss nuts weigh {trapRating1}g.");
}
else
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nI'd say right now you're {trapRating0}% passable");
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYour nuts weigh {trapRating0}g.");
}
}
else
@ -60,12 +60,12 @@ namespace Kehyeedra3.Commands
int trapRating0 = rando.Next(0, 101);
if (trapRating0 == 100)
{
int trapRating1 = rando1.Next(0, 1001);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nI'd say right now {name} is {trapRating1}% passable");
int trapRating1 = rando1.Next(100, 10001);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nCongrats {name}, your boss nuts weigh {trapRating1}g.");
}
else
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nI'd say right now {name} is {trapRating0}% passable");
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\n{name}'s nuts weigh {trapRating0}g.");
}
}
@ -98,12 +98,11 @@ namespace Kehyeedra3.Commands
string result = new DataTable().Compute(input, null).ToString();
await Context.Channel.SendMessageAsync($"{Context.User.Mention} {input} = {result}");
}
[Command("roll"), Summary("Rolls dice. Eg. 'roll d20'")]
public async Task RollDice([Remainder] string input)
[Command("roll"), Summary("Rolls dice. Eg. 'roll 20'")]
public async Task RollDice([Remainder] int input)
{
int dinput = int.Parse(input.Substring(input.IndexOf("d")).Replace("d", ""));
int output = SRandom.Next(dinput);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\n{output+1}");
int output = SRandom.Next(input+1);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\n{output}");
}
[Command("remind"), Summary("Reminds you in a given time. (days, hours, minutes) Eg. 'remind 1 2 3 wash hands' would remind you in 1 day, 2 hours, 3 minutes to wash your hands")]
public async Task Reminder(ulong d, ulong h, ulong m, [Remainder] string r = null)

@ -230,7 +230,7 @@ namespace Kehyeedra3.Services.Models
new Fish() //// Tier 2
{
Id = FishSpecies.T2Leg,
Id = FishSpecies.Hypnofish,
Name = "Hypnofish",
Emote = "<:paska:786244602440450109><:hypnoosi:786244623478947841>",
Rarity = FishRarity.Legendary,
@ -238,7 +238,7 @@ namespace Kehyeedra3.Services.Models
},
new Fish()
{
Id = FishSpecies.T2Swolefish,
Id = FishSpecies.Swolefish,
Name = "Pumped Up Swolefish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Rare,
@ -246,7 +246,7 @@ namespace Kehyeedra3.Services.Models
},
new Fish()
{
Id = FishSpecies.T2Gunfish,
Id = FishSpecies.Gunfish,
Name = "Gunfish",
Emote = "<:gunfishleft:793492588799590460><:gunfishright:793492625277714442>",
Rarity = FishRarity.Uncommon,
@ -254,16 +254,24 @@ namespace Kehyeedra3.Services.Models
},
new Fish()
{
Id = FishSpecies.T2Com,
Id = FishSpecies.Rockfish,
Name = "Rockfish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Common,
Tier = FishTier.T2
},
new Fish()
{
Id = FishSpecies.Fishlet,
Name = "Fishlet",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Common,
Tier = FishTier.T2
},
new Fish() //// Tier 3
{
Id = FishSpecies.T3Doomfish,
Id = FishSpecies.SpecDoomfish,
Name = "Spectral Doomfish",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Legendary,
@ -271,7 +279,7 @@ namespace Kehyeedra3.Services.Models
},
new Fish()
{
Id = FishSpecies.T3Crab,
Id = FishSpecies.RevCrab,
Name = "Revenant Crab",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Rare,
@ -279,7 +287,7 @@ namespace Kehyeedra3.Services.Models
},
new Fish()
{
Id = FishSpecies.T3Flameworm,
Id = FishSpecies.SpecFlameworm,
Name = "Spectral Flameworm",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Uncommon,
@ -287,45 +295,46 @@ namespace Kehyeedra3.Services.Models
},
new Fish()
{
Id = FishSpecies.T3Com,
Id = FishSpecies.SpecShrimp,
Name = "Spectral Shrimp",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Common,
Tier = FishTier.T3
},
new Fish() //// Tier 4
new Fish()
{
Id = FishSpecies.T4Leg,
Name = "Missing T4 Legendary Fish",
Id = FishSpecies.T4PH1,
Name = "Placeholder",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Legendary,
Tier = FishTier.T4
},
new Fish()
{
Id = FishSpecies.T4Rar,
Name = "Missing T4 Rare Fish",
Id = FishSpecies.T4PH2,
Name = "Placeholder",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Rare,
Tier = FishTier.T4
},
new Fish()
{
Id = FishSpecies.T4Unc,
Name = "Missing T4 Uncommon Fish",
Id = FishSpecies.T4PH3,
Name = "Placeholder",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Uncommon,
Tier = FishTier.T4
},
new Fish()
{
Id = FishSpecies.T4Com,
Name = "Missing T4 Common Fish",
Id = FishSpecies.T4PH4,
Name = "Placeholder",
Emote = "<:missingLeg:682586847830081551>",
Rarity = FishRarity.Common,
Tier = FishTier.T4
}
},
};
}
@ -359,29 +368,28 @@ namespace Kehyeedra3.Services.Models
Carp = 18,
Megacrab = 19,
//T2 Legendary
T2Leg = 20,
Hypnofish = 20,
//T2 Rare
T2Swolefish = 21,
Swolefish = 21,
//T2 Uncommon
T2Gunfish = 22,
Gunfish = 22,
//T2 Common
T2Com = 23,
Rockfish = 23,
Fishlet = 24,
//T3 Legendary
T3Doomfish = 24,
SpecDoomfish = 25,
//T3 Rare
T3Crab = 25,
RevCrab = 26,
//T3 Uncommon
T3Flameworm = 26,
SpecFlameworm = 27,
//T3 Common
T3Com = 27,
//T4 Legendary
T4Leg = 28,
//T4 Rare
T4Rar = 29,
//T4 Uncommon
T4Unc = 30,
//T4 Common
T4Com = 31
SpecShrimp = 28,
//T4
T4PH1 = 29,
T4PH2 = 30,
T4PH3 = 31,
T4PH4 = 32,
}
public class FishingInventorySlot
{

Loading…
Cancel
Save