It looks like you're new here. If you want to get involved, click one of these buttons!
(set: $ehp to it - (random: 5, 10))
(set: $atkdmg to (random: 20,30))
You posted this in the Help! with 1.x category (meaning Twine 1), however, the reddit thread you linked is for Harlowe (only available for Twine 2). Thus, you either posted this in the wrong category or that reddit thread is going to be less directly helpful than you may have been hoping.
For the moment, I'm going to assume that you are using Harlowe and posted to the wrong category. I'm also going to assume that you're using Harlowe v1, since you didn't specify a version.
You may use something like the following, which uses the (random:) macro (v1 doc) to generate a random number in the range 5–10: You may set the min and max values to whatever you want.
You can use the (random: ) macro to generate a random value for any of the relevant variables used in that linked example.
It is v1.2.3 and moving the eatk string solved my other problem. Thank you.