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
This post has been closed. You can still view previous posts, but you can't post any new replies.

API BUG

1421168594
PrincessFairy
Plus
Marketplace Creator
API Bug The API scripts are constantly disabling themselves in the interface. They remain active on the API script page, but the scripts don't work. When I reset the script they work for about 3-5 hours and then they stop working again and I have to reset them again. By resetting I am referring to disabling and enabling them on the API page. Sometimes I have had to reset them 3 or 4 times in a 5 hour period.
1421171480
The Aaron
Roll20 Production Team
API Scripter
Which scripts are you using? Have you changed anything about the scripts you are using recently, or did this just start happening?
Also, is this on Dev or Main?
1421179847
PrincessFairy
Plus
Marketplace Creator
This is happening in main server and nothing has been changed in the script in a month or so. It just started happening.
So what scripts are you using? Is this still a problem for you?
1421885889
PrincessFairy
Plus
Marketplace Creator
Its happen to all my scripts but I only have two. Powercards script and token autoactivate marker based on bar 1.
1421891705
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Can you leave your API window open with the console log and report back if it throws any errors when you find your scripts not working?
1421891816
Gen Kitty
Forum Champion
Yeah, I'm getting the same gremlin in a tuesday night game I'm in. GM enables the script, sees no errors, but the script doesn't actually function. I'mm check back the next day and it works. This is really really frustrating. This is on the production server, with only the powercards script.
1421892701

