So i want to have a comand that has a 20 percent chance of returning a YOU HIT THE BLUE DOT 8 point and the other 80 percent it returns a U MISSED u scored 0
2 replies
Indigo Turkey
Does this work? Im not great with coding so please let me know if it does or doesn't!
!addcom !shoot $(eval var roll = Math.floor(Math.random() * 100) + 1; if (roll <= 20) { "YOU HIT THE BLUE DOT! 8 points" } else { "U MISSED. You scored 0" })
Graceful Ladybug
Indigo Turkey said: ``` !addcom !shoot $(eval var roll = Math.floor(Math.random() * 100) + 1; if (roll <= 20) { "YOU HIT THE BLUE DOT! 8 points" } else { "U MISSED. You scored 0" }) ```