A very simple and easy to use status icon script that can be used with macro's like the following: !icon sentry-gun !icon archery-target @{target||token_id} !icon drink-me @{selected|token_id} The first macro will toggle the sentry-gun icon on all selected tokens. The second macro will toggle the archery-target icon on just the targeted token. The final macro will toggle the drink-me icon on only the first selected token, even if you select more than one token. This macro pops up a query with a list of all the status icons and toggles that icon on all the selected tokens. !icon ?{Status Icon|red|blue|green|brown|purple|pink|yellow|dead|skull|sleepy|half-heart|half-haze|interdiction|snail|lightning-helix|spanner|chained-heart|chemical-bolt|death-zone|drink-me|edge-crack|ninja-mask|stopwatch|fishing-net|overdrive|strong|fist|padlock|three-leaves|fluffy-wing|pummeled|tread|arrowed|aura|back-pain|black-flag|bleeding-eye|bolt-shield|broken-heart|cobweb|broken-shield|flying-flag|radioactive|trophy|broken-skull|frozen-orb|rolling-bomb|white-tower|grab|screaming|grenade|sentry-gun|all-for-one|angel-outfit|archery-target} // API COMMAND HANDLER
on("chat:message", function(msg) {
if (msg.type !== "api") return;
if (msg.content.split(" ")[0] === "!icon") {
var Icon = msg.content.split(" ")[1];
var TokenID = msg.content.split(" ")[2];
var Token;
if (TokenID !== undefined) {
Token = getObj("graphic", TokenID);
if (Token.get("status_" + Icon) === false) Token.set("status_" + Icon, true);
else Token.set("status_" + Icon, false);
} else if (msg.selected !== undefined) {
_.each(msg.selected, function(a) {
Token = getObj("graphic", a["_id"]);
if (Token.get("status_" + Icon) === false) Token.set("status_" + Icon, true);
else Token.set("status_" + Icon, false);
});
} else {
log ("No tokens selected or targeted.");
}
}
});