Skip to content

Instantly share code, notes, and snippets.

@BaldarSilveraxe
BaldarSilveraxe / SpaceTest.js
Last active August 29, 2015 14:23
SpaceTest
var SpaceIndustryTiles = (function () {
'use strict';
var textures = [];
textures['space'] = [
{key: '001', url: 'https://s3.amazonaws.com/files.d20.io/images/10242180/lfUyZAeGDrxAhNxZvyShXw/thumb.jpg?1434626840', w: 840, h: 840},
{key: '002', url: 'https://s3.amazonaws.com/files.d20.io/images/10242168/Y-M1W0io3XRhVNY_9cG2Kw/thumb.jpg?1434626836', w: 840, h: 840},
{key: '003', url: 'https://s3.amazonaws.com/files.d20.io/images/10242175/7VTy7MQPF0utcQFsq_76zA/thumb.jpg?1434626838', w: 840, h: 840},
{key: '004', url: 'https://s3.amazonaws.com/files.d20.io/images/10242164/PUjMZwsFbYRnBC01lilM7A/thumb.jpg?1434626834', w: 840, h: 840},
{key: '005', url: 'https://s3.amazonaws.com/files.d20.io/images/10242167/UjwTYXjE1dC4XDx3AC7ekg/thumb.jpg?1434626836', w: 840, h: 840},
@BaldarSilveraxe
BaldarSilveraxe / DungeonDrawDoorUpdate
Created June 17, 2015 18:35
Dungeon Draw Door Update Test
var DungeonDrawDoors = DungeonDrawDoors || (function(){
'use strict';
//version = 2.9
//lastUpdate = 1430236079 //Unix timestamp
//schemaVersion = 2.9
var defaultTexture = 'Old School|#18769c',
//light settings
light_radius_setting = 30,
@BaldarSilveraxe
BaldarSilveraxe / DungeonDrawUpdateTest
Created June 17, 2015 15:41
Dungeon Draw Update Test
var DungeonDraw = DungeonDraw || (function(){
'use strict';
//settings
var defaultTexture = 'Old School|#18769c',
cssButtonAnchor = ' style="border: 1px solid AliceBlue; background-color: SteelBlue; color: white;" ',
cssButtonSpan = ' style="color: white; font-weight: normal; display: block; width: 150px;" ',
cssButtonAnchorImg = ' style="border: 1px solid Black; background-color: White; color: white;" ',
cssButtonImg = ' style="padding: 0px 0px 0px 0px; outline: none; border: none;" ',
deferred={
var activeMap = activeMap || (function(){
'use strict';
var version = '0.2.0',
lastUpdate = 1430550687,
schemaVersion = 0.3,
objExtractKeys = ['id','pageid','stroke','rotation','layer','width','height','top','left','controlledby',
'imgsrc', 'flipv', 'fliph'],
@BaldarSilveraxe
BaldarSilveraxe / featurePath
Last active August 29, 2015 14:20
Roll20 API feature script based on polygon path on the GM layer
var featurePath = featurePath || (function(){
'use strict';
var version = '0.1.1',
lastUpdate = 1430550687,
schemaVersion = '0.1.1',
objExtractKeysGraphic = ['id','pageid','layer','width','height','top','left'],
objExtractKeysPath = ['id','pageid','layer','width','height','top','left','path','stroke'],
@BaldarSilveraxe
BaldarSilveraxe / NoSelectControl
Created December 20, 2014 16:19
Roll20 API to control tokens you can not select.
var NoSelectControl = NoSelectControl || (function() {
'use strict';
var version = 0.1,
handleMessages = function(msg)
{
if('api' !== msg.type ) {
return;
}
@BaldarSilveraxe
BaldarSilveraxe / DungeonReadyDoors
Last active August 29, 2015 14:11
Roll20 API to be used with Dungeon Ready Tiles and scripts
// GIST: https://gist.github.com/BaldarSilveraxe/3b09ede4260a39ab491c
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~
!readydoors
~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
var DungeonReadyDoors = DungeonReadyDoors || (function(){
'use strict';
var version = 0.1,
@BaldarSilveraxe
BaldarSilveraxe / GeoTableChecker
Last active August 29, 2015 14:11
Roll20 Script
on("ready", function() {
on("chat:message", function(msg) {if(msg.type == "api"){processMessage(msg)};});
});
processMessage = function(msg) {
if(msg.type !== "api"){return};
if(msg.content == "!gettable"){gettable();}
};
gettable = function(msg) {
var tableName = "GeomorphicTiles";
var geomorphicTilesCheck = [
@BaldarSilveraxe
BaldarSilveraxe / DungeonReadyScript
Last active February 10, 2019 02:56
Complete Set of Sample Images to Make Your "Dungeon Ready" (Random Dungeon Generator and Dynamic Lighting for Walls and Doors with Editing UI)
// GIST: https://gist.github.com/BaldarSilveraxe/fe582e5845d38d64d76a
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~
!dungeonready
~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
var DungeonReady = DungeonReady || (function(){
'use strict';
var version = 0.2,
@BaldarSilveraxe
BaldarSilveraxe / SpeechBalloon
Last active December 14, 2020 22:10
Roll20 SpeechBalloon
var SpeechBalloon = SpeechBalloon || (function(){
'use strict';
var version = 0.1,
schemaVersion = 0.4,
defaultShowLength = 4, // seconds
msPerSec = 1000, // for conversions.. no magic numbers!
checkStepRate = 1000, //ms = 1 second
checkInterval = false,