Skip to content

Instantly share code, notes, and snippets.

@Kamanar
Kamanar / templatesv2.js
Created November 22, 2013 17:36
Cone and Circle Templates V2
on("chat:message", function(msg) {
if(msg.type == "api" && msg.content.indexOf("!cone") !== -1) {
var slice = msg.content.split(" ");
var direction = slice[1];
var size = parseInt(slice[2]);
var selected = msg.selected;
_.each(selected, function(obj) {
var tok= getObj("graphic", obj._id);
if (direction === "angle")
@Kamanar
Kamanar / templates.js
Last active December 29, 2015 02:19
Cone and Circle Templates
on("chat:message", function(msg) {
if(msg.type == "api" && msg.content.indexOf("!cone") !== -1) {
var slice = msg.content.split(" ");
var direction = slice[1];
var size = parseInt(slice[2]);
var selected = msg.selected;
_.each(selected, function(obj) {
var tok= getObj("graphic", obj._id);
if (direction === "angle")
@Kamanar
Kamanar / Summon Creature
Last active December 28, 2015 12:39
Creates a token to the right of the selected summoner when using !summon babau. Additional if statements can be added to add new summoned creatures. Note: You must update imgsrc with a link to your own, uploaded images. Currently, the Marketplace is not supported.
on("chat:message", function(msg) {
if(msg.type == "api" && msg.content.indexOf("!summon ") !== -1) {
var selected = msg.selected;
_.each(selected, function(obj) {
var tok= getObj("graphic", obj._id);
var slice = msg.content.split(" ");
var augmented = 0;