https://gist.github.com/Nineage/2796ee3a644174e27ce7ec9380e70ea0
Hello everyone!
So for a while now premier league drafts have been done on IRC, but with the ever-growing popularity of PS!, I recently got the request to make a draft bot to be used in Pokemon Showdown. On finishing, I realized that with a few tweaks, the bot could very easily be made to fit any kind of Premier League auction, and I decided to release it to you all. The code is based on a draft bot made by my friend Sparkychild so lots of credit to her. This bot code was used successfully in the UnderUsed Premier League auction, and will be used in the upcoming Little Cup Premier League.
All of the code you need for this bot can be found here. The bot is by no means 100% complete, but it is totally functional, and I am working to iron out any minor errors that still exist.
Instructions for use:
1) Download Ecuacion's Pokemon Showdown Bot at https://github.com/Ecuacion/Pokemon-Showdown-Node-Bot and follow the instructions for installation and configuration.
2) Put the code above into the commands folder
3) (Optional) Edit the settings at the top of the file to control initial money, needed players, and default teams. If you want to enable players to use .4 to bid (rather than .bid 4), you will need to add a line to command-parser.js as well.
4) Run your bot. Note that to start and control a draft you will either need to be a roomowner, or have added yourself to Config.exceptions.
5) Run .draft init to begin a draft, .draft addteam to add a team, and .draft load* to load players. Then run .draft start. More detailed command help can be found by doing .draft help
6) Enjoy your draft!
7) When done drafting, use .draft end
*When using .draft load (the command that loads the players), you should use a raw pastebin or hastebin link that looks something like this. You can get this from a spreadsheet that looks like this by choosing Save As...csv.
That should be pretty much it! The code is fairly easy to edit, so you should be able to tweak it to your needs. If you really can't figure it out, shoot me a VM on here or a PM on PS and I can help. I might also be able to host the bot for you if you need a host.
I apologize in advance for a few places where my code is really suboptimal.
Hello everyone!
So for a while now premier league drafts have been done on IRC, but with the ever-growing popularity of PS!, I recently got the request to make a draft bot to be used in Pokemon Showdown. On finishing, I realized that with a few tweaks, the bot could very easily be made to fit any kind of Premier League auction, and I decided to release it to you all. The code is based on a draft bot made by my friend Sparkychild so lots of credit to her. This bot code was used successfully in the UnderUsed Premier League auction, and will be used in the upcoming Little Cup Premier League.
All of the code you need for this bot can be found here. The bot is by no means 100% complete, but it is totally functional, and I am working to iron out any minor errors that still exist.
Instructions for use:
1) Download Ecuacion's Pokemon Showdown Bot at https://github.com/Ecuacion/Pokemon-Showdown-Node-Bot and follow the instructions for installation and configuration.
2) Put the code above into the commands folder
3) (Optional) Edit the settings at the top of the file to control initial money, needed players, and default teams. If you want to enable players to use .4 to bid (rather than .bid 4), you will need to add a line to command-parser.js as well.
4) Run your bot. Note that to start and control a draft you will either need to be a roomowner, or have added yourself to Config.exceptions.
5) Run .draft init to begin a draft, .draft addteam to add a team, and .draft load* to load players. Then run .draft start. More detailed command help can be found by doing .draft help
6) Enjoy your draft!
7) When done drafting, use .draft end
*When using .draft load (the command that loads the players), you should use a raw pastebin or hastebin link that looks something like this. You can get this from a spreadsheet that looks like this by choosing Save As...csv.
That should be pretty much it! The code is fairly easy to edit, so you should be able to tweak it to your needs. If you really can't figure it out, shoot me a VM on here or a PM on PS and I can help. I might also be able to host the bot for you if you need a host.
I apologize in advance for a few places where my code is really suboptimal.
Last edited: