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('chat:message', function(msg) { | |
//state.inventoryOfItems = undefined; | |
//state.inventoryOfItems = []; | |
if(msg.type !== "api"){return}; | |
roll20API.contentPlayerid = getObj("player", msg.playerid); | |
roll20API.contentUserid = roll20API.contentPlayerid.get("d20userid"); | |
if(allowedUser.indexOf(roll20API.contentUserid) == -1){return}; | |
roll20API.contentGiven = msg.content.toLowerCase(); | |
roll20API.contentGivenProper = msg.content; | |
if(roll20API.contentGiven.indexOf(' ') == -1){ |
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
//API:Events:processMessage | |
processMessage = function(msg) { | |
if(msg.type !== "api"){return}; | |
roll20API.contentPlayer = getObj("player", msg.playerid); | |
roll20API.contentUserid = roll20API.contentPlayer.get("d20userid"); | |
roll20API.contentPlayerid = roll20API.contentPlayer.get("_id"); | |
//Remove or move | |
if(roll20API.allowedUser.indexOf(roll20API.contentUserid) == -1){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
cssForRecordSheet = function(sheetId) { | |
for (var index in roll20API.currentAttribs) { | |
var key = roll20API.currentAttribs[index].name | |
var cur = roll20API.currentAttribs[index].cur | |
var max = roll20API.currentAttribs[index].max | |
var id = roll20API.currentAttribs[index].id | |
switch(key){ | |
case "Player_Name": var Player_Name = cur; break; |
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
//Standard API command detection... | |
on("ready", function() { | |
on("chat:message", function(msg) { | |
if(msg.type == "api"){processMessage(msg)}; | |
}); | |
}); | |
//Your command processes prefrence | |
processMessage = function(msg) { | |
if(msg.type !== "api"){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
var mapName = "GeomorphicMap"; | |
var geomorphicMapId; | |
var geomorphicMapWidth; | |
var geomorphicMapHeight; | |
var geomorphicTilesArray = new Array(); | |
var mapTilesArray = []; | |
var isError = false; | |
var errorType = "None."; | |
var sideString = ""; | |
var tilePicked = "Empty"; |
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
var mapName = "GeomorphicMap"; | |
var geomorphicMapId; | |
var geomorphicMapWidth; | |
var geomorphicMapHeight; | |
var geomorphicTilesArray = new Array(); | |
var mapTilesArray = []; | |
var isError = false; | |
var errorType = "None."; | |
var sideString = ""; | |
var tilePicked = "Empty"; |
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
/* ------------------- | |
Big thanks to Alex L. | |
https://app.roll20.net/users/71687/alex-l | |
------------------- */ | |
var mapName = "GeomorphicMap"; | |
var geomorphicMapId; | |
var geomorphicMapWidth; | |
var geomorphicMapHeight; |
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
var mapName = "GeomorphicMap"; | |
var lineColor = "#00ff00"; | |
var lineSize = 5; | |
var geomorphicMapId; | |
var geomorphicMapWidth; | |
var geomorphicMapHeight; | |
var geomorphicTilesArray = new Array(); | |
var mapTilesArray = []; | |
var isError = false; | |
var errorType = "None."; |
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("chat:message", function(msg) { | |
// This assumes that you type something like "!fudge 20:+3:7" | |
// which would pretend that a d20 rolled a 7 for a total of 10. | |
if(msg.type == "api" && msg.content.indexOf("!fudge ") !== -1) { | |
var parts = msg.content.replace("!fudge ", "").split(":"); | |
var faces = parts[0]; | |
var modifier = parts[1]; | |
var value = parts[2]; | |
var total = eval(value + modifier); | |
var color="black" |
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
{ | |
Call:"shillelagh", | |
Name:"Shillelagh", | |
Class:"Druid", | |
SubClass:"", | |
Ritual:"N", | |
Concentration:"N", | |
Level:"0", | |
School:"Transmutation", | |
Component:"V,S,M", |