Im trying to make a percentage command
but cant figure it out. I’m trying to make it so the command will give a different answer baswd on the percentage. ${touser} has ${random.1-100}% skills with a sword.’ '${eval ${random.1-100} >= 55 ? ‘They are praised by the clan leaders!’ : ‘They are shunned by the clan leaders!’} I hope someone can help.
uh, u’re pretty close actually, just gotta remember that in nightbot the command variables use ( ) instead of { } like this…
$(touser) has $(eval `${Math.floor(Math.random()*100)+1}% skills with a sword. ${Math.floor(Math.random()*100)+1 >= 55 ? `They are praised by the clan leaders!` : `They are shunned by the clan leaders!`}`)
but um, i notice that it uses 2 different random numbers, but it looks like u might wanna use the same random number to determine both the % of skills and whether they r shunned or praised… if that’s the case… use this one instead…
$(touser) has $(eval r=Math.floor(Math.random()*100)+1;`${r}% skills with a sword. ${r >= 55 ? `They are praised by the clan leaders!` : `They are shunned by the clan leaders!`}`)
TYSm!!!, i’ve been trying for ages!
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.