Pokémon !useitem command

For anyone who also have the pokemon !battle command within their twitch chats:
(I did not personally make this code, if someone knows to whom I need to give credit, ill post it once informed)

!addcom !battle A wild $(user) appears & attacks $(touser)! $(user) uses $(eval a=$(urlfetch json https://pastebin.com/raw/qaTds0sF);a[Math.floor(Math.random()*a.length)]). $(eval var a=["It misses...","It's super effective! $(touser) faints","It's not very effective... "]; a[Math.floor(Math.random()*a.length)];)!

I got a request to make a Pokémon item command that pops out a random word item and then “uses it” in chat. I thought it would be awesome to pair it with the battle command to make chats more fun that use nightbot.
I wish nightbot had a higher character limit than just 500, but oh well!

Hope everyone loves the code :slight_smile:

!addcom !useitem $(user) rummaged through their bag and pulled out an item! $(eval a=[`Antidote`,`Burn Heal`,`Courage Candy`,`Energy Powder`,`Energy Root`,`Fresh Water`,`Full Heal`,`Full Restore`,`Heal Powder`,`Health Candy`,`HP Up`,`Hyper Potion`,`Ice Heal`,`Max Elixir`,`Max Ether`,`Max Potion`,`Max Revive`,`Mighty Candy`,`Moomoo Milk`,`Paralyze Heal`,`Quick Candy`,`Rage Candy Bar`,`Rare Candy`,`Revival Herb`,`Revive Medicine`,`Sacred Ash`,];a[Math.floor(Math.random()*a.length)]) Was used!
1 Like

it seems very interesting! I use Stream Avatars and all of the Avatars are Pokemon, I keep the legendary for special events and when the time comes I randomly choose one viewer to fight the Pokemon, but I use a dice, that’s the way I determine the person wins or loses. What you’ve done seems way more interesting!

1 Like

Hey you could fit much more items in the list to pull from if you used a pastebin like the first command to pull from that’s how they get around the 500 character limit. If you would like further instructions on how to do this let me know

1 Like

That would be awesome friend! I would love a small tutorial so we can improve on commands. It just makes everyone happier :slight_smile:

Here’s a link to a topic that should explain it Long command or remote command? - #4 by potatoeaterlove it’s the same thing the first command you are using does.

1 Like

Nice! Thanks Potato, your help is always wonderful and appreciated.

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