Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tf = 0;
- setInterval(function () {
- var unlock_map_end=0;
- var sorok_szama = 0, fragek_szama = 0, text = "", neirjki = 0; var top_frag = 0; var msg, msg2 = [];
- var ranks_temp = [], frags_temp = [], names_temp = [], rank_perm = [], frags_perm = [], name_perm = [];
- var names_temp = $("#players tbody tr td:first-of-type()");
- var frags_temp = $("table#players tbody tr td:nth-of-type(2)");
- tf = $("table#players tbody tr:first-of-type td:nth-of-type(2)").text(); tp = $("table#players tbody tr:first-of-type td:nth-of-type(1)").text();
- if(tf > top_frag) {
- var datum = new Date($.now()).toLocaleString();
- top_frag = tf;
- names_temp.each(function (index) {
- msg += $(this).text();
- });
- frags_temp.each(function (index) {
- frags_perm[index] = $(this).text();
- msg += $(this).text();
- });
- msg2 = "<" + datum.toLocaleString() + "> ";
- names_temp.each(function (index) {
- msg2 += + " " + (index)+1 + ". " + $(this).text() + " " + frags_perm[index] + "K\t";
- });
- console.log(msg2);
- unlock_map_end = 0;
- }
- else {
- if(tf > 0) {
- // New map
- if (unlock_map_end==0) {
- var datum = new Date($.now()).toLocaleString();
- msg = datum;
- names_temp.each(function (index) { msg += $(this).text(); });
- frags_temp.each(function (index) { frags_perm[index] = $(this).text(); msg += $(this).text();
- });
- msg2 = "<" + datum.toLocaleString() + "> New map # Scoreboard # ";
- names_temp.each(function (index) {
- msg2 += + " " + (index)+1 + ". " + $(this).text() + " " + frags_perm[index] + "K\t";
- })
- console.log(msg2);
- unlock_map_end = 1;
- }
- }
- else {
- }
- }
- },4000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement