This file contains hidden or 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(); | |
}, |
This file contains hidden or 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
/* categories */ | |
.chosen-choices { | |
position: absolute !important; | |
max-height: 27px; | |
top: -14px; | |
-webkit-transition: all .25s linear; | |
} | |
.chosen-choices:hover, .chosen-choices:active { | |
max-height: inherit; | |
-webkit-transition: all .25s linear; |
This file contains hidden or 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.Faces = { | |
offset: Number.MAX_SAFE_INTEGER, | |
lineCount: -1 | |
}; { | |
try { | |
throw new Error(''); | |
} catch (e) { | |
API_Meta.Faces.offset = (parseInt(e.stack.split(/\n/)[1].replace(/^.*:(\d+):.*$/, '$1'), 10) - (4)); | |
} |
This file contains hidden or 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',()=>{ | |
on('chat:message',(msg)=>{ | |
if('api' === msg.type && /^!dialog/i.test(msg.content)){ | |
let p = getObj('player',msg.playerid); | |
let theMessage = ""; | |
const openBox = "<div style='border: 0px none; margin-top: 10px; border-radius: 35px 6px 6px 6px; box-shadow: 2px 2px 4px 2px #000; min-height:60px; display: block; padding:5px; text-align: left; white-space: pre-wrap;'>"; | |
const closeBox = "</div>"; | |
const buttonStyle = "'background-color: transparent; align:right; font-size: 0.8em; line-height:1.2; font-family: sans-serif; font-style: normal; font-weight: normal; padding: 0px;color: #ce0f69;display: inline-block;border: none; !important'"; | |
function imageFormat(imgsrc){ |
This file contains hidden or 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
// Reporter | |
// Last Updated: 2021-03-26 | |
// A script to report token and character calls in a list. | |
// Syntax is !report --[t|token_attribute] [c|character_attribute]... ---macro code for each character | |
on('ready', () => { | |
const version = '1.0.1'; //verion number set here | |
log('-=> Reporter v' + version + ' <=-'); //Logs version number to console | |
sendChat('Reporter', '/w gm Ready'); |
This file contains hidden or 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
!ia --menu --row#spellreport --^^spellreport#getrow{{!!t#Cantrips !!c#ffffff !!s#getrepeating{{!!c#@{selected|character_name} !!d# | !!s#spell-cantrip !!sfxn#spellname !!op#bC !!emptyok !!sfxa#spellname !!sfxlist#spellschool School:|spellcastingtime Casting Time:|spellrange Range:|spelltarget Target:|spellcomp_materials Components:|spellduration Duration:|spelldescription Description: (fw) !!frmt#o+}}}} --^^spellreport#getrow{{!!t#Level 1 !!f#.9 !!s#getrepeating{{!!c#@{selected|character_name} !!d# | !!s#spell-1 !!sfxn#spellname !!op#bC !!emptyok !!sfxa#spellname !!sfxlist#spellschool School:|spellcastingtime Casting Time:|spellrange Range:|spelltarget Target:|spellcomp_materials Components:|spellduration Duration:|spelldescription Description: (fw) !!frmt#o+}}}} --^^spellreport#getrow{{!!t#Level 2 !!c#ffffff !!s#getrepeating{{!!c#@{selected|character_name} !!d# | !!s#spell-2 !!sfxn#spellname !!op#bC !!emptyok !!sfxa#spellname !!sfxlist#spellschool School:|spellcastingtime |
This file contains hidden or 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
!chatmenu @{selected|character_id} {template:npcaction}{{rname=@{selected|character_name}}}{{name=Put non-spell invocations in here}}{{description=CHATMENU}} --separator: | --title:Cantrips — *Save DC @{selected|spell_save_dc}* --repeating_spell-cantrip|spellname|spell|spellsource=Mystic --title:Lvl-1 *(@{selected|class_resource}/@{selected|class_resource|max})* --repeating_spell-1|spellname|spell|spellsource=slot --title:Lvl 2 --repeating_spell-2|spellname|spell|spellsource=slot --title:Lvl 3 --repeating_spell-3|spellname|spell|spellsource=slot --title:Lvl 4 --repeating_spell-4|spellname|spell|spellsource=slot --title:Lvl 5 --repeating_spell-5|spellname|spell|spellsource=slot --title:Invocation-1 --repeating_spell-1|spellname|spell|spellsource=invocation --title:Invocation-2 --repeating_spell-2|spellname|spell|spellsource=invocation --title:Invocation-3 --repeating_spell-3|spellname|spell|spellsource=invocation --title:Invocation-4 --repeating_spell-4|spellname|spell|spellsource=invocation --title:Invoca |
This file contains hidden or 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 playerCanControl = (obj, playerid='any') => { | |
const playerInControlledByList = (list, playerid) => list.includes('all') || list.includes(playerid) || ('any'===playerid && list.length); | |
let players = obj.get('controlledby') | |
.split(/,/) | |
.filter(s=>s.length); | |
if(playerInControlledByList(players,playerid)){ | |
return true; |
This file contains hidden or 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
This version was deprecated, but I am leaving the gist to direct people to the new copy, which is here: | |
https://github.com/keithcurtis1/token-actions |
This file contains hidden or 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
BARE MACRO | |
[Snuff](!token-mod --set light_otherplayers|off light_radius|0 light_dimradius|0 light_angle|360) | [Sight](!token-mod --on showname light_hassight light_angle|360) | [Blind](!token-mod --off showname light_hassight light_angle|360) | [Spot](!token-mod --set light_otherplayers|on light_radius|5 light_dimradius|0 light_hassight|on light_angle|360) | [GM](!token-mod --set light_otherplayers|off light_hassight|off light_radius|5 light_dimradius|5 light_angle|360) | |
[Moonlight](!token-mod --set light_otherplayers|on light_radius|15 light_dimradius|=-15 light_angle|360) | [Starlight](!token-mod --set light_otherplayers|on light_radius|7 light_dimradius|=-15 light_angle|360) | [Touch](!token-mod --set light_otherplayers|on light_radius|4 light_dimradius|=-5 light_angle|360) | |
[Candle](!token-mod --set light_otherplayers|on light_radius|5 light_dimradius|0 light_angle|360) | [Lamp](!token-mod --set light_otherplayers|on light_radius|30 light_dimradius|15 light_angle|360) | [Torch](!token-mod --set light_other |