Skip to content

Instantly share code, notes, and snippets.

function updateRoll20AM(){
sendChat("API","!roll20AM --config,remove");
sendChat("API","!roll20AM --config,import");
}
on("add:jukeboxtrack",function(){
updateRoll20AM();
});
on("change:jukeboxtrack",function(){
on("chat:message",function(msg){
if(msg.type=="api" && msg.content=="!menuMaker"){
var meals = getTableItems("Meals",3);
var drinks = getTableItems("Drinks",3);
if (meals === null || drinks ===null){
return;
}
createMenuHandout(meals,drinks);
}
on("ready",function(){
on("change:campaign:playerpageid",function(){
log("Here")
setTimeout(function(){
pingStartToken();
},1500);
});
on("chat:message",function(msg){
if(msg.type=="api" && msg.content.indexOf("!pingStart")==0){
@nolivo
nolivo / gist:b89a06f88bdbb02793dc295800ded003
Created February 18, 2021 02:18
Macros from the Making More Macros video
Great Weapon Fighting
&{template:default} {{name=Great Weapon Fighting}} {{Attack=[[1d20 + @{strength_mod}[STR] + @{pb}[PB]]] | [[1d20 + @{strength_mod}[STR] + @{pb}[PB]]]}} {{Standard Damage=[[ 2d6ro<2 + @{strength_mod}]]}} {{Crit (if applicable)=[[2d6ro<2]]}}
Halo of Spores
&{template:default} {{name=Halo of Spores}} {{Necrotic Damage=[[1d[[4 + 2 * {6, 10, 14}<@{level}]]]] }} {{Saving Throw = @{spell_save_dc} CON Save negates}}
Eldritch Blast
&{template:default} {{name=Eldritch Blast}} {{Attack = [[1d20ro1 + @{charisma_mod}]]}} {{Damage=[[ 1d10 + @{charisma_mod} [AgonizingBlast]+ @{pb} [Thunder] ]]}}
/fx beam-death @{selected|token_id} @{target|token_id}
on("ready",function(){
on("chat:message",function(msg){
if(msg.type=="api" && msg.content.indexOf("!gatherRumors")==0){
var args = msg.content.split("--");
var PC = args[1].trim();
var NPC = args[2].trim();
var checkType = args[3].trim().toLowerCase();
var npcToken = getObj("graphic",NPC);
var pcSheet = getObj("character",PC);
on("ready",function(){
on("chat:message",function(msg){
if(msg.type=="api" && msg.content.indexOf("!ouija")==0){
let args = msg.content.split("--");
let commandText = args[1].trim().toLowerCase();
let params = commandText.split("|");
let command = params[0];
let commandValue = params[1];
let ouijaPage = findObjs({type:"page",name:"ouija"})[0];
@nolivo
nolivo / SmartAOE_Shatter
Last active January 21, 2023 08:38
The shatter spell for D&D 5e, which requires the use of the SmartAOE script.
!smartaoe {{
--title|Shatter
--leftsub|Slot level ?{Cast at what level?|2|3|4|5|6|7|8|9}
--rightsub|DC @{selected|spell_save_dc} CON
--titlecardbackground|linear-gradient(blue, cyan)
--oddrowbackground|#00ccff
--evenrowbackground|#edfcfc
--oddrowfontcolor|#000000
--tablebgcolor|#edfcfc
@nolivo
nolivo / In Between Power Card
Created January 19, 2022 02:26
This powercard is used to emulate the In Between Game
!power {{
--emote|@{selected|token_name} tries their luck at the ‘In Between’ table
--name|In Between
--Rules|Center die must be between the other two.^^Tie=loss^^If outside dice match automatic loss.
--Wager|[[ [$bet] ?{How Much?|5} + 0d0]]gp
--!blurb|**Roll the Bones!!!**
--Rolls|[[ [$r1] 1d20 ]] • [[ [$r2] 1d20 ]] • [[ [$r3] 1d20 ]]
--?? $r1 == $r3 ?? Loser|Outer dice match. Automatic loss. skiptTo*5|EndofCard
--?? $r1 > $r3 ?? skipTo*1|bigsmall
--?? $r3 > $r1 ?? skipTo*2|smallbig
&{template:default}{{name=Healing Potion}}{{?{action type|bonus,?{Potion&#124;Regular&#44; **Healing Potion Used:** [[2d4+2]]&#124;Greater&#44; **Greater Healing Potion Used:** [[4d4+4]]&#124;Superior&#44; **Superior Healing Potion Used:** [[8d4+8]]&#124;Supreme&#44; **Supreme Healing Potion Used:** [[10d4+20]]&#125;|full,?{Potion&#124;Regular&#44; **Healing Potion Used:** [[10]]&#124;Greater&#44; **Greater Healing Potion Used:** [[20]]&#124;Superior&#44; **Superior Healing Potion Used:** [[40]]&#124;Supreme&#44; **Supreme Healing Potion Used:** [[60]]&#125;}}}
The command buttons
/w @{character_name} [Unwillng](~InfernalConduitUnwilling) [Willing](~InfernalConduitWilling)
Infernal Conduit Unwilling
&{template:atkdmg} {{mod=[[@{pb}+@{charisma_mod}]]}} {{rname=Infernal Conduit}} {{r1=[[1d20+@{pb}+@{charisma_mod}]]}} {{always=1}} {{r2=[[1d20+@{pb}+@{charisma_mod}]]}}{{attack=1}} {{range=Touch}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[?{How Many Dice|1}d10]]}} {{dmg1type=Necrotic}} {{crit1=crit1}} {{crit1=[[?{How Many Dice|1}d10]]}} {{desc=@{character_name} heals this same amount of HP as she drains life from her foe!}}
Infernal Conduit Willing
&{template:dmg} {{rname=Infernal Conduit}} {{range=Touch}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[?{How Many Dice|1}d10]]}} {{dmg1type=Necrotic}} {{desc=@{character_name} sacrifices $[[0]] HP and @{target|character_name} recovers $[[0]] HP}}
Forked Tongue