Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Test

1564920710
Grand Maître Chat
Marketplace Creator
Translator
on("change:campaign:turnorder", function(obj, prev) { if (!Campaign().get("turnorder")) return; var turn_order = JSON.parse(Campaign().get("turnorder")); if (!turn_order.length) return; if (!turn_order[0].id == -1) return; if (typeof turn_order[0].pr == "string") { if (turn_order[0].pr.substring(0, 5) == "Round") { var RoundTracker = turn_order[0].pr; var CurrentRound = parseInt(RoundTracker.substring(5)); turn_order[0].pr = "Round " + (CurrentRound + 1); Campaign().set({turnorder: JSON.stringify(turn_order)}); return; } } var current_token = getObj("graphic", turn_order[0].id); var initiative_highlighter = findObjs({name: "InitiativeHighlight", pageid: current_token.get("pageid")}, {caseInsensitive: true})[0]; if (initiative_highlighter == undefined) { sendChat("ERROR", "/w gm Cannot find an initiative highlight token on this page."); return; } if (initiative_highlighter.get("layer") == "gmlayer" && current_token.get("layer") != "gmlayer") { initiative_highlighter.set({ "top": current_token.get("top"), "left": current_token.get("left"), "height": current_token.get("height"), "width": current_token.get("width") }); setTimeout(function() { initiative_highlighter.set({ "layer": current_token.get("layer") }); }, 500); } else { initiative_highlighter.set({ "layer": current_token.get("layer"), "top": current_token.get("top"), "left": current_token.get("left"), "height": current_token.get("height"), "width": current_token.get("width") }); } toFront(current_token); });
1564920769
Grand Maître Chat
Marketplace Creator
Translator
+[[12-@{some char|ammo attribute}]]
1564926796
The Aaron
Roll20 Production Team
API Scripter
What are you testing?