Beispiel #1
0
def overall(usrinput):
    os.system(clear_fn)
    length = 0
    #vars
    usr_stats = overallstats.get(usrinput)
    if not usr_stats:
        usr_stats = defaultdict(int)

    for x in full:
        if usrinput == x['summoner']:
            for k in aggregate_stats:
                usr_stats[k] += x.get(k, 0)

            if x['won']:
                usr_stats['won'] += 1
            if not x['won']:
                usr_stats['lost'] += 1
            length += getsec(x['length'])
    #total game length
    tlength = gethour(length)
    #avg game length = alength
    alength = length / (usr_stats['won'] + usr_stats['lost'])
    alength = gethour(alength)
    #print it!
    print '~Total Stats Across All Games for %s~ \n' % (usrinput)
    print 'Games: %s - Wins: %s - Losses %s - Win: %.2f%% - Time Played: %s' % (usr_stats['won'] + usr_stats['lost'], usr_stats['won'], usr_stats['lost'], usr_stats['won'] / (usr_stats['won'] + usr_stats['lost']) * 100, tlength)
    try:
        print 'Kills: %s - Deaths: %s - Assists: %s - KDR: %.2f \n' % (com(usr_stats['kills']), com(usr_stats['deaths']), com(usr_stats['assists']), usr_stats['kills'] / usr_stats['deaths'])
    except ZeroDivisionError:
        print 'Kills: %s - Deaths: %s - Assists: %s - KDR: 0 \n' % (com(usr_stats['kills']), com(usr_stats['deaths']), com(usr_stats['assists']))
    print 'Damage Dealt'
    print 'Phyiscal: %s - Magical: %s - Total: %s \n' % (com(usr_stats['physicalDamageDealt']), com(usr_stats['magicDamageDealt']), com(usr_stats['physicalDamageDealt'] + usr_stats['magicDamageDealt']))
    print 'Damage Received'
    print 'Phyiscal: %s - Magical: %s - Total: %s \n' % (com(usr_stats['physicalDamageTaken']), com(usr_stats['magicDamageTaken']), com(usr_stats['physicalDamageTaken'] + usr_stats['magicDamageTaken']))
    print 'Gold: %s - Healing: %s - CreepScore: %s \n' % (com(usr_stats['gold']), com(usr_stats['healed']), com(usr_stats['neutralMinionsKilled'] + usr_stats['minions']))
    print 'Time Averages/Min'
    print 'Game Length: %s - Gold: %s - CS: %.2f ' % (alength, com((usr_stats['gold'] / length) * 60), ((usr_stats['neutralMinionsKilled'] + usr_stats['minions']) / length) * 60)
    print 'Kills: %.2f - Deaths: %.2f - Assists: %.2f \n' % ((usr_stats['kills'] / length) * 60, (usr_stats['deaths'] / length) * 60, (usr_stats['assists'] / length) * 60)

    print 'Press a Key to continue'
    msvcrt.getch()
