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
//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 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 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 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 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 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 === "!ShowHealth") | |
{ | |
var page = getObj('page', getObj('player',msg.playerid).get('lastpage')).id; | |
var tokens = findObjs({type: 'graphic', _pageid: page}); | |
for (var i=0; i<tokens.length; i++) | |
{ | |
if (tokens[i].get("bar1_value")) |
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
/* | |
* A Simple face changing script. | |
* Make a rollable table with the character name (one word characer name) plus -Faces | |
* Example, character named John Smith | |
* Table name is John-Faces | |
* Fill table with face names, and pictures which you have uploaded. Can't be from purchase or search | |
* Must be uploaded to your library. | |
* Make macro with this body, as token action macro: | |
* !FaceChange John-?{Face|Normal|Soldier|Popper|Pirate|Noble|Elder|Cleric} | |
* Where those options (other than the title "Face") are the names of the items in your rollable table. |
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
&{template:npcaction} {{name=Size and Shape}} {{rname=Shape Maker}} {{description=**Circle Radius** | |
[5 ft](!TemplateGenerator Circle 5) | [10 ft](!TemplateGenerator Circle 10) | [20 ft](!TemplateGenerator Circle 20) | [30 ft](!TemplateGenerator Circle 30) | [40 ft](!TemplateGenerator Circle 40) | |
________________________ | |
**Square Side** | |
[10 ft](!TemplateGenerator Square 10) | [15 ft](!TemplateGenerator Square 15) | [20 ft](!TemplateGenerator Square 20) | [40 ft](!TemplateGenerator Square 40) | |
________________________ | |
**Cones** | |
[60](!TemplateGenerator Cone 60 135) -------- [60](!TemplateGenerator Cone 60 90) -------- [60](!TemplateGenerator Cone 60 45) | |
----[30](!TemplateGenerator Cone 30 135) ---- [30](!TemplateGenerator Cone 30 90) ---- [30](!TemplateGenerator Cone 30 45)---- | |
--------[15](!TemplateGenerator Cone 15 135) [15](!TemplateGenerator Cone 15 90) [15](!TemplateGenerator Cone 15 45)--------- |
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
//TemplateGenerator | |
//Fill in the table TemplateShapes that the script makes using the images from the imgur link | |
//imgur link: https://imgur.com/a/vekJIAg | |
//Also make a macro called ShapeMaker or something, body should read: !ShapemakerMacro | |
//Share that macro with all players. | |
//Warning! This only works on the page that the player tab is on. Make sure to select a token before clicking the shape | |
on("ready", function() { |
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() | |
{ | |
on("chat:message", function (msg) | |
{ | |
if (msg.type === "api" && msg.content === "!DiceMacroSetup") | |
{ | |
if (playerIsGM(msg.playerid)) | |
{ | |
if (!findObjs({_type: 'macro', _playerid: msg.playerid, name: 'd2'})[0]) | |
{ |