Fight Command Edit for Pokemon

Asked Sep 15, 2020·6 replies·Last activity 5 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 use the !fight command more like !battle $(touser) Where there outcome is random for the battle with different subject lines like (user) KO's all of (touser) pokemon. User was whited out by Touser. Different sample text from the pokemon games such as the ones mentioned...

6 replies

Literally used the search feature for this questions and that did not show up. Sorry

Im actually using this script for my current command

!commands add !fight $(user) fought $(touser) and $(eval a=[won
by KO,lost by submission]; a[Math.floor(Math.random()*a.length)])

If I change won by KO,lost by submission to the lines I want would that work?

Yes, like this:

won by KO|
lost by submission

Okay so messing with the line a bit and this is what I'm at and I have no idea where to go from here. I am not very good at this stuff.

!editcom !test $(user) battled $(touser) and $(eval a=[won by fainting all of $(touser) pokemon,lost by whiting out]; a[Math.floor(Math.random()*a.length)])

However in the portion of won by fainting $(touser) pokemon it seems to cause an issue. How would that be written to show in chat that

BKxLounge battled Nightbot and won by fainting Nightbot pokemon

It should work, the command you wrote should work. I'm so confused by what you're trying to do...

!editcom !test $(user) battled $(touser) and $(eval a=[`won by fainting all of $(touser) pokemon`,`lost by whiting out`]; a[Math.floor(Math.random()*a.length)])

Didn't find your answer? The community is on Discord.

Ask on Discord