Skip to content

Instantly share code, notes, and snippets.

@brewk
brewk / gear, LITE
Last active January 28, 2020 01:45
/* ***********************************
*** Copyright (c) 2020 bruk
*** This script is free software; you can redistribute it and/or modify
*** it under the terms of the GNU General Public License as published by
*** the Free Software Foundation; either version 3 of the License, or
*** (at your option) any later version.
********************************** */
// this script returns average ilvl and neck level (with decimal progress to next level)
//step 1 on line 41 set essencesOn to true
var essencesOn = true;
// step 2 find this code section:
if (parsedTraits.equipped_items[back_slot].quality.type == "LEGENDARY")
{
allItems.back.ilvl = parsedTraits.equipped_items[back_slot].level.value;
//step 1.) go to line 1306, it should say mythicProgress, change it to:
highestWeekly,
raiderIOscore,
mythicProgress,
//step 2.) insert 2 additional columns on your spreadsheet before Progress
//step 3.) go to around line 1190, it should be if (raiderIO == true)
// ********* 1) add the following to the output array (which starts around 1287)
// you will also need to add an additional column to your sheet where you added it
heartPercent,
// ********* 2) look for the following code (around line 386-392)
if (toon.items.neck)
// Inserts an array that includes stats for each piece of gear AND/OR the total stats on all gear
//instructions:
// in the header you must make sure that essencesOn = true;
// similar to adding in the essences you will need to add statsArray, (including ,) AND/OR totalStats, into your output array
// statsArray will require 14 additional columns to be inserted
// totalStats will require 8 additional columns
//
// you can adjust the order that the totalStats are displayed (ie: have stamina be last) by change the order in statOrder below
//instructions:
// in the header you must make sure that essencesOn = true;
// similar to adding in the essences you will need to add traitsArray, (including ,) into your output array
// the traits will require 3 columns to be inserted into your sheet. You may need to adjust the height
// find the following line in the code:
// Time to do some gear audits
var azTraits = [ "-", "-", "-"];
if(toon.level == 120)
{
var traitsJSON = UrlFetchApp.fetch("https://"+region+".api.blizzard.com/profile/wow/character/"+realmName.toLowerCase().replace("'", "").replace(" ", "-")+"/"+toonName.toLowerCase()+"/equipment?namespace=profile-"+region+"&locale=en_US&access_token="+token+"", options);
parsedTraits = JSON.parse(traitsJSON.toString());
// add emsComplete, to your output array (starts at around line 1334)
//find the following line (around line 996)
var worldBosses = [52196, 52163, 52169, 52181, 52157, 52166];
//and replace everything below it UP TO the line that has var profession1 = "none";
// with the following code
// azerite traits / mark benthic
// (optional) add azTraits to the output array where you want it to appear
// you will need to manually add 3 columns to your sheet for them
// Benthic gear will be marked with a b
// this code must be added in after the gearIlvl for{} loop
// you can find it by searching for this line: enchants.push(allItems[enchantableItems[i]].enchant);
// paste the code in after the }s
// adds azerite traits to your sheet, this will create an additional call to the API, so folks with large rosters
// or do frequent refreshes could possibly (but doubtfully) run into too many API request issues
// traits will be displayed with Name (rank#)
// step 1
// add this in somewhere after around line 120, which should be
// toon = JSON.parse(toonJSON.toString());