This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | |
| }) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |