Skip to content

Instantly share code, notes, and snippets.

View Kurohyou's full-sized avatar

Scott Casey Kurohyou

View GitHub Profile
on('ready', async function(){
'use strict';
var diceResults = await diceAction(8,7,true);
var actionResult = diceResults.RollResult;
var damage = diceResults.DamageResult;
sendChat("","New Result");
sendChat("","Action Result: "+actionResult);
sendChat("","Damage Result: "+damage);
function async diceAction(nDice,targetNumber,damageFlag){
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googlesyndication.com https://*.doubleclick.net https://partner.googleadservices.com https://www.googletagservices.com https://ssl.google-analytics.com https://www.google-analytics.com https://ajax.googleapis.com http://ajax.googleapis.com https://d3clqjduf2gvxg.cloudfront.net https://cdn.firebase.com https://*.firebaseio.com https://*.tokbox.com https://*.opentok.com http://static.opentok.com http://www.google-analytics.com http://cdn.crowdin.com https://crowdin.com http://stun.l.google.com". Either the 'unsafe-inline' keyword, a hash ('sha256-1Ekk+2sOz2rpPzkjnWi8qbhAAcUsDkukzA3KOGe4DDQ='), or a nonce ('nonce-...') is required to enable inline execution.
app.roll20.net/:13 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googlesyndication.com https://*.doubleclick.net ht
// Github: https://github.com/shdwjk/Roll20API/blob/master/RecursiveTable/RecursiveTable.js
// By: The Aaron, Arcane Scriptomancer
// Contact: https://app.roll20.net/users/104025/the-aaron
var RecursiveTable = RecursiveTable || (function() {
'use strict';
var version = '0.1.2',
lastUpdate = 1453302547,
schemaVersion = 0.1,
/*
PAGENAVIGATOR script:
Author: Scott C.
Contact: https://app.roll20.net/users/459831/scott-c
Thanks to: The Aaron, Arcane Scriptomancer and Stephen for their help with the bulk of this script.
Script goal: to simplify moving between maps in Roll20.
IDEAS FOR IMPLEMENTING AUTO-TOKEN GENERATION:
Chat menu selection of default player character's/pets
Chat button to bring up drop-down selection of all characters controlled by that player + an option for has pets
map_coordinates = function(obj){
var g,l,t,s,v,h,rv,
//size = 91.14378277661477,
//side = 50,
left_h = 46.48512749037782,
top_h = 39.8443949917523,
left_step_h = 69.585127490378,
top_step_h = 39.84439499,
left_v = 37.5992809922301,
top_v = 43.8658278242683,
!import-table-item --RandomIoun --<%%91%%><%%91%%><%%91%%>1t<%%91%%>IounCrackFlaw<%%93%%><%%93%%><%%93%%> <%%91%%>Eastern Star (Ioun Stone; Occult Mysteries version)<%%93%%>(http://www.d20pfsrd.com/magics/wondrouss/wondrouss/h-l/ioun-stones/eastern-star-ioun-stone) --1 --
!import-table-item --RandomIoun --<%%91%%><%%91%%><%%91%%>1t<%%91%%>IounCrackFlaw<%%93%%><%%93%%><%%93%%> <%%91%%>Emerald Ellipsoid (Ioun Stone)<%%93%%>(http://www.d20pfsrd.com/magics/wondrouss/wondrouss/h-l/ioun-stones/emerald-ellipsoid-ioun-stone) --1 --
!import-table-item --RandomIoun --<%%91%%><%%91%%><%%91%%>1t<%%91%%>IounCrackFlaw<%%93%%><%%93%%><%%93%%> <%%91%%>Gamboge Nodule (Ioun Stone)<%%93%%>(http://www.d20pfsrd.com/magics/wondrouss/wondrouss/h-l/ioun-stones/gamboge-nodule-ioun-stone) --1 --
!import-table-item --RandomIoun --<%%91%%><%%91%%><%%91%%>1t<%%91%%>IounCrackFlaw<%%93%%><%%93%%><%%93%%> <%%91%%>Gold Nodule (Ioun Stone)<%%93%%>(http://www.d20pfsrd.com/magics/wondrouss/wondrouss/h-l/ioun-stones/gold-nodule) --1 --
!
!import-table --MinorItem --show
!import-table-item --MinorItem --<%%91%%><%%91%%>1t<%%91%%>TechItem<%%93%%> <%%93%%><%%93%%> --5 --
!import-table-item --MinorItem --<%%91%%><%%91%%>1t<%%91%%>MinorMagicItem<%%93%%> <%%93%%><%%93%%> --4 --
!import-table --MediumItem --show
!import-table-item --MediumItem --<%%91%%><%%91%%>1t<%%91%%>TechItem<%%93%%> <%%93%%><%%93%%> --5 --
!import-table-item --MediumItem --<%%91%%><%%91%%>1t<%%91%%>MediumMagicItem<%%93%%> <%%93%%><%%93%%> --4 --
!import-table --MajorItem --show
!import-table-item --MajorItem --<%%91%%><%%91%%>1t<%%91%%>TechItem<%%93%%> <%%93%%><%%93%%> --5 --
!import-table-item --MajorItem --<%%91%%><%%91%%>1t<%%91%%>MajorMagicItem<%%93%%> <%%93%%><%%93%%> --4 --
!import-table --EnergyResistance --show
@Kurohyou
Kurohyou / Recursive Tables (with roll modifiers)
Last active July 19, 2016 23:51
A modification of The Aaron's Recursive Tables mod. Adds the ability to roll on tables with a modification by adding it after the table call in the inline roll like so: [[1t[TableName]mod]] mod needs to be an expression like +2, -4, +2+5, +[[1d6]]. The script also now respects whispers when the message contains a roll template.
// Github: https://github.com/shdwjk/Roll20API/blob/master/RecursiveTable/RecursiveTable.js
// By: The Aaron, Arcane Scriptomancer
// Contact: https://app.roll20.net/users/104025/the-aaron
var RecursiveTable = RecursiveTable || (function() {
'use strict';
var version = '0.1.2',
lastUpdate = 1453302547,
schemaVersion = 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
/*
PAGENAVIGATOR script:
Author: Scott C.
Contact: https://app.roll20.net/users/459831/scott-c
Thanks to: The Aaron, Arcane Scriptomancer and Stephen for their help with the bulk of this script.
Script goal: to simplify moving between maps in Roll20.
*/
var PAGENAVIGATOR= PAGENAVIGATOR|| (function(){
'use strict';