Skip to content

Instantly share code, notes, and snippets.

@shdwjk
Created June 8, 2015 13:36
Show Gist options
  • Save shdwjk/fbe81845adb2b7a71333 to your computer and use it in GitHub Desktop.
Save shdwjk/fbe81845adb2b7a71333 to your computer and use it in GitHub Desktop.
Roll20 API: Pic script I got from someone...
on('ready', function() {
on('chat:message', function(msg) {
if (msg.type == "api" && msg.content.indexOf("!pic") !== -1) {
var piclink = msg.content.split(' ')[1];
var fPart = "<div style='box-shadow: 3px 3px 2px #888888; font-family: Verdana; text-shadow: 2px 2px #000; text-align: center; vertical-align: middle; padding: 1px 1px; margin-top: 0.1em; border: 1px solid #000; border-radius: 8px 8px 8px 8px; color: #FFFFFF;"
var tPic = fPart + "background-color:#666666;'>● " + msg.who + " Shared a pic: ●</div>";
var Pic = fPart + "background-color:#AAAAAA;'><img src='" + piclink + "'></div>";
sendChat('', "/direct " + tPic + Pic);
};
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment