[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

    was this for newest version? and are you using iConomy or BOSEconomy?




    support for BOSEconomy banks is included in Version 0.8



    I am currently working on a separate plugin to give rewards for dungeons
    After hours of coding I decided that incorporating it into this plugin was unreasonable

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

    Greenops

    It seems that this plugin will not work in multiverse worlds, only in the original default world. After messing around for an hour it works with out a doubt in regular world. Second world (the only world it want it on, figures) not working at all.
     
  4. Offline

    Codisimus

    I have never worked with multiple worlds but will definitely look into it.
     
  5. Offline

    riuthamus

    Epic, ill be making a video of this very very very soon!! Thanks again
     
  6. Offline

    yummysinsemilla

    Great idea and plugin.

    Although I'm having an issue with the price not working. There's no removal of funds, nor a message saying so. (CB 556)

    The .save file lists that it should.

    CasinoIn;5000;me;815;64;750;
    816:65:751;
    CasinoOut;0;me;818;64;750;
    819:65:751;

    Also, sometimes the second one will not respond. I will "delete" it and it won't disappear. I'll then break it and walk over it and it will reappear. That's easily worked around, but a bug nonetheless. It seems to happen if I delete the first one.
     
  7. Offline

    Codisimus

    I will update to the recommended build and see if there are still problems
     
  8. Offline

    riuthamus

    Can you set a switch/config so i can turn off iconomy support, also, it doesnt seem to be charging the player or putting it to the bank account, we are testing right now though.
     
  9. Offline

    Codisimus

    I could not duplicate this error, what causes it to happen?
    I will add a config file once i get everything else figured out

    Also for both of you, if a player has the permission turnstile.admin.ignore.price then they will not be charged.
    Not sure if this was the cause to your problems.
     
  10. Offline

    riuthamus

    oh.. interesting, so because i am op and have all... damn... good point! okay thanks ill try using a normal user. Very cool!

    At this point the only other features I could think of that would be needed is the ability to set a cost, in a config file, for placing them. This way players could not go crazy and place them everywhere. Also, set a flag for cost bypass for admins! :p Again this is epic!!!
     
  11. Offline

    yummysinsemilla

    I'm not sure myself either. I had it in a 1x1x2 "doorway" and a button 1 block over and 1 block up from it. It worked fine and then out of nowhere, would not work. I moved it into the block passed the doorway and it hasn't done it in about 10 uses over 30 minutes now though. Not sure if that made any difference, or why it would have.

    EDIT: While restarting the server (because permissions weren't reloading correctly) the 2nd turnstile stopped working again. I broke it with a sword and walked over it then it started working fine again, lol. There are no errors in the log.

    Pardon me for my idiocy, LOL. I'll test it out with regular permissions.

    EDIT: Ok that works, lol, sorry. >____>
     
  12. Offline

    Codisimus

    I created a plugin called DungeonReward for you two, it teleports instead of using fence blocks to prevent users from exploiting it. I have done very little testing so just let me know if sumthing is not working right.
     
  13. Offline

    dak393

    Cool thanks for the plugins and all the hard work Ignore me being stupid before thinking money didn't work XD (darn my admin powers)
    and I am using iconomy and the latest recommended build 556
     
  14. Offline

    Codisimus

    that permission node has tricked a few people so far but once you know it is their I think it can be useful. once I get a config file I'll toggle it off by default.
     
  15. Offline

    dak393

    Ya its defiantly useful I just have all permissions so I gain things I didn't know I had till something like this happens XD
     
  16. Offline

    Codisimus

    Ya on my server I had to add all individual nodes instead of '*' bc of a few simple commands like this. It's annoying but those commands do come in handy when I need them
     
  17. Offline

    riuthamus

    I am not sure if your able to come in our server or not and see if i am doing something wrong, ill set you up with mod permissions, but i cant get it to go to the bank accounts. I can get it to go to a person but no bank stuff at all!
     
  18. Offline

    Greenops

    Oh don't I feel silly, they do indeed work with multiworlds. I kept trying /ts create when it was /ts make. Haha. I say you make /ts do same thing as /ts help I kept typing /ts and after not seeing anything thought it no longer was working.
     
  19. Offline

    Graham

    Hey, Awesome plugin. I charge my users 2 coin to go into my shop and free to leave. Also, I am making a video of your plugin, and should I like send it to you somehow?
     
  20. Offline

    Codisimus

    yes maybe i could join it later but show me your data file first.
    /ts should show the help page as long as your using v0.7.1 or later
    if you upload load it to youtube or sumthing and send me the link ill gladly add it to this page.
     
  21. Offline

    riuthamus

    Code:
    test01;1;riustash;-378;65;-91;
    -377:65:-90;
    
     
  22. Offline

    Codisimus

    the way this plugin is setup it should list the bank as bank:[NameOfBank] where the owner goes. it actually replaces the owner and instead detects if you are a owner of the bank [NameOfBank] so if you use /ts owner after setting the bank it will overwrite it. if you cant get it to work with /ts bank [NameOfTurnstile] [NameOfBank] maybe try /ts owner [NameOfTurnstile] bank:[NameOfBank]
     
  23. Offline

    riuthamus

    this is what my testing has done...

    1) /ts make test01
    2) /ts link test01
    3) /ts bank test01 riustash
    4) /ts price 1

    click the button, the non-admin account is charged but no money is sent to the bank

    1) /ts make test01
    2) /ts link test01
    3) /ts owner test01 riuthamus
    4) /ts price 1

    click the button, money goes from their account to my account

    Also tried to /ts owner riustash and that didnt work either

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

    Codisimus

    ok found the error, /ts owner [NameOfTurnstile] bank:[NameOfBank] will work for you but i'm uploading the fix right now
     
  25. Offline

    riuthamus

    That works, so the syntax is now bank:name?
     
  26. Offline

    Codisimus

    no i just updated to v0.8.1 which fixes /ts bank not working but with the update you can do it either way
     
  27. Offline

    riuthamus

    epic, thanks, i tested in game and it works as desired!!!
     
  28. Offline

    Codisimus

    I proly won't be on here again till late tonight but I appreciate the error testing as I don't really using BOSEconomy (yet)
     
  29. Offline

    riuthamus

    Not a problem, and perhaps you can tell me some time, the features you would like to see... so you would be interested in using it! :p
     
  30. Offline

    Greenops

    The ability to make private turnstiles that only you or the people you list may enter.
     
  31. Offline

    DanDaMan

    A couple guys could easily farm it for money. I think maybe a sign warp or portal that pays you when entering would be better. Than they can't stick around and farm the portal. Just make sure your players can't use the /tp command.

    I totally agree that we need some kind of system like that for dungeons!
     

Share This Page