Nice mike! Glad you like it :) But LOT better and more complex scripts than mine to buy pro for :P Side note: I managed to work out how to update all the tokens on a change in the menu. what would be a 'reasonable' execution time? Right now I'm doing it on all pages for all tokens that are viable. On my game it can find, filter, and update 204 token in around 800-900ms..that sound reasonable? Tokens Updated: 204 ms to run: 851 Or if anyone knows a faster/cleaner way to do it than this, feel free to help a brother out. ForceUpdate = function(){
var i = 0;
var start = new Date().getTime();
var barUsed = state.HealthColors.auraBar;
var results = filterObjs(function(obj) {
if( obj.get("type") == "graphic" &&
obj.get("subtype") == "token" &&
obj.get("layer") == "objects" &&
obj.get(barUsed + "_max") !== "" &&
obj.get(barUsed + "_value") !== "")
return true;
else return false;
});
_.each(results, function(obj) {
var prev = JSON.parse(JSON.stringify(obj));
handleToken(obj, prev);
i++
});
var end = new Date().getTime();
GMW("Tokens Updated: " + i + "<br>ms to run: "+ (end - start))
},