I've been playing around and trying to figure out how to have custom responses according to specific numbers rolled. Example:
1 = $(user) rolled a nat 1 and died.
2-19 = $(user) rolled a _
20 = $(user) rolled a nat 20, critical hit!
I have been using eval rng and trying to input responses via if and else but not quite getting it. This is the base command im working with, but im more than open to change it:
$(user) rolled a $(eval Math.floor((Math.random() * 20) + 1))
I also tried this based off of reading things but couldnt get it to work:
$(eval var a = (Math.floor(Math.random() * 20)); if (a=20) { var s = " $(user) rolled a nat 20, critical succuess! "; } if (a=1) { var s = " $(user) rolled a nat 1 and died."; } else { "$(user) rolled {r}.")