Beispiel #2
0
def champinfo(champ, summ):
    length = 0
    overall_length = 0
    usr_stats = overallstats.get(champ)
    overall_stats = overallstats.get(summ)
    if not overall_stats:
        overall_stats = defaultdict(int)
    if not usr_stats:
        usr_stats = defaultdict(int)
    #Gather stats for the champion selected.
    for x in full:
        if summ == x['summoner']:
            if champ == x['champion']:
                for k in aggregate_stats:
                    usr_stats[k] += x.get(k, 0)
                if x['won']:
                    usr_stats['won'] += 1
                if not x['won']:
                    usr_stats['lost'] += 1
                length += getsec(x['length'])
    #Gather stats from all of the summoners champ if setting is enabled.
    if setting[4] == '1':
        for x in full:
            if summ == x['summoner']:
                for k in aggregate_stats:
                    overall_stats[k] += x.get(k, 0)
                if x['won']:
                    overall_stats['won'] += 1
                if not x['won']:
                    overall_stats['lost'] += 1
                overall_length += getsec(x['length'])
        #total Game length = tlength
        #overall_tlength = gethour(overall_length)
        #avg game length = alength
        overall_alength = overall_length / (overall_stats['won'] + overall_stats['lost'])
        overall_alength = gethour(overall_alength)

    #total game length
    tlength = gethour(length)
    #avg game length = alength
    alength = length / (usr_stats['won'] + usr_stats['lost'])
    alength = gethour(alength)
    os.system(clear_fn)

    print '~Total Stats Across All Games for %s with %s~ \n' % (summ, champ)
    print 'Games: %s - Wins: %s - Losses %s - Win: %.2f%% - Time Played: %s' % (usr_stats['won'] + usr_stats['lost'], usr_stats['won'], usr_stats['lost'], usr_stats['won'] / (usr_stats['won'] + usr_stats['lost']) * 100, tlength)
    try:
        print 'Kills: %s - Deaths: %s - Assists: %s - KDR: %.2f \n' % (com(usr_stats['kills']), com(usr_stats['deaths']), com(usr_stats['assists']), usr_stats['kills'] / usr_stats['deaths'])
    except ZeroDivisionError:
        print 'Kills: %s - Deaths: %s - Assists: %s - KDR: 0 \n' % (com(usr_stats['kills']), com(usr_stats['deaths']), com(usr_stats['assists']))
    print 'Damage Dealt'
    print 'Phyiscal: %s - Magical: %s - Total: %s \n' % (com(usr_stats['physicalDamageDealt']), com(usr_stats['magicDamageDealt']), com(usr_stats['physicalDamageDealt'] + usr_stats['magicDamageDealt']))
    print 'Damage Received'
    print 'Phyiscal: %s - Magical: %s - Total: %s \n' % (com(usr_stats['physicalDamageTaken']), com(usr_stats['magicDamageTaken']), com(usr_stats['physicalDamageTaken'] + usr_stats['magicDamageTaken']))
    print 'Gold: %s - Healing: %s - CreepScore: %s \n' % (com(usr_stats['gold']), com(usr_stats['healed']), com(usr_stats['neutralMinionsKilled'] + usr_stats['minions']))
    print 'Time Averages/Min'
    print 'Game Length: %s - Gold: %s - CS: %.2f ' % (alength, com((usr_stats['gold'] / length) * 60), ((usr_stats['neutralMinionsKilled'] + usr_stats['minions']) / length) * 60)
    print 'Kills: %.2f - Deaths: %.2f - Assists: %.2f' % ((usr_stats['kills'] / length) * 60, (usr_stats['deaths'] / length) * 60, (usr_stats['assists'] / length) * 60)

    if setting[4] == '1':
        print '\nTime Averages/Min over all champions'
        print 'Game Length: %s - Gold: %s - CS: %.2f ' % (overall_alength, com((overall_stats['gold'] / overall_length) * 60), ((overall_stats['neutralMinionsKilled'] + overall_stats['minions']) / overall_length) * 60)
        print 'Kills: %.2f - Deaths: %.2f - Assists: %.2f' % ((overall_stats['kills'] / overall_length) * 60, (overall_stats['deaths'] / overall_length) * 60, (overall_stats['assists'] / overall_length) * 60)
    print '\nPress a Key to continue'
    msvcrt.getch()
Beispiel #3
0
def champinfo(champ, summ):
    length = 0
    overall_length = 0
    usr_stats = overallstats.get(champ)
    overall_stats = overallstats.get(summ)
    if not overall_stats:
        overall_stats = defaultdict(int)
    if not usr_stats:
        usr_stats = defaultdict(int)
    #Gather stats for the champion selected.
    for x in full:
        if summ == x['summoner']:
            if champ == x['champion']:
                for k in aggregate_stats:
                    usr_stats[k] += x.get(k, 0)
                if x['won']:
                    usr_stats['won'] += 1
                if not x['won']:
                    usr_stats['lost'] += 1
                length += getsec(x['length'])
    #Gather stats from all of the summoners champ if setting is enabled.
    if setting[4] == '1':
        for x in full:
            if summ == x['summoner']:
                for k in aggregate_stats:
                    overall_stats[k] += x.get(k, 0)
                if x['won']:
                    overall_stats['won'] += 1
                if not x['won']:
                    overall_stats['lost'] += 1
                overall_length += getsec(x['length'])
        #total Game length = tlength
        #overall_tlength = gethour(overall_length)
        #avg game length = alength
        overall_alength = overall_length / (overall_stats['won'] +
                                            overall_stats['lost'])
        overall_alength = gethour(overall_alength)

    #total game length
    tlength = gethour(length)
    #avg game length = alength
    alength = length / (usr_stats['won'] + usr_stats['lost'])
    alength = gethour(alength)
    os.system(clear_fn)

    print '~Total Stats Across All Games for %s with %s~ \n' % (summ, champ)
    print 'Games: %s - Wins: %s - Losses %s - Win: %.2f%% - Time Played: %s' % (
        usr_stats['won'] + usr_stats['lost'], usr_stats['won'],
        usr_stats['lost'], usr_stats['won'] /
        (usr_stats['won'] + usr_stats['lost']) * 100, tlength)
    try:
        print 'Kills: %s - Deaths: %s - Assists: %s - KDR: %.2f \n' % (
            com(usr_stats['kills']), com(
                usr_stats['deaths']), com(usr_stats['assists']),
            usr_stats['kills'] / usr_stats['deaths'])
    except ZeroDivisionError:
        print 'Kills: %s - Deaths: %s - Assists: %s - KDR: 0 \n' % (com(
            usr_stats['kills']), com(
                usr_stats['deaths']), com(usr_stats['assists']))
    print 'Damage Dealt'
    print 'Phyiscal: %s - Magical: %s - Total: %s \n' % (
        com(usr_stats['physicalDamageDealt']),
        com(usr_stats['magicDamageDealt']),
        com(usr_stats['physicalDamageDealt'] + usr_stats['magicDamageDealt']))
    print 'Damage Received'
    print 'Phyiscal: %s - Magical: %s - Total: %s \n' % (
        com(usr_stats['physicalDamageTaken']),
        com(usr_stats['magicDamageTaken']),
        com(usr_stats['physicalDamageTaken'] + usr_stats['magicDamageTaken']))
    print 'Gold: %s - Healing: %s - CreepScore: %s \n' % (
        com(usr_stats['gold']), com(usr_stats['healed']),
        com(usr_stats['neutralMinionsKilled'] + usr_stats['minions']))
    print 'Time Averages/Min'
    print 'Game Length: %s - Gold: %s - CS: %.2f ' % (
        alength, com((usr_stats['gold'] / length) * 60),
        ((usr_stats['neutralMinionsKilled'] + usr_stats['minions']) / length) *
        60)
    print 'Kills: %.2f - Deaths: %.2f - Assists: %.2f' % (
        (usr_stats['kills'] / length) * 60,
        (usr_stats['deaths'] / length) * 60,
        (usr_stats['assists'] / length) * 60)

    if setting[4] == '1':
        print '\nTime Averages/Min over all champions'
        print 'Game Length: %s - Gold: %s - CS: %.2f ' % (
            overall_alength, com(
                (overall_stats['gold'] / overall_length) * 60),
            ((overall_stats['neutralMinionsKilled'] + overall_stats['minions'])
             / overall_length) * 60)
        print 'Kills: %.2f - Deaths: %.2f - Assists: %.2f' % (
            (overall_stats['kills'] / overall_length) * 60,
            (overall_stats['deaths'] / overall_length) * 60,
            (overall_stats['assists'] / overall_length) * 60)
    print '\nPress a Key to continue'
    msvcrt.getch()
