Inactive [RPG/MISC] BetterLeveling v1.1 - Makes Player Levels Useful [1.4.5-R0.3]

Discussion in 'Inactive/Unsupported Plugins' started by monstuhs, Apr 15, 2012.

  1. Offline

    monstuhs

    BetterLeveling - Make Minecraft player levels useful
    Version: v1.0
    Author: monstuhs

    Resurrected this plugin from the grave. I spent all my time tonight fixing maven dependencies issues so I only had time to compile and ever-so-gently smoke test this with 1.4.5. No clue where I was at with this when I left off so please let me know if you find any bugs.

    BetterLeveling allows you to factor in vanilla Minecraft level to various activities. This uses the vanilla level mechanics so it doesn't rely on it's own built-in leveling system such as mcMMO

    Features:
    • Additional health regeneration per level
    • Chance to crit on attack based on your level
    • Chance to dodge when attacked based on your level
    • Chance to double-drop ore's when mined based on your level
    • Chance to instabreak certain blocks based on your level
    • Can configure the amount of XP lost and dropped on player death
    • Everything is configurable!
    Download BetterLeveling
    View the Source Code

    Configuration
    Code:
    settings:
      WorldName: world
      combat:
        PercentageDamageFromDodge: 75
        PercentageDamageFromCrit: 200
        PercentageDamageFromHeadshot: 200
        MaximumChanceForCrit: 75.0
        MaximumChanceForDodge: 75.0
      death:
        PercentageOfXPDropped: 100
        PercentageOfXPRetained: 0
    activity:
      mining:
        PercentageChancePerLevelToDoubleDrop: 1.0
        PercentageChancePerLevelToInstaBreak: 1.0
      combat:
        PercentageChancePerLevelToDodge: 2.0
        PercentageChancePerLevelToCrit: 2.0
      passive:
        regeneration:
          RegenIntervalInSeconds: 20
          HalfheartsPerLevel: 0.5
    localization:
      stats:
        ChanceToCrit: Chance To Crit
        ChanceToDodge: Chance To Dodge
        ChanceToDoubleDrop: Chance To Double-Drop
        ChanceToInstaBreak: Chance To Insta-Break
        ExtraRegenPerSecond: Extra Regen Per Second
      combat:
        CriticalHit: Critical Hit!
        Dodge: Dodge!
        HeadShot: Headshot!
    Changelog:

    Version 1.1
    * Made "ChanceToDoubleDrop" and "ChanceToInstaBreak" double precision (meaning you can do 0.42 or 3.14159) if you want.

    Version 1.0
    * Updated to 1.4.5 R0.3


    [​IMG]

    Show Spoiler

    Version 0.6 & 0.6.2
    * Insta-break no longer works on blocks connected to things like levers, buttons, doors, etc.
    * Insta-break only works when you are using the appropriate tool (spade for dirt/grass/sand/etc, pick for ore/stone/cobble/etc and axe for wood/logs/etc)
    * Configurable percentage of XP retained on death (default 0%)
    * Configurable percentage of player XP dropped on death (default 100%)
    * All player messages are configurable (which allows localization). You can set the messages in the configuration file (default messages are US English)
    * The "/stats" command now shows the maximum values for crit and dodge chance
    * Changed the "percentage per level" for crit and dodge to be double precision so you can use values like "0.42" or "4.20" or whatever your little heart desires
    * Critical Hit, Dodge, and Headshot messages sent to players can be turned off by specifying '' or "" in the corresponding localization node.

    Version 0.5
    * Updated to bukkit 1.2.5 R3.0
    * Fixed bug where setting chance to instabreak to 0 didn't always work (I'm going to add an on/off configuration setting in the next version)
    * Instabreak only works on Ore blocks now (I plan to make this configurable in the next version)
    * Fixed "ConcurrentModificationException" error
    * Fixed "NagAuthor" warning on disable
    * Fixed bug where "/stats" command would ignore server's maximum value for each stat
    * Download link now uses public dropbox

    Version 0.4
    * Added command: "stats" that shows your current stats
    [​IMG]

    Version 0.3
    * Added regeneration-per-level support (configurable)
    * (Regen per level * player level) is always rounded down

    Version 0.2
    * Fixed bug where skeletons were attempting to make headshots

    Version 0.1
    * Initial Version
     
  2. Offline

    marubal21

    i change for example:
    ChanceToCrit: Chance To Crit to ChanceToCrit: Crit%:
    and it just reverts to
    ChanceToCrit: Chance To Crit once i reload the server.

    I was able to get the stats messages to work. is there a way to completely remove the CriticalHit & Dodge messages from displaying when they happen?

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

    monstuhs

    Glad to hear it, I just got home and was trying to reproduce the issue.

    I will try to make it so that any empty messages won't display. Should have something up tonight shortly


    Ok, just uploaded 0.6.2 which allows you to use empty string values for localized messages. If you use an empty string value (see below for example), the message will be suppressed altogether.

    In this example, critical hits won't be displayed, but dodging and headshots will:

    (Note that those are two single quotes for CriticalHit, not one double quote).

    Config files are finicky, but I tested it out and it works locally. Let me know if you have any trouble with it.

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

    Beimeith

    I have a suggestion for you:

    Can you prevent placed blocks from being double dropped?

    I like Double-drop, but the problem is that it is really exploitable. With even a modest 10% chance to double, someone can easily mine a block, place it, mine it again, and repeat to get unlimited free blocks. With Silk Touch enchantment this works on anything, even Diamond, Redstone, Lapis, etc. I don't want to have to prevent using the feature at all since I think it is cool, but for the moment I have to.

    The best solution I can think of is to record where a certain type of block is placed, (Diamond, gold, etc. [it should be configurable]) and then make it immune to double-drop. This should allow it to work on all naturally occurring blocks but prevent duplication problems.
     
  5. Offline

    needle44

    Suggestion: Can you make it where it requires a "item" to level up. So lets say I got a exp level of 30. I would also need lets say x amount of ender pearls to level up in the first place. Make the number it takes per level up configurable and the item it takes configurable. Thanks for reading.
     
  6. Offline

    monstuhs

    Interesting point; didn't think about this. I'll give this some good thought and try to get a fix in for it for the next version!

    So prevent the player from gaining levels (vanilla mc levels) unless they have a certain item on them? I can look into that.

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

    Beimeith

    Oh, two other things:

    Can you set a maximum chance to double-drop / insta-break?

    Also, can you add a way to change the values/reload the plugin from inside the game? (This may not be possible but I have to ask!)
     
  8. Offline

    needle44

    Yeah ^^ Also an interesting idea is economy support for like exp loss. So if someone has x amount of money on them they lose that x amount of money instead of their exp (they gain the levels back when they spawn) But if they don't have that money then they lose a configurable amount of exp but they don't lose their money, just an idea :p
     
  9. Offline

    kahlilnc

    How about colorful messages preferably custom?
     
  10. Offline

    Beimeith

    Two more for you! I'm on a roll tonight, (I suspect the alcohol)!

    Is there a way to make it permission-based? Basically, if I want one group of people to have insta-break, but not double-drop, or one group to have nothing, and another to have everything?

    Related to the above, can you add multiworld support? From testing it appears that it works for every world I have, and I would like to disable it (partially or totally) in some of them which are supposed to be harder/more dangerous. I don't want people getting lots of extra critical hits there!
     
  11. Offline

    ftfc

    another idea,
    be able to remove specific abilities.
    so for example be able to remove insta-break all together
    or double drop
    or any combination?
     
  12. Offline

    mike8420

    i just received this error on my server

    14:49:29 [WARNING] Can't keep up! Did the system time change, or is the server o
    verloaded?
    15:23:42 [SEVERE] java.util.ConcurrentModificationException
    15:23:42 [SEVERE] at java.util.ArrayList$Itr.checkForComodification(Unknow
    n Source)
    15:23:42 [SEVERE] at java.util.ArrayList$Itr.next(Unknown Source)
    15:23:42 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWor
    ld.java:628)
    15:23:42 [SEVERE] at me.monstuhs.betterleveling.Runnables.RegenerationTask
    .run(RegenerationTask.java:29)
    15:23:42 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(Craf
    tWorker.java:34)
    15:23:42 [SEVERE] at java.lang.Thread.run(Unknown Source)
     
  13. Offline

    monstuhs

    Permissions... like configuration, is one of the less fun areas to work on, which is why I was putting it off =P. I'll dig into it soon. Also, regarding the multi-world support, I'll try to get to that too

    I'll look into it

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

    c0d0h

    Hi, this is the perfect plugin i have been searching for, so that i no longer have to rely on in-house external plugin systems.. so well done for such an awesome plugin :)

    on to business (so to speak).. when entering the /stats command is there any way to not display the max critical or dodge? eg. chance to crit: 0/80.0, i just want to display like 0.0%.

    EDIT
    also, i have tested the retain bit (test at 100) but still loose all of my levels and xp. any ideas?

    Thanks :)
     
  15. Offline

    Niko of death

    Is this compatible with mcmmo?
     
  16. Offline

    c0d0h

    this would be why mine wasnt working .. oops :oops:
     
  17. Offline

    a11111

    I'd like to see an option to adjust the equation that determines how much XP is needed for each level. I tested this plugin on my PVP server and basically what happens is all the top players built huge mob grinders to level up and then completely dominated everyone.

    - Maybe make it so you can change it so it's 3x harder than usual to level up.
    - Or make it so you only get XP from killing other players?
     
  18. Offline

    Heros5k

    How to Install this Plugin?
     
  19. Offline

    monstuhs

    1. Download betterleveling.jar
    2. Put betterleveling.jar into the "plugins" folder
    3. Restart server
     
  20. Offline

    varnado2013

    Make it to where you don't lose levels upon death!
     
  21. Offline

    Trykster

    having an issue setting the % of xp dropped upon death below 100.. when i try to set the value to 50 or 75% it drops nothing.. if i switch it back to 100 it works fine..
     
  22. Offline

    marubal21

    is it possible to make PercentageChancePerLevelToDoubleDrop and PercentageChancePerLevelToInstaBreak work with double precision. cuase i currently use 0.4 on my server but it reads it as 0.
     
  23. Offline

    mike8420

    I have instant break on 0 but everytime i break a stone block it instant breaks, my level is at 97 but shouldnt it not instant break
     
  24. Offline

    Vdrhtc

    Yeah, yeah, permissions support will be just awesome! That's exactly what I need. Nearly infinite possibilities)
    And may be you can add accurate damage data in chat messages, for instance, percentage ratio between dealt damage and full hp of a target or exact value in half-hearts instead of (2x)? That's will be epic
     
  25. Offline

    damnnicholas

    Hey i made a little showcase about this :)


    Mind if you check it out?
     
    kahlilnc likes this.
  26. Offline

    vanmc

    Really great plugin :D
     
  27. Offline

    pablo746

    is there a way i can turn off insta break.
     
  28. Offline

    deatlock

    I really liked the plugin, it improves the game a lot.
    It is extra fun with the monster hunt plugin by the way.

    But i'm having a little issue.
    When i set values diffrent from 0 or 100 to PercentageOfXPDropped an PercentageOfXPRetained it comes out as 0.
    For example if i set both to 50 i'll keep nothing and drop nothing.
    If i set PercentageOfXPRetained to 100 it keeps all my levels.

    Am i doing something worg?
     
  29. Offline

    deatlock

    and another thing
    instabreak still happening even with PercentageChance set to 0
     
  30. Offline

    jdev21

    I'm having the same problems as deatlock.
     
  31. Offline

    AlexCityOfFun

    I have an error on my console. I dont know what is it...
    Code:
    16:28:37 [SEVERE] java.util.ConcurrentModificationException
    16:28:37 [SEVERE]    at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
    16:28:37 [SEVERE]    at java.util.ArrayList$Itr.next(Unknown Source)
    16:28:37 [SEVERE]    at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:628)
    16:28:37 [SEVERE]    at me.monstuhs.betterleveling.Runnables.RegenerationTask.run(RegenerationTask.java:29)
    16:28:37 [SEVERE]    at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    16:28:37 [SEVERE]    at java.lang.Thread.run(Unknown Source)
    Could you solve it?
     

Share This Page