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
.charsheet label { | |
display: inline-block; | |
width: 75px; | |
text-align: right; | |
} | |
.charsheet .sheet-attrBox { | |
display:table-cell; | |
border:solid; | |
border-width:1px; |
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
.charsheet { | |
background-image: url("https://sites.google.com/site/roleplayingismagichome/_/rsrc/1385907608270/config/WebsiteBackground_Rough.png.1385907608112.png"); | |
height: 80%; | |
width: 100%; | |
} | |
.charsheet .sheet-everything { | |
height: 90%; | |
margin: 10px 40px; | |
width: 80%; |
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 with a command for specifying tokens to follow other tokens. | |
* Simply select the tokens in the marching order and enter the "!follow" | |
* commandwith either a direction for the marching order of the selected tokens | |
* or the name of a token for the selected tokens to follow behind. | |
* | |
* E.G. "!follow west" will make the selected tokens follow each other in order | |
* from east to west, with the westmost token being the leader and the eastmost | |
* token being the caboose. | |
* Alternatively if we want the selected tokens to follow a character named |
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 set of chat commands used to set tokens to carry other tokens. | |
* When a token moves, the any tokens it is carrying move to its new location. | |
* | |
* The following commands are available: | |
* !carry When this command is entered, all selected tokens become | |
* carried by the bottommost selected token. | |
* !drop [name of carried token] | |
* When this command is entered, the selected token drops the | |
* token with the specified name. |
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
/** Returns an array representing a 2D vector from pt1 to pt2. */ | |
var vec = function(pt1, pt2) { | |
return [pt2[0]-pt1[0], pt2[1]-pt1[1]]; | |
} | |
/** Returns the length of an array representing a vector. */ | |
var vecLength = function(vector) { | |
var length = 0; | |
for(var i=0; i < vector.length; i++) { |
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 small library for testing collisions between moving tokens in Roll20. | |
* | |
* Requires: | |
* Vector Math https://gist.github.com/Cazra/348653571dffc16e87b9 | |
*/ | |
var TokenCollisions = (function() { | |
/** | |
* Returns the first token, from some list of tokens, that a token has | |
* collided with during its last movement. |
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
/** | |
* Provides a dice rolling command specialized for MLP: RiM season 4 edition. | |
* The syntax for the command is | |
* !r [{Character name}:]{skill name} [+/- Advantages/Drawbacks] | |
* | |
* e.g. | |
* !r Spectrum Square:Energy Weapons +4 -2 | |
* | |
* The character name and skill name are case-insensitive. You should only | |
* need to enter the character name if you control more than one character, |
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("chat:message", function(msg) { | |
var cmdName = "!dance"; | |
var msgTxt = msg.content; | |
// This provides a chat command to heal a character by name. | |
// Alternatively, you can heal all named tokens using "all" as the target. | |
if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) { | |
var danceCounter = 0; | |
var curPageID = findObjs({_type: "campaign"})[0].get("playerpageid"); | |
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
.charsheet { | |
background-image: url("http://i336.photobucket.com/albums/n346/Hymnodi/Useful%20stuff/FALLOUT2.png"); | |
} | |
.charsheet * { | |
border-color: #22ff88; | |
color: #22ff88; | |
} | |
.charsheet input, select, textarea { |
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
// This is a "heal" chat command for the roll20 virtual tabletop API. | |
// It can be used to heal all 3 bars for a token by name, | |
// or you can have it heal the tokens for all the characters in your campaign's journal. | |
// | |
// E.g: | |
// Healing one character named "Dave the Dwarf": | |
// !heal Dave the Dwarf | |
// | |
// Healing all characters | |
// !heal all |
OlderNewer