[FUN] LevelUp v0.3 - Adds levels/experience and perks to Minecraft [766]

Discussion in 'Inactive/Unsupported Plugins' started by dgahimer, May 12, 2011.

  1. Offline


    Plugin: LevelUp - A plugin to add levels and experience for certain tasks to Minecraft
    Version: 0.3

    LevelUp allows players to gain experience from various activities, gain levels, and use those levels to acquire perks to aid certain skills.

    <Edit by Moderator: Redacted mediafire url>

    * Gain experience from mining, de-foresting, and digging
    * Track levels gained from experience
    * Use levels to gain perks (currently the perk is static: players have a (1 - .995^(level - 1))% chance of instantly destroying blocks )
    * Permissions support

    * Always back up your server. Always. For this plugin, for other plugins, even if you aren't using plugins. Back up your server.
    * Download LevelUp.rar from the above Mediafire link
    * Extract the .rar to the plugins folder
    * If desired, navigate to plugins/LevelUp and open block_xp.prop in your favorite text editor. Change the numbers to change how much experience each block is worth
    * Currently, the amount of XP needed to reach a given level is found by the formula: XP = 10,000 * level

    /levelup [username] - When used without an argument, /levelup sends the XP and level to the player who
        calls the command. If the caller is not a user, it tells the user that the command may not be used.
        With an argument, it returns the level and XP of the username sent
    * levelup.command -- a user with this permission is able to use the command above
    * levelup.level -- a user with this permission is able to gain experience
    * levelup.perk -- a user with this permission is able to user level perks

    MySQL Support:
    The "properties.prop" file has 7 mandatory fields and 2 optional fields that need to be filled out to use a MySQL database. The fields are:
    - * use-database= If this field is true, the server tries to use a database

    * database-type= In this field, you need to input the database software you are using. Currently, MySQL is the only software supported

    * database-host= This is the host name of the SQL server you are using

    * database-port= This is the port number of the SQL server (default is 3306)

    * database-name= This is the name of the database you with to use

    * database-user= This is the username you wish to use with the SQL server

    * database-password= This is the password you with to use with the SQL server

    * database-table-chars= This is the name of the table you wish to use for characters (default levelupcharacters)

    * database-table-blockxp= This is the name of the table you wish to use for block xpl (default levelupblockxp)

    For those of you who have previously used my plugin or who start without using a database and proceed to implement a DBMS solution, it will automatically convert from file to a database. This will delete your files once added to the database. Remember what I said about backing everything up earlier? I highly recommend you do that. If this ruins any characters, I apologize, but in my admittedly brief testing, it worked flawlessly.

    * Added support for MySQL

    * Reworked leveling algorithm. It now takes (20000 * level)xp to reach the next level

    * Added functionality to track blocks placed by users to prevent farming ores
    * Removed the ability to instantly destroy blocks the user interacts with (buttons, doors, levers, etc.)

    * Added levels, experience, Permission support, and level perks

    * Add more perks, and allow the user to choose between them (with the server-configurable choices on whether to allow or disallow the possible perks)
    * Add "give xp" and "remove xp" commands
    * Add support for more dbms's
    * Multiworld support
    * Feel free to make suggestions

    Thanks for reading this far!
    Last edited by a moderator: Dec 14, 2016
    ssdx123 likes this.
  2. Offline


    So right now the only perk is instant block destroy for x% chance?
  3. Offline


    Yessir, that would be correct. I'm planning on adding the ability to have blocks have extra drops, trying to determine a way to increase the speed of breaking blocks (I wanted this initially, but since that didn't work yet, I substituted it for the chance to instantly destroy a block), increase damage to mobs, etc.

    Additionally, I'm going to add XP for killing mobs, etc. Again, all this will be configurable on/off and xp values by server admins.
  4. Offline


    Ahh, I was hoping you weren't going to add double drops :oops:. Would it be possible to NOT get skill points if you're destroying a block that was placed by the user? This would make people not be able to dupe ores.

    The only reason I dislike and don't use mcMMO is simply because of easy ore duping... :( Hopefully you can get something worked out! :)
  5. Offline


    By default, for ores, it only gives XP for mining the actual ore. I didn't think you were able to replace an ore into the ground, but if I'm wrong correct me. It will allow you to replace stone, dirt, etc. but given the abundance of that anyway, I wouldn't think it is an issue. If this is an issue you are concerned about, however, I can look into a way to track blocks the user has placed. My only concern for this would be that it could quickly become a burden on the server, but it is certainly worth a shot.

    As far as double drops, it'll be something you can configure. In the future, when there are multiple perks, I'm going to allow the admins of each server to set which perks are enabled on the server through a config. file, so if you did not want double drops, you could disallow them entirely.
  6. Offline


    You can place iron ore, when you mine iron/gold, etc it gives you the ore haha, anyways Ok.
  7. Offline


    Hmm, yeah, I forgot that happened with iron and gold. I was thinking of redstone and diamonds. I'll look into a way to fix that tomorrow
  8. Offline


    -Change it to unlimited levels.
    -Set a custom title for a rank range example: 0-10 = newbie. 10-15 = Ore hunter etc.
    -Each title can access different commands (permissions)
  9. Offline


  10. Offline


    Added the changelog
  11. Offline


  12. Offline


    There's no reason for this to get deleted. There are several leveling up plugins out there, and if this even differentiates by '1' measly feature, then its a valid, unique plugin. Besides, this plugin is stil in VERY early development, from the looks of it, and there's no telling what he plans to add to it in the near future.
  13. Offline


    i think that all of this is a great idea. however, in your post near the top, you said you would add killing mobs get experience. I think you should gain some experience by killing other people in a defined "arena." you could set as you would with defining an area you want to cuboid. Hope this gets put in! Thanks[torch]
  14. Offline


    In order to reach level 11 you have to break 51200 dirt or 20480 stones, you might want to reconsider your xp needed formular :D

    Since the xp gained is static the level curve should be linear and not exponential, took me around 3-4h to get to leve 8, every level doubles the needed xp, do the math ^^ 25% instabreak on level 62 seems a bit low too considering the time spent to reach it....like your whole life :D

    Besides that, add a highscore to show the top10 players with level orderd by their xp (xp not shown) :cool:

    Oh and i really like the basic idea of your plugin, lightweight and doing what it's supposed to do :)
  15. Offline


    Thank you, DrBoweNur. This is a plugin a friend wanted me to write, and I decided to release it to the public to save any inexperienced admins trouble if they want something like this.

    Bseagull, I think that would be a great feature to give people the option to use. It might be down the road, but I'd like to give players the opportunity.

    @Chumber Yeah, I agree. I'm going to work on a better formula, but I was just trying to get something down for the time being. If you change the values in the "plugins/LevelUp/block_xp.prop" then you can alter how much XP is given per block, but I know this is only a slight fix, as it doesn't overcome the fact that XP required to level doubles at each level.

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


    Yeah i won't touch the block_xp.prop file, i might alter the xp needed curve and everything will adjusts itself, if i change the xp gained per block AND the xp needed afterwards everything is messed up, this way no one will be punished for playing before everything is fine tuned ^^

    Going to clone your source now :D
  17. Offline


    Sounds a little like... DnD?
  18. Offline


    Yeah, I didn't remember what the exact DnD leveling formula was, but I thought it was something near that, so that was why I used that one for the time being
  19. Offline


    I would do it like this:
    You need Level * 5000 and after every up your xp resets to 0
    You need another var (the level) in your serialized object but thats about it and you won't run into the limit of long :D

    5000 might be too low, takes around 10-15 mins to mine those with stone, that makes it 16h to level from 61 to 62 which sounds about okay if my 15 mins are correct :D and you can level way past 62 to get higher instabreak ratio...

    EDIT: Okay i just checked, i make 10k xp in 5 mins with dia shovel and cobblestone, need better numbers :D
  20. Offline


    That's quite a bit of xp in just a few minutes. I'm sure I can figure it out, though. I like that idea
  21. Offline


    I pushed some numbers and 20000*level might work, this way you need 10 min more for every level, i would also save name, level, xp and totalXP into sql, load that stuff into an object on player join, write it back on level up, player leave and server shutdown.

    totalXP because if you change the formula it's the easiest way to recalculate everyones level and i'm pretty sure you will never reach the max value of LONG (it's like mining diamond ore).

    With 20k it looks like this, you could even add a hell level like every 10 level you need double xp or something ^^
    Thats 17 days and 12 mins digging to reach level 100, if you never hit any ores of course - hmm not sure but i think thats okay :D
  22. Offline


    I'm getting this error
    14:31:52 [SEVERE] Could not pass event BLOCK_DAMAGE to LevelUp
            at me.dgahimer.LevelUpBlockListener.onBlockDamage(LevelUpBlockListener.j
            at org.bukkit.plugin.java.JavaPluginLoader$26.execute(JavaPluginLoader.j
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
            at org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDamageEvent(C
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:8
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:433)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
  23. Offline


  24. Offline


  25. Offline


    Using 740 myself, no problem at all.

    Ah LOOL @dgahimer disable insta break on doors, chests, furnace and other items you have to hit to activate, just broke a chest - no fun at all :D
    Meister likes this.
  26. Offline


    Oops, thanks for letting me know about that mistake. I'll fix it ASAP. I also appreciate the work you've put into figuring out leveling numbers for me!

    @Meister, I'm really not sure what that problem with be, but I'll troubleshoot it when I get a few minutes
  27. Offline


    Punching with your fist through stone is quit cool though :D
  28. Offline


    I just uploaded a new version. The changes are reflected above, but include negating the ability to instantly destroy a blocks a user interacts with and a tracking mechanism so that users cannot farm ores.
  29. Offline


    Very nice, destroyed one full chest and 2 doors so far :D

    How far back do you track blocks?
  30. Offline


    Right now, they're tracked forever. (Well, unless you delete the data file.) Its going to put some ridiculous stress on the server after a while, but I haven't really had time to make a better system. I'm pondering the idea of just making it track ores/rare blocks because, really, with the plethora of dirt and stone, those don't really need tracked. I'm not certain though. My next two projects are to fix the leveling system and then use JDBC to connect to databases

Share This Page