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
/****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 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 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 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 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
//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 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
//Familiar Sight Swap | |
// make a macro with body: | |
// !SwapSight PlayerTokenName FamiliarTokenName | |
on("ready", function() { | |
on("chat:message", function (msg) { | |
if (msg.type === "api" && msg.content.split(' ')[0] === "!SwapSight") { | |
SwapSight(msg); |
OlderNewer