Using !eot in this script... if (msg.type == "api" && msg.content.indexOf("!eot") !== -1) {
var c = Campaign();
var pre_turnorder = c.get('turnorder');
if (!pre_turnorder) { return; }
var turn_order = JSON.parse(c.get('turnorder'));
if (!turn_order.length) { return; };
var turn = turn_order.shift();
turn_order.push({
id: turn.id,
pr: turn.pr,
custom: "Turn Counter"
});
Campaign().set("turnorder", JSON.stringify(turn_order));
}
... doesn't trigger ... on("change:campaign:turnorder", function(obj, prev) {
... which is necessary for the highlight and round tracker scripts I use. I could probably copy and adjust what I have in the other scripts into the !eot scripts, but that would just be creating redundant code I would have to keep updated in two places.