minor feexes

fish and general store fixe
master
Lan 4 years ago
parent 5f9ebe48a4
commit 9564f54f55
  1. 17
      Kehyeedra3/Commands/Economy.cs
  2. 20
      Kehyeedra3/Commands/Interactive.cs

@ -231,7 +231,8 @@ 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?"); 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; return;
} }
if (guser.GeneralInventory != null|| guser.GeneralInventory != "{}")
{
items = guser.GetGenInve(); // items = guser.GetGenInve(); //
int[] subtract = { 0 }; int[] subtract = { 0 };
subtract[0] = -1; subtract[0] = -1;
@ -274,7 +275,7 @@ namespace Kehyeedra3.Commands
} }
guser.SetGenInve(items); guser.SetGenInve(items);
}
level = user.Lvl; level = user.Lvl;
totalXp = user.TXp; totalXp = user.TXp;
@ -287,7 +288,7 @@ namespace Kehyeedra3.Commands
int rari = SRandom.Next(0, 2001); int rari = SRandom.Next(0, 2001);
int weigh = SRandom.Next(10, 1501+prestige*500); int weigh = SRandom.Next(10, 1501+prestige*500);
int tierRoll = SRandom.Next(0, 20*rod+10*prestige+1); int tierRoll = SRandom.Next(0, 20*rod+10*prestige+11);
int dCatchRoll = SRandom.Next(0, 1000+prestige*20); int dCatchRoll = SRandom.Next(0, 1000+prestige*20);
int dcatch = 1; int dcatch = 1;
@ -527,7 +528,7 @@ namespace Kehyeedra3.Commands
if (bLet) if (bLet)
{ {
xp = Convert.ToUInt64(Math.Round(xp * 1.1, 0, MidpointRounding.ToEven)) * (ulong)dcatch; xp = Convert.ToUInt64(Math.Round(xp * 1.1, 0, MidpointRounding.ToEven));
} }
string lvlUp = ""; string lvlUp = "";
@ -795,7 +796,7 @@ namespace Kehyeedra3.Commands
return; return;
} }
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nProcess 1 **Lucky Catfish** for **0.1000%**? \n(Owned: {fish})\n"); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nProcess 1 **Lucky Catfish** for **0.1000%**? \n(Owned: {fish})\nType 'yes' to continue.");
var inp = await NextMessageAsync(); var inp = await NextMessageAsync();
if (inp.Content.ToLowerInvariant().Contains("yes")) if (inp.Content.ToLowerInvariant().Contains("yes"))
{ {
@ -810,6 +811,10 @@ namespace Kehyeedra3.Commands
await Database.SaveChangesAsync(); await Database.SaveChangesAsync();
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYou have obtained **Lucky Paste**"); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nYou have obtained **Lucky Paste**");
} }
else
{
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nok retard.");
}
} }
else else
{ {
@ -821,7 +826,7 @@ namespace Kehyeedra3.Commands
if (T2Up[0] != 0 && Rod[0] != 0) if (T2Up[0] != 0 && Rod[0] != 0)
{ {
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nDo you want to craft the **Reinforced Fishing Rod**?\nThis will use 1 **Lucky Paste** and 1 **Incomplete Rod**."); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nDo you want to craft the **Reinforced Fishing Rod**?\nThis will use 1 **Lucky Paste** and 1 **Incomplete Rod**.\nType 'yes' to continue.");
var inp = await NextMessageAsync(); var inp = await NextMessageAsync();
if (inp.Content != null && inp.Content.ToLowerInvariant().Contains("yes")) if (inp.Content != null && inp.Content.ToLowerInvariant().Contains("yes"))
{ {

@ -566,7 +566,7 @@ namespace Kehyeedra3.Commands
} }
[Command("gstore", RunMode = RunMode.Async),Alias("gs")] [Command("gstore", RunMode = RunMode.Async),Alias("gs"),Summary("General store: gstore or gs. Secondary variables s/sell to sell, b/buy to buy.")]
public async Task GeneralStore(string input = null) public async Task GeneralStore(string input = null)
{ {
using (var Database = new ApplicationDbContextFactory().CreateDbContext()) using (var Database = new ApplicationDbContextFactory().CreateDbContext())
@ -624,12 +624,12 @@ namespace Kehyeedra3.Commands
} }
else if (input == "b" || input == "buy") else if (input == "b" || input == "buy")
{ {
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nWhich item?\n{itemtxt}"); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nSpecify the item and amount (ID num)\n{itemtxt}");
var inp = await NextMessageAsync(); var inp = await NextMessageAsync(timeout: TimeSpan.FromMinutes(2));
item = itemlist.FirstOrDefault(i => (int)i.Id == int.Parse(inp.Content)); var inpsep = inp.Content.Split(" ");
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nHow many?");
inp = await NextMessageAsync(); item = itemlist.FirstOrDefault(i => (int)i.Id == int.Parse(inpsep[0]));
items = user.GetGenInve(); items = user.GetGenInve();
@ -641,12 +641,12 @@ namespace Kehyeedra3.Commands
items.Add(item.Id, amount); items.Add(item.Id, amount);
} }
if (int.Parse(inp.Content) * item.Price <= user.Money) if (int.Parse(inpsep[1]) * item.Price <= user.Money)
{ {
amount[0] += int.Parse(inp.Content); amount[0] += int.Parse(inpsep[1]);
int count = int.Parse(inp.Content); int count = int.Parse(inpsep[1]);
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nThis will cost you {count * item.Price}.\nType 'ok' to confirm."); await Context.Channel.SendMessageAsync($"{Context.User.Mention}\nThis will cost you {((long)(count * item.Price)).ToYeedraDisplay()}.\nType 'ok' to confirm.");
inp = await NextMessageAsync(); inp = await NextMessageAsync();
if (inp.Content.ToLowerInvariant() == "ok") if (inp.Content.ToLowerInvariant() == "ok")

Loading…
Cancel
Save