Skip to content

Instantly share code, notes, and snippets.

@Bastlifa
Bastlifa / FamiliarSightSwap.js
Created September 28, 2018 23:17
Familiar Sight Swap for Roll20 D&D 5E
//Familiar Sight Swap
// make a macro with body:
// !SwapSight PlayerTokenName FamiliarTokenName
on("ready", function() {
on("chat:message", function (msg) {
if (msg.type === "api" && msg.content.split(' ')[0] === "!SwapSight") {
SwapSight(msg);
@Bastlifa
Bastlifa / AddWep.js
Last active November 21, 2018 06:38
Add Weapon to FFG SW Sheets on Roll20
on("ready", function() {
on('chat:message', function(msg) {
if (msg.type === "api" && msg.content.split(' ')[0] === "!AddWep")
{
// strips the first bit off of the api command
let weaponName = msg.content.replace("!AddWep ", "");
AddWep(msg, weaponName);
}
});
});
@Bastlifa
Bastlifa / TableMaker.js
Created December 17, 2018 03:00
Roll20 Table Maker via Blank Character Sheet
//TableMaker
//Make a character with no sheet.
//All attributes are table entries, all current values are weights.
//Drag token (can be default) to canvas. Select it. Type !TableMaker <table name> into chat and hit enter
//Table name must use dashes for spaces (probably)
//Transmog your table over to whatever game you need it for.
//This probably sucks, don't use it.
on("ready", function() {
@Bastlifa
Bastlifa / CombatManeuverBatch
Created September 4, 2019 01:48
Combat Maneuver Batch Adder for Roll20 PF1
// Add other maneuvers as desired.
// Select PC tokens tokens, hit !CombatManeuverBatch
var generateUUID = (function() {
"use strict";
var a = 0, b = [];
return function() {
var c = (new Date()).getTime() + 0, d = c === a;
a = c;
@Bastlifa
Bastlifa / witcherLifeEvent.js
Created May 15, 2020 01:56
Witcher TTRPG Life Events Script for Roll20
on("ready", function()
{
on("chat:message", function (msg)
{
if (msg.type === "api" && msg.content === "!allyEnemy")
{
allyEnemy()
}
if (msg.type === "api" && msg.content === "!fortuneMisfortune")
{