Inactive [FUN/ECON] Vouchers v2.2.1 - Buy Vouchers for Features and Commands [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Kevin Forte, May 29, 2011.

  1. Offline

    Kevin Forte

    Vouchers: Let Your Players Pay for Features and Commands (Now With Aliases!)
    ~Version: 2.2.1~
    Download: [JAR]

    I have been constantly searching for a reason for my players to want to have a Lot of iConomy money. I couldn't really find that reason, so I made one. Introducing Vouchers, a way to let your players pay their way to a God-like status.

    Current Voucher Types:
    • Protection ~ Lets a player place a block only they (or an admin) can destroy.
    • Teleport ~ Allows a player to teleport to another player or an x,y,z coordinate.
    • Heal ~ Allows a player to fully heal themselves.
    • Timeshift ~ Allows a player to set the world time.
    • Parachute ~ Allows a player to hold shift to negate fall damage once.
    • Resurrect ~ Heals a player to full health when they would otherwise die if they are holding shift.
    • Superpick ~ Allows a player to break one block instantly.
    • Sunshine ~ Allows a player to clear up storms.
    • Thunderpunch ~ Hitting a mob or player will strike them with lightning.
    • Specify your own types to coincide with any command and create aliases for those commands.
    Creating a Voucher Shop:
    Show Spoiler

    1. Place a sign. On the lines, write:
    • Line One: [Vouchers]
    • Line Two: Voucher Type for Sale.
    • Line Three: Price of Voucher. OR Price of Voucher:Amount of Vouchers Being Purchased. (Example: 50:3 <-- Purchasing 3 Vouchers for 50 gold.)
    • Line Four: Whatever you want (I personally write the commands associated with the voucher or its purpose).
    2. That's it! If done correctly, you will be sent a message and the "[Vouchers]" line will turn blue.

    EXAMPLE:
    [​IMG]

    Using Commands as Voucher Types:
    Show Spoiler

    As of 1.5, you'll notice a 'Hooked Commands' section has been added to the config. To add a command, format it like this:
    Code:
    Hooked Commands:
        MoneyCheck:
            Starting Amount for New Players: 0
            Include Arguments: true
            Command: money
            Alias: showmethemoney
            Warm-Up Time: 0
            Cool-Down Time: 0
            Description: Check how much money you have.
    
    This will create a MoneyCheck voucher for the command /money, which can also be used with the command alias /showmethemoney. If you do not wish to use an alias for a command, simply leave the section blank. If 'Include Arguments' is true, '/money' and any following arguments will expend a MoneyCheck voucher. If 'Include Arguments' is false, the command used must match the defined command for the Voucher exactly or a Voucher won't be used. The description is what is displayed when a player types '/vhelp MoneyCheck'. See the sample config.yml for an explanation of Warm-Up Time, Cool-Down Time, and Starting Amount for New Players.

    Commands:
    Show Spoiler

    [] = Necessary Argument
    {} = Optional Argument
    ** = Requires Permissions
    • /vcheck ~ Shows a player how many vouchers they have of the basic types.
    • /vcheckcom ~ Shows a player how many vouchers they have of defined command types.
    • /vtp [player name]/[x] [y] [z] ~ Use a Teleport voucher. Arguments can either be another player's name or an x,y,z coordinate.
    • /vheal ~ Heals the player completely with a Heal voucher.
    • /vprotect ~ Toggles protected block placing mode. Any block placed in this mode will exhaust a Protection voucher and will only be breakable by that player or a player with the Vouchers.admin node.
    • /vtime [day/night] ~ Lets a player set the time via a Timeshift voucher.
    • /vgift [player's name] [amount] [type] ~ Lets a player send a voucher to another player.
    • /vgive [player's name] [amount] [type]
    • /vsun ~ Removes a storm if there is one.
    • /vsp ~ Toggles superpick mode.
    • /vthunder ~ Toggles thunderpunch mode.
    • /vsave ~ Saves the current Vouchers and Shop locations.
    • /vreload [commands/vouchers/settings/all] ~ Reloads config.yml data.
    • /vhelp [sign/vouchertype (case sensitive)] ~ In-game reference for setting up Voucher Shops ('/vhelp sign') or display the description of a voucher type in the config.

    Important Notice:
    This plugin requires both iConomy/BOSEconomy and Permissions! Also, before you post that you are having problems, please follow this checklist:
    • 1. Read this entire post.
    • 2. Try deleting your /plugins/Vouchers folder and letting it recreate itself.
    • 3. Make sure you have not entered invalid values into the config.yml.
    If you are still getting errors and/or having issues after that, let me know. I appreciate it!

    To-Do:
    Show Spoiler

    • Flight Voucher
    • Superpick Voucher
    • Thunderpunch Voucher
    • Changing the sign formatting so that you can buy more than one voucher at once.
    • BOSEconomy support.
    • Item Exchange support.
    • Adding more configuration options for the current Vouchers.
    • Adding a cost to create Voucher shops.

    Permissions:
    Show Spoiler

    • Vouchers.use.(type in all lowercase) ~ Allows a player to use a Voucher. (Example: Vouchers.use.superpick)
    • Vouchers.setup ~ Allows a player to create/remove Voucher shops
    • Vouchers.free.(type in all lowercase) ~ Allows a player to use a Voucher command without needing the actual voucher.
    • Vouchers.buy ~ Allows a player to use voucher shops.
    • Vouchers.admin ~ Allows a player to destroy other players' Protected Blocks, use the /vsave command, use the /vgive command, and use the /vreload command.

    Changelog:
    v2.2.1
    • Quick Bug Fix.
    v2.2
    • Added a /vgive command.
    • Switched to Bukkit based permissions.
    • Removed a couple obnoxious permission error messages.
    • Delayed economy plugin check.
    • /vhelp now shows whether or not you have permissions to use the Voucher.
    Show Spoiler

    v2.1.1
    • Plugin will disable itself if an economy plugin is not found.
    v2.1
    • Thunderpunch Voucher added.
    • Voucher descriptions added.
    • /vhelp [voucher type/sign] command added.
    • Bug fix.
    v2.0.2
    • MAJOR Bug Fix. Consider this the recommended build of Vouchers.
    v2.0.1
    • Fixed a misplaced "You don't have permission" error message.
    • Fixed an error given if you try and use /vreload without an argument or with too many arguments.
    • Fixed a possible NPE if your config.yml is outdated.
    • Fixed /vtp not giving an error if you use an incorrect length of arguments.
    v2.0
    • Major Code Cleanup.
    • BOSEconomy Support.
    • Added a Ton of new config options for ALL vouchers.
    • You can now choose to include the arguments of hooked commands or not.
    • Protected blocks are now saved on server restart. Whoops!
    • /vreload command added.
    • 'Vouchers.admin' Permissions node added.
    v1.5.1
    • Fixed more potential NPEs. Damn things always sneak up on me.
    v1.5
    • All data is now handled with the config.yml in the plugins/Vouchers folder.
    • 'Vouchers.world' permission removed due to redundancy.
    • 'Vouchers.free.[type]' re-added.
    • 'Vouchers.buy' permission added.
    • NPE problem REALLY solved. Seriously.
    v1.4.4
    • NPE problem (when using command vouchers) Finally solved.
    v1.4.3
    • All players are now notified when one uses a Timeshift voucher.
    • Command aliases have been added.
    v1.4.2
    • Fixed a bug that allowed negative Voucher cost values.
    • Fixed a bug that sent players (without permissions to use Resurrect or Parachute vouchers) a message whenever they took fall damage or died, regardless of whether they tried to use the voucher or not.
    v1.4.1
    • Vouchers.world permission added for Multiverse servers.
    • The method of setting up shops to purchase more than one Voucher from has changed.
    • /vsignhelp command added for in-game shop setup reference.
    v1.4

    • Removed the Vouchers.free.(type) permissions. Will be fixed in an upcoming update.
    • Fixed command vouchers never being depleted.
    • Fixed command vouchers not being loaded correctly.
    • Added a /vsave command to try and combat the problem of losing Vouchers and shops.
    • Added the ability to create signs that allow a player to buy more than one Voucher at a time.
    v1.3

    • Times that /vtime sets the world to changed for longer days/nights.
    • PERMISSION NODES CHANGED: BE SURE TO UPDATE YOUR WORLD.YML
    • Players must be holding shift (sneaking) for a Resurrect voucher to be used.
    • (Hopefully) Fixed the issue with command voucher arguments.
    v1.2.2

    • Players must be holding shift (sneaking) for a Parachute voucher to be used.
    • Sunshine Voucher added.
    v1.2.1

    • First attempt at making sure Resurrect vouchers aren't used for fall damage that is already cancelled by other plugins. Good catch @Joy
    v1.2

    • Added a Superpick Voucher.
    • Added the '/vgift' command to send other players Vouchers.
    v1.1

    • Added Command-Based Voucher Types.
    • Added a Permissions node required for players to use their Vouchers.
    v1.0:

    • Original Release.
     
    Bradley Hilton and Mitsugaru like this.
  2. Any news on this? Been a few weeks :(
     
  3. Offline

    Valiant

    None of my players have permission to buy from the signs and Im not sure why...
    I gave my mods these nodes and it wont work for them either.

    - 'Vouchers.buy'
    - 'Vouchers.use.*'
    - 'Vouchers.enabled'

    some were just shots in the dark...
     
  4. Offline

    Raycrash

    Maybe try it without ' '.
     
  5. Offline

    Kevin Forte

    Guys, again I'm really sorry, I'll have time to work on this soon right after I get settled in college and what-not. Then I promise you all I will work on this :p until then I am going to find a way to publish the source since I suck at GitHub.
     
  6. Offline

    Raycrash

    Big thanks ! ;)

    It's really awful for our players to lose all vouchers on server restart and for us replacing the signs :p
     
  7. Offline

    Kevin Forte

    I still find that to be the most ridiculous thing xD What OS are you running your server from?
     
  8. Offline

    Raycrash

    It's a linux one...not sure which (gameserver).
    Why ?
     
  9. Offline

    Kevin Forte

    I don't know, I just really have no idea why your players are losing their vouchers. I have never had that issue.
     
  10. Offline

    Valiant

    That would not work because the file format requires it to be parsed in that format for Permissions.
     
  11. Offline

    Raycrash

    If you use (not bukkit) permissions you dont use ' '
     
  12. Offline

    Valiant

    With the plugin Permissions, yes you do. Its all parsed in that format.

    Code:
      Moderators:
            default: false
            info:
                prefix: '&f[&3Mod&f] '
                suffix: '&3'
                build: true
            inheritance:
                - 'Builders'
            permissions:
                - 'essentials.tp'
                - 'essentials.tphere'
                - 'essentials.kick'
                - 'essentials.ban'
                - 'essentials.mail.send'
                - 'essentials.list'
                - 'essentials.whois'
                - 'nSpleef.member.creategame'
                - 'nSpleef.member.deletegame'
                - 'stargate.use'
                - 'vanish.vanish'
                - 'vanish.vanish.list'
                - 'essentials.broadcast'
                - 'nocheat.notify'
                - 'OwnBlocks.use'
                - 'OwnBlocks.info'
                - 'OwnBlocks.add'
                - 'essentials.tppos'
                - 'lwc.admin.*'
                - 'essentials.signs.free.use'
                - 'essentials.signs.disposal.use'
                - 'essentials.msg'
                - 'residence.create'
                - 'residence.admin'
                - 'Vouchers.use.stack'
        Admins:
            default: false
            info:
                prefix: '&f[&5Admin&f] '
                suffix: '&9'
                build: true
            inheritance:
            permissions:
                - '*'
     
  13. Offline

    Raycrash

    # Only "*" needs to be in quotes. Quoting other permission nodes is optional.

    From permissions wiki ;)
     
  14. Offline

    Valiant

    copy that. Problem solved. Signs not working after server restart. Like the others are experiencing.

    ALSO.
    I have a /stack command all set up but it uses the /stack command... I guess is there a way for it to have to use /vstack ? creating a whole new command for it?

    Thus allowing those with permission to just use it can, and those without have to buy a voucher. Instead of bypass nodes. or have both, but have one override the other.
     
  15. Offline

    Kevin Forte

    ...Wait haha. I'm lost xD

    To all of the people who have been saying that their vouchers haven't been saving and the shops are being deleted after server restart, please tell me the conditions when this happens, the OS you host your server on or the method with which you host your server, etc. Be as DETAILED as possible! I really want to fix this problem for everyone and whenever I test it (on Mac and Windows servers) I get no issue with the shops or the saved vouchers.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  16. Offline

    Raycrash

    Well can't tell you that much, it's a web-interface based dedicated server.
     
  17. Offline

    ollyjohnston

    hey , if i reload my server , using /reload it breaks the commands and the sign usage. but with a restart it is ok
     
  18. Offline

    Kevin Forte

    Maybe that's it. I'll add a /vsave command and see if that helps.

    Hm, well maybe the problem is the same as ollyjohnston's.

    Updated to 1.4, check out the Changelog for a list of stuff. Hopefully some issues will be fixed! Let me know if you have any questions/concerns.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  19. Offline

    Valiant

    I
    Sorry Early morning posts ^_^

    I have a voucher set up on my server for the command /stack. In my config for personal commands I have Stack:stack
    as the command for it is /stack lol

    BUT It now charges me and moderators for a voucher in able to use it. I was wondering if its possible for all commands that are set up for your plugin to be converted to a /v[command] setup while still also giving original access to the original command.

    Basically, I dont want one node that bypasses everything as I dont want my moderators to not have to by ANY vouchers ;) IF you still dont follow me, just ask what your not quite understanding. I only get time to post when I am at home 3 in the morning tired beyond belief so lol ya.
     
  20. Offline

    Kevin Forte

    Okay, that made sense this time :p Actually, that's really not a bad idea hahaha. Definitely saves the problem of all of the .free crap. I'll see if I can get that to work.
     
  21. Offline

    ollyjohnston

    YAY thanks :)
     
  22. Offline

    Kevin Forte

    Let me know if everything works okay for you and what-not :)
     
  23. Offline

    ollyjohnston

    sweet thanks man :)

    can you do - Vouchers.use.* to allow vouchers ?

    "You dont have permission to use vouchers here ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  24. Offline

    Kevin Forte

    Oh damn, I forgot to note the new permission node. You should be able to use Vouchers.use.*, yes. One second...

    Updated to 1.4.1, I added a Permissions node and changed the way multi-voucher signs are formatted so please take note! You will need to change your existing signs.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  25. Offline

    Raycrash

    On a side note.... the price can be negative and people can cheat themselve money easily.
     
  26. Offline

    Kevin Forte

    Good catch. I guess I assumed that people running servers would be the one setting up the shops, but I'll fix it.
     
  27. Offline

    Raycrash

    Yea...well my mods told me atleast, seems I got the non-abusive-ones =)
     
  28. Offline

    Kevin Forte

    Fixing it now :p
     
  29. Offline

    Domiiniic

    Hi when i try to set up custom vouchers such as Sneak:sneak (using HeroSneak) and SetHome:sethome, i get this error?

    Any help would be amazing thanks :p

    EDIT: Just to let you know, all the default vouchers work fine.
     
  30. Offline

    Kevin Forte

    What are you doing that causes that error, and are you using the most recent version?
     
  31. Offline

    Domiiniic

    I am clicking the sign, and I have already set up the custom vouchers in the .txt file.
     

Share This Page