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

another question regarding macro

OK.. so i have seen several macros you can use.. now i have a question.. can you create a macro with random wording.. for example.. /roll 1d20 if roll = 1 then /me spins in a 360 degree arc swinging wildly at the foe ir roll = 2 then /me ducks down, and rises bringing his shortsword up into the crotch of the foe if roll = 3 then /me stabs forward with his short sword stabbnig the foe in the stomach so.. when i run the macro it will roll the d20 and then choose the corresponding response. (i could then add the actial attack and damage) cheers keith
1429720303
Lithl
Pro
Sheet Author
API Scripter
Simple macros cannot contain conditionals like that. However, the API could potentially let you create a macro along those lines (requires Mentor subscription), Rollable Tables can be used to create this kind of "random emote" text, and it could be possible to create a static table like this with a custom roll template (currently requires a Mentor subscription, but that may change in the future).
thanks.. so in theory it would have to be an api script, that would a.. roll on the rollable table b.. print the result to the chat c.. then roll a Damage attack macro or can that be done using just macro ie.. /roll on rollable table /em result /roll attack macro /em result etc etc
1429724010

Edited 1429724070
Your best workaround MIGHT be a combination of the rollable tables. You would have your macro be like /em [[1t[table1]]] and gets a [[d20]] Then you have to make the table to say like either 'swings a great sword'/'shoots his AK-48'/'touches the villain inappropriately' It isn't conditional, but it can make your attacks prettier. Would look like: Keith A. touches the villain inappropriately and gets a 14 Keith A. swings a great sword and gets a 20 Keith A. shoots his Ak-48 and gets a 1
1429724288
The Aaron
Roll20 Production Team
API Scripter
(Moved to Specific Use Forum. The API forum is for discussion of the Javascript API, a mentor level feature. )