Skip to content

Instantly share code, notes, and snippets.

🐉
Coding, coding, coding...

Aaron C. Meadows shdwjk

🐉
Coding, coding, coding...
  • Indianapolis, IN
Block or report user

Report or block shdwjk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shdwjk
shdwjk / gmnote.js
Last active Jan 20, 2019 — forked from keithcurtis1/gmnote.js
This pulls the GM notes from a token on Roll20 and whispers them to the chat
View gmnote.js
on('ready',()=>{
const blockElements = [
'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', 'pre', 'address',
'blockquote', 'dl', 'div', 'fieldset', 'form', 'hr', 'noscript', 'table','br'
];
const rStart=new RegExp(`<\\s*(?:${blockElements.join('|')})\\b[^>]*>`,'ig');
const rEnd=new RegExp(`<\\s*\\/\\s*(?:${blockElements.join('|')})\\b[^>]*>`,'ig');
const getLines = (str) =>
@shdwjk
shdwjk / TempHP.js
Created Jan 11, 2019
AssureTempHPMarkers
View TempHP.js
/* global TokenMod, ChatSetAttr */
on('ready', () => {
// Configuration parameters
const HPBarNum = 3;
const TempHPMarker = 'chained-heart';
const DeadMarker = 'dead';
const TempHPAttributeName = 'temp_hp';
/////////////////////////////////////////////
@shdwjk
shdwjk / auraHealth.js
Created Mar 31, 2018
DXWarlock's HealthColors Script -- with TokenMod Support
View auraHealth.js
/* global createObj TokenMod spawnFxWithDefinition getObj state playerIsGM sendChat _ findObjs log on*/
/*
My Profile link: https://app.roll20.net/users/262130/dxwarlock
GIT link: https://github.com/dxwarlock/Roll20/blob/master/Public/HeathColors
Roll20Link: https://app.roll20.net/forum/post/4630083/script-aura-slash-tint-healthcolor
*/
/*jshint bitwise: false*/
var HealthColors = HealthColors || (function () {
'use strict';
var version = '1.5.1',
View Kirsty Calendar, Aaron wind
/*
Calendar for Mundana
Created by Kirsty (https://app.roll20.net/users/1165285/kirsty)
and sabotaged to an extreme extent by dancodan, also cramed in some swedish here and there..
Many thanks to Aaron (https://app.roll20.net/users/104025/the-aaron) for his NoteLog script, parts of which I "borrowed"
API Commands:
!cal (as Player) - Shows world, date, time, moon, weather and counted days
!cal (as GM) - Same as player but includes options to advance the date/time, alter the weather, add a note or view the settings menu.
!calSet (GM only) - Allows the GM to change the world, date, time display, show/hide days until full moon, adjust day counter or set the start date
Red Colour: #7E2D40
View Perlin.js
// Ported from: https://github.com/josephg/noisejs
/*
Perlin.seed(134123);
let v1 = Perlin.perlin2(0.5,0.5);
*/
/*
* A speed-improved perlin and simplex noise algorithms for 2D.
*
* Based on example code by Stefan Gustavson (stegu@itn.liu.se).
@shdwjk
shdwjk / normalizePageScale
Last active Nov 3, 2017
Normalize Page Scale. !nps for the current page or !nps-all for all pages.
View normalizePageScale
on('ready',function(){
"use strict";
var scgm=(msg)=>{
sendChat('NPS',`/w gm <div style=" margin-left: -40px; border: 1px solid #ccc; border-radius: .5em; padding: .1em .5em; background-color: #eee; font-size: 10px; font-weight: bold; "> ${msg} </div> `);
},
scaleGraphic = function(scale){
return function(graphic){
graphic.set({
left: graphic.get('left')*scale,
top: graphic.get('top')*scale,
@shdwjk
shdwjk / Hidden.js
Created Sep 20, 2016
Manveti's HiddenRolls script with a -q or --quiet option to suppress output to the player
View Hidden.js
var HiddenRolls = HiddenRolls || {
COMMANDS: ["!hideroll", "!hiderolls", "!hidetotal", "!hidetotals", "!hideall", "!help"],
write: function(s, who, style, from){
if (who){
who = "/w " + who.split(" ", 1)[0] + " ";
}
sendChat(from, who + s.replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<br>"));
},
@shdwjk
shdwjk / NormalizePageSize.js
Created Aug 27, 2016
NormalizePageSize -- !nps by gm to adjust scale of all tactical maps to 5ft.
View NormalizePageSize.js
on('ready',function(){
"use strict";
var scgm=(msg)=>{
sendChat('NPS',`/w gm <div style=" margin-left: -40px; border: 1px solid #ccc; border-radius: .5em; padding: .1em .5em; background-color: #eee; font-size: 10px; font-weight: bold; "> ${msg} </div> `);
},
scaleGraphic = function(scale){
return function(graphic){
graphic.set({
left: graphic.get('left')*scale,
top: graphic.get('top')*scale,
@shdwjk
shdwjk / CreatureGenWithXP.js
Last active Aug 26, 2016
CreatureGen with XP field
View CreatureGenWithXP.js
/**
*
* Copyright (C) 2015 Ken L.
* Licensed under the GPL Version 3 license.
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Andy W.
* Shu Zong C.
* Carlos R. L. Rodrigues
View Page Navigation
/*Script goal: to simplify moving between maps in Roll20.
Specific Goals:
1. Moving a token to a designated location on a map should move the player(s) to the associated map if GM permission is set to true
2. GM should be able to enter in a specific map to travel to via API command dialog.
3. I think that's it.
*/
var INTERACTIVEMAP = INTERACTIVEMAP || (function(){
'use strict';
var version = '0.0.1',
You can’t perform that action at this time.