Basically i’m setting up a basketball IQ command but its not working don’t know if My code is to long
!addcom -cd=5 !iq $(user) has a basketball IQ of $(eval a=Math.ceil(Math.random()*100); if (a>50){b=CoolStoryBob;} else if (a<50){b=LUL;} else {b=TriHard;}${a}%. ${b}’) and a love of $(eval a=Math.ceil(Math.random()*100); if (a>50){b=CoolStoryBob;} else if (a=<50){b=LUL;} else {b=TriHard;}${a}%. ${b}`)
I rewrote the code so it all works in 1 $(eval) and shortened to about 150 characters.
!addcom -cd=5 !iq $(eval function r(){x=Math.ceil(Math.random()*100);return x+`% `+(x>50?`CoolStoryBob`:`LUL`);}`$(user) has a basketball IQ of ${r()} and a love of ${r()}`)
It doesn’t make sense to add a 3rd emote because you’re only checking if a number is greater than or less than/equal to 50. If you specify 3 separate number ranges then I’ll tweak the code accordingly.
How would i implement this code into My slap command
${decodeURIComponent($(querystring)).replace(/@/g,``)||$(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel))} and ${r(a)} with ${r(b)}`).
Thank You! Emily for taking the time out of your day to help me so the code should be like this ? Shouldn’t it be $(touser) if i’m going @ a viewer
!slap $(user) has slap the Shit out of $(eval r=$(urlfetch https://decapi.me/twitch/random_user/$(channel)); $(query)?$(user) slaps ${decodeURIComponent($(querystring))}.:$(user) slaps ${r}. *Don’t know why there is an emoji at the end
!addcom -cd=5 !slap $(user) has slapped the shit out of $(eval a=decodeURIComponent(`$(querystring)`).replace(/@/g,``);a?a:`$(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel))`)
Where i can use $(user) and $(touser) i have it at $(user) only but let Say i wanted to @ someone in chat it also i dont know if/else goes into the command
For example Cyrensy is 20% simp this is what It will say if i typed !simp. But i also want to @ another viewer for example !simp @Roketto it will say Roketto is 45% simp etc
When i try to @ another viewer using !simp just shows my name not the viewer i @ it
I was thinking of using this if it’s blank it Will say My name and if i @ a viewer it will say theirs