Halloween Trick or Treat Event

Discussion in 'CommandHelper Scripts' started by ThgilFoDrol, Oct 31, 2016.

  1. ThgilFoDrol

    ThgilFoDrol New Member

    Hello, I figure this is probably a bit late for most of you guys since Halloween has just passed, but I took some time today to write a simple trick or treat system for my server (to be live for a week). I'm posting this in case someone wants to reuse the concept with the boilerplate done already- the feature set should work out of the box for the most part, though.

    Basically, you can set specific doors in the overworld to give players treats from a specific prize pool split into 4 tiers, with a default cooldown of 22 hours between trick or treating. I've included a small command (non-registered) to help with the setup of the door locations- just type /chhw with the required permission node to see the help menu.

    Dependencies:
    Essentials- rewards are given to the player using /essentials:give.

    Link to script(s): https://github.com/thgilfodrol/NoobcraftGC-CH/tree/master/halloween

    Installation:
    1. Copy the files to your LocalPackages directory.
    2. Make changes if you need to.
    3. Reload your aliases or restart the server.

    Note:
    • I used import() and export() for the door locations and players' cooldowns per door- feel free to substitute with data storage medium of your choice. You might have to implement resets for data on your own, though.
    • Upon winning the tier 4 prize, you might get an error in console for an unrecognized command- this is likely the zPermissions command I use to add the perm for a special halloween emote. If you don't have something similar, you should just remove it.