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

How to make ab utton in the text chat that rolls a player's initiative when pressed

Going to be running a game soon, and I want to wow the players. I know it's possible to create buttons in the text chat, API Command Buttons, but I have a hard time actually getting anything to work in them, let alone what I want. What command can I make into a macro that will roll initiative, here a simple 3d6>4f1!, for the player who clicked it and send that straight to the initiative tracker?
1450235382

Edited 1450235549
Silvyre
Forum Champion
[Initiative](!
[[ 3d6>4f1! &{tracker} ]]) That should do it.
1450235391

Edited 1450235428
This should work Initiative: [[3d6>4f1! &{tracker}]] NM, use Silvyre's haha
thanks guys
a note for anybody looking to do this as well: don't make it a macro, make a character with it as an ability and put THAT in your macro bar. For some reason the macro will automatically change the syntax of the comman or something and it won't work, but it works fine as an ability in a character sheet.
1450237863

Edited 1450237901
Silvyre
Forum Champion
Yep; the "Actions" text areas of the Edit Macro window of Settings Macros (aka General Macros) from the My Settings tab of the Sidebar convert HTML entities when saved and then reopened. This might change in the future.
1450257980
Ziechael
Forum Champion
Sheet Author
API Scripter
To have it as a global macro make it as normal, save it, and then NEVER reopen it. As Silvyre says, it will convert the HTML but only when reopened. Setting it and then leaving it alone will allow it to function just fine (I keep a basic text document with the HTML equivalent versions off site just in case i accidentally open one that needs the replacement code).