General Discussion

General DiscussionHow to find your total KDA

How to find your total KDA in General Discussion
Rise

    from reddit
    To calculate your total KDA in dotabuff: go to your heroes page then select most game impact. Your url should look like this: http://dotabuff.com/players/86742287/heroes?metric=impact
    open developers console by pressing F12 and paste this code:
    k = d = a = 0;
    records = eval($('span.game-record')[0].innerText.replace('-', '+').replace('-', '+'));
    $('table td:nth-child(4)').each(function(z,b){k += (+b.innerText.replace(/,/g,''))})
    $('table td:nth-child(5)').each(function(z,b){d += (+b.innerText.replace(/,/g,''))})
    $('table td:nth-child(6)').each(function(z,b){a += (+b.innerText.replace(/,/g,''))})
    console.log('Records :', k, d, a);
    console.log('KDA :', k/records, d/records, a/records);
    console.log('Total KDA :', ((k/records) + (a/records)) / (d/records));
    created by this guy: http://steamcommunity.com/id/rvnjl/
    EDIT (for those in firefox):
    if (location.search != '?metric=impact') {
    alert('You will be redirected to most game impact page then execute the script again.');
    location = 'http://dotabuff.com/players/' + location.pathname.substring(9).split('/')[0] + '/heroes?metric=impact';
    }
    else {
    k = d = a = 0;
    records = eval($('span.game-record')[0].textContent.replace(/-/g, '+').replace(/,/, ''));
    $('table td:nth-child(4)').each(function(z,b){k += (+b.textContent.replace(/,/g,''))});
    $('table td:nth-child(5)').each(function(z,b){d += (+b.textContent.replace(/,/g,''))});
    $('table td:nth-child(6)').each(function(z,b){a += (+b.textContent.replace(/,/g,''))});
    alert('Total kills : ' + k + '\n'
    + 'Total deaths : ' + d + '\n'
    + 'Total assists : ' + a + '\n'
    + 'Total matches ' + records
    + '\n' + 'KDA : ' + k/records
    + ', ' + d/records + ', ' + a/records + '\n'
    + 'Final KDA : ' + ((k/records) + (a/records)) / (d/records));
    }

    http://www.reddit.com/r/DotA2/comments/2a1bmo/how_to_calculate_your_total_kda_in_dotabuff/

    Rise

      my total is 3.1 (2.7 main)

      Noé

        2.9

        Zahard

          3.37

          Seoulmate

            3.5 :(

            Rise

              why are u mad with 3.5 0.0

              Zenoth

                2.7 rofl lowest reporting

                Jesus_Is_A_Lich

                  just for you Zenoth: 1.75 :cheeky:

                  Rise

                    :facepalm: