Skip to content

Instantly share code, notes, and snippets.

Avatar

BaldarSilveraxe

View GitHub Profile
View Geomorphic
//Standard API command detection...
on("ready", function() {
on("chat:message", function(msg) {
if(msg.type == "api"){processMessage(msg)};
});
});
//Your command processes prefrence
processMessage = function(msg) {
if(msg.type !== "api"){return};
@BaldarSilveraxe
BaldarSilveraxe / Geomorph
Last active Aug 29, 2015
Roll20 API Random Dungeon Generator with Dynamic Lighting
View Geomorph
var mapName = "GeomorphicMap";
var geomorphicMapId;
var geomorphicMapWidth;
var geomorphicMapHeight;
var geomorphicTilesArray = new Array();
var mapTilesArray = [];
var isError = false;
var errorType = "None.";
var sideString = "";
var tilePicked = "Empty";
@BaldarSilveraxe
BaldarSilveraxe / gist:9056392
Last active Aug 29, 2015
Roll20 API Random Dungeon Generator with Dynamic Lighting
View gist:9056392
var mapName = "GeomorphicMap";
var geomorphicMapId;
var geomorphicMapWidth;
var geomorphicMapHeight;
var geomorphicTilesArray = new Array();
var mapTilesArray = [];
var isError = false;
var errorType = "None.";
var sideString = "";
var tilePicked = "Empty";
@BaldarSilveraxe
BaldarSilveraxe / Geomorph
Created Feb 17, 2014
ROLL20 Random Dungeon Generator with Dynamic Lighting (Big thanks to Alex L.)
View Geomorph
/* -------------------
Big thanks to Alex L.
https://app.roll20.net/users/71687/alex-l
------------------- */
var mapName = "GeomorphicMap";
var geomorphicMapId;
var geomorphicMapWidth;
var geomorphicMapHeight;
View Faking
on("chat:message", function(msg) {
// This assumes that you type something like "!fudge 20:+3:7"
// which would pretend that a d20 rolled a 7 for a total of 10.
if(msg.type == "api" && msg.content.indexOf("!fudge ") !== -1) {
var parts = msg.content.replace("!fudge ", "").split(":");
var faces = parts[0];
var modifier = parts[1];
var value = parts[2];
var total = eval(value + modifier);
var color="black"
View gist:badd261304c7b09c51e0
{
Call:"shillelagh",
Name:"Shillelagh",
Class:"Druid",
SubClass:"",
Ritual:"N",
Concentration:"N",
Level:"0",
School:"Transmutation",
Component:"V,S,M",
View SpellArray
{
Call:"shillelagh",
Name:"Shillelagh",
Class:"Druid",
SubClass:"",
Ritual:"N",
Concentration:"N",
Level:"0",
School:"Transmutation",
Component:"V,S,M",
View GEoCode
var mapName = "GeomorphicMap";
var lineColor = "#00ff00";
var lineSize = 5;
var geomorphicMapId;
var geomorphicMapWidth;
var geomorphicMapHeight;
var geomorphicTilesArray = new Array();
var mapTilesArray = [];
var isError = false;
var errorType = "None.";
@BaldarSilveraxe
BaldarSilveraxe / Updated GEO Code
Created Sep 11, 2014
Updated GEO Code for Roll20 Type A pack
View Updated GEO Code
var mapName = "GeomorphicMap";
var lineColor = "#00ff00";
var lineSize = 5;
var geomorphicMapId;
var geomorphicMapWidth;
var geomorphicMapHeight;
var geomorphicTilesArray = new Array();
var mapTilesArray = [];
var isError = false;
var errorType = "None.";
@BaldarSilveraxe
BaldarSilveraxe / Language Script
Last active Aug 29, 2015
Roll20 Language Script
View Language Script
var languageAvatar = "https://s3.amazonaws.com/files.d20.io/images/5538325/0OqDji-XRtAd9ilCHbTbOQ/thumb.png?1410447564"
var roll20API = roll20API || {};
var whoSpoke = "";
var whichLanguage = "";
var languageSeed = 0;
var gibberish = "";
roll20API.languageData = [
{
Description: "Dwarven",
You can’t perform that action at this time.