Edited 1421892721
The Aaron
Pro
API Scripter
I just had pretty much this exact issue. I had to refresh the scripts page a few times before it started working again. For me, the log said this when it didn't work: Restarting sandbox due to script changes... Spinning up new sandbox... and this once it did (I have a debugging script that outputs "Info is up!" when on('ready',...) occurs): Restarting sandbox due to script changes... Spinning up new sandbox... "Info is up!" This was on Prod.
Are you all using the Powercard Script when this is happening?
1421902407
Gen Kitty
Forum Champion
Yes, it is the only script the GM is using.
1421902972
The Aaron
Pro
API Scripter
In my case, I have it installed. It might not be the best campaign for tracking script bugs down in though... It's my API testbed.
1421907278
Lithl
Pro
Sheet Author
API Scripter
*snerk* Yeah, tracking bugs down looks like it would be difficult for you, Aaron. My test campaign only has 3 tabs, because I keep changing what script is in them instead of adding new tabs. =P
1421938598
PrincessFairy
Plus
Marketplace Creator
It's good to see that others are having the same problem. I hope it gets fixed. Next time I play I will post the console log but we only Play on Sunday so it will be a few days.
1421939002
The Aaron
Pro
API Scripter
Brian said: *snerk* Yeah, tracking bugs down looks like it would be difficult for you, Aaron. My test campaign only has 3 tabs, because I keep changing what script is in them instead of adding new tabs. =P It only started with 3 tabs... :)
1421944542
PrincessFairy
Plus
Marketplace Creator
Lol
I don't know if this is related. But what I have found is that I will login to a campaign with the intentions of doing XYZ, however the kids come in, wife needs something, get distracted, sleepy, whatever... but I remain logged in for a significant period of time with no activity. So one of two things happens, I start trying to do things again, but the API is stopped with a simple "Sandbox closed due to error." message, or I just close the tab and attempt to login later with essentially the same result. I have not seen a case (personally) where the "Sandbox closed due to error." happens when I don't sit idle (or more accurately not actually using the API) at some stage for a significant period of time (generally 1-2 hours). But in such cases, once the API is restarted it works great until I do the same thing.
1421956817
Gen Kitty
Forum Champion
The gremlin has struck twice in three sessions, and if it happens again next week I'll do my best to get a console log though my not being the GM may make the log useless.... What has happened for me is that the GM updates the script sometime in the hours prior to the game. I login to the game, the script isn't working. The GM, once he logs in to the table, disables/enables the script a few times, reports back there's no errors, and the script still doesn't work and we go without for the evening. I'll log back into the table the next afternoon, and the script works and I tear my hair out in frustration. I have no idea what was different about session #2 in that the script just worked from start to finish, but #1 and #3 the script didn't.
GenKitty said: The gremlin has struck twice in three sessions, and if it happens again next week I'll do my best to get a console log though my not being the GM may make the log useless.... What has happened for me is that the GM updates the script sometime in the hours prior to the game. I login to the game, the script isn't working. The GM, once he logs in to the table, disables/enables the script a few times, reports back there's no errors, and the script still doesn't work and we go without for the evening. I'll log back into the table the next afternoon, and the script works and I tear my hair out in frustration. I have no idea what was different about session #2 in that the script just worked from start to finish, but #1 and #3 the script didn't. Send me a link to the campaign where it's happening.
1422052822
Gen Kitty
Forum Champion
Link sent
1422054369
PrincessFairy
Plus
Marketplace Creator
Just happen after 1 hour, all I got was error Sandbox closed due to error. Restarting sandbox due to script changes... Spinning up new sandbox... Restarting sandbox due to script changes... Spinning up new sandbox... Restarting sandbox due to script changes... Spinning up new sandbox... Restarting sandbox due to script changes... Spinning up new sandbox... Restarting sandbox due to script changes... Spinning up new sandbox... Restarting sandbox due to script changes... Spinning up new sandbox... Restarting sandbox due to script changes... Spinning up new sandbox... Restarting sandbox due to script changes... Spinning up new sandbox... "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: 65/65" "1: 65/65" "1: 65/65" "1: 65/65" "1: 65/65" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: NaN/NaN" "1: 48/48" "1: 48/48" "1: NaN/NaN" "1: NaN/NaN" Sandbox closed due to error.
1422066311
PrincessFairy
Plus
Marketplace Creator
It strikes again, and there just no fixing it. I am not sure what is going on with the API, and I am really surprised to see it having this much of a problem. I really hope that the solution is fixed soon, it sometimes happen by the hour sometimes over several hours.
I mean, on your stuff The Dragon, those look like actually errors, don't they? Or is it supposed to say NaN/NaN?
1422129876
PrincessFairy
Plus
Marketplace Creator
It always come up NaN/NaN, I am really not sure on that part, all of my script was written by Arron or Honey Badger so unless there is a error and there codes I am not sure. But just to make sure I am going to post all my scripts here so you can review them to see if it is a script issue. Sorry about the large set of scripts, but this is everything I use so if there is something wrong in it maybe you can find it. Token Marker /** * Set various token markers based on bar cur/max ratios * * The CONFIG array can have any number of configuration objects. These objects * are processed in order. * * barId - The ID of the bar to look at the values for [1, 2, 3] * barRatio - The ratio of bar value to max value that triggers setting the status marker [0 - 1] * status - The name of the status marker to toggle [redmarker, bluemarker, greenmarker, brownmarker, purplemarker, dead] * whenLow - The state of the marker when the bar value is &lt;= the ratio [true, false] */ var CONFIG = [ {barId: 1, barRatio: .75, status: "pink", whenLow: true}, {barId: 1, barRatio: .5, status: "half-heart", whenLow: true}, {barId: 1, barRatio: .25, status: "red", whenLow: true}, {barId: 1, barRatio: 0, status: "pummeled", whenLow: true}]; on("change:token", function(obj) { CONFIG.forEach(function(opts) { var maxValue = parseInt(obj.get("bar" + opts.barId + "_max")); var curValue = parseInt(obj.get("bar" + opts.barId + "_value")); log(opts.barId + ": " + curValue + "/" + maxValue); if (!isNaN(maxValue) && !isNaN(curValue)) { var markerName = "status_" + opts.status; if (curValue &lt;= (maxValue * opts.barRatio)) { obj.set(markerName, opts.whenLow); } else { obj.set(markerName, !opts.whenLow); } } }); }); on("change:graphic", function(obj) { if(obj.get("bar1_max") === "") return; if(obj.get("bar1_value") &lt;= -1) { obj.set({ status_interdiction: true }); } else { obj.set({ status_interdiction: false }); } if(obj.get("bar1_value") &lt;= -10) { obj.set({ status_dead: true }); } else { obj.set({ status_dead: false }); } }); Powercards // VARIABLE & FUNCTION DECLARATIONS -- DO NOT ALTER!! var PowerCardScript = PowerCardScript || {}; var getBrightness = getBrightness || {}; var hexDec = hexDec || {}; // USER CONFIGUATION var POWERCARD_DEFAULT_FORMAT = ""; var POWERCARD_CUSTOM_EMOTE = false; var POWERCARD_USE_PLAYER_COLOR = true; var POWERCARD_SHOW_ATTACK_DAMAGE_TAGS = true; var POWERCARD_SHOW_ATTACK_DAMAGE_INFO = true; var POWERCARD_INLINE_ROLL_NO_HIGHLIGHT = false; var POWERCARD_INLINE_ROLL_COLOR_OVERRIDE = true; // ALLOW URLS IN POWERCARDS var ALLOW_URLS = false; var ALLOW_HIDDEN_URLS = false; // DEFINE SIZE & COLOR OF POWERCARD BORDER AND IF ROUNDED var POWERCARD_BORDER_SIZE = 1; var POWERCARD_BORDER_COLOR = "#000000"; var POWERCARD_ROUNDED_CORNERS = true; // DEFINE IF CORNER OF INLINE ROLLS ARE ROUNDED var POWERCARD_ROUNDED_INLINE_ROLLS = true; // DEFINE COLORS FOR STANDARD INLINE ROLLS var POWERCARD_INLINE_BASE_BORDER = "#87850A"; var POWERCARD_INLINE_BASE_BACKGROUND = "#FFFEA2"; var POWERCARD_INLINE_BASE_TEXT_COLOR = "#000000"; // DEFINE COLORS FOR MAXIMUM VALUE ROLLS var POWERCARD_INLINE_CRIT_BORDER = "#004400"; var POWERCARD_INLINE_CRIT_BACKGROUND = "#88CC88"; var POWERCARD_INLINE_CRIT_TEXT_COLOR = "#004400"; // DEFINE COLOR FOR MINIMUM VALUE ROLLS var POWERCARD_INLINE_FAIL_BORDER = "#660000"; var POWERCARD_INLINE_FAIL_BACKGROUND = "#FFAAAA"; var POWERCARD_INLINE_FAIL_TEXT_COLOR = "#660000"; // DEFINE COLORS FOR A ROLL WITH BOTH MINIMUM AND MAXIMUM VALUES IN THE ROLL var POWERCARD_INLINE_BOTH_BORDER = "#061539"; var POWERCARD_INLINE_BOTH_BACKGROUND = "#8FA4D4"; var POWERCARD_INLINE_BOTH_TEXT_COLOR = "#061539"; on("chat:message", function (msg) { // Exit if not an api command if (msg.type != "api") return; // Get the API Chat Command msg.who = msg.who.replace(" (GM)", ""); msg.content = msg.content.replace("(GM) ", ""); var command = msg.content.split(" ", 1); if(command == "!power") { PowerCardScript.Process(msg); } }); PowerCardScript.Process = function(msg){ // DEFINE VARIABLES var n = msg.content.split(" --"); var PowerCard = {}; var DisplayCard = ""; var NumberOfAttacks = 1; var NumberOfDmgRolls = 1; var NumberOfRolls = 1; var Tag = ""; var Content = ""; var Character = ""; // MORE USER CONFIGURATION // DEFINE COLORS FOR ODD/EVEN ROWS var POWERCARD_ODD_ROW_BGCOLOR = "#CEC7B6"; // #CEC7B6 - Default light brown var POWERCARD_ODD_ROW_TXCOLOR = "#000000"; var POWERCARD_EVEN_ROW_BGCOLOR = "#B6AB91"; // #B6AB91 - Default darker brown var POWERCARD_EVEN_ROW_TXCOLOR = "#000000"; // SHOW AVATAR/IMAGE IN CUSTOM EMOTES var POWERCARD_SHOW_AVATAR = true; // SET THE DEFAULT FORMAT... Override with --format| in macro PowerCard.format = POWERCARD_DEFAULT_FORMAT; // CREATE POWERCARD OBJECT ARRAY n.shift(); n.forEach(function(token){ Tag = token.substring(0, token.indexOf("|")); Content = token.substring(token.indexOf("|") + 1); if (Tag.substring(0, 6).toLowerCase() === "attack") { var attacks = parseInt(Tag.substring(6)); if(attacks && attacks &gt;= NumberOfAttacks) { NumberOfAttacks = attacks; Tag = "attack"; } } else if (Tag.substring(0, 6).toLowerCase() === "damage") { var dmgs = parseInt(Tag.substring(6)); if(dmgs && dmgs &gt;= NumberOfDmgRolls) { NumberOfDmgRolls = dmgs; Tag = "damage"; } } else if (Tag.substring(0, 9).toLowerCase() === "multiroll") { var mrolls = parseInt(Tag.substring(9)); if(mrolls && mrolls &gt;= NumberOfRolls) { NumberOfRolls = mrolls; Tag = "multiroll"; } } else if (Tag.substring(0,5).toLowerCase() === "emote" && Content.charAt(0) === "!") { POWERCARD_SHOW_AVATAR = false; Content = Content.replace("!", ""); } // PARSE FOR INLINE FORMATTING var f; // LINE BREAK if (Content.indexOf("^^") != -1) Content = Content.replace(/\^\^/g, "&lt;br&gt;&lt;br&gt;"); // INDENT FIRST LINE if (Content.indexOf("^*") != -1) Content = Content.replace(/\^\*/g, "&lt;span style='margin-left: 1em;'&gt;&lt;/span&gt;"); // BOLD if (Content.indexOf("**") != -1) { // Do stuff... f = 1; while (Content.indexOf("**") != -1) { Content = (f % 2 == 1) ? Content.replace("**", "&lt;b&gt;") : Content.replace("**", "&lt;/b&gt;"); f++; } } // ITALICS if (Content.indexOf("__") != -1) { // Do stuff... f = 1; while (Content.indexOf("__") != -1) { Content = (f % 2 == 1) ? Content.replace("__", "&lt;i&gt;") : Content.replace("__", "&lt;/i&gt;"); f++; } } // URL if (Content.indexOf("@@") != -1 && ALLOW_URLS) { if (ALLOW_HIDDEN_URLS) { f = 1; while (Content.indexOf("@@") != -1) { Content = (f % 2 == 1) ? Content.replace("@@", "&lt;a href='") : Content.replace("@@", "&lt;/a&gt;"); if (f % 2 == 1) { Content = Content.replace("@@", "&lt;a href='"); Content = Content.replace("||", "' style='color:#000; text-decoration: underline;'&gt;"); } f++; } } else { while (Content.indexOf("@@") != -1) { Content = (f % 2 == 1) ? Content.replace("@@", "&lt;a&gt;") : Content.replace("@@", "&lt;/a&gt;"); f++; } } } PowerCard[Tag] = Content; }); // ERROR CATCH FOR EMPTY EMOTE if (PowerCard.emote === "") PowerCard.emote = '" "'; // CREATE CUSTOM EMOTE if (PowerCard.charid !== undefined && PowerCard.emote !== undefined && POWERCARD_CUSTOM_EMOTE) { Character = getObj("character", PowerCard.charid); if (POWERCARD_SHOW_AVATAR) { PowerCard.emote = "&lt;div style='display: table-cell; width: 50px;'&gt;&lt;img src='" + Character.get("avatar") + "' style='height: 50px; width: 50px;'&gt;&lt;/img&gt;&lt;/div&gt;&lt;div style='display:table-cell; width: calc(100%-50px); vertical-align: middle; font-size: 12px; font-style: italic; text-align: center;'&gt;" + PowerCard.emote + "&lt;/div&gt;"; } else { PowerCard.emote = "&lt;div style='display:block; width: 100%; vertical-align: middle; font-size: 12px; font-style: italic; text-align: center;'&gt;" + PowerCard.emote + "&lt;/div&gt;"; } } // CREATE WHISPER TARGET var WhisperTarget = ""; if (PowerCard.whisper !== undefined) { WhisperTarget = (PowerCard.whisper.toLowerCase() == "self") ? msg.who : "gm"; } // CREATE TITLE STYLE var TitleStyle = " font-family: Georgia; font-size: medium; font-weight: normal; letter-spacing: 0.25px; text-align: center; vertical-align: middle; padding: 2px 0px; margin: 0px 0px 0px -10px; border: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + ";"; // ROUNDED CORNERS ON TOP OF POWER CARD TitleStyle += (POWERCARD_ROUNDED_CORNERS) ? " border-radius: 10px 10px 0px 0px;" : ""; // LIST OF PRE-SET TITLE TEXT & BACKGROUND COLORS FOR D&D 4E var AtWill = " color: #FFF; background-color: #040;"; var Encounter = " color: #FFF; background-color: #400;"; var Daily = " color: #FFF; background-color: #444;"; var Item = " color: #FFF; background-color: #e58900;"; var Recharge = " color: #FFF; background-color: #004;"; // SET PowerCard.bgcolor TO PLAYER'S COLOR IF .bgcolor IS EQUAL TO PLAYER // THIS OVERRIDES TXCOLOR if (PowerCard.bgcolor == "player") { PowerCard.bgcolor = getObj("player", msg.playerid).get("color"); PowerCard.txcolor = (getBrightness(PowerCard.bgcolor) &lt; (255/2)) ? "#FFF" : "#000"; } // CHECK FOR PRESET TITLE COLORS if (!POWERCARD_USE_PLAYER_COLOR) { if (PowerCard.usage !== undefined && PowerCard.txcolor === undefined && PowerCard.bgcolor === undefined) { // PRESET TITLE COLORS TitleStyle += AtWill; if (PowerCard.usage.toLowerCase().indexOf("encounter") != -1) TitleStyle += Encounter; if (PowerCard.usage.toLowerCase().indexOf("daily") != -1) TitleStyle += Daily; if (PowerCard.usage.toLowerCase().indexOf("item") != -1) TitleStyle += Item; if (PowerCard.usage.toLowerCase().indexOf("recharge") != -1) TitleStyle += Recharge; } else { // CUSTOM TITLECARD TEXT & BACKGROUND COLORS TitleStyle += (PowerCard.txcolor !== undefined) ? " color: " + PowerCard.txcolor + ";" : " color: #FFF;"; TitleStyle += (PowerCard.bgcolor !== undefined) ? " background-color: " + PowerCard.bgcolor + ";" : " background-color: #040;"; } } else { // SET TITLE BGCOLOR TO PLAYER COLOR --- OVERRIDES ALL OTHER COLOR OPTIONS --- var PlayerBGColor = getObj("player", msg.playerid).get("color"); var PlayerTXColor = (getBrightness(PlayerBGColor) &lt; (255/2)) ? "#FFF" : "#000"; TitleStyle += " color: " + PlayerTXColor + "; background-color: " + PlayerBGColor + ";"; } // DEFINE .leftsub and .rightsub if (PowerCard.leftsub === undefined) PowerCard.leftsub = (PowerCard.usage !== undefined) ? PowerCard.usage : ""; if (PowerCard.rightsub === undefined) PowerCard.rightsub = (PowerCard.action !== undefined) ? PowerCard.action : ""; var PowerCardDiamond = (PowerCard.leftsub === "" || PowerCard.rightsub === "") ? "" : " ♦ "; // BEGIN DISPLAYCARD CREATION PowerCard.title = PowerCard.title ? PowerCard.title.split("|").join("&" + "#013;") : PowerCard.title; DisplayCard += "&lt;div style='" + TitleStyle + "' title='" + PowerCard.title + "'&gt;" + PowerCard.name; DisplayCard += (PowerCard.leftsub !== "" || PowerCard.rightsub !== "") ? "&lt;br&gt;&lt;span style='font-family: Tahoma; font-size: small; font-weight: normal;'&gt;" + PowerCard.leftsub + PowerCardDiamond + PowerCard.rightsub + "&lt;/span&gt;&lt;/div&gt;" : "&lt;/div&gt;"; // ROW STYLE VARIABLES if (PowerCard.orowbg !== undefined) POWERCARD_ODD_ROW_BGCOLOR = PowerCard.orowbg; if (PowerCard.orowtx !== undefined) POWERCARD_ODD_ROW_TXCOLOR = PowerCard.orowtx; if (PowerCard.erowbg !== undefined) POWERCARD_EVEN_ROW_BGCOLOR = PowerCard.erowbg; if (PowerCard.erowtx !== undefined) POWERCARD_EVEN_ROW_TXCOLOR = PowerCard.erowtx; var OddRow = " background-color: " + POWERCARD_ODD_ROW_BGCOLOR + "; color: " + POWERCARD_ODD_ROW_TXCOLOR + ";"; var EvenRow = " background-color: " + POWERCARD_EVEN_ROW_BGCOLOR + "; color: " + POWERCARD_EVEN_ROW_TXCOLOR + ";"; var RowStyle = " margin: 0px 0px 0px -10px; padding: 5px; border-left: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + "; border-right: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + "; border-radius: 0px;"; var RowBackground = OddRow; var RowNumber = 1; var Indent = 0; var KeyCount = 0; // KEY LOOP var Keys = Object.keys(PowerCard); var ReservedTags = "attack, damage, multiroll, text"; var IgnoredTags = "format, emote, name, usage, action, defense, txcolor, bgcolor, leftsub, rightsub, ddn, desc, crit, title, whisper, orowbg, orowtx, erowbg, erowtx, charid, playercolor"; Keys.forEach(function(Tag){ Content = PowerCard[Tag]; if (Tag.charAt(0) === "^") { Indent = (parseInt(Tag.charAt(1)) &gt;= 0) ? Tag.charAt(1) : 1; Tag = (parseInt(Tag.charAt(1)) &gt;= 0) ? Tag.substring(2) : Tag.substring(1); // Reset indent to 0 if ^0 is used... (Thanks to Rob J. on Roll20) if (Indent === "0") { RowStyle = " margin: 0px 0px 0px -10px; padding: 5px; border-left: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + "; border-right: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + "; border-radius: 0px;"; } else { RowStyle = " margin: 0px 0px 0px -10px; padding: 5px; border-left: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + "; border-right: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + "; border-radius: 0px; padding-left: " + (Indent * 1.5) + "em;"; } } // CHECK FOR RESERVED & IGNORED TAGS if (ReservedTags.indexOf(Tag) != -1) { // ATTACK ROLLS if (Tag.toLowerCase() == "attack") { for(var AttackCount = 0; AttackCount &lt; NumberOfAttacks; AttackCount++){ RowBackground = (RowNumber % 2 == 1) ? OddRow : EvenRow; RowNumber += 1; switch (PowerCard.format) { case "dnd4e": { if (AttackCount === 0) { Content = Content.replace("]]", "]] vs " + PowerCard.defense + " "); DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;" + (POWERCARD_SHOW_ATTACK_DAMAGE_TAGS ? "&lt;b&gt;Attack:&lt;/b&gt; " : "") + Content + "&lt;/div&gt;"; } else DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;" + (POWERCARD_SHOW_ATTACK_DAMAGE_TAGS ? "&lt;b&gt;Attack:&lt;/b&gt; " : "") + "$[a" + AttackCount + "] vs " + PowerCard.defense + " &lt;/div&gt;"; break; } case "dnd5e": case "ddn": { DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;" + (POWERCARD_SHOW_ATTACK_DAMAGE_TAGS ? "&lt;b&gt;Attack:&lt;/b&gt; " : "") + Content + " vs Armor Class&lt;/div&gt;"; break; } default: { if (AttackCount === 0) DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;" + (POWERCARD_SHOW_ATTACK_DAMAGE_TAGS ? "&lt;b&gt;Attack:&lt;/b&gt; " : "") + Content + "&lt;/div&gt;"; else DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;" + (POWERCARD_SHOW_ATTACK_DAMAGE_TAGS ? "&lt;b&gt;Attack:&lt;/b&gt; " : "") + "$[a" + AttackCount + "]&lt;/div&gt;"; } } } } // DAMAGE ROLLS if (Tag.toLowerCase() == "damage") { for (var DamageCount = 0; DamageCount &lt; NumberOfDmgRolls; DamageCount++) { RowBackground = (RowNumber % 2 == 1) ? OddRow : EvenRow; RowNumber += 1; if (DamageCount === 0) DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;" + (POWERCARD_SHOW_ATTACK_DAMAGE_TAGS ? "&lt;b&gt;Hit:&lt;/b&gt; " : "") + Content + "&lt;/div&gt;"; else DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;$[d" + DamageCount + "]&lt;/div&gt;"; } } // MULTIROLLS if (Tag.toLowerCase() == "multiroll") { for (var MultiRoll = 0; MultiRoll &lt; NumberOfRolls; MultiRoll++) { RowBackground = (RowNumber % 2 == 1) ? OddRow : EvenRow; RowNumber += 1; if (MultiRoll === 0) DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;" + Content + "&lt;/div&gt;"; else DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;$[m" + MultiRoll + "]&lt;/div&gt;"; } } } else if (IgnoredTags.indexOf(Tag.toLowerCase()) != -1) { // Do nothing } else { if (Tag.toLowerCase().substring(0,4) == "text") { RowBackground = (RowNumber % 2 == 1) ? OddRow : EvenRow; RowNumber += 1; DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;" + Content + "&lt;/div&gt;"; } else { RowBackground = (RowNumber % 2 == 1) ? OddRow : EvenRow; RowNumber += 1; DisplayCard += "&lt;div style='" + RowStyle + RowBackground + "'&gt;&lt;b&gt;" + Tag + ":&lt;/b&gt; " + Content + "&lt;/div&gt;"; } } KeyCount++; }); // ADD ROUNDED CORNERS & BORDER TO BOTTOM OF POWER CARD if (POWERCARD_ROUNDED_CORNERS && KeyCount == (Keys.length)) DisplayCard = DisplayCard.replace(/border-radius: 0px;(?!.*border-radius: 0px;)/g, "border-radius: 0px 0px 10px 10px; border-bottom: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + ";"); if (!POWERCARD_ROUNDED_CORNERS && POWERCARD_BORDER_SIZE) DisplayCard = DisplayCard.replace(/border-radius: 0px;(?!.*border-radius: 0px;)/g, "border-bottom: " + POWERCARD_BORDER_SIZE + "px solid " + POWERCARD_BORDER_COLOR + ";"); // INLINE ROLLS REPLACEMENT if (msg.inlinerolls !== undefined) { // Process inline rolls... for (var i = 0; i &lt; msg.inlinerolls.length; i++){ var inlinerollValue = buildinline(msg.inlinerolls[i], PowerCard.crit); DisplayCard = DisplayCard.replace("$[[" + i + "]]", inlinerollValue); } // Process multirolls... var content = PowerCard.attack; var idx = content ? content.substring(content.indexOf("$[[") + 3, content.indexOf("]]")) : false; var exp = idx && msg.inlinerolls[idx] ? msg.inlinerolls[idx].expression : undefined; var attExp = buildExpression(NumberOfAttacks, "a", exp); content = PowerCard.damage; idx = content ? content.substring(content.indexOf("$[[") + 3, content.indexOf("]]")) : false; exp = idx && msg.inlinerolls[idx] ? msg.inlinerolls[idx].expression : undefined; var dmgExp = buildExpression(NumberOfDmgRolls, "d", exp); content = PowerCard.multiroll; idx = content ? content.substring(content.indexOf("$[[") + 3, content.indexOf("]]")) : false; exp = idx && msg.inlinerolls[idx] ? msg.inlinerolls[idx].expression : undefined; var mltExp = buildExpression(NumberOfRolls, "m", exp); // Process multiroll results... var rollExp = attExp + ";" + dmgExp + ";" + mltExp; sendChat("", rollExp, function(m){ var i; var inlinerollValue; for (i = 1; i &lt; NumberOfAttacks; i++){ inlinerollValue = buildinline(m[0].inlinerolls[i], PowerCard.crit); DisplayCard = DisplayCard.replace("$[a" + i + "]", inlinerollValue); } var dIndex = 1; for (i = NumberOfAttacks; i &lt; NumberOfAttacks + NumberOfDmgRolls-1 ; i++){ inlinerollValue = buildinline(m[0].inlinerolls[i], PowerCard.crit); DisplayCard = DisplayCard.replace("$[d" + dIndex++ + "]", inlinerollValue); } var mIndex = 1; for (i = NumberOfAttacks + NumberOfDmgRolls-1; i &lt; NumberOfAttacks+NumberOfDmgRolls+NumberOfRolls-2 ; i++){ inlinerollValue = buildinline(m[0].inlinerolls[i], PowerCard.crit); DisplayCard = DisplayCard.replace("$[m" + mIndex++ + "]", inlinerollValue); } // SEND OUTPUT TO CHAT if (PowerCard.whisper !== "no" && PowerCard.whisper !== undefined) { if (PowerCard.emote !== undefined && PowerCard.charid !== undefined && POWERCARD_CUSTOM_EMOTE) { sendChat("", "/desc "); sendChat("", "/direct " + PowerCard.emote); } else if (PowerCard.emote !== undefined) { sendChat(msg.who, "/emas " + PowerCard.emote); } sendChat("Power Card Script", "/w " + WhisperTarget + " " + DisplayCard); } else { if (PowerCard.emote !== undefined && PowerCard.charid !== undefined && POWERCARD_CUSTOM_EMOTE) { sendChat("", "/desc "); sendChat("", "/direct " + PowerCard.emote); } else if (PowerCard.emote !== undefined) { sendChat(msg.who, "/emas " + PowerCard.emote); } sendChat("", "/direct " + DisplayCard); } }); } else { // NO INLINE ROLLS if (PowerCard.whisper !== "no" && PowerCard.whisper !== undefined) { if (PowerCard.emote !== undefined && PowerCard.charid !== undefined && POWERCARD_CUSTOM_EMOTE) { sendChat("", "/desc "); sendChat("", "/direct " + PowerCard.emote); } else if (PowerCard.emote !== undefined) { sendChat(msg.who, "/emas " + PowerCard.emote); } sendChat("Power Card Script", "/w " + WhisperTarget + " " + DisplayCard); } else { if (PowerCard.emote !== undefined && PowerCard.charid !== undefined && POWERCARD_CUSTOM_EMOTE) { sendChat("", "/desc "); sendChat("", "/direct " + PowerCard.emote); } else if (PowerCard.emote !== undefined) { sendChat(msg.who, "/emas " + PowerCard.emote); } sendChat("", "/direct " + DisplayCard); } } }; function buildinline(inlineroll){ var InlineBorderRadius = (POWERCARD_ROUNDED_INLINE_ROLLS) ? 5 : 0; var InlineColorOverride = ""; var values = []; var critRoll = false; var failRoll = false; var critCheck = false; var failCheck = false; var highRoll = false; var lowRoll = false; var noHighlight = false; inlineroll.results.rolls.forEach(function(roll){ var result = processRoll(roll, critRoll, failRoll, highRoll, lowRoll, noHighlight); if (result.value.toString().indexOf("critsuccess") != -1) critCheck = true; if (result.value.toString().indexOf("critfail") != -1) failCheck = true; values.push(result.value); critRoll = result.critRoll; failRoll = result.failRoll; highRoll = result.highRoll; lowRoll = result.lowRoll; noHighlight = result.noHighlight; }); // Overrides the default coloring of the inline rolls... if (POWERCARD_INLINE_ROLL_COLOR_OVERRIDE) { if (critCheck && failCheck) { InlineColorOverride = " background-color: " + POWERCARD_INLINE_BOTH_BACKGROUND + "; border-color: " + POWERCARD_INLINE_BOTH_BORDER + "; color: " + POWERCARD_INLINE_BOTH_TEXT_COLOR + ";"; } else if (critCheck && !failCheck) { InlineColorOverride = " background-color: " + POWERCARD_INLINE_CRIT_BACKGROUND + "; border-color: " + POWERCARD_INLINE_CRIT_BORDER + "; color: " + POWERCARD_INLINE_CRIT_TEXT_COLOR + ";"; } else if (!critCheck && failCheck) { InlineColorOverride = " background-color: " + POWERCARD_INLINE_FAIL_BACKGROUND + "; border-color: " + POWERCARD_INLINE_FAIL_BORDER + "; color: " + POWERCARD_INLINE_FAIL_TEXT_COLOR + ";"; } else { InlineColorOverride = " background-color: " + POWERCARD_INLINE_BASE_BACKGROUND + "; border-color: " + POWERCARD_INLINE_BASE_BORDER + "; color: " + POWERCARD_INLINE_BASE_TEXT_COLOR + ";"; } } // Temporary kludge to get table result... if (inlineroll.results.rolls[0].table !== undefined) inlineroll.results.total = inlineroll.results.rolls[0].results[0].tableItem.name; var rollOut = '&lt;span style="text-align: center; vertical-align: text-middle; display: inline-block; min-width: 1.75em; border-radius: ' + InlineBorderRadius + 'px; padding: 0px 2px; ' + InlineColorOverride + '" title="Rolling ' + inlineroll.expression + ' = ' + values.join(""); rollOut += '"Apple-tab-span" style="white-space:pre"&gt;rollOut += (critCheck && failCheck ? ' importantroll' : (critCheck ? ' fullcrit' : (failCheck ? ' fullfail' : ''))) + '"&gt;' + inlineroll.results.total + '&lt;/span&gt;'; return rollOut; } function buildExpression(numRolls, tag, expression){ var rolls = []; for (var i = 1; i &lt; numRolls; i++){ rolls.push("[[" + expression +"]]"); } return tag + ":" + rolls.join(" "); } function processRoll(roll, critRoll, failRoll, highRoll, lowRoll, noHighlight){ if (roll.type === "C") { return {value: " " + roll.text + " "}; } else if (roll.type === "L") { if (roll.text.indexOf("HR") != -1) highRoll = parseInt(roll.text.substring(2)); else highRoll = false; if (roll.text.indexOf("LR") != -1) lowRoll = parseInt(roll.text.substring(2)); else lowRoll = false; if (roll.text.indexOf("NH") != -1) { // Blocks highlight on an individual roll... noHighlight = true; } // Remove inline tags to reduce clutter... roll.text = roll.text.replace(/HR(\d+)/g, ""); roll.text = roll.text.replace(/LR(\d+)/g, ""); roll.text = roll.text.replace(/NH/g, ""); if (roll.text !== "") roll.text = " [" + roll.text + "] "; return {value: roll.text, highRoll:highRoll, lowRoll:lowRoll, noHighlight:noHighlight}; } else if (roll.type === "M") { roll.expr = roll.expr.toString().replace(/\+/g, " + "); return {value: roll.expr}; } else if (roll.type === "R") { var rollValues = []; roll.results.forEach(function(result){ if (result.tableItem !== undefined) { rollValues.push(result.tableItem.name); } else { // Reset critRoll and failRoll for next roll... critRoll = false; failRoll = false; // Turn off highlighting if true... if (POWERCARD_INLINE_ROLL_NO_HIGHLIGHT || noHighlight) { critRoll = false; failRoll = false; } else { if (highRoll !== false && result.v &gt;= highRoll || result.v === roll.sides) critRoll = true; else if (lowRoll !== false && result.v &lt;= lowRoll || result.v === 1) failRoll = true; } result.v = "&lt;span class='basicdiceroll" + (critRoll ? ' critsuccess' : (failRoll ? ' critfail' : '')) + "'&gt;" + result.v + "&lt;/span&gt;"; rollValues.push(result.v); } }); return {value: "(" + rollValues.join(" + ") + ")", critRoll:critRoll, failRoll:failRoll, highRoll:highRoll, lowRoll:lowRoll, noHighlight:noHighlight}; } else if (roll.type === "G") { var grollVal = []; roll.rolls.forEach(function(groll){ groll.forEach(function(groll2){ var result = processRoll(groll2, highRoll, lowRoll, noHighlight); grollVal.push(result.value); critRoll = critRoll || result.critRoll; failRoll = failRoll || result.failRoll; highRoll = highRoll || result.highRoll; lowRoll = lowRoll || result.lowRoll; noHighlight = noHighlight || result.noHighlight; }); }); return {value: "{" + grollVal.join(" ") + "}", critRoll:critRoll, failRoll:failRoll, highRoll:highRoll, lowRoll:lowRoll, noHighlight:noHighlight}; } } function getBrightness(hex) { hex = hex.replace('#', ''); var c_r = hexDec(hex.substr(0, 2)); var c_g = hexDec(hex.substr(2, 2)); var c_b = hexDec(hex.substr(4, 2)); return ((c_r * 299) + (c_g * 587) + (c_b * 114)) / 1000; } function hexDec(hex_string) { hex_string = (hex_string + '').replace(/[^a-f0-9]/gi, ''); return parseInt(hex_string, 16); } Token Marker // GIST: <a href="https://gist.github.com/shdwjk/5119cf1c5ffdf30883" rel="nofollow">https://gist.github.com/shdwjk/5119cf1c5ffdf30883</a>... var Mark = Mark || (function() { 'use strict'; var version = 0.22, schemaVersion = 0.2, markerURL = '<a href="https://s3.amazonaws.com/files.d20.io/images/7300942/yCwklIx6BawcWTYd9sg4Qg/thumb.png?1422046275" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/7300942/yCwklIx6BawcWTYd9sg4Qg/thumb.png?1422046275</a>', fixNewObj= function(obj) { var p = obj.changed._fbpath, new_p = p.replace(/([^\/]*\/){4}/, "/"); obj.fbpath = new_p; return obj; }, ch = function (c) { var entities = { '&lt;' : 'lt', '&gt;' : 'gt', "'" : '#39', '@' : '#64', '{' : '#123', '|' : '#124', '}' : '#125', '[' : '#91', ']' : '#93', '"' : 'quot', '-' : 'mdash', ' ' : 'nbsp' }; if(_.has(entities,c) ){ return ('&'+entities[c]+';'); } return ''; }, showHelp = function() { sendChat('', '/w gm ' +'&lt;div style="border: 1px solid black; background-color: white; padding: 3px 3px;"&gt;' +'&lt;div style="font-weight: bold; border-bottom: 1px solid black;font-size: 130%;"&gt;' +'Mark v'+version +'&lt;/div&gt;' +'&lt;div style="padding-left:10px;margin-bottom:3px;"&gt;' +'&lt;p&gt;Mark places a numbered marker under each token whose id is supplied ' +'to it. Markers are cleared when the Turn Order changes, is closed, ' +'or when the player page changes. This script is intended to allow players ' +'to mark their targets for discussion with the GM, usually as part of an ' +'attack.&lt;/p&gt;' +'&lt;/div&gt;' +'&lt;b&gt;Commands&lt;/b&gt;' +'&lt;div style="padding-left:10px;"&gt;' +'&lt;b&gt;&lt;span style="font-family: serif;"&gt;!mark '+ch('&lt;')+'Token ID'+ch('&gt;')+' ['+ch('&lt;')+'Token ID'+ch('&gt;')+' ... ]&lt;/span&gt;&lt;/b&gt;' +'&lt;div style="padding-left: 10px;padding-right:20px"&gt;' +'&lt;p&gt;This command requires a minimum of 1 parameter. For each supplied Token ID, a marker is placed beneath it with a numbered status. The status number starts at 1, increases with each marker placed, and resets the when markers are cleared.&lt;/p&gt;' +'&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; If you are using multiple '+ch('@')+ch('{')+'target'+ch('|')+'token_id'+ch('}')+' calls in a macro, and need to mark fewer than the suppled number of arguments, simply select the same token several times. The duplicates will be removed.&lt;/p&gt;' +'&lt;ul&gt;' +'&lt;li style="border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;"&gt;' +'&lt;b&gt;&lt;span style="font-family: serif;"&gt;'+ch('&lt;')+'Token ID'+ch('&gt;')+'&lt;/span&gt;&lt;/b&gt; '+ch('-')+' A Token ID, usually supplied with something like '+ch('@')+ch('{')+'target'+ch('|')+'Target 1'+ch('|')+'token_id'+ch('}')+'.' +'&lt;/li&gt; ' +'&lt;/ul&gt;' +'&lt;/div&gt;' +'&lt;b&gt;&lt;span style="font-family: serif;"&gt;!mark-clear&lt;/span&gt;&lt;/b&gt;' +'&lt;div style="padding-left: 10px;padding-right:20px"&gt;' +'&lt;p&gt;Clears all the markers. (GM Only)&lt;/p&gt;' +'&lt;/div&gt;' +'&lt;/div&gt;' +'&lt;/div&gt;' ); }, reset = function() { state.Mark.count=0; _.each(findObjs({ type: 'graphic', subtype: 'token', imgsrc: markerURL }), function (g){ g.set({ layer: 'gmlayer', width: 70, height: 70, top: 35, left: 35, pageid: Campaign().get('playerpageid'), statusmarkers: '' }); }); }, getStatusForCount = function(count) { var colorOrder=["red", "blue", "green", "brown", "purple", "pink", "yellow"]; return _.chain(count.toString().split('')) .reduce(function(memo,d){ if(colorOrder.length) { memo.push(colorOrder.shift()+'@'+d); } return memo; }, []) .value() .reverse() .join(','); }, HandleInput = function(msg) { var args, who, errors=[], playerPage, markerSupply, tokens; if (msg.type !== "api" ) { return; } who=getObj('player',msg.playerid).get('_displayname').split(' ')[0]; args = msg.content.split(/ +/); switch(args[0]) { case '!mark-clear': if(isGM(msg.playerid)) { reset(); } break; case '!mark': if(1 === args.length) { showHelp(); break; } tokens=_.chain(args) .rest() .uniq() .map(function(a){ var t=getObj('graphic',a); if(! t) { errors.push('Argument [&lt;b&gt;'+a+'&lt;/b&gt;] is not a valid token id.'); } return t; },errors) .filter(function(t){ return undefined !== t; }) .value(); if(errors.length) { sendChat('','/w '+who +'&lt;div style="border: 1px solid black; background-color: white; padding: 3px 3px;"&gt;' +'&lt;div&gt;&lt;span style="font-weight:bold;color:#990000;"&gt;Error:&lt;/span&gt; ' +errors.join('&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight:bold;color:#990000;"&gt;Error:&lt;/span&gt; ') +'&lt;/div&gt;' +'&lt;/div&gt;' ); } // find player's page if(_.has(Campaign().get('playerspecificpages'),msg.playerid)) { playerPage = Campaign().get('playerspecificpages')[msg.playerid]; } else { playerPage = Campaign().get('playerpageid'); } markerSupply = findObjs({ type: 'graphic', subtype: 'token', imgsrc: markerURL, layer: 'gmlayer', pageid: playerPage }); _.each(tokens, function (t) { var m=markerSupply.pop(), size=( Math.max(t.get('width'), t.get('height') ) * 1.7), count=++state.Mark.count, status=getStatusForCount(count); if(m) { m.set({ width: size, height: size, top: t.get('top'), left: t.get('left'), layer: 'objects', statusmarkers: status }); } else { m = fixNewObj(createObj('graphic',{ imgsrc: markerURL, subtype: 'token', pageid: playerPage, width: size, height: size, top: t.get('top'), left: t.get('left'), layer: 'objects', statusmarkers: status })); } toBack(m); }); break; } }, CheckInstall = function() { if( ! _.has(state,'Mark') || state.Mark.version !== schemaVersion) { /* Default Settings stored in the state. */ state.Mark = { version: schemaVersion, count: 0, markedtokens: {} }; } }, HandlePlayerPageChange = function() { reset(); }, HandleTurnOrderChange = function(obj,prev) { var to = JSON.parse(obj.get("turnorder")), po = JSON.parse(prev.turnorder); if( (_.isArray(to) && _.isArray(po) && !_.isEqual(to[0],po[0]) ) || (_.isArray(to) && ! _.isArray(po)) ) { reset(); } }, HandleInitiativePageChange = function(obj) { if(false === obj.get('initiativepage')) { reset(); } }, RegisterEventHandlers = function() { on('chat:message', HandleInput); on('change:campaign:playerpageid', HandlePlayerPageChange); on('change:campaign:turnorder', HandleTurnOrderChange); on('change:campaign:initiativepage', HandleInitiativePageChange); }; return { RegisterEventHandlers: RegisterEventHandlers, CheckInstall: CheckInstall }; }()); on("ready",function(){ 'use strict'; if("undefined" !== typeof isGM && _.isFunction(isGM)) { Mark.CheckInstall(); Mark.RegisterEventHandlers(); } else { log('--------------------------------------------------------------'); log('Mark requires the isGM module to work.'); log('isGM GIST: <a href="https://gist.github.com/shdwjk/8d5bb062abab184636" rel="nofollow">https://gist.github.com/shdwjk/8d5bb062abab184636</a>... log('--------------------------------------------------------------'); } }); IsGMMarker // GIST: <a href="https://gist.github.com/shdwjk/8d5bb062abab18463625" rel="nofollow">https://gist.github.com/shdwjk/8d5bb062abab18463625</a> var IsGMModule = IsGMModule || { version: 0.6, active: true, reset_password: "swordfish", CheckInstall: function() { var players = findObjs({_type:"player"}); if( ! _.has(state,'IsGM') || ! _.has(state.IsGM,'version') || state.IsGM.version != IsGMModule.version ) { state.IsGM={ version: IsGMModule.version, gms: [], players: [], unknown: [] }; } state.IsGM.unknown=_.difference( _.pluck(players,'id'), state.IsGM.gms, state.IsGM.players ); IsGMModule.active = (state.IsGM.unknown.length&gt;0); }, IsGM: function(id) { return _.contains(state.IsGM.gms,id); }, HandleMessages: function(msg) { if(msg.type != "api") { if(IsGMModule.active && msg.playerid != 'API') { if(_.contains(state.IsGM.unknown, msg.playerid)) { var player=getObj('player',msg.playerid); if("" == player.get('speakingas') || 'player|'+msg.playerid == player.get('speakingas')) { if(msg.who == player.get('_displayname')) { state.IsGM.players.push(msg.playerid); } else { state.IsGM.gms.push(msg.playerid); sendChat('IsGM','/w gm '+player.get('_displayname')+' is now flagged as a GM.') } state.IsGM.unknown=_.without(state.IsGM.unknown,msg.playerid); IsGMModule.active = (state.IsGM.unknown.length&gt;0); } } } } else { var tokenized = msg.content.split(" "); var command = tokenized[0]; switch(command) { case '!reset-isgm': if(isGM(msg.playerid) || (tokenized.length&gt;1 && tokenized[1] == IsGMModule.reset_password)) { delete state.IsGM; IsGMModule.CheckInstall(); sendChat('IsGM','/w gm IsGM data reset.'); } else { var who=getObj('player',msg.playerid).get('_displayname').split(' ')[0]; sendChat('IsGM','/w '+who+' ('+who+')Only GMs may reset the IsGM data.' +'If you are a GM you can reset by specifying the reset password from' +'the top of the IsGM script as an argument to !reset-isgm') } break; } } }, RegisterEventHandlers: function(){ on('chat:message',IsGMModule.HandleMessages); }, }; on('ready',function(){ IsGMModule.CheckInstall(); IsGMModule.RegisterEventHandlers(); }); var isGM = isGM || function(id) { return IsGMModule.IsGM(id); };
1422130013
PrincessFairy
Plus
Marketplace Creator
It looks like one or two may have posted twice on the list but there is only 4 scripts active. Sorry if there is any confussion.
1422130961
PrincessFairy
Plus
Marketplace Creator
However, I will mention that it messed up several times last night but it has worked fined all day to day while I have been building the campaign. At least for now.
1422134135
The Aaron
Pro
API Scripter
The NaN/NaN are coming from the first log() in the Turn Tracker script, which happens before the check for isNaN().
1422160259
PrincessFairy
Plus
Marketplace Creator
Well I have been doing stuff through out the day and randomly checking back, the script finally failed me after 15 hours of checking back, so it looks like I am just going to have to keep resetting it until something is fixed. Thanks for all your help, I hope that there will be a way to fix this sometime in the future. Thanks again.
1422160860
The Aaron
Pro
API Scripter
Sorry, my point was that those NaN/NaN are just log messages, and not really errors. Them being NaN is likely the result of having things selected that aren't tokens, or nothing selected. The log messages themselves would not cause the sandbox error.
Just a few moments ago, I got a Sandbox Closed due to Error. I did save script, and it restarted with out errors.
1422290783
PrincessFairy
Plus
Marketplace Creator
I went thru my game Sunday had to restartso for api script
1422380008
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
API Bugfix Update . Please post there for further assistance.