Skip to content

Instantly share code, notes, and snippets.

@Kamanar
Kamanar / gist:8070970
Last active Jan 1, 2016
Quick Attack Script
View gist:8070970
on("chat:message", function(msg) {
if(msg.type == "api" && msg.content.indexOf("!Attack") !== -1) {
//log("SR Started")
var selected = msg.selected;
//log (selected)
_.each(selected, function(obj) {
var tok = getObj("graphic", obj._id);
//log(tok);
var controller = getObj("character", tok.get("represents"));
@Kamanar
Kamanar / templatesv2.js
Created Nov 22, 2013
Cone and Circle Templates V2
View templatesv2.js
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 Dec 29, 2015
Cone and Circle Templates
View templates.js
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 Dec 28, 2015
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.
View Summon Creature
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;