Advertisement
M-Q711599

unlimited rest 2025

Jan 15th, 2020
1,004
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 22.35 KB | None | 0 0
  1.  
  2.     // lock out "Weekly checker"
  3.     var todayStamp =new Date();
  4.     var today = todayStamp.getDay();
  5.     var sinceYesterday  = 0;
  6.     var now = todayStamp.getHours();
  7.     var resetTime = new Date();
  8.  
  9.     var offset = new Date().getTimezoneOffset();
  10.     offset=offset/60;
  11.  
  12.     if (region == "us")
  13.     {
  14.         resetTime.setHours(15-offset,0,0,0);
  15.     }
  16.     else
  17.     {
  18.         resetTime.setHours(7-offset,0,0,0);
  19.     }
  20.  
  21.  
  22.     sinceYesterday = resetTime.getTime();
  23.  
  24.  
  25.     //attempt to fix post-midnight pre-reset
  26.     if (now < 15-offset && now > -1 && region == "us") //if it's after midnight but before 11am
  27.     {
  28.         sinceYesterday-=86400000;
  29.     }
  30.  
  31.     if (now < 7-offset && now > -1 && region == "eu") //if it's after midnight but before 7am
  32.     {
  33.         sinceYesterday-=86400000;
  34.     }
  35.  
  36.  
  37.     // now we have to figure out how long it's been since tuesday
  38.     var sinceTuesday =new Date();
  39.  
  40.     var reset = region == "eu" ? 3 : 2;  // 2 for tuesday, 3 for wednesday
  41.  
  42.     var midnight = new Date();
  43.     midnight.setHours(0,0,0,0);
  44.  
  45.     sinceTuesday = resetTime*1;
  46.  
  47.     if (today == reset)  //it IS tuesday!
  48.     {
  49.         //attempt to fix post-midnight pre-reset
  50.         if ((now < 7-offset && now > -1 && region == "eu") || (now < 15-offset && now > -1 && region == "us")) //if it's after midnight but before 7am
  51.         {
  52.             sinceTuesday-=(86400000*7);
  53.         }
  54.     }
  55.  
  56.     if (today > reset)
  57.     {
  58.         // wednesday (thurs eu) - saturday
  59.         sinceTuesday = sinceTuesday-(today-reset)*86400000;
  60.     }
  61.  
  62.     else if (today < reset)
  63.     {
  64.         // sunday + monday (tues eu)
  65.         sinceTuesday = sinceTuesday-((7+today-reset))*86400000; // this was 6, but to account for EU it was changed to 7-reset to be either 6 or 5 to account for Wednesday resets
  66.     }
  67.  
  68.     // Raid stat sub-categories
  69.     var CURRENT_XPAC = 7;
  70.     var raidInstancesSortOrder = [];
  71.     var raidDifficultySortOrder = ["Raid Finder", "Normal", "Heroic", "Mythic"];
  72.     for (i = 43; i <= 43; i++) // BfA raids start at 40, increase i <= when more are released
  73.     {
  74.         raidInstancesSortOrder.push(toon.progression.raids[i].name);
  75.     }
  76.     var instanceDetails = { "dungeons":{},"raids":{} };
  77.     for (i in raidInstancesSortOrder)
  78.     {
  79.         instanceDetails.raids[raidInstancesSortOrder[i]] = {};
  80.     }
  81.     var getShortInstanceName = function (inputString)
  82.     {
  83.         var split = inputString.split(" ");
  84.         if (split.length !== 1)
  85.         {
  86.             var retstring = "";
  87.             for (i in split)
  88.             {
  89.                 retstring = retstring + split[i].slice(0, 1);
  90.             }
  91.             return retstring;
  92.         }
  93.         else
  94.         {
  95.             return split[0].slice(0,3).toUpperCase();
  96.         }
  97.     };
  98.     var getRaidAndBossName = function(inputString)
  99.     {
  100.         var info = "";
  101.  
  102.         //attempt to get boss name, raid, and difficulty by splitting based on this string
  103.         if (inputString.indexOf("defeats") !== -1)
  104.         {
  105.             info = inputString.split(" defeats (");
  106.         }
  107.         else if (inputString.indexOf("redemptions") !== -1)
  108.         {
  109.             info = inputString.split(" redemptions (");
  110.         }
  111.         else if (inputString.indexOf("defenses") !== -1)
  112.         {
  113.             info = inputString.split(" defenses (");
  114.         }
  115.         else
  116.         {
  117.             info = inputString.split(" kills (");
  118.         }
  119.         var bossName = info.shift(); // first we get boss name
  120.         info = info[0].split(" ");
  121.         var difficultyName = "";
  122.         var nameForInstance = "";
  123.         if (info[0] === "Raid")
  124.         {
  125.             difficultyName = info.shift() + " " +  info.shift(); // Raid Finder
  126.             nameForInstance = info.join(" ").slice(0, -1); // rest is the name and we remove the last ")"
  127.         }
  128.         else if (info[0] !== "Return")
  129.         {
  130.             difficultyName = info.shift(); // first info is what difficultie we have
  131.             nameForInstance = info.join(" ").slice(0, -1); // rest is the name and we remove the last ")"
  132.         }
  133.         else // this should only be Return to Karazhan
  134.         {
  135.             difficultyName = "Mythic";
  136.             nameForInstance = info.join(" ").slice(0, -1); // rest is the name and we remove the last ")"
  137.         }
  138.         return [bossName, nameForInstance, difficultyName];
  139.     };
  140.     for (var instanceNumber in toon.statistics.subCategories[5].subCategories[CURRENT_XPAC].statistics)
  141.     {
  142.         var instanceBoss = toon.statistics.subCategories[5].subCategories[CURRENT_XPAC].statistics[instanceNumber];
  143.         var instanceReturns = getRaidAndBossName(instanceBoss.name);
  144.         var bossName = instanceReturns[0];
  145.         var nameOfInstance = instanceReturns[1];
  146.         var difficultyName = instanceReturns[2];
  147.         var typeOfInstance = "Dungeon";
  148.         for (var raid in raidInstancesSortOrder)// this is needed this as "the" is missing from instances.
  149.         {
  150.             if (raidInstancesSortOrder[raid].indexOf(nameOfInstance) !== -1)
  151.             {
  152.                 nameOfInstance = raidInstancesSortOrder[raid];
  153.                 typeOfInstance = "Raid";
  154.             }
  155.         }
  156.         var thisInstance = typeOfInstance === "Raid" ? instanceDetails.raids : instanceDetails.dungeons;
  157.         thisInstance[nameOfInstance] = thisInstance[nameOfInstance] || {};
  158.         thisInstance[nameOfInstance][difficultyName] = thisInstance[nameOfInstance][difficultyName] || {};
  159.         thisInstance[nameOfInstance][difficultyName].bosses = thisInstance[nameOfInstance][difficultyName].bosses || {};
  160.  
  161.         var infoForBoss = { "kills": instanceBoss.quantity };
  162.         if (typeOfInstance === "Dungeon" && difficultyName === "Heroic")
  163.         {
  164.             infoForBoss.lockout = instanceBoss.lastUpdated > sinceYesterday;
  165.         }
  166.         else if (typeOfInstance !== "Dungeon" || difficultyName !== "Normal")// everything except normal dungeons
  167.         {
  168.             infoForBoss.lockout = instanceBoss.lastUpdated > sinceTuesday;
  169.         }
  170.         if (nameOfInstance.indexOf("Violet Hold")===-1)
  171.         {
  172.             thisInstance[nameOfInstance][difficultyName].bosses[bossName] = infoForBoss;
  173.         }
  174.         else
  175.         {
  176.             var oldInfo = thisInstance[nameOfInstance][difficultyName].bosses["Violet Hold End Boss"] || {};
  177.             if (oldInfo.kills)
  178.             {
  179.                 infoForBoss.kills += oldInfo.kills;
  180.                 infoForBoss.lockout = infoForBoss.lockout || oldInfo.lockout; // since 0 is false and 1 is true this will work.
  181.             }
  182.             thisInstance[nameOfInstance][difficultyName].bosses["Violet Hold End Boss"] = infoForBoss;
  183.         }
  184.         thisInstance[nameOfInstance][difficultyName].kills = thisInstance[nameOfInstance][difficultyName].kills || 0;
  185.         thisInstance[nameOfInstance][difficultyName].kills += instanceBoss.quantity;
  186.     }
  187.     var displayInfo = { "raid": {}, "dungeon": {} };
  188.     for (var instanceType in instanceDetails)
  189.     {
  190.         var instances = instanceDetails[instanceType];
  191.         var infoOnDifficulty = {};
  192.         for (var instanceName in instances)
  193.         {
  194.             var instance = instances[instanceName];
  195.             if (instanceType === "raids") // for dungeons we take lockout for all instances, for raid we do it for each instance.
  196.             {
  197.                 infoOnDifficulty = {};
  198.             }
  199.             for (var difficulty in instance)
  200.             {
  201.                 infoOnDifficulty[difficulty] = infoOnDifficulty[difficulty] || {
  202.                     "activeWeeks":0, "lockout":0, "instanceLength": 0, "progress": 0, "kills": 0
  203.                 };
  204.                 var thisDifficulty = infoOnDifficulty[difficulty];
  205.                 var bosses = instance[difficulty].bosses;
  206.                 for (var boss in bosses)
  207.                 {
  208.                     var bossInfo = bosses[boss];
  209.                     thisDifficulty.activeWeeks = Math.max(thisDifficulty.activeWeeks, bossInfo.kills);
  210.                     thisDifficulty.instanceLength++;
  211.                     thisDifficulty.kills += bossInfo.kills;
  212.                     thisDifficulty.progress += bossInfo.kills === 0 ? 0 : 1;
  213.                     thisDifficulty.lockout += bossInfo.lockout ? 1 : 0;
  214.                     if (instanceType === "dungeons" && difficulty === "Mythic" && bossInfo.lockout)
  215.                     {
  216.                         thisDifficulty.details = thisDifficulty.details ? thisDifficulty.details + ", " + getShortInstanceName(instanceName) : getShortInstanceName(instanceName);
  217.                     }
  218.                 }
  219.  
  220.                 // really didn't want to do it this way, but... Daz needs special code to deal with alliance/horde having different entries in stats
  221.                 if (instanceName == "Battle of Dazar'alor")
  222.                 {
  223.                     thisDifficulty.instanceLength = 9;
  224.                 }
  225.             }
  226.             if (instanceType === "raids")
  227.             {
  228.                 displayInfo.raid[instanceName] = infoOnDifficulty;
  229.             }
  230.         }
  231.         if (instanceType === "dungeons")
  232.         {
  233.             displayInfo.dungeon = infoOnDifficulty;
  234.         }
  235.     }
  236.  
  237.  
  238.     //code for displaying missing mythics instead of completed, needs updating of more mythics are added
  239.     var missingMythics ="Missing: ";
  240.  
  241.     // remove the undefined if 0 completed, or the "Missing: " if all completed (increment this if more dungeons added)
  242.     if (!displayInfo.dungeon.Mythic.details || displayInfo.dungeon.Mythic.lockout ==10)
  243.     {
  244.         displayInfo.dungeon.Mythic.details = "";
  245.         missingMythics = "";
  246.     }
  247.  
  248.     else if (listMissing == true)
  249.     {
  250.         var mythicList = ["ATA", "FRE", "KR", "SotS", "SoB", "ToS", "TM", "TU", "TD", "WM"];  //add abbrvs to list if more are added
  251.         for (i=0; i<mythicList.length; i++)
  252.         {
  253.             var n=displayInfo.dungeon.Mythic.details.search(mythicList[i]);
  254.             if (n==-1)
  255.             {
  256.                 missingMythics = missingMythics + mythicList[i] + " ";
  257.             }
  258.         }
  259.         displayInfo.dungeon.Mythic.details = missingMythics;
  260.     }
  261.  
  262.     var worldBosses = [52196, 52163, 52169, 52181, 52157, 52166];          
  263.  
  264.     var worldBossKill = "";
  265.     var warfront = "";
  266.     var islandExpeditions = "";
  267.  
  268.     for (i=0; i < toon.quests.length; i++)
  269.     {
  270.         if (worldBosses.indexOf(toon.quests[i]) > -1)
  271.         {
  272.             worldBossKill = worldBossKill + "Weekly: \u2713 "; //unicode checkmark
  273.         }
  274.         if (toon.quests[i] == 54895 || toon.quests[i] == 54896)
  275.         {
  276.             worldBossKill = worldBossKill + "Ivus: \u2713 ";
  277.         }
  278.         if (toon.quests[i] == 52847 || toon.quests[i] == 52848)
  279.         {
  280.             worldBossKill = worldBossKill + "DH: \u2713 ";
  281.         }
  282.         if (toon.quests[i] == 53414 || toon.quests[i] == 53416)
  283.         {
  284.             warfront = warfront + "Stormgarde: \u2713 ";
  285.         }
  286.         if (toon.quests[i] == 53955 || toon.quests[i] == 53992)
  287.         {
  288.             warfront = warfront + "Darkshore: \u2713 ";
  289.         }
  290.         if (toon.quests[i] == 53435 || toon.quests[i] == 53436)
  291.         {
  292.             islandExpeditions = "\u2713 ";
  293.         }
  294.     }
  295. RAW Paste Data
  296.     // lock out "Weekly checker"
  297.     var todayStamp =new Date();
  298.     var today = todayStamp.getDay();
  299.     var sinceYesterday  = 0;
  300.     var now = todayStamp.getHours();
  301.     var resetTime = new Date();
  302.  
  303.     var offset = new Date().getTimezoneOffset();
  304.     offset=offset/60;
  305.  
  306.     if (region == "us")
  307.     {
  308.         resetTime.setHours(15-offset,0,0,0);
  309.     }
  310.     else
  311.     {
  312.         resetTime.setHours(7-offset,0,0,0);
  313.     }
  314.  
  315.  
  316.     sinceYesterday = resetTime.getTime();
  317.  
  318.  
  319.     //attempt to fix post-midnight pre-reset
  320.     if (now < 15-offset && now > -1 && region == "us") //if it's after midnight but before 11am
  321.     {
  322.         sinceYesterday-=86400000;
  323.     }
  324.  
  325.     if (now < 7-offset && now > -1 && region == "eu") //if it's after midnight but before 7am
  326.     {
  327.         sinceYesterday-=86400000;
  328.     }
  329.  
  330.  
  331.     // now we have to figure out how long it's been since tuesday
  332.     var sinceTuesday =new Date();
  333.  
  334.     var reset = region == "eu" ? 3 : 2;  // 2 for tuesday, 3 for wednesday
  335.  
  336.     var midnight = new Date();
  337.     midnight.setHours(0,0,0,0);
  338.  
  339.     sinceTuesday = resetTime*1;
  340.  
  341.     if (today == reset)  //it IS tuesday!
  342.     {
  343.         //attempt to fix post-midnight pre-reset
  344.         if ((now < 7-offset && now > -1 && region == "eu") || (now < 15-offset && now > -1 && region == "us")) //if it's after midnight but before 7am
  345.         {
  346.             sinceTuesday-=(86400000*7);
  347.         }
  348.     }
  349.  
  350.     if (today > reset)
  351.     {
  352.         // wednesday (thurs eu) - saturday
  353.         sinceTuesday = sinceTuesday-(today-reset)*86400000;
  354.     }
  355.  
  356.     else if (today < reset)
  357.     {
  358.         // sunday + monday (tues eu)
  359.         sinceTuesday = sinceTuesday-((7+today-reset))*86400000; // this was 6, but to account for EU it was changed to 7-reset to be either 6 or 5 to account for Wednesday resets
  360.     }
  361.  
  362.     // Raid stat sub-categories
  363.     var CURRENT_XPAC = 7;
  364.     var raidInstancesSortOrder = [];
  365.     var raidDifficultySortOrder = ["Raid Finder", "Normal", "Heroic", "Mythic"];
  366.     for (i = 43; i <= 43; i++) // BfA raids start at 40, increase i <= when more are released
  367.     {
  368.         raidInstancesSortOrder.push(toon.progression.raids[i].name);
  369.     }
  370.     var instanceDetails = { "dungeons":{},"raids":{} };
  371.     for (i in raidInstancesSortOrder)
  372.     {
  373.         instanceDetails.raids[raidInstancesSortOrder[i]] = {};
  374.     }
  375.     var getShortInstanceName = function (inputString)
  376.     {
  377.         var split = inputString.split(" ");
  378.         if (split.length !== 1)
  379.         {
  380.             var retstring = "";
  381.             for (i in split)
  382.             {
  383.                 retstring = retstring + split[i].slice(0, 1);
  384.             }
  385.             return retstring;
  386.         }
  387.         else
  388.         {
  389.             return split[0].slice(0,3).toUpperCase();
  390.         }
  391.     };
  392.     var getRaidAndBossName = function(inputString)
  393.     {
  394.         var info = "";
  395.  
  396.         //attempt to get boss name, raid, and difficulty by splitting based on this string
  397.         if (inputString.indexOf("defeats") !== -1)
  398.         {
  399.             info = inputString.split(" defeats (");
  400.         }
  401.         else if (inputString.indexOf("redemptions") !== -1)
  402.         {
  403.             info = inputString.split(" redemptions (");
  404.         }
  405.         else if (inputString.indexOf("defenses") !== -1)
  406.         {
  407.             info = inputString.split(" defenses (");
  408.         }
  409.         else
  410.         {
  411.             info = inputString.split(" kills (");
  412.         }
  413.         var bossName = info.shift(); // first we get boss name
  414.         info = info[0].split(" ");
  415.         var difficultyName = "";
  416.         var nameForInstance = "";
  417.         if (info[0] === "Raid")
  418.         {
  419.             difficultyName = info.shift() + " " +  info.shift(); // Raid Finder
  420.             nameForInstance = info.join(" ").slice(0, -1); // rest is the name and we remove the last ")"
  421.         }
  422.         else if (info[0] !== "Return")
  423.         {
  424.             difficultyName = info.shift(); // first info is what difficultie we have
  425.             nameForInstance = info.join(" ").slice(0, -1); // rest is the name and we remove the last ")"
  426.         }
  427.         else // this should only be Return to Karazhan
  428.         {
  429.             difficultyName = "Mythic";
  430.             nameForInstance = info.join(" ").slice(0, -1); // rest is the name and we remove the last ")"
  431.         }
  432.         return [bossName, nameForInstance, difficultyName];
  433.     };
  434.     for (var instanceNumber in toon.statistics.subCategories[5].subCategories[CURRENT_XPAC].statistics)
  435.     {
  436.         var instanceBoss = toon.statistics.subCategories[5].subCategories[CURRENT_XPAC].statistics[instanceNumber];
  437.         var instanceReturns = getRaidAndBossName(instanceBoss.name);
  438.         var bossName = instanceReturns[0];
  439.         var nameOfInstance = instanceReturns[1];
  440.         var difficultyName = instanceReturns[2];
  441.         var typeOfInstance = "Dungeon";
  442.         for (var raid in raidInstancesSortOrder)// this is needed this as "the" is missing from instances.
  443.         {
  444.             if (raidInstancesSortOrder[raid].indexOf(nameOfInstance) !== -1)
  445.             {
  446.                 nameOfInstance = raidInstancesSortOrder[raid];
  447.                 typeOfInstance = "Raid";
  448.             }
  449.         }
  450.         var thisInstance = typeOfInstance === "Raid" ? instanceDetails.raids : instanceDetails.dungeons;
  451.         thisInstance[nameOfInstance] = thisInstance[nameOfInstance] || {};
  452.         thisInstance[nameOfInstance][difficultyName] = thisInstance[nameOfInstance][difficultyName] || {};
  453.         thisInstance[nameOfInstance][difficultyName].bosses = thisInstance[nameOfInstance][difficultyName].bosses || {};
  454.  
  455.         var infoForBoss = { "kills": instanceBoss.quantity };
  456.         if (typeOfInstance === "Dungeon" && difficultyName === "Heroic")
  457.         {
  458.             infoForBoss.lockout = instanceBoss.lastUpdated > sinceYesterday;
  459.         }
  460.         else if (typeOfInstance !== "Dungeon" || difficultyName !== "Normal")// everything except normal dungeons
  461.         {
  462.             infoForBoss.lockout = instanceBoss.lastUpdated > sinceTuesday;
  463.         }
  464.         if (nameOfInstance.indexOf("Violet Hold")===-1)
  465.         {
  466.             thisInstance[nameOfInstance][difficultyName].bosses[bossName] = infoForBoss;
  467.         }
  468.         else
  469.         {
  470.             var oldInfo = thisInstance[nameOfInstance][difficultyName].bosses["Violet Hold End Boss"] || {};
  471.             if (oldInfo.kills)
  472.             {
  473.                 infoForBoss.kills += oldInfo.kills;
  474.                 infoForBoss.lockout = infoForBoss.lockout || oldInfo.lockout; // since 0 is false and 1 is true this will work.
  475.             }
  476.             thisInstance[nameOfInstance][difficultyName].bosses["Violet Hold End Boss"] = infoForBoss;
  477.         }
  478.         thisInstance[nameOfInstance][difficultyName].kills = thisInstance[nameOfInstance][difficultyName].kills || 0;
  479.         thisInstance[nameOfInstance][difficultyName].kills += instanceBoss.quantity;
  480.     }
  481.     var displayInfo = { "raid": {}, "dungeon": {} };
  482.     for (var instanceType in instanceDetails)
  483.     {
  484.         var instances = instanceDetails[instanceType];
  485.         var infoOnDifficulty = {};
  486.         for (var instanceName in instances)
  487.         {
  488.             var instance = instances[instanceName];
  489.             if (instanceType === "raids") // for dungeons we take lockout for all instances, for raid we do it for each instance.
  490.             {
  491.                 infoOnDifficulty = {};
  492.             }
  493.             for (var difficulty in instance)
  494.             {
  495.                 infoOnDifficulty[difficulty] = infoOnDifficulty[difficulty] || {
  496.                     "activeWeeks":0, "lockout":0, "instanceLength": 0, "progress": 0, "kills": 0
  497.                 };
  498.                 var thisDifficulty = infoOnDifficulty[difficulty];
  499.                 var bosses = instance[difficulty].bosses;
  500.                 for (var boss in bosses)
  501.                 {
  502.                     var bossInfo = bosses[boss];
  503.                     thisDifficulty.activeWeeks = Math.max(thisDifficulty.activeWeeks, bossInfo.kills);
  504.                     thisDifficulty.instanceLength++;
  505.                     thisDifficulty.kills += bossInfo.kills;
  506.                     thisDifficulty.progress += bossInfo.kills === 0 ? 0 : 1;
  507.                     thisDifficulty.lockout += bossInfo.lockout ? 1 : 0;
  508.                     if (instanceType === "dungeons" && difficulty === "Mythic" && bossInfo.lockout)
  509.                     {
  510.                         thisDifficulty.details = thisDifficulty.details ? thisDifficulty.details + ", " + getShortInstanceName(instanceName) : getShortInstanceName(instanceName);
  511.                     }
  512.                 }
  513.  
  514.                 // really didn't want to do it this way, but... Daz needs special code to deal with alliance/horde having different entries in stats
  515.                 if (instanceName == "Battle of Dazar'alor")
  516.                 {
  517.                     thisDifficulty.instanceLength = 9;
  518.                 }
  519.             }
  520.             if (instanceType === "raids")
  521.             {
  522.                 displayInfo.raid[instanceName] = infoOnDifficulty;
  523.             }
  524.         }
  525.         if (instanceType === "dungeons")
  526.         {
  527.             displayInfo.dungeon = infoOnDifficulty;
  528.         }
  529.     }
  530.  
  531.  
  532.     //code for displaying missing mythics instead of completed, needs updating of more mythics are added
  533.     var missingMythics ="Missing: ";
  534.  
  535.     // remove the undefined if 0 completed, or the "Missing: " if all completed (increment this if more dungeons added)
  536.     if (!displayInfo.dungeon.Mythic.details || displayInfo.dungeon.Mythic.lockout ==10)
  537.     {
  538.         displayInfo.dungeon.Mythic.details = "";
  539.         missingMythics = "";
  540.     }
  541.  
  542.     else if (listMissing == true)
  543.     {
  544.         var mythicList = ["ATA", "FRE", "KR", "SotS", "SoB", "ToS", "TM", "TU", "TD", "WM"];  //add abbrvs to list if more are added
  545.         for (i=0; i<mythicList.length; i++)
  546.         {
  547.             var n=displayInfo.dungeon.Mythic.details.search(mythicList[i]);
  548.             if (n==-1)
  549.             {
  550.                 missingMythics = missingMythics + mythicList[i] + " ";
  551.             }
  552.         }
  553.         displayInfo.dungeon.Mythic.details = missingMythics;
  554.     }
  555.  
  556.     var worldBosses = [52196, 52163, 52169, 52181, 52157, 52166];          
  557.  
  558.     var worldBossKill = "";
  559.     var warfront = "";
  560.     var islandExpeditions = "";
  561.  
  562.     for (i=0; i < toon.quests.length; i++)
  563.     {
  564.         if (worldBosses.indexOf(toon.quests[i]) > -1)
  565.         {
  566.             worldBossKill = worldBossKill + "Weekly: \u2713 "; //unicode checkmark
  567.         }
  568.         if (toon.quests[i] == 54895 || toon.quests[i] == 54896)
  569.         {
  570.             worldBossKill = worldBossKill + "Ivus: \u2713 ";
  571.         }
  572.         if (toon.quests[i] == 52847 || toon.quests[i] == 52848)
  573.         {
  574.             worldBossKill = worldBossKill + "DH: \u2713 ";
  575.         }
  576.         if (toon.quests[i] == 53414 || toon.quests[i] == 53416)
  577.         {
  578.             warfront = warfront + "Stormgarde: \u2713 ";
  579.         }
  580.         if (toon.quests[i] == 53955 || toon.quests[i] == 53992)
  581.         {
  582.             warfront = warfront + "Darkshore: \u2713 ";
  583.         }
  584.         if (toon.quests[i] == 53435 || toon.quests[i] == 53436)
  585.         {
  586.             islandExpeditions = "\u2713 ";
  587.         }
  588.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement