No problem. Go to your Game's Details page, where you invite players, or promote them to co-gm, click the "Launch Game" button, etc. On the right side, click the "Settings" dropdown and select "API Scripts" Click the "New Script" Tab Change "untitled.js" in the Name: field to "Blind Roll" (or something else, doesn't matter, just identifies the tab for you). Click in the black area below and paste the script (see below) into it. Scroll down and click the "Save Script" button. That's it for installing the script. Now in the game, if you type something in chat like this: !broll 1d20+3 The person that sends it will get a message of "secret roll sent to GM (1d20+3)" and the GM will get a roll of 1d20+3 result. Script Code: on("chat:message", function(msg_orig) {
"use strict";
var msg = _.clone(msg_orig), who;
if (msg.type !== "api") {
return;
}
if(_.has(msg,'inlinerolls')){
msg.content = _.chain(msg.inlinerolls)
.reduce(function(m,v,k){
m['$[['+k+']]']=v.results.total || 0;
return m;
},{})
.reduce(function(m,v,k){
return m.replace(k,v);
},msg.content)
.value();
}
who=getObj('player',msg.playerid).get('_displayname').split(' ')[0];
var cmdName = "!broll ";
var msgTxt = msg.content;
var msgWho = msg.who;
var msgFormula = msgTxt.slice(cmdName.length);
if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) {
if(_.has(msg,'rolltemplate')) {
sendChat(msgWho,'/w gm &{template:'+msg.rolltemplate+'}'+msg.content);
sendChat(msgWho, "/w " + who + " secret rolltemplate sent to GM");
} else {
sendChat(msgWho, "/gmroll " + msgFormula);
sendChat(msgWho, "/w " + who + " secret roll sent to GM (" + msgFormula + ")");
}
};
});