async def get_dungeon_embed(self, ctx, player: skypy.Player): if not player.load_dungeon_stats(): return await Embed(self.bot, ctx.author, title="Error", description="Couldn't find any dungeon stats for this player.").set_requested_by_footer() class_emojis = {"healer": ":heart:", "mage": ":sparkler:", "berserk": ":crossed_swords:", "archer": ":bow_and_arrow:", "tank": ":shield:"} embed = Embed(self.bot, ctx.author, title=f"{self.format_name(player.uname)} Catacombs stats on {player.profile_name}", description=f"**Catacombs level: {player.catacomb_level[0]}\nXP to next level: {round(player.catacomb_level[1])}**") embed.add_field(name=":arrows_counterclockwise: Times played", value="\n".join([f"**Floor {z}:** {round(player.catacomb_times_floor_played[z])}" for z in player.catacomb_times_floor_played]), inline=False) embed.add_field(name=":clock1: Fastest times", value="\n".join([f"**Floor {z}:** {timedelta(seconds=round(player.catacomb_fasted_times[z] / 1000))}" for z in player.catacomb_fasted_times]), inline=True) embed.add_field(name=":1234: Best scores", value="\n".join([f"**Floor {z}:** {round(player.catacomb_best_scores[z]):,}" for z in player.catacomb_best_scores]), inline=True) embed.add_field(name=":drop_of_blood: Mobs killed", value="\n".join([f"**Floor {z}:** {round(player.catacomb_mobs_killed[z])}" for z in player.catacomb_mobs_killed]), inline=True) embed.add_field(name=u"\u200b", value="**Class Levels**", inline=False) for _class in player.catacomb_class_levels: embed.add_field(name=f"{class_emojis[_class.lower()]} {_class}", value=f"**Level:** {player.catacomb_class_levels[_class][0]}\n**XP to next level:** {round(player.catacomb_class_levels[_class][1])}\n", inline=True) embed.add_field(name=u"\u200b", value=u"\u200b", inline=True) embed.set_thumbnail(url=player.avatar()) await embed.set_made_with_love_footer() return embed
async def get_networth_embeds(self, ctx, player: skypy.Player): description = "" networth_elements = { "armor": "Armour", "wardrobe_inventory": "Wardrobe", "inventory": "Inventory", "enderchest": "Ender Chest", "talisman_bag": "Talisman Bag", "fishing_bag": "Fishing Bag", "quiver": "Quiver", "potion_bag": "Potion Bag", "pets": "Pets", "purse": "Purse Balance", "bank": "Bank Balance", "backpacks": "Backpacks", } embed = await Embed( self.bot, ctx.author, title= f"{self.format_name(player.uname)} estimated networth on {player.profile_name}" ).set_made_with_love_footer() detailed_nw_embed = await Embed( self.bot, ctx.author, title= f"{self.format_name(player.uname)} estimated networth on {player.profile_name}" ).set_made_with_love_footer() for inventory in networth_elements: description += f"**{self.bot.custom_emojis.get('inventories', {}).get(inventory, '')}{networth_elements[inventory]}** - {round(player.networth[inventory]):,}\n" if inventory in player.detailed_networth: detailed_nw_embed.add_field( name= f"{self.bot.custom_emojis.get('inventories', {}).get(inventory, '')}{networth_elements[inventory]} - {round(player.networth[inventory]):,}", value=player.detailed_networth[inventory].replace( '<recomb>', self.bot.custom_emojis.get('misc', {}).get( 'recombobulator', '')) or "API disabled or no items", inline=False) embed.add_field( name=f"**Total Networth** - {round(player.networth['total']):,}", value=description, inline=False) detailed_nw_embed.description = f"**Total Networth** - {round(player.networth['total']):,}" detailed_nw_embed.set_thumbnail(url=player.avatar()) return [embed, detailed_nw_embed]
async def get_stats_embed(self, ctx, player : skypy.Player): player.load_banking(False) player.load_misc(False) player.load_skills_slayers(False) name = self.format_name(player.uname) percentages = ["crit_chance", "speed", "crit_damage", "bonus_attack_speed", "sea_creature_chance"] icons = { 'health': "❤️", 'defense': "🛡️", 'effective_health': "💕", 'strength': "⚔️", 'speed': "🏃♂️", 'crit_chance': "🎲", 'crit_damage': "☠️", 'bonus_attack_speed': "🗯️", 'intelligence': "🧠", 'sea_creature_chance': "🎣", 'magic_find': "⭐", 'pet_luck': "🦜"} if player.enabled_api["skills"]: description = f"Average skill level: {player.skill_average}" else: description = "Average skill level: Skills Api disabled" embed = Embed(self.bot, ctx.author, title=f"{name} Stats on {player.profile_name}", description=description) await embed.set_patron_footer() embed.set_thumbnail(url=player.avatar()) for name, stat in player.stats.items(): if name == "damage" or name == "damage_increase": continue if name in percentages: stat = str(stat) + "%" else: stat = f"{stat:,}" embed.add_field(name=f"{icons[name]} " + name.replace("_", " ").capitalize(), value=stat) embed.add_field(name="🌈 Fairy souls", value=player.fairy_souls_collected) if player.enabled_api["banking"]: embed.add_field(name="🏦 Bank Balance", value=f"{round(player.bank_balance):,}") embed.add_field(name="💰 Purse", value=f"{round(player.purse):,}") online = await player.is_online() embed.add_field(name="🟢 Currently online" if online else "🔴Currently online", value="Yes" if online else "No") embed.add_field(name="🚪 Join date", value=str(player.join_date.strftime("%Y-%m-%d"))) embed.add_field(name="⏰ Last update", value=str(player.last_save.strftime("%Y-%m-%d"))) embed.add_field(name=":money_with_wings: Estimated networth", value=f"{round(player.networth['total'] + player.slayer_total_spend):,}") return embed