
I put this script together as I wanted to introduce random magical affects, but the wild magics tables were not enough. So I took the Net Libarm of Magical Affects v2 By Orrex and made it into a automated script.
The affects book is mostly for version 5e, but it's output can be easily adapted to match what ever system you are really using.
The Commands:

The script file can be found:
https://raw.githubusercontent.com/pyromanci/MagicalSurges/master/MagicalSurge.js
I should point out. Because this affects table was original designed to use real dice. The crit fail is actually a true crit, 10k. Which is world ending.
The affects book is mostly for version 5e, but it's output can be easily adapted to match what ever system you are really using.
The Commands:
!MagicalSurge -This will post to chat for all to see
!GMMagicalSurge -This will whisper the result to the Game Master
Example output:!GMMagicalSurge -This will whisper the result to the Game Master

The script file can be found:
https://raw.githubusercontent.com/pyromanci/MagicalSurges/master/MagicalSurge.js
I should point out. Because this affects table was original designed to use real dice. The crit fail is actually a true crit, 10k. Which is world ending.