This file contains 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 && playerIsGM(msg.playerid)) | |
{ | |
var selected = msg.selected; | |
if (selected===undefined) | |
{ | |
sendChat("API","Please select a character."); | |
return; |
This file contains 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
//usage - !mapSizer imageWidthInPixels imageHeightInPixels | |
on("ready",function(){ | |
on("chat:message",function(msg){ | |
if(msg.type=="api" && msg.content.indexOf("!mapSizer")==0){ | |
var args = msg.content.split(" "); | |
var mapWidth = Number(args[1]); | |
var mapHeight = Number(args[2]); | |
var selected = msg.selected; | |
if(selected===undefined){ | |
sendChat("API","Please select a graphic"); |
This file contains 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("change:campaign:playerpageid",function(){ | |
setTimeout(function(){ | |
pingStartToken(); | |
},1500); | |
}); | |
on("chat:message",function(msg){ | |
if(msg.type=="api" && msg.content.indexOf("!pingStart")==0){ | |
pingStartToken(); |
This file contains 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(){ | |
var isItRunning; | |
on("change:campaign:playerpageid",function(){ | |
var currentPage = getObj("page",Campaign().get("playerpageid")); | |
if (currentPage.get("name")=="breakScreen"){ | |
var textBox; | |
var token = findObjs({ | |
name:"textLocation", | |
type:"graphic", | |
pageid:Campaign().get("playerpageid") |
This file contains 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("!exportMacros")==0){ | |
var existingMacros = findObjs({type:"character",name:"MrMacro"}); | |
if (existingMacros!==undefined){ | |
_.each(existingMacros,function(mrMacro){ | |
mrMacro.remove(); | |
}) | |
} | |
This file contains 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){ | |
if(msg.type=="api" && msg.content.indexOf("!pingMe")==0){ | |
var characterList = findObjs({type:"character",controlledby:msg.playerid}); | |
var playerName = getObj("player",msg.playerid).get("displayname"); | |
if(characterList.length==1){ | |
sendChat("PingMeAPI","!pingCharacter " + characterList[0].get("id") + " " + msg.playerid + " " + playerName); | |
} | |
else{ | |
var pingList=""; | |
_.each(characterList,function(character){ |
This file contains 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"){ | |
return; | |
} | |
var args = msg.content.split(" "); | |
if (args[0] == "!multiTokenFx"){ | |
if(msg.selected===undefined){ | |
sendChat("MultiFX","/w gm please select some tokens"); |
This file contains 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
!power {{ | |
--name|Ray of Frost | |
--leftsub|Ranged Spell Attack | |
--rightsub|60 ft Range | |
--npc_qualities_summary @{target|character_id} | |
--Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{spell_attack_bonus} ]] vs AC @{target|AC} | |
--?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 2d8 ]] | |
--?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d8 ]] | |
--soundfx|_audio,play,nomenu|freezeRay | |
--vfx_opt|@{selected|token_id} @{target|token_id} beam-frost |
This file contains 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){ | |
if(msg.type=="api" && msg.content=="!partyMover"){ | |
buildPartyMoverMacro(); | |
} | |
}); | |
on("change:page:name",function(){ | |
buildPartyMoverMacro(); | |
sendChat("API","!mc refresh"); | |
}) |
This file contains 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) | |
{ | |
if (msg.type == "api" && msg.content.indexOf("!customSpellbook") == 0){ | |
var args = msg.content.split(/\s+/); | |
var spellName = args[1].toLowerCase(); | |
var spellLevel = Number(args[2]); | |
var tokenid = msg.selected[0]._id; | |
var token = getObj("graphic",tokenid); | |
var charID = token.get("represents"); | |
var tokenName = token.get("name"); |
OlderNewer