Created
November 4, 2017 21:26
-
-
Save Bastlifa/d900ede441a5045014ea29a96cacf472 to your computer and use it in GitHub Desktop.
Removes GM Whispers From Characters in Roll20
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("ready", function() { | |
on("chat:message", function (msg) { | |
if (msg.type === "api" && msg.content === "!NoWhisper") | |
{ | |
var characters = findObjs({type: 'character'}); | |
for (var i=0; i<characters.length; i++) | |
{ | |
if (getAttrByName(characters[i].id, 'wtype')) | |
{ | |
findObjs({_type: 'attribute', _characterid: characters[i].id, name: 'wtype'})[0].set('current', ""); | |
} | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment