Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Blind Roll + Sheet Macro

I'm trying to use the blind roll script ( THIS ) in conjunction with the sheet macro for skill checks to get an easy to use blind roll result sent only to me. (Not needing to add API scripts like powercards) What I use now is: !broll @{Del|wtype}&{template:simple} @{Del|rtype}?{Skill |Acrobatics,+[[(@{Del|acrobatics_bonus}@{Del|pbd_safe}*(1-ceil((@{Del|npc})*0.00001)))+(@{Del|npc_acrobatics}*@{Del|npc})]][ACRO]..... and so forth. But this is the result I get when I rolled. Is there a way to modify the api script to get this to work?
1558241823
GiGs
Pro
Sheet Author
API Scripter
This might be caused by the & in the template call. Try replacing it with the html replacement  & !broll @{Del|wtype} & {template:simple} 
1558270881

Edited 1558270969
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Good call gigs, I'd bet the script doesn't grab the roll template which is passed separately from the regular content of the message. Although from that output, it looks like it doesn't handle inline rolls either, which based on the example syntax I think is the intended function. Edit: yes it's possible, although is probably going to require several new functions and chat handling 
The macro that is run, is the standard sheet macro for skill checks that has been posted on these forums. ( HERE )
1558279124
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Jip said: The macro that is run, is the standard sheet macro for skill checks that has been posted on these forums. ( HERE ) yes, but I don't think the blind roll script supports inline rolls. It mirrors the action (mostly) of /gmroll which doesn't require inline rolls and doesn't use templates.
Aaron updated it for me a couple of years ago. I don't use it too often and don't know if it will do what the OP wants, but here it is: // !broll 1d20+3 --Some text that shows up with the roll on("chat:message", function(msg) { var cmdName = "!broll "; var msgTxt = msg.content; var msgWho = msg.who; var msgArgs = msgTxt.slice(cmdName.length).split(/\s+--/); if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) { sendChat(msgWho, `/w gm [[${msgArgs[0]}]]${msgArgs.length>1?` ${msgArgs[1]}`:''}`); sendChat(msgWho, `/w "${msgWho}" secret roll sent to GM ( ${msgArgs[0]} )${msgArgs.length>1?` [${msgArgs[1]}]`:''}`); }; });
1558283006
GiGs
Pro
Sheet Author
API Scripter
Jip said: The macro that is run, is the standard sheet macro for skill checks that has been posted on these forums. ( HERE ) I think the problem here is two-fold: as Scott said, the script would need to be rewritten to account for inline rolls. There might also be issues with all those html entities. Those macros depend on roll20's text parser being run once, but when you send them through the script engine, it's run one extra time - that might break the output. If that's the case, it's a massive job to fix and probably impractical to attempt.
1558284339
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
GiGs said: Jip said: The macro that is run, is the standard sheet macro for skill checks that has been posted on these forums. ( HERE ) I think the problem here is two-fold: as Scott said, the script would need to be rewritten to account for inline rolls. There might also be issues with all those html entities. Those macros depend on roll20's text parser being run once, but when you send them through the script engine, it's run one extra time - that might break the output. If that's the case, it's a massive job to fix and probably impractical to attempt. The html entities for the query nesting actually aren't an issue because by the time the script sees the macro, the roll queries have already been resolved and those entities should already be replaced and only the option that was selected is seen by the API.
1558296259
GiGs
Pro
Sheet Author
API Scripter
You're right, that makes sense.