Beispiel #4
0
def overall(usrinput):
    os.system(clear_fn)
    length = 0
    #vars
    usr_stats = overallstats.get(usrinput)
    if not usr_stats:
        usr_stats = defaultdict(int)

    for x in full:
        if usrinput == x['summoner']:
            for k in aggregate_stats:
                usr_stats[k] += x.get(k, 0)

            if x['won']:
                usr_stats['won'] += 1
            if not x['won']:
                usr_stats['lost'] += 1
            length += getsec(x['length'])
    #total game length
    tlength = gethour(length)
    #avg game length = alength
    alength = length / (usr_stats['won'] + usr_stats['lost'])
    alength = gethour(alength)
    #print it!
    print '~Total Stats Across All Games for %s~ \n' % (usrinput)
    print 'Games: %s - Wins: %s - Losses %s - Win: %.2f%% - Time Played: %s' % (
        usr_stats['won'] + usr_stats['lost'], usr_stats['won'],
        usr_stats['lost'], usr_stats['won'] /
        (usr_stats['won'] + usr_stats['lost']) * 100, tlength)
    try:
        print 'Kills: %s - Deaths: %s - Assists: %s - KDR: %.2f \n' % (
            com(usr_stats['kills']), com(
                usr_stats['deaths']), com(usr_stats['assists']),
            usr_stats['kills'] / usr_stats['deaths'])
    except ZeroDivisionError:
        print 'Kills: %s - Deaths: %s - Assists: %s - KDR: 0 \n' % (com(
            usr_stats['kills']), com(
                usr_stats['deaths']), com(usr_stats['assists']))
    print 'Damage Dealt'
    print 'Phyiscal: %s - Magical: %s - Total: %s \n' % (
        com(usr_stats['physicalDamageDealt']),
        com(usr_stats['magicDamageDealt']),
        com(usr_stats['physicalDamageDealt'] + usr_stats['magicDamageDealt']))
    print 'Damage Received'
    print 'Phyiscal: %s - Magical: %s - Total: %s \n' % (
        com(usr_stats['physicalDamageTaken']),
        com(usr_stats['magicDamageTaken']),
        com(usr_stats['physicalDamageTaken'] + usr_stats['magicDamageTaken']))
    print 'Gold: %s - Healing: %s - CreepScore: %s \n' % (
        com(usr_stats['gold']), com(usr_stats['healed']),
        com(usr_stats['neutralMinionsKilled'] + usr_stats['minions']))
    print 'Time Averages/Min'
    print 'Game Length: %s - Gold: %s - CS: %.2f ' % (
        alength, com((usr_stats['gold'] / length) * 60),
        ((usr_stats['neutralMinionsKilled'] + usr_stats['minions']) / length) *
        60)
    print 'Kills: %.2f - Deaths: %.2f - Assists: %.2f \n' % (
        (usr_stats['kills'] / length) * 60,
        (usr_stats['deaths'] / length) * 60,
        (usr_stats['assists'] / length) * 60)

    print 'Press a Key to continue'
    msvcrt.getch()