Lucille
February 10, 2022, 8:45am
1
So, im setting up a IQ commands, its supposed to be " (User), you have (number) , (comment)"
$(touser) , you have $(eval x = Math.floor((Math.random() * 260) + -10); $(urlfetch json https://pastebin.com/raw/HGaJMk4H ))
The respond from nightbot is " (User), you have (comment)"
how do i pop up the number from the first $(eval) to the nightbot respond, if i add another $(eval) it will pop up but it not related "(user) you have 0 IQ, wow you have very high IQ:
Emily
February 11, 2022, 11:42am
2
Hey @Lucille !
Your Pastebin is dead so I won’t be able to help you with it, so it’s gonna be a general example.
But the way to do this is to use a single $(eval)
:
$(eval r=Math.floor(Math.random()*260)-10; o='$(urlfetch json https://pastebin.com/raw/XXXXXXXX)'.split('#'); i=0; if(r>50){i=1} if(r>100){i=2} if(r>150){i=3} if(r>200){i=4} `$(user), you have ${r} IQ. ${o[i]}`)
And your Pastebin must look like that:
MESSAGE_IF_IQ_UP_TO_50#
MESSAGE_IF_IQ_UP_TO_100#
MESSAGE_IF_IQ_UP_TO_150#
MESSAGE_IF_IQ_UP_TO_200#
MESSAGE_IF_IQ_UP_TO_250
If you used the search bar with iq command
as the query you would have found the following topic that would have answered your question:
I have 2 doubts. First, how to create a command that choose a random number between 1 and 140. And the other doubt is if I can make that:
If the number is between 1-69, it says “Definitivamente eres tonto.”,
if the number is between 70-79 it says “Pues eres bastante tonto, aunque podría ser peor.”
If the number is between 80-89 it says “Estás por debajo del promedio.”.
If the number is between 90-109 it says “Eres parte del promedio, te salvaste con suerte!”.
If the number is between 110-11…
1 Like
system
Closed
February 25, 2022, 11:42am
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.