
I am looking to update my blind whisper script to show rolls using the roll engine rather than just showing them as pure text. The way it works now it doesn't allow you to mouse over, you cant see how it was rolled or any information. I dont know who originally helped me with this, so I can't credit them or anything. But here is the script. Is what I am asking for possible or am I just having a fantasy :P on("chat:message", function(msg) {
var cmdName = "!bw";
var msgWhisper = msg.content.slice(cmdName.length);
if(msg.type == "api" && msg.content.indexOf(cmdName) !== -1) {
if(_.has(msg,'inlinerolls')){
msgWhisper = _.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);
},msgWhisper)
.value();
}
if(_.has(msg,'rolltemplate')) {
sendChat('','/w gm &{template:'+msg.rolltemplate+'}'+msgWhisper);
} else {
sendChat('', '/w gm '+msgWhisper.replace(/\&/g,'&') );
}
}
});
Thank you in advance for any assistance.