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 .
×

Help For BlindRoll API (Pathfinder 2)

1603268750

Edited 1603275207
I've been searching for a while in others topics but haven't see the response i'm looking for, sadly So here i come. I'm currently running this API Script that i've found somewhere in the forum: 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]}]`:''}`);     }; }); And here it's my Macro: !broll [[[[1d20]] + [[?{Skill|Acrobatics,@{selected|acrobatics}|Arcana,@{selected|arcana}|Athletics,@{selected|athletics}|Crafting, @{selected|crafting}|Deception,@{selected|deception}|Diplomacy,@{selected|diplomacy}|Intimidation, @{selected|intimidation}|Medicine,@{selected|Medicine}|Nature,@{selected|Nature}|Occultism, @{selected|Occultism}|Perception,@{selected|perception}|Performance,@{selected|performance}|Religion, @{selected|religion}|Society,@{selected|society}|Stealth,@{selected|stealth}|Survival,@{selected|survival}|Thievery, @{selected|thievery}}]] + [[?{Situation Bonus|0}]]]] And the only thing appear in the chat log is: (From MyName (GM)):  [[$[[3]]]] I've try many hours to understand what's going on but, sadly, i've never code something in my life. Can you guys help me with this ? I want the macro to send the roll with a situation bonus to all gm but the player doesn't see the roll (that's the point of the secret roll you will say to me) Thank you in advance for your answer P.S:  I'm sorry if i've a bad english, i try to improve (i'm French)
Hi Zaka,  The blind roll script there already has brackets in it for inline rolls. So the extra [[ and ]] you have are just confusing it.  Try this one: !broll 1d20 + ?{Skill|Acrobatics,@{selected|acrobatics}|Arcana,@{selected|arcana}|Athletics,@{selected|athletics}|Crafting, @{selected|crafting}|Deception,@{selected|deception}|Diplomacy,@{selected|diplomacy}|Intimidation, @{selected|intimidation}|Medicine,@{selected|Medicine}|Nature,@{selected|Nature}|Occultism, @{selected|Occultism}|Perception,@{selected|perception}|Performance,@{selected|performance}|Religion, @{selected|religion}|Society,@{selected|society}|Stealth,@{selected|stealth}|Survival,@{selected|survival}|Thievery, @{selected|thievery}} + ?{Situation Bonus|0}
Thx a lot, it was simple in fact ^^'