Skip to content

Instantly share code, notes, and snippets.

View Prototype958's full-sized avatar

Cameron Michel Prototype958

View GitHub Profile
@Prototype958
Prototype958 / simpleSurges.js
Last active April 27, 2021 18:20
Roll20 Simple Surges
on("ready", function() {
on("chat:message", async function(msg) {
if (msg.type === "api" && msg.content.indexOf("!surge") === 0) {
//Usage:
// !surge [/*TableName*/]
//Args:
// --tides - send if tides of chaos has been used to roll a d10 instead of a d20
// --hide - send to /w gm results of the table roll instead of displaying to all players
//Full example:
@Prototype958
Prototype958 / beholderEyes.js
Last active September 28, 2022 15:33
Roll20 Beholder Eyes
on("ready", function() {
on("chat:message", async function(msg) {
if (msg.type === "api" && msg.content.indexOf("!eyes") === 0) {
//Send chat callback to roll 1d10
let roll = await new Promise((resolve,reject)=>{
sendChat("", "/r 1d10", function(obs) {
resolve(obs);
})
})
@Prototype958
Prototype958 / spiritualWeapon.js
Created September 8, 2022 14:04
Roll20 Summon Spiritual Weapon
on("ready", function() {
on("chat:message", function(msg) {
if (msg.type === "api" && msg.content.indexOf("!spiritualWeapon") == 0) {
var selected = msg.selected;
if (selected == undefined) {
sendChat("API", "Must select a token");
return;
}
@Prototype958
Prototype958 / wildMagic.js
Created September 8, 2022 14:06
Roll20 Wild Magic Surges 10000+
on("ready", function() {
on("chat:message", async function(msg) {
if (msg.type === "api" && msg.content.indexOf("!wildMagic") === 0) {
//Usage:
// !wildMagic
//Args:
// --tides - send if tides of chaos has been used to roll a d10 instead of a d20
// --hide - send to /w gm results of the table roll instead of displaying to all players
// --force - send to return a surge regardless of roll