[RPG/MECH] Turnstile v1.9.1 - Charge players money/items to enter an area [953]

Discussion in 'Inactive/Unsupported Plugins' started by Codisimus, Mar 15, 2011.

  1. Offline

    Codisimus

    This page will no longer be updated. Please follow this project at the Bukkit Dev Page

    Turnstile - Charge players money/items to enter an area:
    Version: 1.9.1 (7/16/2011)
    Supports iConomy, BOSEconomy, Essentials, Permissions
    Download Page

    This plugin is used to create a Turnstile to prevent players from entering certain locations without paying money/items.

    The Turnstile is made up of a fence block, this block will disappear when a linked button is clicked. The block will reappear when walked through or after a certain amount of time. Money is deducted from the user when they press the button (or walk through the Turnstile if 'NoFraud' is set to true in the config). All money deducted is given to the owner/bank of the Turnstile.

    Turnstiles can also charge items by linking a chest instead of a button. Put the required item in and punch the chest to open the Turnstile.

    Format of Save file:
    Show Spoiler

    Code:
    DreknorIn;1;4;13;2;scudmaster;Codys_World;-174;55;-102;
    -175:55:-101;-174:55:-99;
    
    [Name];[Price];[Earned];[ItemID.Damage Value];[Amount of item];[Owner];[WorldName][x];[y];[z](of location of Turnstile);
    [x];[y];[z](of location of linked button/chest);[x];[y];[z] (of location of linked button/chest);

    Features:
    • Configurable properties.
    • Custom messages
    • No Fraud mode (Turnstile doesn't charge until walked through)
    • Restrict use of a specific Turnstile to a certain group
    • Make a Turnstile Free or Locked during a certain time of day
    • Autoclose timer
    • Create private Turnstiles only you can use
    • Only owners and admins can destroy Turnstile blocks, buttons, and chests
    • Edit turnstiles easily in game or in the save file
    • Only the owner/bank owner can edit a turnstile
    • Turnstiles can charge specific items instead of money
    • Durability support
    • Turnstiles can also be free to use
    • Charge users money to create turnstiles
    • Set different Turnstiles to unique prices and owners/banks
    • List and locate Turnstiles
    • MultiWorld support
    • Uses iConomy, BOSEconomy or Essentials to charge users money
    • Permissions to limit players from using turnstiles, for all commands (except help), and for admins
    • Included in CraftBukkitUpToDate for easy updating (make sure you come check the changelog if somthing is not working right)
    Commands:
    Commands can be written as /turnstile or /ts
    Show Spoiler

    • /ts make [Name] - Make target fence block into a Turnstile
    • /ts link [Name] - Link target block with Turnstile
    • /ts rename [Name] [NewName] - Renames the Turnstile
    • /ts unlink [Name] - Unlink target block with Turnstile
    • /ts delete [Name] - Delete Turnstile and unlink blocks
    • /ts price [Name] [Price] - Set cost of Turnstile
    • /ts price [Name] [ItemID(.Damage)] [Amount] - Set cost to item
    • /ts access [Name] public - Allow anyone to open the Turnstile
    • /ts access [Name] private - Allow only the owner to open
    • /ts access [Name] [Group] - Allow only specific Group to open
    • /ts free [Name] [TimeStart-TimeEnd] - Free during timespan
    • /ts locked [Name] [TimeStart-TimeEnd] - Locked during timespan
    • /ts earned [Name] - Display money the Turnstile earned
    • /ts collect - Retrieve items from the target Turnstile chest
    • /ts owner [Name] [Player] - Send money for Turnstile to Player
    • /ts bank [Name] [Player] - Send money for Turnstile to Bank
    • /ts list - List all Turnstiles
    • /ts info - Gives info of Turnstile
    • /ts help - Displays Turnstile help page

    Permission Nodes:
    Show Spoiler

    • turnstile.open - Needed to be able to activate Turnstiles
    • turnstile.openfree - Player/Group is not charged to open Turnstiles
    • turnstile.make - Needed to make/link/unlink/delete Turnstiles
    • turnstile.makefree - Player/Group is not charged to make Turnstiles
    • turnstile.set.free - Allows Player/Group to use /ts free
    • turnstile.set.locked - Allows Player/Group to use /ts locked
    • turnstile.set.price - Allows Player/Group to use /ts price
    • turnstile.set.owner - Allows Player/Group to use /ts owner
    • turnstile.set.access - Allows Player/Group to use /ts access
    • turnstile.set.bank - Allows Player/Group to use /ts bank
    • turnstile.earned - Allows Player/Group to use /ts earned
    • turnstile.admin.list - Allows Player/Group to use /ts list
    • turnstile.admin.info - Allows Player/Group to use /ts info
    • turnstile.admin.ignoreowner - Player/Group can edit any Turnstile regardless of being the owner

    Tutorial:
    NOTE: New Tutorial video, Please watch before asking questions.




    ToDo:
    • Send items to owner
    • Add option of using a door instead of a fence block
    • Add pressure plate support
    Changelog:
    Old Versions + ChangeLog can be found at Download Page
    Show Spoiler

    Version 1.9.1 (7/16/2011)
    • Added rename command
    • Now allows multiple Turnstiles per block
    • Fixed Access
    • Added color support for all customizable messages
    Version 1.9 (6/26/2011)
    • Improved OP options
    • Updated Economy support
    • Fixed collect command
    • Added option of door instead of block
    • Added pressure plate support
    Version 1.8 (6/12/2011)
    • Cleaned up code/fixed errors
    • Added /ts collect command to retrieve earned items
    Version 1.7.6 (6/4/2011)
    • Cleaned up errors and added error messages
    Version 1.7.5 (6/3/2011)
    • Various fixes and code cleanup
    Version 1.7.4 (6/3/2011)
    • Added Essentials econ support
    Version 1.7.3 (5/20/2011)
    • Fixed durability support
    Version 1.7.2 (5/20/2011)
    • Added decimal support
    Version 1.7.1 (5/16/2011)
    • Readded the useOpenFreeNode and useMakeFreeNode options in config
    Version 1.7 (5/15/2011)
    • Changed permission nodes
    • Allow right clicking a button to open
    • Made Turnstiles unbreakable
    • Added command to allow group specific Turnstiles
    Version 1.6.1 (5/4/2011)
    • Updated to iConomy 5
    • Few various fixes
    Version 1.6 (4/29/2011)
    • Added durability support
    • Added custom messages
    • Fixed reload issues
    • Added No Fraud mode (Turnstile charges when walked through)
    • Added option to restrict use of a specific Turnstile to a certain group
    • Added option of making a Turnstile Free or Locked during a certain time of day
    • Added autoclose timer
    Version 1.5 (4/15/2011)
    • Improved multiworld support
    • Other various fixes
    Version 1.4.3 (4/4/2011)
    • Fixed isOp() conflicting with Permissions
    Version 1.4.2 (3/31/2011)
    • Few minor fixes
    • Works with build #612
    Version 1.4.1 (3/30/2011)
    • Can now use with left or right hand
    Version 1.4 (3/30/2011)
    • Fixed turnstile creation
    Version 1.3.3 (3/30/2011)
    • Updated to build #602
    • Changed the way you create turnstiles. Now you must target the fence block that will become a Turnstile
    Version 1.3.2 (3/28/2011)
    • Added private Turnstiles, Set price to -808 to make it so only the owner can enter
    Version 1.3.1 (3/28/2011)
    • Fixed error of crashing if owners name is < 5 letters long
    Version 1.3 (3/26/2011)
    • Added protection for Turnstile blocks, buttons, and chests
    Version 1.2.1 (3/24/2011)
    • Various fixes
    Version 1.2 (3/23/2011)
    • Fixed multiworld support
    Version 1.1 (3/23/2011)
    • Fixed paying with items not opening Turnstile
    Version 1.0 (3/23/2011)
    • Added an autoclose timer (set to -1 as default in config file meaning it will stay open until walked through)
    • Added '/ts earned [Name]' command (no permission node)
    • Fixed config
    • Added option of setting price to all (saved as -411 in save file) which will clear a players balance as the cost
    • Fixed error of turnstile opening without enough money
    • Fixed permissions reload
    • Fixed/added lots of other things I can't even remember
    Version 0.9 (3/22/2011)
    • Fixed error of no confirmation messages for iConomy
    • Added a check to make sure the balance has enough money
    • Implemented option of paying with a specific item
    • Added config file with the following options
      • CostToMakeTurnstile=0
      • useIgnorePriceNode=False
      • useIgnoreCostNode=False
    Version 0.8.3 (3/19/2011)
    • Fixed unknown command spamming chat
    • Fixed no Economy message spamming
    • Changed /ts locate to /ts info (turnstile.admin.info)
    Version 0.8.2 (3/19/2011)
    • Added multiworld support (you must rename save files to Turnstile[WorldName].save or turnstiles will not be loaded)
    Version 0.8.1 (3/18/2011)
    • Fixed /ts bank not working
    • Added /ts bank to help page
    • /ts bank now only works with BOSEconomy linked
    Version 0.8 (3/18/2011)
    • Added support for BOSEconomy banks
    • New node turnstile.admin.bank
    • New command /ts bank [Name] [Bank]
    Version 0.7.1 (3/17/2011)
    • Mispelled commands display help screen
    • If owner is set to "server" then money is not added or deducted from the owner
    • Button now only works when turnstile is closed
    Version 0.7 (3/17/2011)
    • Turnstile now closes after being walked through
    • Fixed error of "Turnstile successfully loaded with Permissions!" being displayed multiple times
    Version 0.6.1 (3/16/2011)
    • Fixed error that Permissions was required
    Version 0.6 (3/16/2011)
    • Added support for Permissions
    Version 0.5 (3/16/2011)
    Version 0.4 (3/15/2011)
    • Limited commands to the owner of the turnstile
    • Other various fixes
    Version 0.3 (3/15/2011)
    • Initial Release
     
  2. Offline

    Codisimus

    only the Turnstile owner can delete the Turnstile

    Added decimal support in Version 1.7.2

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

    King_Pikmin

    Sweet! Thanks! *Hugs*
     
  4. Offline

    Forecaster

    Are you aware that it appears to completely ignore the data value of an item?

    At least for me it accepts any item as long as the item id is the same.
     
  5. Offline

    Codisimus

    Wut were you testing it with, I tried it with black wool, and white wool was not accepted. I'll look at my code
    EDIT: Actually you're proly right, I have to fix this. Hopefully soon.
     
  6. Offline

    dak393

    haven't tested it yet but could it be that he didn't specify the type say "35" instead of "35:0"
     
  7. Offline

    Codisimus

    No i assumed that when you search an inventory for an itemstack it check the durability too, but it doesn't... I'll have to do that myself.

    EDIT: Ok I fixed this but I'm leaving and won't be able to test/update until later today.
     
  8. Offline

    dak393

    cool :)
     
  9. Offline

    Codisimus

    Fixed in version 1.7.3
     
  10. Offline

    Forecaster

    I did specify the data values actually. And also, turnstiles use . instead of : (Why is that? It's confusing, and really freaks the plugin out if you use : instead, or put in anything other than a number)

    I tested with swords with different durabilities first. When that didn't work I tested with different kinds of wool.

    The reason I noticed this is because I need it to only accept undamaged swords.

    (I have craftbukkit 766 and turnstiles 1.7.2)
     
  11. Offline

    Codisimus

    I was already using : for something else so I had to use . but it should be working now
     
  12. Offline

    Forecaster

    It works perfectly now! :D

    Thanks!
     
  13. Offline

    DJ_Idol

    This plugin has gotten better and better, you've done a great job @Codisimus
     
  14. Offline

    fxb9500

    just upgraded to Turnstile 1.7.3 and getting a "You do not have permission to do that" error

    Admin permissions group is King:
    Code:
    King:
            default: false
            info:
                prefix: '&c'
                suffix: '&c'
                build: true
                rank: 100
                plimit: 99
                dlimit: 99
            inheritance: Duke
            permissions:
            - '*'
            - iConomy.*
            - bankaccount.admin
            - turnstile.*
            - localshops.*
            - turnstile.admin.*
            - turnstile.admin.ignoreowner
            - jail.*
            - turnstile.make
    
    Turnstile Config File:
    Code:
    #Config file for Turnstile
    #Plugin made by Codisimus
    
    
    #Economy plugin can be set to "iConomy" or "BOSEconomy"
    #BankAccount for iConomy is also supported
    
    EconomyPlugin=iConomy
    
    
    #useisOp() can be set to "true" or "false"
    #If true, Turnstile will not look for Permissions
    #and instead use Op status for making Turnstiles
    #everyone will be able to use Turnstiles
    
    useisOp()=false
    
    
    #When set to true, players will not be charged untill they walk through the Turnstile
    
    NoFraud=true
    
    
    #The amount of time (in seconds) the Turnstile will stay open
    #If set to 0, the Turnstile will not AutoClose
    
    AutoCloseTimer=20
    
    
    #This is how much it will cost a user to make a Turnstile
    
    CostToMakeTurnstile=5
    
    
    #If set to true, groups that have these permmission nodes
    #can use and make Turnstiles for free
    
    use'openfree'node=false
    use'makefree'node=true
    
    
    #These are the messages that players will see while using Turnstiles
    
    PermissionMessage=You do not have permission to do that.
    Any ideas?
     
  15. Offline

    Codisimus

    @fxb9500
    look at the permission nodes spoiler, I changed them a lot to make more sense. You have to add 'turnstile.set.*'
     
  16. Offline

    fxb9500

    Got it, thanks

    okay, so is there a way I can have some of the turnstile.set permissions but not all? For example, I want the normal users on the server to be able to make turnstiles that don't charge anything but are lockable, so I allow turnstile.make, turnstile.set.free, turnstile.set.access, and turnstile.set.locked, but they are still not allowed to make a turnstile. I'm getting the same type of problem on button warp too, users/groups that don't have the admin nodes can't make warps.

    Specifically:
    Code:
    groups:
        Guest:
            default: true
            info:
                prefix: '&7'
                suffix: '&7'
                build: false
                rank: 1
            inheritance: null
            permissions:
            - ''
            - jail.usercmd.jailstatus
            - turnstile.open
            - buttonwarp.use
        Citizen:
            default: false
            info:
                prefix: '&9'
                suffix: '&9'
                build: true
                rank: 20
            inheritance:
            - Guest
            permissions:
            - minecraft.list
            - minecraft.tell
            - minecraft.help
            - iConomy.access
            - iConomy.payment
            - iConomy.bank.*
            - iConomy.rank
            - iConomy.list
            - turnstile.use
            - localshops.user.*
            - localshops.manager.add
            - localshops.manager.create
            - localshops.manager.move
            - localshops.manager.remove
            - localshops.manager.select
            - localshops.manager.set
            - localshops.manager.set.owner
            - turnstile.make
            - turnstile.set.bank
            - turnstile.set.access
            - turnstile.set.price
            - turnstile.set.owner
            - turnstil.earned
            - bankaccount.basic
            - jail.usercmd.jailstatus
            - iobookcase.canread
            - buttonwarp.use
            - buttonwarp.getreward
            - turnstile.open
            - turnstile.set
            - turnstile.set.free
            - turnstile.set.locked
        Guard:
            default: false
            info:
                prefix: '&9'
                suffix: '&9'
                build: true
                rank: 40
            inheritance:
            - Citizen
            permissions:
            - minecraft.tp
            - minecraft.time
            - minecraft.save-all
            - minecraft.kick
            - p2.promote
            - iConomy.access
            - iConomy.admin.grant
            - iConomy.rank
            - iConomy.list
            - turnstile.use
            - turnstile.make
            - turnstile.set.bank
            - turnstile.set.price
            - turnstile.set.owner
            - localshops.user.*
            - localshops.manager.add
            - localshops.manager.create
            - localshops.manager.move
            - localshops.manager.remove
            - localshops.manager.select
            - localshops.manager.set
            - localshops.manager.set.owner
            - bankaccount.extended
            - bankaccount.basic
            - jail.command.jail
            - jail.command.unjail
            - turnstile.open
        Duke:
            default: false
            info:
                prefix: '&5'
                suffix: '&5'
                build: true
                rank: 80
            inheritance:
            - Guard
            permissions:
            - minecraft.give
            - permissions.group
            - iConomy.admin.grant
            - minecraft.tp
            - minecraft.list
            - minecraft.time
            - minecraft.save-all
            - minecraft.kick
            - p2.promote
            - p2.demote
            - iConomy.access
            - iConomy.admin.grant
            - iConomy.rank
            - iConomy.list
            - turnstile.open
            - turnstile.make
            - turnstile.set.bank
            - turnstile.set.price
            - turnstile.set.owner
            - turnstile.set.locked
            - turnstile.set.access
            - localshops.manager.*
            - localshops.user.*
            - localshops.free.create
            - localshops.free.move
            - permissions.group
            - money.top
            - iconomy.list
            - minecraft.tell
            - bankaccount.extended
            - bankaccount.basic
            - jail.command.jail
            - jail.command.unjail
            - jail.command.jailtelein
            - jail.command.jailteleout
            - iobookcase.canwrite
        King:
            default: false
            info:
                prefix: '&c'
                suffix: '&c'
                build: true
                rank: 100
                plimit: 99
                dlimit: 99
            inheritance:
            - Duke
            permissions:
            - '*'
            - iConomy.*
            - bankaccount.admin
            - turnstile.*
            - localshops.*
            - turnstile.admin.*
            - turnstile.admin.ignoreowner
            - jail.*
            - turnstile.make
            - turnstile.set.*
        Ambassador:
            default: false
            info:
                rank: 90
                prefix: '&6'
                suffix: '&6'
            inheritance:
            - Duke
            permissions:
            - turnstile.open
            - buttonwarp.make
            - buttonwarp.*
    
    and only I (King) can do /ts make or /bw make

    EDIT:
    Now even I can't edit turnstiles... turnstile.set.* permission node is enable, and the console doesn't show anything out of the ordinary :(
    CraftBukkit 766, everything else is the latest release

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

    Codisimus

    @fxb9500
    try changing your position as op and let me know if you make a difference
     
  18. Offline

    fxb9500

    I found that when I opped myself I could make and edit turnstiles, but when I de-opped myself I could not. In the config file I have useisOp()=false

    Now that I think about it, I opped myself so I could edit spawn around the same time I added the turnstile.set.* node for myself, which would explain why it worked before.
     
  19. Offline

    Codisimus

    I'll do some tests
     
  20. Offline

    Geoff Winans

    It appears this plugin has abruptly stopped working on my server.

    Now, only users that are in the Admin group -and- Op'd can use the buttons. Anyone else gets "You don't have permission to use this". This came out of the blue.

    Any thoughts on the cause?

    Latest RB (803).
     
  21. Offline

    hofec

    Broken with #803 . .same OP_ permissions thing as guys described above man .. :) btw. i love your work ..

    Thank you so much for BW and this ![diamond]
     
  22. Offline

    Codisimus

    @Geoff Winans
    @hofec
    I'm currently adding support for Essentials economy, then I will fix the op issues
     
  23. Offline

    hofec

    Okey than ! thanks
     
  24. Offline

    Codisimus

  25. Offline

    matymathew

    I am the owner with all commands and I can not even make a turnstile keep getting do not have permission and its hooked in permission and icon dont now how to fix it
     
  26. Offline

    Liger_XT5

    I got an odd issue. Didn't see this until someone made a mistake making their TurnStile.
    I'm using CB 766 (not bothering to update until a stable MC and CB version is released) and I can't delete other turnstiles. I have all three turnstile admin permissions and it tells me that only the owner has permissions to edit them.
     
  27. Offline

    omerdn1

    Same issue!
     
    hofec likes this.
  28. Offline

    hofec

    ^^
    This !

    same ..
     
  29. Offline

    daankorssen

    I really like this, But can you add Essentials Eco support?
     
  30. Offline

    captainawesome7

    Hey @Codisimus Did you figure out how to send the items to the player yet?
     
  31. Offline

    Codisimus

    someone gave me aan idea that I'm going to try out
     

Share This Page