Пример #1
0
        public async Task PrintEquipment()
        {
            var userinfo = Context.Message.Author;

            string[] equip = PLDatabase.getEquipmentOf(userinfo.Id.ToString());
            var      eb    = new EmbedBuilder();

            eb.Color = Color.Gold;
            //Console.WriteLine("AAA");
            //Add Indexes
            int j = 1;

            foreach (string s in equip)
            {
                switch (j)
                {
                case 1:
                    eb.AddInlineField($"{j.ToString()} :HEAD: {s}", "STATS");
                    break;

                case 2:
                    eb.AddInlineField($"{j.ToString()} :R-HAND: {s}", "STATS");
                    break;

                case 3:
                    eb.AddInlineField($"{j.ToString()} :L-HAND: {s}", "STATS");
                    break;

                case 4:
                    eb.AddInlineField($"{j.ToString()} :CHEST: {s}", "STATS");
                    break;

                case 5:
                    eb.AddInlineField($"{j.ToString()} :LEGS: {s}", "STATS");
                    break;

                case 6:
                    eb.AddInlineField($"{j.ToString()} :BOOTS: {s}", "STATS");
                    break;

                case 7:
                    eb.AddInlineField($"{j.ToString()} :ACCESSORY: {s}", "STATS");
                    break;
                }

                j++;
            }
            eb.Title       = $"**Equipment Menu**";
            eb.Description = userinfo.Username;
            await userinfo.SendMessageAsync("", false, eb);

            try{ await Context.Message.DeleteAsync(); }catch (Exception e) { } //DELETE USER REQUEST MSG
        }
Пример #2
0
        public async Task UnEquipItem([Summary("Equipment Item index")] int num)
        {
            var userinfo = Context.Message.Author;

            if (num > 5 || num < 1)
            {
                await userinfo.SendMessageAsync($"**There isn't any Item to Unequip in the chosen slot __OR__ Your inventory is Full.**");

                return;
            }
            string[] Equips = PLDatabase.getEquipmentOf(userinfo.Id.ToString());
            if (PLDatabase.UnEquipItemXOf(num, Context.Message.Author.Id.ToString()) && Equips[num - 1] != "_empty_")
            {
                await userinfo.SendMessageAsync($"**Item __{Equips[num - 1]}__ Unequiped.**");
            }
            else
            {
                await userinfo.SendMessageAsync($"**There isn't any Item to Unequip in the chosen slot __OR__ Your inventory is Full.**");
            }
            try{ await Context.Message.DeleteAsync(); }catch (Exception e) { } //DELETE USER REQUEST MSG
        }