This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GroupCheck version 1.12 | |
// Last Updated: 2019-08-14 | |
// A script to roll checks for many tokens at once with one command. | |
/* global state, getObj, getAttrByName, on, log, sendChat, playerIsGM, _ */ | |
const GroupCheck = (() => { | |
"use strict"; | |
const version = "1.12", | |
stateVersion = 7, | |
dataVersion = 7, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on("change:graphic", function(obj, prev) { | |
let tokenID = obj.get("id"); | |
let page = getObj("page", Campaign().get("playerpageid")); | |
if (typeof checkLightLevel !== "undefined" && page.get("dynamic_lighting_enabled")) { | |
if (prev.left !== obj.get("left") || prev.top !== obj.get("top")) { | |
function containsIllumination(illumination, obj) { | |
return illumination.some(item => obj.name.includes(item)); | |
} | |
function updateIllumination(obj, lightLevel, dimLight, darkness) { | |
let newName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HandsUp = (() => { | |
'use strict'; | |
/** | |
* The hand-raising state for a player. | |
* @typedef {object} HandState | |
* @property {number} intervalId | |
* @property {string} origColor | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on('ready',()=>{ | |
const JournalCommandDecoder = (t) => { | |
const fixStart = t => t.replace(/^"https:\/\/app.roll20.net\/editor\/%60/,'"`'); | |
const percentOut = t => t.replace(/%{/g,'::PERCENT_OPEN_CURLY::'); | |
const percentIn = t => t.replace(/::PERCENT_OPEN_CURLY::/g,'%{'); | |
return percentIn(decodeURIComponent(percentOut(fixStart(t)))); | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var API_Meta = API_Meta || {}; | |
API_Meta.dltool = { | |
offset: Number.MAX_SAFE_INTEGER, | |
lineCount: -1 | |
}; { | |
try { | |
throw new Error(''); | |
} catch (e) { | |
API_Meta.dltool.offset = (parseInt(e.stack.split(/\n/)[1].replace(/^.*:(\d+):.*$/, '$1'), 10) - (7)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var API_Meta = API_Meta || {}; //eslint-disable-line no-var | |
API_Meta.Condefinition = { | |
offset: Number.MAX_SAFE_INTEGER, | |
lineCount: -1 | |
}; { | |
try { | |
throw new Error(''); | |
} catch (e) { | |
API_Meta.Condefinition.offset = (parseInt(e.stack.split(/\n/)[1].replace(/^.*:(\d+):.*$/, '$1'), 10) - (7)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var API_Meta = API_Meta || {}; | |
API_Meta.Supernotes = { | |
offset: Number.MAX_SAFE_INTEGER, | |
lineCount: -1 | |
}; { | |
try { | |
throw new Error(''); | |
} catch (e) { | |
API_Meta.Supernotes.offset = (parseInt(e.stack.split(/\n/)[1].replace(/^.*:(\d+):.*$/, '$1'), 10) - (4)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Adobe InDesign 2022" | |
--return selection | |
set tableexport to "" | |
set theTables to every table of every text frame of front document | |
--return item 1 of theTables | |
set theParent to parent of item 2 of theTables | |
set bob to contents of row 2 of item 2 of theTables | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var API_Meta = API_Meta || {}; | |
API_Meta.Pingbuddy = { offset: Number.MAX_SAFE_INTEGER, lineCount: -1 }; | |
{ | |
try { throw new Error(''); } catch (e) { API_Meta.Pingbuddy.offset = (parseInt(e.stack.split(/\n/)[1].replace(/^.*:(\d+):.*$/, '$1'), 10) - (4)); } | |
} | |
/*######################## | |
PingBuddy by Keith Curtis, including code adapted from Nick Olivo | |
Forum thread: https://app.roll20.net/forum/post/11095028/script-ping-buddy | |
Script repo: https://gist.github.com/keithcurtis1/536c5e575e4ef6ba40a519eca17b392a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on("ready", function () { | |
const theGM = findObjs({ | |
type: 'player' | |
}) | |
.find(o => playerIsGM(o.id)); | |
on("change:campaign:playerpageid", function () { | |
setTimeout(function () { | |
pingPlayerToken(); | |
}, |
NewerOlder