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
/* Screen Shake (really just maps, tokens, and paths) | |
make a macro with the folloing body | |
/w gm &{template:default} {{name=Screen Shaker}} {{[Start](!ScreenShake)}} {{[Shake With Time](!ScreenShake ?{time})}} {{[Stop](!ScreenShakeStop)}} | |
*/ | |
on("ready", function() { | |
var ScreenShakeEnabled = true; | |
on("chat:message", function (msg) { | |
if (msg.type === "api" && msg.content.split(' ')[0] === "!ScreenShake" && playerIsGM(msg.playerid)) | |
{ | |
var shakeTime = 0; |
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 and restore rooftops when a player gets within range of the building. | |
To use this: | |
1: After first loading, use !RooftopCommands to make the use macros | |
2: Use the polygon tool to make your dynamic lighting lines on the building. | |
3: Move the player flag to the page you want to use this on. | |
4: Use a roof token, best if it's rotation is an integer multiple of 90 degrees (0, 90, 180, 270) | |
5: Name the roof token "roof", without the quotes. | |
6: Drag in player tokens. That is, tokens either assigned to players, or representing characters assigned to player | |
7: Type !RoofReady into chat, or better yet, use it from the macro. |
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() { | |
on("chat:message", function (msg) { | |
if (msg.type === "api" && msg.content === "!NoWhisper") | |
{ | |
var characters = findObjs({type: 'character'}); | |
for (var i=0; i<characters.length; i++) | |
{ | |
if (getAttrByName(characters[i].id, 'wtype')) | |
{ |
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() { | |
var graphics; | |
var paths; | |
const scalePathString = function(pathstring,scale){ | |
return JSON.stringify(_.map(JSON.parse(pathstring),(n)=> _.map(n,(i)=> _.isNumber(i) ? scale*i : i ))); | |
}; | |
const simpleObject = function(o){ |
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
//Just type !MakeChallengeDiceTable into chat and hit enter. Then go ahead and delete this script. | |
on("ready", function() { | |
"use strict"; | |
on("chat:message", function (msg) { | |
if (msg.type === "api" && msg.content === "!MakeChallengeDiceTable") | |
{ | |
var CDtable = findObjs({type: 'rollabletable', name: "Challenge-Dice"})[0]; | |
if (!CDtable) | |
{ |
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); |
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
// 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
/* 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
/****************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. | |
*********************************************************/ | |