Skip to content

Instantly share code, notes, and snippets.

@SCPRedMage
SCPRedMage / BarMonitor.js
Created January 19, 2017 00:13
Script to trigger sheet worker updates when linked bar is updated
var BarMonitor = BarMonitor || (function() {
'use strict';
var version = '0.1',
lastUpdate = 1484779400,
attrUpdate = function(obj,bar)
{
var link = obj.get(bar+"_link");
var value = obj.get(bar+"_value");
@SCPRedMage
SCPRedMage / HL-import-worker.js
Created January 31, 2017 03:20
HL-import module for Roll20 Pathfinder character sheet
var HLImport = HLImport || (function() {
'use strict';
var parseNum = function(num)
{
if (_.isUndefined(num) || num === "")
return 0;
return (parseInt(num) || 0);
},
@SCPRedMage
SCPRedMage / newCharacterAbilities.js
Last active July 13, 2017 21:33
Create basic token actions for new Roll20 characters
function getCharacterObj(obj) {
"use strict";
//send any object and returns the associated character object
//returns character object for attribute, token/graphic, and ability, and... character
var objType = obj._type,
att, characterObj, tok;
if ((objType !== "attribute") && (objType !== "graphic") && (objType !== "character")) {