IQ command problem

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()}`)
1 Like

Thank You , If wanted to add another emote

Will it go here: CoolStoryBob:LUL`);}

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.

1 Like

Thank you! Also i have this command called slap and i want it to @ the user and also pick a random viewer if it’s left blank

!addcom -cd=5 !slap $(user) has slap the Fuck out of $(urlfetch$(channel))

How would i implement this code into My slap command

${decodeURIComponent($(querystring)).replace(/@/g,``)||$(urlfetch$(channel))} and ${r(a)} with ${r(b)}`).

Hey @Cyrensy!

You could use the search bar, there’s a lot of topics about this already, here’s one of them:

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$(channel)); $(query)?$(user) slaps ${decodeURIComponent($(querystring))}.:$(user) slaps ${r}.:wink: *Don’t know why there is an emoji at the end

Slap command

!addcom -cd=5 !slap $(user) has slapped the shit out of $(eval a=decodeURIComponent(`$(querystring)`).replace(/@/g,``);a?a:`$(urlfetch$(channel))`)

What do you want the simp command to do?

1 Like

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

If you provide an exact outline of what the simp command is supposed to do and say then I can provide code for it.

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

Got it, try this

!addcom -cd=5 !simp $(touser) is $(eval Math.floor(Math.random()*101))% simp
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.