The Challenge! Automated, Randomized Fighting Chat Game!

fight
random
chat
games
twitch

#61

Version 1.8

Changelog:

  • Fixed a bug where you could challenge yourself, including sassy message
  • Added User Cooldown/Recoverytime option in Minutes.
  • Added the appropriate language lines
  • Added the new setting to the control panel

Usage: !challenge set recovery - Sets per user recovery time. Affects both challenger and challenged. Other users are free to battle in the meantime.

All-in-one installation file: challengeSystem.zip (16.6 KB)

Tired now, can’t be bothered to upload separate files. Extract into your PhantomBot’s base directory and overwrite.

Thanks again to @yxpoh for the idea and inspiration, @UsernamesSuck for the comments and pointers and @TheRealAlixe for the controlpanel code. Would have never made it this amazing without all of you! :heart:


#62

Updated main thread with @ArthurTheLastAncient latest release.
Many updates to it. Version 1.8


#63

Version 1.8.1

Minor update. Just a bugfix actually. Finally figured out why username capitalisation was weird. This also fixes the recovery time working correctly

All-in-one installation/update: challengeSystem.zip (16.8 KB)

Instructions: Simply unzip into the base directory of PhantomBot and let it overwrite any files. Restart the bot and you’re done.

Individual files (Advanced users)
./scripts/custom/games/challengeSystem.js (Core game file, 21.3 KB)
./scripts/lang/custom/games-challengeSystem.js (Language file, 8.3 KB) (Edit this if you want your own movesets and theming. Directions in in-file comments)
./script/core/panelCommands.js (Overwrite, needed for the controlpanel to be able to update the settings live, 16.0 KB)
./web/panel/js/gamesPanel.js (Overwrite, Backend of the controlpanel, allows the settings to be read from/written to the Database, 19.6 KB)
.web/panel/games.html (Zipped, Overwrite, This is the actual controlpanel file, 3.4 KB)

Keep in mind that updating PhantomBot will overwrite the files marked with Overwrite

As far as I’m concerned, this is perfect now.


Callback to Control panel
#64

@IllusionaryOne Whats your view on this system and do you think its worth a pull request to the nightly build if so ill get right on that Kappa


#65

Version 1.8.2

As I was sharing this around, people reported a minor bug where challenging an unknown user would pass “undefined” instead of the points string to the chat message, so I fixed it. While I was at it I also added some checks to make sure the pointSystem is enabled when using wagers.

Changelog:

  • Added check if challenged user actually is seen before by the bot with appropriate language string.
  • Added check if pointSystem is enabled before checking wager/currency, will issue a log.warning if the pointSystem is off and disable any wager functionality. (But does not touch the current wager setting)
  • “!challenge set wager” won’t allow changing of wager if the pointSystem is disabled and informs the user of this with appropriate language string. Setting of wager is still doable from the control panel, although it won’t have any effect.
  • Cleaned up some language strings
  • Accidentally included my custom moves in the last update. Restored the original moveset.

Update instructions
challengeSystem.zip (7.3 KB)
Extract into the base folder of PhantomBot. (Does not include the control panel files)

Individual files (Advanced users)
./scripts/custom/games/challengeSystem.js (Core game file, 22.6 KB)
./scripts/lang/custom/games-challengeSystem.js (Language file, 8.0 KB)

Happy challenging~


#66

Version 1.9.0

After getting some more feedback I’ve seen a bunch of people setting up command aliases for the challenge command, so I decided to implement a function to change the base command.

Changelog

  • Added set option “baseCommand” to change the base command to another command.
  • Added appropriate language strings
  • Added an error message for trying to set the basecommand to an already existing command
  • Added the basecommand setting to the control panel
  • Added automagically acceptance of starting with “!”
  • Individual permissions of basecommand and subcommands “set” and “reset” will be retained
  • Added a line that will clear the settings box in the control panel when pressing “submit”. The new value should be loaded from the database within moments so the user can actually see if changes took effect.

Usage
!challenge set basecommand [string]

Update instructions (Easy mode)
challengeSystem.zip (17.5 KB)

Extract ZIP file into the base folder of Phantombot. Let it overwrite files as needed.

Individual files (Advanced users)
./scripts/core/panelCommands.js (16.0 KB) overwrite
./scripts/custom/games/challengeSystem.js (26.4 KB)
./scripts/lang/custom/games-challengeSystem.js (8.4 KB)
./web/panel/games.html (ZIP, 3.6 KB) overwrite
./web/panel/js/gamesPanel.js (19.9 KB) overwrite

Note: Files marked with “overwrite” are existing Phantombot files and will be overwritten when updating Phantombot.


#67

Version 1.9.1 (Bug fix)

Changelog

  • Fixed a bug that caused changes in the pointSystem not to be registered correctly.

Update Instructions (Easy mode)
challengeSystem.zip (17.5 KB)

Extract ZIP file into the base folder of Phantombot. Let it overwrite files as needed.

Individual files (Advanced users)
I’m only putting the changed file here:
./scripts/custom/games/challengeSystem.js (26.5 KB)


Dueling Game
#68

It took a while, but I finally got around to update this.

Version 1.9.2 (compatibility update)

Changelog

  • Updated files to work with Phantombot 2.4.1 (Revision: 6a2fb20d) (Latest stable release as of now). Keep in mind that the controlpanel files do not work with the beta. When I get around to it I’ll see if I can make it work with the Beta control panel as well.

Update/installation instructions

challengeSystem.zip (17.9 KB)

Shut down PhantomBot. Download ZIP file, extract into the base folder of PhantomBot, and let it overwrite files as needed. If you don’t want the control panel files, look for

and put those in the same folders in your phantombot installation. Again, all settings are configurable from Chat through “!challenge set”

That’s it, happy challenging!

Edit:
Fixed a cosmetic typo :wink:


#69

This looks great! How would you feel if we took your idea and made a built-in version of it? We’d have to make some changes to make it work for us, but we love what you’ve done. Is that okay with you?


#70

I would be honored! But please do credit the original author @yxpoh and @Dakoda as well :heart:


#71

We will do! Thanks for your hard work.


#72

No Prob. It was made for that reason too, to share it to the mass.
But right now, I believe @ArthurTheLastAncient should be getting the main credit since he’s been updating it till now and revamped the base system i made.

Hahaha


#73

awesome to hear that man <3 thanks for wanting to use the system