Esempio n. 1
0
def update_keystones():
    cl = Client()
    ks = cl.find_passives({'is_keystone': "1"})
    ks_json = {node.int_id: node.name for node in ks}

    with open(f"{_dir}/keystones.json", 'w+') as file:
        js.dump(ks_json, file)
Esempio n. 2
0
def update_ascendancy():
    cl = Client()
    asc = cl.find_passives({'ascendancy_class': "%"}, limit=500)
    asc_json = {node.int_id: node.name for node in asc}

    with open(f"{_dir}/ascendancy.json", 'w+') as file:
        js.dump(asc_json, file)
Esempio n. 3
0
 def __init__(self, bot):
     self.bot = bot
     self.client = Client()
     self.re = re.compile(r'\[\[[^\]]+\]\]')
     self.rng = re.compile('\(.+?\)')
     self.reaction_emojis = [
         "{}\N{COMBINING ENCLOSING KEYCAP}".format(num)
         for num in range(1, 4)
     ]
     self.reaction_emojis.append("❌")
     self.vendor_info = {
         "1":
         "Nessa (*Next to the player's stash*)",
         "2":
         "Yeena (*Inside the encampment, on the left side*)",
         "3":
         "Clarissa (*Left to the notice board*)",
         "4":
         "Petarus and Vanja (*Next to the bridge to the town's Waypoint*)",
         "5":
         "Lani",
         "6":
         "Lilly Roth (*Next to the player's Stash*)",
         "7":
         "Yeena",
         "8":
         "Clarissa (*Left to the notice board*)",
         "9":
         "Petarus and Vanja** (*Opposite of the Stash*)",
         "10":
         "Lani (*near the bridge to the ship*)",
         "Siosa":
         "Siosa (*in The Library after completing quest A fixture of Fate*)"
     }
Esempio n. 4
0
    async def poe(self, ctx, *, item: str):
        """Search for and post a POE <item> image"""
        item = Client().find_items({'_pageName': f'%{item}%'}, limit=1)
        if not item:
            return

        result = item[0]
        if result.base == "Prophecy":
            flavor = 'prophecy'
        elif 'gem' in result.tags:
            flavor = 'gem'
            # do some meta stufff here maybe?
        elif 'divination_card' in result.tags:
            flavor = 'unique'
            # possibly needs more here
        else:
            flavor = result.rarity
        r = poeutils.ItemRender(flavor)
        image = r.render(result)
        image_fp = BytesIO()
        image.save(image_fp, 'png')
        image_fp.seek(0)

        await ctx.send(file=discord.File(image_fp, result.name + ".png"))
Esempio n. 5
0
        RARES[stash][name] = [(item, tab)]


def get_credentials():
    """
    Prompts for credentials at the command line.
    """
    u = input('Account: ')
    p = getpass.getpass()
    creds = (u, p)
    return creds


if __name__ == '__main__':
    print("Logging in...")
    c = Client(get_credentials())
    db = sync_account(c)
    traverse_db(chance_orb_recipe_visitor, db)
    found = 0
    for league in RARES:
        print(f"LEAGUE: {league}")
        stash = RARES[league]
        for rare in stash:
            count = len(stash[rare])
            if count >= 2:
                print(f'CHANCE ORB: {rare} ({count})')
                for i in stash[rare]:
                    print(
                        f"  - {i[0]['typeLine']} @ ({i[0]['x']},{i[0]['y']} @ {i[1]['n']})"
                    )
    print(f"Scanned {TOTAL} rares")
Esempio n. 6
0
 def __init__(self, bot):
     self.bot = bot
     self.client = Client()
     self.re = re.compile(r'\[\[[^\]]+\]\]')