
I cant seem to get inroll rolls to work in the API For example Im working on a blind roll script, modifying one I found on the forums here If I do this in chat: /w gm [[1d100<?{Percent|50}]] ?{Skill|Skillname} it works perfectly..and formats it how I want the API to return it. My Macro Im using to call it is: !br [[1d100<?{Percent|50}]] ?{Skill|Skillname} which then SHOULD get sent to the /w gm {text} in the APi below. But if I do that in API, It returns a result of '$0 Skillname' (with 0 saying 'rolling 0 = 0' if I hover over it) Doing log(msgFormula); spits out '"$[[0]] SkillName" My API code is below..anyone see what Im doing wrong that Im missing? on("chat:message", function(msg) {
var cmdName = "!br ";
var msgTxt = msg.content;
var msgWho = msg.who;
var msgFormula = msgTxt.slice(cmdName.length);
if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) {
log(msgFormula);
sendChat(msgWho, "/w gm " + msgFormula);
sendChat('System', "/w " + msgWho + " roll sent to GM");
};
});