I am looking to make 1 - 10 answers possible and still working on the responses. Would it be possible to show me how to write out a command that has 10 possible outcomes that are text and one of the outcomes being: Grug throw (random number 1-10) rocks at Users name.
Is there a better cheat sheet for this type of writing or just ask each time I want to write a command?
Thank you!
What you want is pretty simple I’ll show you the general format.
$(eval
Random=Math.floor(Math.random()*10+1);
//This is the random number every time you use the command it will make a new number 1-10
//Also after you set something equal to something else put a semicolon at the end of it so it knows where it ends.
Response=[`Response1`,
//Since there’s more responses after this one you put a comma after the backticks.
`Response2`,
`...`,
//Just do this for as many responses you want two back ticks and a comma.
`Response10 ${Random}`];
//This inserts the random number into the response also it has an ending bracket since it’s the last one
Response[Math.floor(Math.random()*Response.length)])
//This is the final message it outputs it’s picking randomly from the responses.
This should be everything you need to know about how to format the command you want.