Skip to content

Instantly share code, notes, and snippets.

View shdwjk's full-sized avatar
🐉
Coding, coding, coding...

Aaron C. Meadows shdwjk

🐉
Coding, coding, coding...
  • Springfield, MO
View GitHub Profile
@shdwjk
shdwjk / SpeechBalloon.js
Last active March 24, 2023 21:47 — forked from BaldarSilveraxe/SpeechBalloon
Roll20 SpeechBalloon
const SpeechBalloon = (() => { // eslint-disable-line no-unused-vars
const version = 0.1; // eslint-disable-line no-unused-vars
const schemaVersion = 0.4;
const defaultShowLength = 4; // seconds
const msPerSec = 1000; // for conversions.. no magic numbers!
const checkStepRate = 1000; //ms = 1 second
@shdwjk
shdwjk / gmnote.js
Last active January 20, 2019 15:00 — forked from keithcurtis1/gmnote.js
This pulls the GM notes from a token on Roll20 and whispers them to the chat
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) =>
/*
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
/*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',
/*
Easy Experience Script:
This script will create a character called ExperienceThresholds that it uses for most of its functionality. If there is already an
ExperienceThresholds character present, it will not make one; please make sure that you do not have a self-made ExperienceThresholds character
(highly unlikely I would think ;) )
----------------------------------------------------------------------------------------
Use the following chat commands to utilize this script:
!xp challenge @{token_id/character_id}: Adds a character's npc-xp attribute value to the Session XP tally in the ExperienceThresholds character.
!xp miscXP ###: Adds a manually entered XP value to the Session XP tally in ExperienceThresholds.
!xp session: Divides the Session XP by the number of PCs (defined as characters that have a player-name entry), adds that xp to each PC's
on('ready',function(){
"use strict";
var leftOffset = 20,
topOffset = 30,
hpleftOffset = 20,
hptopOffset = 24,
spleftOffset = 23,
sptopOffset = 34,
@shdwjk
shdwjk / CarryTokens.js
Last active August 29, 2015 14:03 — forked from Cazra/gist:5792605
// GIST: https://gist.github.com/shdwjk/48370c09788e11263d32/edit
// Fork of Stephen L.'s carry script
// Addition: using isGM() script for checking who is a GM
// Correction: Removed use of for(in) which was causing crashes as it parses the
// object's prototype's properties as well, not just the properties.
//
/**
* 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.
*