!fight command with different tactics

Hey @samshera!

Here’s how you can do this: first head over to Pastebin and create an account so you can go back to it later and edit your pastes.

Then create your paste like this:

sentence_1_blablabla|
sentence_2_blablabla|
...
sentence_n_blablabla

Fill the paste with the answers you want Nightbot to give you, and end each of them with a | (vertical bar). If you want to have $(user) (the one who called the command) at a specific place in the sentence, write ${u} instead of $(user), same thing for the target of the command, write ${t} instead of $(touser).

Make sure the paste is set to never expire and unlisted, then save it.

And finally, here’s the command:

!addcom !fight $(eval u=`$(user)`; t=`$(touser)`;r=`$(urlfetch json https://www.pastebin.com/raw/XXXXXXXX)`.split(`|`); r[Math.floor(Math.random()*r.length)];)

Replace XXXXXXXX with your paste ID.

1 Like