A command to increase a quote

Asked Jul 18, 2024·4 replies·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I would like to create 4 commands :

!lvl : "The streamer is actually level {value} in Fortnite"
!setlvl : {NewValue}
+lvl : {Value + 1}
-lvl : {Value - 1}

i tried this for the +lvl but it did't work :

> $(eval let response = $(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&no_id=1&data=$(query…)); let number = parseInt(response) + 1; $(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&clear=1); $(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&silent=1&no_id=1… $(query))); The streamer is actually level ${number} in Fortnite; Level changed successfully !; )

Thanks to everyone who will help me !

4 replies

got a few quirks in there... and unfortunately the $(urlfetch) will not accept a normal js variable as input, it must be an argument command variable such as $(query) or $(1)... but it could go a little something like this...
for !lvl...

js
!addcom !lvl The streamer is actually level $(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&no_id=1&data=1) in Fortnite

for !setlvl...

js
!addcom !setlvl $(eval `$(urlfetch https://twitch.center/customapi/editquote?token=PRIVATE_TOKEN&silent=1&data=1%20$(1))`;`The streamer is actually level $(1) in Fortnite; Level changed successfully!`)

for +lvl...

js
!addcom -a=!setlvl +lvl $(eval let x=`$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&no_id=1&data=1)`;if(x==x*1){x=x*1;x++};x)

for -lvl...

js
!addcom -a=!setlvl -lvl $(eval let x=`$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&no_id=1&data=1)`;if(x==x*1){x=x*1;x--};x)

and a one time use command that i would recommend deleting after u use it to enter the initial number u want saved...

js
!addcom !setuplvl $(urlfetch https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&silent=1&data=$(1))

the important thing is to make sure -lvl and +lvl r aliased to !setlvl ... and i would imagine u know u need to swap out the tokens

Thanks for your reply,

These commands work fine :

`!lvl :

The streamer is actually level $(urlfetch https ://twitch.center/customapi/quote?token=PUBLIC_TOKEN&no_id=1&data=1) in Fortnite

`

`!setlvl :

$(eval $(urlfetch https ://twitch.center/customapi/editquote?token=PRIVATE_TOKEN&silent=1&data=1%20$(1));The streamer is actually level $(1) in Fortnite; Level changed successfully!)

`

but the +lvl and -lvl set the lvl value to x1 (
I put the alias !setlvl on the 2 commands)

did u double check your copy paste?... cause i just tried it myself and it goes up and down by one as intended

Ahh my bad it's working, I think it's because I did the command twice !setuplvl because I forgot to put a number !

Thank you !