[MECH] SlowHealth v3.2 - Auto Heal/Hurt Multi-World Permissions [1060]

Discussion in 'Inactive/Unsupported Plugins' started by ACTruncale, Jan 19, 2011.

  1. Offline

    ACTruncale

    SlowHealth v3.2.0

    Download: SlowHealth.jar
    Source included in JAR

    NOW WITH MULTI-WORLD AND PERMISSIONS SUPPORT
    NEW: ADDED BED HEALING


    Version:
    - v3.2.0 tested with CraftBukkit #122-1060​

    Description:
    - Adds health (configurable) every second (configurable) to players on the server.
    - Can hurt player if you make regen-amount negative
    - Can set maximum amount SlowHealth will heal the player by
    - Can set minimum amount SlowHealth will stop hurting the player by (if you set regen-amount to less than 0
    - Can set the starting altitude that slow health with start working
    - Multi-world support
    - Permissions support

    Instructions:
    - Save SlowHealth.jar to plug-in folder
    - Start and stop server to allow Slow Health to create the needed files.
    - Inside your plug-in folder there should be a SlowHealth Folder with three files
    - default.properties
    - world.properties (or whatever your default world is in your server.properties file)
    - WORLDLIST.txt
    - If you only have a single world just change the settings in your worlds property file.

    Adding Worlds to Slow Health:
    - For every world you have add the world name in the WORLDLIST.txt file. One world per line.
    - Run the server and let it create the properties file, then edit it to your liking.​
    - Any world not on the WORLDLIST.txt will use the setting in the default.properties file.​

    Customize Slow Health:
    All values must be in integer form (whole numbers)​
    - regen-rate:1
    - This value is how fast SlowHealth will heal you in second.​
    - regen-amount:1
    - This is how many 1/2 hearts SlowHealth will heal you for.​
    - Set this to a negative number to hurt the player :eek:
    - regen-max:20
    - Controls at what value SlowHealth will stop healing.​
    - regen-min:0
    - This is used if you are hurting the player instead of healing them.​
    - Controls when your stop hurting them. 0 will lead to death.​
    - regen-altitude:0
    - If a player goes below this depth, the will no longer be healed.​
    - Used if you want to make underground harder.​
    - sleep-heal:20
    - When players sleep through the night they get healed this amount.​

    Permissions:
    If using permissions use the node 'slowhealth' for everyone you want to be affected by this mod. Permissions is not needed to use this mod, Slow Health will default to everyone getting healed if not installed.​

    To be added:
    - Fix the plug-in to work if properties is set to spawn-monsters=false.
    - An option to have slow health heal you after a set amount of time after you take damage​
    - An option to heal you only when you are standing still (probably will be mutually exclusive of above option)​
    - Heal only when light is above a certain level​
    - Console controls to edit settings 'on the fly' (will support permissions)​
    - Suggest more please...

    Credits:
    - Code modified from Silence's SimpleGod code and Protected's SlowHealth 1.0.
    - Also credit to feverdream, Drakia, Edward Hand


    Change Log:

     
  2. Offline

    ACTruncale

    Yeah the forcing people to eat thing was the idea behind having a negative regen-rate. Of course I'd never do that to either... kind of sadistic :)
     
  3. Offline

    Daveyo

    superb addon.

    Suggestion: make it so they can buy back health through iconomy or buy more health than 20 total hearts. just some ideas
     
  4. Offline

    ACTruncale

    Humm... that is an interesting idea. Buying health with iConomy I think is out of this mods scope, but I might take a stab at creating a seperate one. I haven't seen a mod yet that incorporates buying health.
     
  5. Offline

    rct2guy

    Thanks a lot! I feel like 1.5 keeps monsters dangerous, while still not as threatening.
     
  6. Offline

    barghest

    I have it set at 4.2. That turns out to be a very slow regen, but it's not so slow that you really need to bring healing items with you. Try lowering it even more than 1.5 and see what you think.
     
  7. Offline

    Legolas75893

    Suggestion:
    Maybe make it so you can set it to when a zombie attacks you,you start to lose health...instead of always just losing health?
     
  8. Offline

    ACTruncale

    Kind of like a zombie disease? That sounds like another cool plug-in that could be made. And to cure it you have to eat cake or something haha.
    I set mine to 8secs :)
     
  9. Offline

    Legolas75893

    Exactly.
     
  10. Offline

    Binaryclock

    In craftbukkit, it regenerates like 5 health per every 1 second, even though in the logs it says 1 heart per 1 second on server load.

    Anyone else getting this? I even disabled all other plugins to test.
    --- merged: Feb 5, 2011 6:24 PM ---
    An update:

    This seems to be a conflict with SimpleServer wrapper. SimpleServer seems to send multiple updates events for health. After I removed the SimpleServer wrapper, the plugin works as excepted.
     
  11. Offline

    Cozoq

    This plugin does not seem to work as intended when spawn-monsters=false in server.properties. In this case, the default healing occurs, regardless of slowhealth plugin settings. This plugin needs to disable/override that default healing. (Vanilla server has autohealing of 1/s when spawn-monsters=false).

    Example 1:
    spawn-monsters=false
    regen-rate=5
    regen-amount=1
    regen-max=15
    ^^Does not work. You quickly heal to full health always.

    Example 2:
    spawn-monsters=true
    regen-rate=5
    regen-amount=1
    regen-max=15
    ^^Works perfectly.
     
  12. Offline

    ACTruncale

    Good Find! I will ask around if there is a way to override the healing for no-monster-spawn (easy mode).
     
  13. Offline

    Maluzis

    I have a little problem on my server with bukkit. I do not have any plugins installed, the server is freshly taken. Despite this, my life is still to recover. I do not want to be so.

    In server.properities I entered two lines such as:
    enable-health=true
    auto-heal=false

    Nevertheless, I still have a problem. What can I do about this?

    PS: I had download this:
    Code:
    http://bamboo.lukegb.com/browse/BUKKIT-CRAFTBUKKIT-271/artifact
    PS2: spawn-monsters=false - is this a problem?
     
  14. Offline

    ACTruncale

    PS2: spawn-monsters=false - is this a problem? [/quote]
    The problem is with monsters set to false the auto healing comes back on. There is no way currently (that I know of) to turn it off
     
  15. Offline

    TopShopGamer

    Thanks for the mod. Here's a suggestion: have configurable health ranges with individual settings in each. An example being between 0.5 and 3 hearts you gain 0.5 of a heart every 5 seconds. From 3 to 7 you gain 0.5 hearts every 30 seconds. From 7 to 10 then, you don't regenerate at all.
     
  16. Offline

    skawke

    Is it possible to have Permissions intergrated? :D
     
  17. Offline

    ACTruncale

    Yes it is possible :) it may or may not happen. I am not sure what you'd want to be permission'd out though?
     
  18. Offline

    RainRain

    Maybe for a command to reload settings for it?
     
  19. Offline

    ACTruncale

    Humm that might work. A command to change the regen-rate etc on the fly. Maybe a disable enable too. I'll work that in on the next release.
     
  20. Offline

    skawke

    For example, errr only Mods and Admins can have their health regen'd, stuff like that :D
     
  21. Offline

    Maluzis

    You can do to the script subtracts health? Then partially overlooked the problem.
     
  22. Offline

    ACTruncale

    Yeah I'll look at supporting Permissions. Though I know the second I do, Bukkit will release their own :)

    I am currently working on a new 'unnamed' mod that is taking up most of my free time though :)
     
  23. Offline

    Gutter

    I have some suggestions. In fact, I registered just now because I saw your plea for some :) If I understand how the modding thing work, they have to be "non persistent", right?

    Is it possible to make the regeneration rate change depending on the player's movement, or even his position?

    The player could regenerate faster if he isn't moving, or if he is standing in the light. Not to interfere with any vampire mods out there (??) but it would make sense to regenerate faster when you are more "calm". Sunlight (or beign outside? can you detect that?) could make the healing rate faster than torch light/being inside.

    A "changing rate", or one that triggers after X ms, would require some data per player, but it wouldn't need to be saved, so it might help? But even without it, just having the rate halved when moving, or when there is no light, would be amazing.
     
    Junubee likes this.
  24. Offline

    Shadowsquire

    Just wondering before I update, is there a way to set the regen rate below 1 second? Like .5 seconds (half a second) or something?
     
  25. Offline

    ACTruncale

    yes just set the rate to 0.5 and that should work
     
  26. Offline

    Drakia

    I've noticed that if you reload the plugin (By using the reload command in the bukkit console) the Timer isn't stopped, and then you have two timers running and healing. I modified the plugin to just add
    m_Timer.cancel();
    to the onDisable() function and that makes it work properly.
     
  27. Offline

    Biebboek

    Just for your information: this plugin does not work anymore on CraftBukkit #304:


    Feb 12, 2011 3:41:24 PM org.bukkit.craftbukkit.CraftServer loadPlugins
    SEVERE: For input string: "0.25" (Is it up to date?)
    java.lang.NumberFormatException: For input string: "0.25"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:481)
    at java.lang.Integer.parseInt(Integer.java:514)
    at adam.SlowHealth.SlowHealth.onEnable(SlowHealth.java:59)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:135)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:410)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:175)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:74)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:55)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:171)
    at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:158)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:110)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:209)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
     
  28. Offline

    Drakia

    I'm pretty sure regen-amount, regen-max, and regen-min are integers, so it's not that the plugin doesn't work, your config is wrong. Re-read the first post about how to config.
     
  29. Offline

    Biebboek

    Oh, this is my fault! Thanks for your help, and sorry for the false accusation.

    I can now confirm this works on #304! :)
     
  30. Offline

    ACTruncale

    Thanks! I just noticed that too. I'll change it and upload the new file.
    --- merged: Feb 13, 2011 10:28 PM ---
    Update Posted
     
  31. Offline

    Daveyo

    permissions support or even iconomy support would be awesome. Great addon
     

Share This Page