Inactive [ECON/RPG/FUN] TreasureHunt 0.8.2 - Randomly-placed treasure goodness! [1.2.4-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by Taien, Sep 27, 2011.

  1. Offline

    Taien

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Unfortunately, the chest generation can be taxing on weaker servers. It also could be caused by having too tight of requirements for the chest location (like light levels, distance, etc). What it does is basically picks a random location within the distance you specify, and then checks if that location meets the requirements. If it doesn't, it picks another spot and checks, repeat repeat repeat until it finds a spot.

    I plan to add a MaxChestGenRuns option for you to specify how many times it can attempt to find a spot before it gives up, thus saving your server from that lag. If you have a weaker server, you could set it to like 100 or something and you probably wouldn't notice any lag. I've had chest generation runs in the thousands of attempts on my server and it only lags a second or two even at that amount. So adding that option will be the best I can do in that regard. :) Or maybe I can find a way to have it space out its attempts over time.

    It's probably a permission issue. If you have a permissions plugin installed and the th.hunt permission isn't set to your players, they won't be able to use it. If you're not using a perms plugin or Vault at all, it will default to allowing people to use the command. So I think it's probably a perms issue.

    When a chest is generated the plugin picks a total value for the chest, between 0-5000, and may also draw a few more times if you have the DrawWeight set above 1. It will take the lowest value of the randomly picked numbers, and use that as the base value for the chest. The values in the config file for each item represent how much of that total value each item of that type takes up. The chest will populate with items until it hits or exceeds slightly the total value. So if you want less items in chests, set their values higher.

    Soon, you'll be able to set different sets of items to appear in each level of chest. Also, I'm adding multiworld support soon as well.

    Keep watching the bukkitdev section for this plugin. I may have it updated tomorrow. (Sorry, I've been working 50 hour weeks lately plus running my own server and programming for it, so I have neglected this plugin slightly, and I apologize for that). I have a r3 build working on my server which fixes some of the bugs in the ticket section, but I need to add those features I just mentioned in the previous paragraph before I release it. It won't take long. I'm getting pretty decent at this. :p

    As for the efficiency of the plugin...I'll probably go through and rewrite sections of it soon as well. This plugin was initially created when I was at more of a 3 or 4/10 level on minecraft plugin coding, and I'd say I'm up to about a 7 or 8/10 now. :p
  2. Offline

    Dan Schu

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    How can I resolve this problem? I don't have an economy installed, if that's whats being problematic. The code below is what I have been getting when I try to start the server.
    Code:
    18:45:23 [SEVERE] Error occurred while enabling TreasureHunt v0.7 (Is it up to date?): net/milkbowl/vault/economy/Economy
    java.lang.NoClassDefFoundError: net/milkbowl/vault/economy/Economy
        at me.taien.TreasureHunt.onEnable(TreasureHunt.java:147)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:230)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1057)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:379)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:191)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:174)
        at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:357)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:344)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Caused by: java.lang.ClassNotFoundException: net.milkbowl.vault.economy.Economy
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 11 more
    
    I tried setting the money multipliers (money in the config.yml) to 0, and that didn't help.
  3. Offline

    Taien

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I assume you don't have Vault installed either then right?

    I'll look into the code and make sure it's properly handling the case when Vault isn't around.
  4. Offline

    sleite

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Couple of suggestions:

    1) The /starthunt command should start a hunt immediately without requiring any additional parameters. There could be a 'default setting' set up in the config to make this work nice. It's a nice easy and quick way for an admin to start a hunt without having to think. (I have so many plug-in's on my server, it's a real chore to remember commands. Heck, I couldn't even remember /hunt ... I had to lookup the plug-in to remember how to access the help).

    2) IF a hunt is already started, does a player get notified of this if they log in to the server after the fact? I haven't tried this, but, if this isn't the case, then I would like to suggest that when a player logs in to the server and there is already a hunt underway, that the play is notified of the hunt.

    Still testing the plug-in. I like the concept. Keep up the great work.
  5. Offline

    Taien

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Fairly sure you can already /starthunt without parameters. If not, I can add it with the next version.
  6. Offline

    Taien

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Version 0.8 released! See BukkitDev for the download.

    The file will be available as soon as it is approved, or you can click the download link in the description for the project as well to download it from MediaFire. It is made for version 1.1-R4. See BukkitDev for all other information :) Thanks for your interest in my plugin, people.
  7. Offline

    dypo25

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Idek how to make a hunt! Plz tell me, someone!
  8. Offline

    bigboy2013

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is there a way for permissions I can use a two-word world name? The world is called "Stack-n-Craft World" So how would i write that in permissions?
  9. Offline

    Taien

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That's a good question. I'm pretty sure world names like that are impossible, so you must be talking about a MultiVerse alias. Currently the plugin doesn't handle those, so it should instead have the folder name of your world (usually 'world'). In the case of multiple worlds, it's always the folder name of the world.
  10. Offline

    Taien

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Version 0.8.1 released!
    See bukkitdev thread for details and downloads :)
  11. Offline

    bigboy2013

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Actually, I just noticed that now. Apparently our host allows two-word worlds. But Apparently just "Stack-n-Craft World" in quotations works fine for treasurehunt. Its not a multiverse world either, its the main world. I didnt mean to name the world in two words, but I just didnt think before I did it lol... It makes using alot of plugins complicated.
  12. Offline

    Sketaful

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Just rename it then?
  13. Offline

    ne0x86

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    hi,

    i configured all /hunt parameters good but when i try to /starthunt 4000 an internal error appears,


    Any idea?

    This post has been edited 1 time. It was last edited by ne0x86 Mar 29, 2012.
  14. Offline

    Taien

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can you post the error (with line number) that you get in console?
  15. Offline

    Taien

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    New version 0.8.2 released! See bukkitdev for details :)
  16. Offline

    ihazdiamondpick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    MMMMMMMMMMMM, I must look in to this
  17. Offline

    ihazdiamondpick

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  18. Offline

    ne0x86

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i installed now the new version, but the error persist. When y make /starthunt, this error appears in console:

    CONSOLE: Placed stronghold in INVALID biome at (52, -23)
    TreasureHunt: Location selection took 136 runs.
    TreasureHunt: Location selection took 53 runs.
    and "internar error ocured" appears in game
    any idea? i want this plugin :(
  19. Offline

    frownnn

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    How do I force the chests to fade away? Instead of waiting out the time for it to fade?
  20. Offline

    ne0x86

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    pelase, can confirm if this plugins needs vault to run?
  21. Offline

    Wolf1026

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is there a way to make it start in a specific area? My server [players] would enjoy this, and we have a big Arena to play events in. However, I don't want chests spawning out of the Arena. So is there a function that allows you to start the hunt in a specific area, or is it not possible?
  22. Offline

    Flamez44

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I would just mention to fix alot of these problems, you could add like a world edit/worldguard type of optional dependency so u could select the area u want chests 2 spawn in, with in a very specific manor.
  23. Offline

    Sketaful

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Love this plugin. Been using it since it first came out (almost atleast).

    I do have some ideas/requests thought. I've asked about the possibiliy to add the location of the treasure to the dynmap before and that is something I'm still interested in seeing happen.

    I do however have some more ideas about dynmap+treasurehunt=true. :)
    Fiorst. To be able to disable using rotten meat (or anything else for that matter) and /hunt to find the treasure. To be able to get the treasure market on dynmap instead. would also like to be able to config how exact the marking on dynmap should be. Letys say a mark means its right under it or that it could be in a cirkle of X blocks from the marking. (nothing of this should affect the random dept it arrives at.)

    I would also love if this idea got even more expanded so that every time someone finds a treasure there is a new mark on the map (a permanent mark until removed by admin) with the info on Who found the treasure and the date/time of the find and if the treasure was a normal, epic etc.).

    Just ideas but I like my ideas. No prob if you don't thought :)
  24. Offline

    CarePenguin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    When I start my server, TreasurHunt says I don't have Vault installed, but I have Vault. And also when I type in /starthunt command, it gives a warning message saying [WARNING] Can't keep up! Did the system time change, or is the server overloaded?

    Here is the complete message:
    Code:
    20:07:07 [INFO] Starting minecraft server version 1.2.5
    20:07:07 [INFO] Loading properties
    20:07:07 [INFO] Starting Minecraft server on 192.168.0.105:25565
    20:07:07 [INFO] This server is running CraftBukkit version git-Bukkit-1.2.5-R3.0-b2203jnks (MC: 1.2.5) (Implementing API version 1.2.5-R3.0)
    20:07:07 [INFO] [PermissionsEx] sql backend registered!
    20:07:07 [INFO] [PermissionsEx] file backend registered!
    20:07:07 [INFO] [PermissionsEx] PermissionEx plugin initialized.
    20:07:08 [INFO] [SimpleChestLock] Loading SimpleChestLock v1.0.1
    20:07:08 [INFO] [Vault] Loading Vault v1.2.16-b184
    20:07:08 [INFO] [PermissionsEx] Loading PermissionsEx v1.19.2
    20:07:08 [INFO] [PermissionsEx] Initializing file backend
    20:07:08 [INFO] [TreasureHunt] Loading TreasureHunt v0.9
    20:07:08 [INFO] [Vault] Enabling Vault v1.2.16-b184
    20:07:08 [INFO] [Vault][Permission] PermissionsEx found: Waiting
    20:07:08 [INFO] [Vault][Permission] SuperPermissions loaded as backup permission system.
    20:07:08 [INFO] [Vault][Chat] PermissionsEx found: Waiting
    20:07:08 [INFO] [Vault] Enabled Version 1.2.16-b184
    20:07:08 [INFO] Preparing level "world"
    20:07:08 [INFO] Default game type: 0
    20:07:08 [INFO] Preparing start region for level 0 (Seed: -85510008131247269)
    20:07:09 [INFO] Preparing spawn area: 32%
    20:07:10 [INFO] Preparing start region for level 1 (Seed: -419048195935531023)
    20:07:10 [INFO] Preparing spawn area: 3%
    20:07:11 [INFO] Preparing spawn area: 65%
    20:07:12 [INFO] Preparing start region for level 2 (Seed: -419048195935531023)
    20:07:12 [INFO] [SimpleChestLock] Enabling SimpleChestLock v1.0.1
    20:07:12 [INFO] [PermissionsEx] Enabling PermissionsEx v1.19.2
    20:07:12 [INFO] [PermissionsEx] Superperms support enabled.
    20:07:12 [INFO] [PermissionsEx] v1.19.2 enabled
    20:07:12 [INFO] [Vault][Permission] PermissionsEx hooked.
    20:07:12 [INFO] [Vault][Chat] PermissionsEx_Chat hooked.
    20:07:12 [INFO] [TreasureHunt] Enabling TreasureHunt v0.9
    20:07:12 [INFO] [TreasureHunt] Activating...
    20:07:12 [INFO] [TreasureHunt] Vault not found.  No money will be found in chests.
    20:07:12 [INFO] [TreasureHunt] Loading configuration.
    20:07:13 [INFO] [TreasureHunt] Loaded 0CompassBlocks.
    20:07:13 [INFO] [TreasureHunt] Loaded world 'world'
    20:07:13 [INFO] [TreasureHunt] Settings for 1 worlds loaded.
    20:07:13 [INFO] [TreasureHunt] Loaded 0 items successfully.
    20:07:13 [INFO] [TreasureHunt] Activated.
    20:07:13 [INFO] Server permissions file permissions.yml is empty, ignoring it
    20:07:13 [INFO] Done (4.921s)! For help, type "help" or "?"
    >treasurehunt
    20:07:24 [INFO] Unknown command. Type "help" for help.
    >starthunt
    20:07:38 [INFO] [TreasureHunt] Location selection took 321 runs.
    20:07:38 [INFO] [TreasureHunt] Hunt (world): 1863,22,-2026 - Value: 1146
    20:07:38 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    
    Please help.

    Thanks,
  25. Offline

    Sketaful

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Well, You have vault and you have Treasurehunt but you don't seem to have any economic plugin. :)
  26. Offline

    Sketaful

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You can change the radius in which the chests are spawning in the config and from what X/Y location the radius should start from.
    Code:
    WorldOptions:
      world:
        HuntTool: ROTTEN_FLESH
        MarkerBlock: GLOWSTONE
        ChestChance: 100
        ChestInterval: 60
        ChestDuration: 60
        MaxDistance: 2000       < - - - Radius
        MinDistance: 0
        CenterX: 0        <- - - X Coords
        CenterZ: 0        < - - - Y Coords
  27. Offline

    CarePenguin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    OK. Thanks. I will go find an economic plugin. But what about warning message?
  28. Offline

    Sketaful

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Install an economic plugin first an see if that removes the warning. Could be it. Othervise we'll just take another look at it. :)
  29. Offline

    CarePenguin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks. The warning is gone after I installed an economic plugin. Another question, after someone claimed the chest, how can I destroy the chest or will it just go away by itself?
  30. Offline

    Sketaful

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm not really sure. Never removed a chest. :p

    But if you're op or admin, just try breaking it.

Share This Page