TreasureHunt 0.8.2
Find that loot!
Hello everyone. This is my second released plugin for bukkit, but probably my tenth or twelfth overall.
The purpose of TreasureHunt is to give people even more fun things to do in your server. The plugin allows your worlds to randomly generate chests based on very specific settings that you choose. You can use any number of worlds with this plugin, and each can have a different configuration. :)
Here is some info on the variables(but not all of them) and usage, which are able to be different in each world:
- There are five kinds of chests. Common, Uncommon, Rare, Legendary, and EPIC. The rarity is determined by the random value chosen for the chest. Less than 1500 is Common. 1500-2499 is Uncommon. 2500-3499 is Rare. 3500-4499 is Legendary. 4500+ is EPIC. The default max value is 5000, but chests can spawn above the cap a bit if the last item chosen to fill the chest exceeds the value chosen for the chest by a good enough amount.
- The plugin's timer checks every <interval> seconds against a random number generator. The chance of a chest spawning is 1 in <chance>. If it hits, a chest of random value spawns in the world and is placed in a random location.
- The value of the chests can be completely random, or you can use the <weight> variable to cause the plugin to draw more times and take the lowest of the draws(meaning more common chests will spawn and higher chests will be rarer).
- The location of the chest is determined by choosing random locations until a suitable one is found. Suitable means that it fits within the <minheight> and <maxheight>, and that the light level is between <minlight> and <maxlight>. The chest must also spawn on a block specified in <spawnblocks>, so any location chosen that does not contain this kind of block is ignored.
- The chest fills with items from the item lists, depending on its rarity. You can set the <gooditemweight> higher to make chests that spawn above Common have a better chance of having better items. (More draws for the item chosen - takes the one that is closest to the rarer side of the list.)
- You can set a <markerblock> under the chest to replace the block previously there. The default is glowstone, making chests appear with a glowstone block under them.
- Players can do /hunt, /th, or left-click with a <hunttool> (<consumechance>% chance of consumption) to get the distance to the nearest chest horizontally (does not take into account height, making you have to dig when you arrive).
- Move and keep checking the command to determine the direction of the chest. The first one to open the chest is the one who claims it, and no one else can open it once it's claimed. The chest also cannot be destroyed. After 5 minutes from the time it was found, the chest will fade.
- The chest will also fade if it is not found within an hour, or if the plugins are reloaded or the server is shut down. When a chest fades, the glowstone under it is replaced with soulsand; this is just to add a neat way to see where chests have been.
- Ops or people with permissions can use /hunt help or /th help to see info on how to configure the plugin ingame.
Permissions Plugins Supported
- Everything Vault supports! Get Vault to use permissions with TreasureHunt. Note: If you don't use Vault, ops can still do the admin commands. See command list for details.
Money Plugins Supported
- Everything Vault supports! Get Vault to use money with TreasureHunt. Note: If you don't use Vault, the plugin can still be used. It just won't give money in chests.
Commands
- /hunt - shows you the distance to the nearest chest.
Op Commands
- /starthunt <value> Ex: /hm starthunt 5000
- /starthunt here <value> - start a hunt at the block you are looking at.
- /hunt help - shows all commands for setting the TH settings ingame
- /hunt reload - reloads configuration...does not reset active hunts
- /hunt list - lists all active hunts
- /hunt save - save configuration
- /hunt center - set the center of chest generation to your coords
- /hunt addworld - add your current world as a chest generation world
- /hunt removeworld - removes your current world as a chest generation world
- /hunt maxdist <integer> - set the max distance chests can be generated from the center
- /hunt duration <integer> - set the duration a chest can be unfound before fading, in minutes.
- /hunt weight <integer> - set the number of draws the value of the chest is taken from (takes lowest)
- /hunt chance <integer> - set the 1 in <integer> chance of a chest being spawned per check. (higher is less often)
- /hunt interval <integer> - set the interval in seconds between chest draws.
- /hunt minmoney <integer> - set the minimum money that can be provided by any chest.
- /hunt moneymultiplier <decimal> - set the multiplier based on chest value to determine the max money a chest can yield (money will be between minmoney and this times chest value)
- /hunt consumechance <integer> - set the % chance (0-100) that a hunt tool will be consumed when used.
- /hunt tool - set the hunt tool for the current world to what you're holding
- /hunt maxvalue - set the max value of chests for the current world
- /hunt marker - set the block that appears under a chest (default glowstone)
- /hunt usemarker - set whether to use a marker block at all
- /hunt enabled - set whether the current world is enabled or not.
- /hunt copyworld - import settings from the world you specify.
Permissions Nodes
- taien.th.hunt.world - allows users to use /hunt or /th in world
- taien.th.notify - allows users to receive broadcasts from TreasureHunt
- taien.th.tool.world - allows users to use the hunt tool in world
- taien.th.claim.world - allows users to claim chests they find in world (without this, they cannot win the hunt, only find the chest)
- taien.th.admin - allows users to use all OP COMMANDS from above.
Planned Features (Soon)
- More optimization for chest generation (to reduce lag when /hunting)
- Connection to WorldGuard
- Customizable messages
- Custom itemsets for each world
- Permission node to have certain players be ignored as the 'closest player'
- Config setting for not fading found chests and only fading unfound ones
Next Version (0.9)
- Ability to click on certain blocks (settable) with a compass to have the compass point to the nearest chest
- New setting for each world to determine the maximum distance (to the chest) a compass block will adjust your compass for
- Permission node taien.th.compass.world (or *) to allow users to use the compass blocks
- Ability to set a minimum player amount required to spawn chests
- Fix for chests not despawning properly
Known Bugs
- See Ticket section.
Changelog
Version 0.8.2
- Fixed a pretty major bug with high-level chests spawning far too often - weight was being applied correctly but there was a bug in the item generation
- Removed the "set" from the beginning of a lot of commands...felt it was a bit redundant
Version 0.8.1
- Added the per-world config option "GoodItemWeight", which in the same way as "Weight" affects a chest's item generation. Basically, a GoodItemWeight of 3, for example, will make the plugin draw three times for each item, and the best tier of item drawn is used. So a higher GoodItemWeight will cause less common items in rarer chests.
- Added '/th setitemweight' to set the GoodItemWeight ingame.
- Added the global option "MinPlayers", which prevents chests from spawning if the number of players online is less than what it is set to.
- Fixed the command /starthunt, which wasn't working if you didn't specify any information (it now performs correctly when you don't specify any arguments and spawns a chest in a random world with a random value).
- Added an indicator when doing /hunt, /th, or using the hunt tool to show how many chests are currently up in the world you're in.
- Added indicators in /th settings for new settings and some that were missing
- Updated for 1.2.3!
Version 0.8
- The plugin is now fully updated to support multiple worlds. Up until now it really wasn't set up for it. Now you can set specific settings for each world, and enable and disable chest spawning in each world.
- The taien.th.hunt, taien.th.tool, and taien.th.claim permissions have been altered to allow world specific permissions. That means you have to change the old ones to taien.th.hunt.* or whatever if you want the players to be able to use the tool in every world.
- The chest setup has been changed significantly. Each type of chest now has an item set. You can use items with data values as well by instead of having WOOL: 30 (which previously would give you wool in the chest at a value of 30 each) putting in "WOOL:14": 30. (This would give you red wool.) The data value stuff is untested so please let me know if there are problems (but there shouldn't be - I've used the same code before).
- Using the new item sets, a common chest can have only common items. An uncommon can have common and uncommon, and a rare can have rare, common, or uncommon. This same pattern continues through Epic.
- Added the ability to set the kind of block appears under a spawned chest (MarkerBlock), default glowstone.
- Added new commands to set new values.
- Added /th as an alternative to /hunt
- Various bugfixes
- Updated for 1.1_R4
I strongly recommend renaming your current config file to save its data for setting up your new config, as they have been rearranged a bit.
Version 0.7
- Changed permissions support to use Vault, which should hopefully fix all the permissions bugs people have been having.
- This version is tested and working in the latest Dev build of bukkit for 1.1. (This statement will become outdated over time.)
Version 0.6
- Added config option and '/hunt setminmoney' command to set the minimum money a chest will give. (Integer - Only using Vault)
- Added config option and '/hunt setconsumechance' command to set the % chance of a hunt tool being consumed when used. (Integer 0-100)
- Added config option and '/hunt setmoneymultiplier' command to set the (decimal) multiplier of a chest's value to be used as the max money it can provide (the actual amount will be random between the min amount and the chest's value * this). If you set this to 0, money will not be given out in chests.
- Added Vault support to support the new money stuff. It won't work if you don't have it, but can still be used without it.
- Added '/starthunt here <value>' to allow people with the taien.th.admin permission to place chests manually.
Version 0.5e
- Fixed bug with '/hunt setmindist' command.
- Add min distance indicator to '/hunt settings' command.
Version 0.5d
- Support for Bukkit RB 1337 (untested, let me know if there are problems)
- Added config option "MinDistance", which sets the minimum distance a chest can spawn from the center point.
- Added a console output when chests are generated showing how many runs it took to find a suitable location. If this gets too high, try lowering your specificness on requirements for light and distance and such.
Version 0.5c
- Support for Bukkit RB 1317 (Sorry, new stuff coming soon)
Version 0.5b
- Added message "<Playername> is very close to a chest!" when players are within 200 blocks of a chest.
- Added config option "SecondsBetweenChecks", which sets how often a player can use /hunt or the hunt tool. Default is once every 5 seconds. (They can still attempt to use it, but it won't process the request, thus saving the server lots of processing.)
Version 0.5
- Fixed PermissionsBukkit support. Let me know if there are problems, as I do not run this plugin on my server.
- PermissionsEx support
Version 0.4a
- Fixed chest draw interval not being properly read by the program (I had duration in its place for some reason).
Version 0.4
- SuperPerms support(PermissionsBukkit)
- /hunt settings command - lists current settings of TreasureHunt
- /hunt list command - lists all active hunts
- /hunt setweight command - see below
- Added ability to set the types of blocks a chest can spawn on
- Added ability to set the required max or minimum light level.
- Added ability to set the minimum and maximum elevation for chests to spawn on, as well as a separate maximum for chests with value over 3500 (Legendary or EPIC)
- Added ability to turn off the glowstone/soulsand marker under the chest
- Added ability to set downward weight on chest value - default is 2 draws (value is drawn twice and lowest is used)
- Permission: taien.th.tool - use the hunt tool
- Permission: taien.th.hunt - use the hunt command
- Permission: taien.th.claim - ability to claim chests
- Permission: taien.th.notify - ability to recieve TreasureHunt broadcasts
- Permission: taien.th.admin - ability to use /hunt help and all TreasureHunt settings commands.
Version 0.3
- Fixed the glowstone block underneath the chest being breakable.
- Added commands! See above.
- Added configuration options "CenterX" and "CenterZ", which are the coordinates of the center of chest generation. You can also access this value ingame from the new commands (see above). You may need to set this if you have used a previous version, otherwise it will be set to the first world on your server.
- Added configuration option "TreasureWorld", which holds the name of the world that is generating chests. You can access this ingame too!
Version 0.2
- Fixed bug where left-clicking with the hunt tool would sometimes crash the client.
- Added configuration option "MaxDistance", used to set the max distance from 0,0 a chest can spawn.
- Added configuration option "ChestInterval", used to set how often (in seconds) the plugin does a chest chance check to spawn a chest.
- Added configuration option "ChestChance", used to set the chance of a chest spawning. This number is what the chance is out of, so if you set it to 100, the chance of a chest spawning on a ChestInterval is 1 in 100. So, higher is less likely.
- Added configuration option "HuntTool", used to set the tool the player can use to check for the nearest chest.
- Added configuration option "ChestDuration", used to set how long a chest will sit there unfound before it fades, in minutes.
- Added /hunt reload command for ops.
Version 0.1
- Released!
Facts
- Date created
- Oct 15, 2011
- Categories
- Last update
- Apr 01, 2012
- Development stage
- Release
- License
- All Rights Reserved
- Curse link
- TreasureHunt
- Downloads
- 11,222
- Recent files
- R: TreasureHunt 0.8.2 for CB 1.2.4-R1.0 Apr 01, 2012
- R: TreasureHunt 0.8.1 for CB 1.2.3-R0.2 Mar 21, 2012
- R: TreasureHunt 0.8 for CB 1.1-R4 Feb 23, 2012
- R: TreasureHunt 0.7 for CB 1.0.1-R1 Jan 19, 2012
- R: TreasureHunt 0.6 for CB 1.0.1-R1 Jan 02, 2012
- Reply
- #197
Cecelo126 May 17, 2012 at 18:42 UTC - 0 likesWhere do I have to put that permissions nodes? Sorry but I'm new here
- Reply
- #196
shutka May 17, 2012 at 17:56 UTC - 0 likes@disciple218: Go I want to change some texts.
- Reply
- #195
disciple218 May 17, 2012 at 16:54 UTC - 0 likes@shutka: Go
If the license info above says "All Rights Reserved", then I'm guessing the author doesn't want to release the source code. That being the case, talking about decompiling it is bad form. If it lacks a feature you want, why not just put a request in? The author has been very generous about adding requested features.
- Reply
- #194
shutka May 17, 2012 at 15:01 UTC - 0 likesCan we has the source or I should decompile it by my own?
- Reply
- #193
OriginalMadman May 16, 2012 at 13:44 UTC - 0 likes@Taien1: Go
Simply awesome, makes me and the players happy! Thanks for all your hard work, this is one of the most appreciated plugins we got (out of 100+!) :)
damNation.eu - Lots of Plugin fun - Custom Worlds - Developers: FREE donor status!
- Reply
- #192
Taien1 May 16, 2012 at 04:04 UTC - 0 likes@theprint: Go
Make sure you have the world name in the permission:
taien.th.hunt.world or taien.th.hunt.*
Also, there is no permission for the /th list command currently (it's part of taien.th.admin). The command was made for ops to know where they all are...I felt it was too easy if the players knew. If you want, I could put that on the todo list (adding a taien.th.list permission).
- Reply
- #191
Taien1 May 16, 2012 at 04:03 UTC - 0 likes@OriginalMadman: Go
This has already been fixed in 0.9, marked your ticket fixed like the other one :p Just wait until I release it, it's almost done I swear :) I'm working out the bugs.
- Reply
- #190
theprint May 14, 2012 at 01:34 UTC - 0 likesThe bug of having to /op players went away after I updated Vault (in case other people have the same issue).
However, I still have the problem with non-op players not being able to use /hunt list or /th list, in spite of having the permissions set to allow it.
- Reply
- #189
OriginalMadman May 13, 2012 at 22:17 UTC - 0 likes@Cthulhu_craft: Go
Just figured out I had the same problem that chests aren't fading (and my players taking advantage). Placed a ticket.
- Reply
- #188
theprint May 13, 2012 at 02:32 UTC - 0 likesFirst of all - I love this plugin! It's one of my favorites of all time, and the players go crazy when a new treasure is spawned.
I've run into a strange bug, however: I have to /op players before they can participate in hunts. What's really odd is, that I can de-op them and they can still use the tool to track the treasure, but not use the /hunt list command.
I am running the latest recommended Bukkit build using PEX. I have checked that the permissions are registering, which they appear to be - even without the opping - but it's still not working.
Keep up the excellent work - and hope you can crack this nut too.