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() { | |
"use strict"; | |
on("chat:message", function (msg) { | |
var args; | |
if (msg.type === "api"){ | |
args = msg.content.split(/\s+/); | |
if (args[0].match(/^!Clock/i)){ | |
let time = parseInt(args[1],10)||0; | |
if(time){ | |
let due = _.now()+time*1000, |
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
/************************************************************************************************************ | |
You will need to create a character named TMChar. Leave him empty, but in the attributes and abilities tab, | |
add two attributes: PoolThreat, and PoolMomentum. Set appropriate caps. Momentum caps at 6, I believe. | |
I chose 20 for a threat cap, but I'm not sure there is one. You can edit to remove the cap on threat, | |
or just set it very high on the sheet. | |
You will then need to make 5 macros, with the following bodies: | |
!TMReport | |
!TMThreatInc | |
!TMThreatDec | |
!TMMomentumInc |
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
/**************************************** Druid Shift **************************************** | |
This is for the 5E OGL sheet in Roll20. It will probably not work with any others without | |
some modification. Also, I didn't do much in the way of error checking. | |
The GM must make character named Druid X, where X is the creature being shifted into. | |
It is suggested that the GM duplicate existing creatures, rename them, and assign to the druid | |
player. The images for the characters must be uploaded and assigned to the avatar of the druid | |
form characters. The easiest way I've found it to open the character sheet, edit, right click | |
the picture in the avatar, copy, paste into your image program, save, upload and put it back in. | |
Maybe you could just upload it back into the avatar directly. Anyways, this won't work if you |
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
/****Stress Level Script for Matt C.**** | |
Select a token. Click stress macro. The | |
macro will automatically roll some dice | |
and add the result to bar 3, up to 200. | |
If the threshold 100 is reached, a sound | |
will play. It will also post to chat for | |
any stress increase. Finally, there's a | |
stress reset. | |
You'll need to mod it to play sound. |
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
//A little trap | |
on("ready", function() { | |
"use strict"; | |
var i = 0; | |
const millisecondsPerSecond = 1000; // handy conversion | |
let timeForFullSpin = 15 * millisecondsPerSecond; // rotate fully in 15 seconds |
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
/****************Dragonlance Moon Tracker***************** | |
A script to track the moon phases in a Dragonlance Game. | |
You'll need the accompanying images for the moon phases. | |
Put them in a table as specified. Create a character | |
named "MoonTracker", optionally, change the GM whisper | |
for Nuitari to whisper your black robed mages. Only they | |
can see Nuitari. | |
*********************************************************/ | |
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
/* Token control script | |
make a macro called TokenControl, | |
the body should read: | |
!TokenControl @{target|token_id} @{selected|token_id} | |
To use this, select a token that you want to alter the control of | |
then click the macro from your bar | |
then target a token of a player. I think the same token could work. | |
This will, hopefully, alter who controlls the selected token. | |
If the targeted token's player had control, it will remove it | |
if it did not, it will add it. */ |
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
// a script to remove rooftops if a player enters a building | |
on("ready", function() { | |
"use strict"; | |
var allPlayerTokens = []; | |
var allRoofTokens = []; | |
function getPlayerTokens() | |
{ |
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
// a script to remove rooftops if a player enters a building | |
// move the player flag to the page you want to use this on | |
// draw your dynamic lighting lines on your building | |
// use a roof token, best if it's rotation is an integer multiple of 90 degrees (0, 90, 180, 270) | |
// name the roof token "roof", without the quotes. Preferable put it on map layer | |
// drag in player tokens. That is, tokens either assigned to players, or representing characters assigned to player | |
// type !RoofReady into chat, or better yet, use it from a macro. Alternatively, dragging the player flag to the page does this. | |
// should be good to go. Let me know if there are errors please :) | |
// other feature: !RoofDLOff and !RoofDLOn will now turn off or on the dynamic lighting interaction of the script. Default is 'on'. | |
// if you want default to be off, change the declaration on line 21 to read: var dlInteraction = false; |
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
//Requested speed updating script. Should be pretty simple. | |
on("change:graphic:bar1_value", function(obj, prev) { | |
if (obj.get("controlledby") != "" || obj.get("represents")) | |
{ | |
if (obj.get("represents")) | |
{ | |
if(getObj('character', obj.get('represents')).get("controlledby")) | |
{ | |
SpeedUpdateReport(obj, false); |
OlderNewer