Skip to content

Instantly share code, notes, and snippets.

View palikhov's full-sized avatar
🐉
E5E / SRD 5.1 rus / Excel GM Tools

Anton Palikhov palikhov

🐉
E5E / SRD 5.1 rus / Excel GM Tools
View GitHub Profile
@palikhov
palikhov / dialog.js
Created January 4, 2022 06:57 — forked from keithcurtis1/dialog.js
Creates dialog boxes with token images for Roll20 *!dialog [token_id] --[message]*
on('ready',()=>{
on('chat:message',(msg)=>{
if('api' === msg.type && /^!dialog/i.test(msg.content)){
let p = getObj('player',msg.playerid);
let theMessage = "";
const openBox = "<div style='border: 0px none; margin-top: 10px; border-radius: 35px 6px 6px 6px; box-shadow: 2px 2px 4px 2px #000; min-height:60px; display: block; padding:5px; text-align: left; white-space: pre-wrap;'>";
const closeBox = "</div>";
const buttonStyle = "'background-color: transparent; align:right; font-size: 0.8em; line-height:1.2; font-family: sans-serif; font-style: normal; font-weight: normal; padding: 0px;color: #ce0f69;display: inline-block;border: none; !important'";
function imageFormat(imgsrc){
!chatmenu @{selected|character_id} {template:npcaction}{{rname=@{selected|character_name}}}{{name=@{selected|class_display}
@{selected|race_display}, @{selected|background}
**Jump** - Long [[(@{selected|strength}/2)]] / [[@{selected|strength}]]ft. | High [[((@{selected|strength_mod}+2)/2)]] / [[@{selected|strength_mod}+2]] ft.
**HP: **@{selected|hp} / @{selected|hp|max} | ** AC: ** @{selected|ac} | **Spd: ** @{selected|speed} | **Passive: ** @{selected|passive_wisdom}}}{{description=CHATMENU }} --separator: |   --title:Ability Rolls --**Str @{selected|strength}** *(@{selected|strength_mod})* ,strength|**Dex @{selected|dexterity}** *(@{selected|dexterity_mod})*,dexterity|**Con @{selected|constitution}** *(@{selected|constitution_mod})* ,constitution|**Int @{selected|intelligence}** *(@{selected|intelligence_mod})* ,intelligence|**Wis @{selected|wisdom}** *(@{selected|wisdom_mod})*,wisdom|**Cha @{selected|charisma}** *(@{selected|charisma_mod})*,charisma --title:Saving Throws --Str,strength_save|Dex,dexterity_
!chatmenu @{selected|character_id} {template:npcaction}{{rname=@{selected|character_name}}}{{name=@{selected|npc_type}
**HP: **@{selected|bar1} / @{selected|hp|max} | ** AC: ** @{selected|npc_ac} | **Spd: ** @{selected|npc_speed}
**Languages: **@{selected|npc_languages}
**Senses: **@{selected|npc_senses}
 **Resists:: **@{selected|npc_resistances}
 **Immune: **@{selected|npc_immunities}
 **Cond. Immune: **@{selected|npc_condition_immunities}}}{{description=CHATMENU}} --separator: | --title:Ability Rolls --**Str @{selected|strength}** *(@{selected|strength_mod})* ,strength|**Dex @{selected|dexterity}** *(@{selected|dexterity_mod})*,dexterity|**Con @{selected|constitution}** *(@{selected|constitution_mod})* ,constitution|**Int @{selected|intelligence}** *(@{selected|intelligence_mod})* ,intelligence|**Wis @{selected|wisdom}** *(@{selected|wisdom_mod})*,wisdom|**Cha @{selected|charisma}** *(@{selected|charisma_mod})*,charisma --title:Saving Throws --Str,npc_str_save|Dex,npc_dex_save|Con,npc_con_save|Int,npc_in
@palikhov
palikhov / spiritualWeapon.js
Created January 4, 2022 06:55 — forked from nolivo/spiritualWeapon.js
A script for use with Roll20 to summon a spiritual weapon to the right of a selected character's token
on("ready",function()
{
on("chat:message",function(msg){
if(msg.type=="api" && msg.content.indexOf("!spiritualWeapon")==0 && playerIsGM(msg.playerid))
{
var selected = msg.selected;
if (selected===undefined)
{
sendChat("API","Please select a character.");
return;
@palikhov
palikhov / Character Stats
Created January 4, 2022 06:55 — forked from bradleyallanpatterson/Character Stats
Generic Roll20 Character Macro for skills initiative and saving throws
/w gm &{template:npcaction}{{rname=@{selected|character_name}}}{{name=@{selected|npc_type}
**HP: **@{selected|bar1} / @{selected|hp|max} | ** AC: ** @{selected|ac} | **Spd: ** @{selected|speed}
}}{{description=
[Initiative](~selected|INITIATIVE)
****
**Abilities**
[**Str @{selected|strength}** *(@{selected|strength_mod})*](~selected|npc_str) | [save](~selected|npc_str_save)
[**Dex @{selected|dexterity}** *(@{selected|dexterity_mod})*](~selected|npc_dec) | [save](~selected|npc_dex_save)
[**Con @{selected|constitution}** *(@{selected|constitution_mod})*](~selected|npc_con) | [save](~selected|npc_con_save)
[**Int @{selected|intelligence}** *(@{selected|intelligence_mod})*](~selected|npc_int) | [save](~selected|npc_int_save)
@palikhov
palikhov / Spells - Wizard
Created January 4, 2022 06:55 — forked from bradleyallanpatterson/Spells - Wizard
Generic Roll20 Character Macro for spells - wizard spells
/w @{character_name} &{template:atk} {{desc=**Spellbook**
**Cantrips:**
[Chill Touch](!&#13;&#37;{@{selected|character_name}&#124;Spell_0_ChillTouch&#125;)
[Fire Bolt](!&#13;&#37;{@{selected|character_name}&#124;Spell_0_FireBolt&#125;)
**1st:**
[Burning Hands](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_BurningHands&#125;)
[Chromatic Orb](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_Chromatic_Orb&#125;)
[Magic Missile](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_MagicMissile&#125;)
@palikhov
palikhov / Spells - Ranger
Created January 4, 2022 06:55 — forked from bradleyallanpatterson/Spells - Ranger
Generic Roll20 Character Macro for spells - ranger spells
/w @{character_name} &{template:atk} {{desc=**Spells**
**1st:**
[Cure Wounds](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_CureWounds&#125;)
[Detect Magic](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_Detect_Magic&#125;)
[Disguise Self](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_Disquise_Self&#125;)
[Detect Poison And Disease](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_Detect_Poison_Disease&#125;)
}}
@palikhov
palikhov / Spells - Cleric
Created January 4, 2022 06:55 — forked from bradleyallanpatterson/Spells - Cleric
Generic Roll20 Character Macro for spells - cleric spells
/w @{character_name} &{template:atk} {{desc=**Spells**
**Cantrips:**
**1st:**
[Searing Smite](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_SearingSmite&#125;)
[Thunderous Smite](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_ThunderSmite&#125;)
**2nd:**
[Spiritual Weapon](!&#13;&#37;{@{selected|character_name}&#124;Spell_2_SpiritualWeapon&#125;)
@palikhov
palikhov / Spells - Paladin
Created January 4, 2022 06:55 — forked from bradleyallanpatterson/Spells - Paladin
Generic Roll20 Character Macro for spells - paladin spells
/w @{character_name} &{template:atk} {{desc=**Spells**
**1st:**
[Searing Smite](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_SearingSmite&#125;)
[Thunderous Smite](!&#13;&#37;{@{selected|character_name}&#124;Spell_1_ThunderSmite&#125;)
}}
@palikhov
palikhov / Spells - Druid
Created January 4, 2022 06:55 — forked from bradleyallanpatterson/Spells - Druid
Generic Roll20 Character Macro for spells - druid spells
/w @{character_name} &{template:atk} {{desc=**Spells**
**1st:**
**2nd:**
**3rd:**
**4th:**