[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

    darth2499

    would it be possible so if you hit that button it makes you do a command?
     
  3. Offline

    fneyret

  4. Offline

    darth2499

  5. Offline

    dannybtw

    When i dont have a price we can walk through but when i add a price it doesnt open
     
  6. Offline

    an0x

    Hm i have a bug i make a button and a link it with a iron door now i make an server reload and then its a fence รด0
     
  7. Offline

    cvxx7q

    i encountered a slight problem, after setting my linked pressure plates (Stone) i always Respawn where i was standing when i made the link

    Pressure plate>Link>Fence

    i have one pressure plate on either side of the fence if that means anything (probably not)

    and my spawn is set to my last POS when i do the linking (probably repeating myself :S, sorry)
     
  8. Offline

    Codisimus

    Sorry I have no idea wut your problem is... This plugin shouldn't effect where you respawn
     
  9. Offline

    GarretSidzaka

    can you add bedrock to this for turnstyle. ppl can just break the turnstyle and run through
     
  10. Offline

    Duendek86

    Hi all, here you have an spanish basic tutorial about turnstile uses :)
     
  11. Offline

    NoPride

    Anyone having a Problem running this on RB 1000

    EDIT.. had to delete config file
     
  12. Offline

    Silarn

    I'm wondering, now that it seems to have active support, if you would add an option for Towny town banks? You can essentially run a check to see if said person is the mayor/assistant of specified town (or still is during a transaction) and if so, link it to the town bank (town-TownName usually). (Maybe even check if it is within town boundaries, but that may be harder to do.) It would be pretty cool if people could use this to help fund town upkeep rather than purely focusing on daily taxes.
     
  13. Offline

    Bdl2

    Found an exploit with no-fraud mode.

    If a player stands directly next to the fence block and clicks a button to pass, they can push through to the other side regardless of whether they have the money to pay or not. I'd imagine the same probably happens with a pressure plate directly in-front of the turnstile.

    The simple fix is to just place the button/pressure plate far enough away so that players can't reach it from standing next to the turnstile, but it's still an exploit, so I figured I'd let you know.
     
  14. Offline

    MrRotten

    I absolutely love Turnstiles!

    When I initially installed it, everything seemed to work great except for a basically one thing.
    1. Could not figure out how to COLLECT from the Turnstile. I tried the commands, and just could not figure it out.

    After a lil while I started noticing this error in my Console.
    ********************* Console Error ******************************
    17:00:10 [SEVERE] Could not pass event PLAYER_INTERACT to Turnstile
    java.lang.NullPointerException
    at Turnstile.Turnstile.hasAccess(
    Turnstile.java:198)
    at Turnstile.Turnstile.checkBalance(Turnstile.java:158)
    at Turnstile.TurnstilePlayerListener.onPlayerInteract(TurnstilePlayerListener.java:403)
    at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
    at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:63)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:458)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    ****************************************************************************

    I was also wondering about something else... I went through a ton of pages in this forum to try and determine my error, couldn't. I also noticed that people were getting Console Message Checks saying that Turnstile is linked to their iConomy. Well, I have BOSEconomy, I went into the Config file and stuck it in there, and I don't see a message letting me know it's linking to my Economy system. Am I doing something wrong???

    Also, I noticed one other issue... When I reload my server, it seems that money/balances resets itself back to an earlier save or something.

    Here is MY config file: Lil help would be appreciated!
    ***************** Turnstile Config ******************
    #Config file for Turnstile
    #Plugin made by Codisimus
    #Supported Economy plugins:

    #BOSEconomy, iConomy (4 or 5), Essentials, None
    Economy=BOSEconomy

    #If set to true, Turnstile will overlook Permissions
    #Only OPs will be able to make Turnstiles
    #Everyone will be able to use Turnstiles
    UseOP=true

    #When set to true, players will not be charged untill they walk through the Turnstile
    NoFraud=false

    #The amount of time (in seconds) the Turnstile will stay open
    #If set to 0, the Turnstile will not AutoClose
    AutoCloseTimer=10

    #This is how much it will cost a user to make a Turnstile
    CostToMakeTurnstile=0

    #If set to true, groups that have these permmission nodes
    #can use and make Turnstiles for free
    use'openfree'node=false
    use'makefree'node=false

    #These are the messages that players will see while using Turnstiles
    #Type \! instead of ! in order to use an exclamation point (ex. hi\!)
    #Use & to specify colors for messages (ex. &3hi&a.)
    PermissionMessage=You do not have permission to do that.
    LockedMessage=This Turnstile is currently locked.
    FreeMessage=This Turnstile is currently free.
    CorrectItemMessage=Item accepted, Turnstile opened\!
    WrongItemMessage=Correct item not found\!
    DisplayCostMessage=This Turnstile costs <price> coins to use.
    OpenMessage=<price> coins deducted to use the turnstile.
    NotEnoughMoneyMessage=You do not have enough money to use the turnstile.
    BalanceClearedMessage=Balance cleared to use the turnstile.
    PrivateMessage=That is a private Turnstile\!
    ********************************************************************

    Thanks in advance!
    MrRotten

    RottenCreeper.GuildPortal.com
     
  15. Offline

    topsub

    I am having the issue when someone hits the button and has no money it still opens. I do a /ts price <name> 100.

    Did something mess up? it doesn't work like in the video?

    More testing even if i have 5 bucks it doesn't charge them at all? Ideas?

    Code:
    #Config file for Turnstile
    #Plugin made by Codisimus
    
    #Supported Economy plugins:
    #BOSEconomy, iConomy (4 or 5), Essentials, None
    
    Economy=iConomy
    
    #If set to true, Turnstile will overlook Permissions
    #Only OPs will be able to make Turnstiles
    #Everyone will be able to use Turnstiles
    
    UseOP=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=5
    
    #This is how much it will cost a user to make a Turnstile
    
    CostToMakeTurnstile=50
    
    #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
    #Type \! instead of ! in order to use an exclamation point (ex. hi\!)
    #Use & to specify colors for messages (ex. &3hi&a.)
    
    PermissionMessage=You do not have permission to do that.
    LockedMessage=This Turnstile is currently locked.
    FreeMessage=This Turnstile is currently free.
    CorrectItemMessage=Item accepted, Turnstile opened\!
    WrongItemMessage=Correct item not found\!
    DisplayCostMessage=This Turnstile costs <price> to use
    OpenMessage=<price> coins deducted to use the turnstile
    NotEnoughMoneyMessage=You do not have enough money to use the turnstile
    BalanceClearedMessage=Balance cleared to use the turnstile
    PrivateMessage=That is a private Turnstile\!
    
     
  16. the turnstile doesn't seem to take the cost from the player. It won't even open.


    EDIT: Nvm, they suddenly decided to work?? XD I didnt change anything, but later I went back and tried again, and it worked fine.
     
  17. Offline

    samp20

  18. It doesn't seem the turnstile is taking player's money. I'm using iConomy.

    It just lets them through, doesn't cost them anything. Even if it says it is.
     
  19. Offline

    Blopdsand

    Code:
    #Config file for Turnstile
    #Plugin made by Codisimus
     
    #Supported Economy plugins:
    #BOSEconomy, iConomy (4 or 5), Essentials, None
    
    Economy=Essentials
     
    #If set to true, Turnstile will overlook Permissions
    #Only OPs will be able to make Turnstiles
    #Everyone will be able to use Turnstiles
    
    UseOP=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=6
     
    #This is how much it will cost a user to make a Turnstile
    
    CostToMakeTurnstile=$25
     
    #If set to true, groups that have these permmission nodes
    #can use and make Turnstiles for free
    
    use'openfree'node=false
    use'makefree'node=false
     
    #These are the messages that players will see while using Turnstiles
    #Type \! instead of ! in order to use an exclamation point (ex. hi\!)
    #Use 
    Hey Codismus, having problems,

    When i define the price of a turnstile it becomes inactive, it works fine before i set the price, but makes no response once the price is set

    Theres my Config, should it be working?

    btw using WorldGuard and am an OP and Admin in my server
     
  20. got exect the same problem
    only diference is that i use Iconomy

    i fixed it.
    i opened my turnstile.save with notepad and changed it the first numbers to 10 (My price was 10 cions) instead of 10.0 and i saved the file. reloaded the serverplugins. that worked.
    and when i changed it back to 10.0 it worked 2 xD. maybe you heb to reload ther plugins to get it working xD.
    and dont be suprised if it dont charge money of you...
    There is one logic explenation and that is that your the owner of the gate so if you pay you get it back xD. if someone else uses the gate they pay and you get.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  21. Was suddenly getting these today:

    Code:
    17:06:57 [SEVERE] Could not pass event PLAYER_INTERACT to Turnstile
    java.lang.NullPointerException
            at com.nijikokun.register.payment.methods.iCo5.getBankAccount(iCo5.java:53)
            at Turnstile.Register.charge(Register.java:30)
            at Turnstile.Turnstile.checkBalance(Turnstile.java:170)
            at Turnstile.TurnstilePlayerListener.onPlayerInteract(TurnstilePlayerListener.java:384)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:314)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:210)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:554)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:86)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:453)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  22. Offline

    an0x

    every reload no turnstile works more that means that no mony is subtractet etc
     
  23. Offline

    Moo Master

    Does it work on 1000?
     
  24. Offline

    topsub

    I guess this is going inactive as i haven't had any feedback in a while..
     
  25. Offline

    bularax

    Let's hope the plugin maker will update it soon :)
     
  26. Offline

    randeri221

    i dont think he will damn it :/
    i realy needed this plugin xD
    if anybody knows a plugin that do kinda like what turnstile does pm me plz
    codisimus plz update this to cb1000 xD
     
  27. Offline

    mrsuperbing

    it works fine at first but once i do /ts price [name] 15 it stops working
     
  28. Offline

    an0x

    please update youzre awesome plugin
     
  29. Offline

    fneyret

    Hi. I have two turnstile on my server. The first works very well. But sometimes, the second one stops to work (no message when walking on the pressure plate), then works again after a while (without reloading or restarting the server).
     
  30. Offline

    andrewkm

  31. Offline

    MadcowD

    He was on today. Hmm. Anyway here is aglitch. When the players balance is lower than the price of the turnstile it lets him spam it and get in free. This is do to the iConomy processing happening after the removal of the block. Which allows a very small window for them to sneak in!
     

Share This Page