[MECH/FUN][INACTIVE] TheBlackPlague v0.2.5 - Start a plague and watch it spread [1185]

Discussion in 'Inactive/Unsupported Plugins' started by Everdras, Jul 23, 2011.

  1. Offline

    Everdras

    The Black Plague:
    1. Start plague
    2. Watch it spread
    3. ???
    4. Profit.

    Version: 0.2.5


    Features:
    • Simulates a plague
    • Can start/end plague by command (default at load: plague is off).
    • Can infect and cure players by command
    • Can adjust 90% of things you would want to adjust with it. When you see X, Y, Z, etc below, it means YOU can pick the number. Defaults are listed in the "Options" section.
    • Plague is started 'naturally' by a player being within X blocks of a zombie upon its death AND has a chance when simply being damaged by a zombie.
    • Plague is cured by only one means: death. (Or maybe you could give the cure command to a priest class or something, and have them bind the command to a stick... who knows.) Note: death to anything but the plague does not cure the plague. You must die by a plague tick to remove it.
    • Plague does X damage every Y seconds, and every time it does damage it spreads to anyone within Z blocks.
    • Supports Permissions 3, but does not require it. Nodes listed below.
    Download: JAR - Fully updated, thread safe, and imbued with my own blood sweat and tears.
    Source: GoogleCode

    Permission Nodes:
    Show Spoiler

    • BlackPlague.toggle - /bp on & /bp off
    • BlackPlague.infect - /bp infect playername
    • BlackPlague.cure - /bp cure playername
    • BlackPlague.options - all 'options' commands



    Usage:
    Show Spoiler

    • /bp on - turns the plague on
    • /bp off - turns the plague off
    • /bp infect playername - infects the player whose name is playername with the plague.
    • /bp cure playername - cures the player whose name is playername from the plague.
    Note: Commands that require a player's name are case-sensitive and the name must be fully typed out.


    Options:
    Show Spoiler

    • /bp interval serverticks | sets the time between ticks. 20 server ticks = 1 second. Note: if your logs are outputting the "can't keep up!" message from too many players being on, then it may be less than 20 ticks per second. I can't change anything about that.
    • /bp damage halfhearts | damage done per tick, in half hearts. So if you want the tick to do 8 hearts, set it to 16
    • /bp playerdist blocks | distance at which you will be infected by another player
    • /bp zombiedist blocks | distance at which a zombie will infect you as it 'explodes' (dies)
    • /bp zombiechance percent | % chance a zombie will infect you on attack (45 = 45%)
    • /bp explodechance percent | % chance a zombie will infect you on death (45 = 45%)
    My suggestions:
    • Don't set damage below 0, or to be super huge*.
    • Don't set time to be negative. It can be hours, if you want, but this would make the damage a bit easy to eat through. Just don't pass 9.223 quintillion server ticks.
    • Don't set distances to be negative or to be super-huge**.
    • Don't set percents to be negative or over 100.
    *Over 2.147 billion
    **Over say, 50-100.


    Changelog:
    v0.2.5-
    • Rewrite complete- thread safe!
    v0.2.0-
    • Can set interval, damage, % chances to infect on zombie attack and explode, and distances at which zombies and players will infect people.
    • Zombies attacking you will now infect you too.
    v0.1.0-Initial Release

    TODO:
    -Use 'smart' player name matching. I.e. can type out the first part of someone name for a command, and it will 'autocomplete' it for you. I think this is implemented...?
    -carriers
    -flatfile config
    -exposed method to infect



    KNOWN ISSUES:
    -Uses non-thread safe API. I'll need to do a rewrite of a lot of the code. Fixed.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
    kahlilnc and Noppoly like this.
  2. Offline

    iPhysX

    I like how this can be used as a punishment when im angry at people :) Nice job
     
  3. Offline

    Dimochka

    Oh god it's ZOMBIE APOCALYPSE
     
  4. Offline

    Coelho

    Brilliant
     
  5. Offline

    RazorFlint

    Wait.
    Profit of a pluage?
     
  6. Offline

    Everdras

    You've never heard of the "x ? profit" meme?

    Here, it stems from this joke made in south park...

    [​IMG]
     
  7. Offline

    RazorFlint

    @Everdras I was meant to insert a xD At the end of that sentence but anyways...
     
  8. Offline

    Plague

    Nobody simulates me, not moving to releases.
     
    colony88 and cholo71796 like this.
  9. Offline

    Everdras

    [​IMG]
     
    colony88, Mukrakiish and Samkio like this.
  10. Offline

    vrox

    Suggestion:
    Carriers. Theres a chance that when you get it, it doesn't affect you, and you don't even know its there for a while. But you can still spread it to other people unknowingly.
     
  11. Offline

    Everdras

    Hm. I like it. I'll put it in.
     
  12. Offline

    cholo71796

    Hahahahah!
     
  13. Offline

    Catjjc

    Awesome plugin, our dev team are really interested in using this in an upcomming project. I wonder if it's possible to put a configurable % on the chance of being infected by the zombies, it'd be amazing if it's possible!

    Thanks, keep it up :)
     
  14. Offline

    Everdras

    I'm going to provide an update within a week or so, here are planned changes:
    Show Spoiler

    • minor performance increase (data structure changing from LinkedList to BST, changing how the thread behaves while it's in-between damage ticks). Though you likely won't be able to tell the difference anyway, since you probably have idle cores on your CPU which means this plugin is simply running on a different core than minecraft and thus not impacting its performance anyway.
    • adding 'carriers,' see above
    • allowing admins to set damage done, tick interval, distances at which the plague spreads (on player damage tick and zombie death), adding option to make zombies only infect a % of the time. Will make the user-defined options persist between plagues and plugin reloads.
    • possibly going to change it so that zombies attacking you is what infects you. It had been my intention for it to work like this from the start, but I wasn't able to figure out how to do it. I think I've found a way to do it now though.
     
  15. Offline

    Catjjc

    Wow,
    Wow awesome, sounds great!
     
  16. Offline

    Everdras

    Ok, I think everything is pretty much updated.

    Things that I had to push back:
    -data structure switch
    -carriers

    Things to look for in the next release:
    -a cure (I'm thinking cake or mushroom soup. Or perhaps the poisonous mushroom.)
    -carriers (for real this time)
    -data structure switch
     
  17. Offline

    SneakyBeaver189

    What are the affects of the plage?
     
  18. Offline

    aidanhd500

    omg south park reference!!!!!!!!!! YOU ARE AWSOME
     
  19. Offline

    Everdras

    Read "Features."
     
  20. Offline

    Catjjc

    The new changes rock Everdas, can't wait for the cure!
     
  21. Offline

    Spectre

    Wow I really like this idea, It will be fun to see what it develops into. I love the idea of a plague, especially because my server has a quarantine already set up. I think it would be very interesting to make some other symptoms for the plague, like slow movement, possibly cloudy vission, maybe even black outs every once in a while. Those are my suggestions and I really like this plugin so keep up the good work!
     
  22. Offline

    Everdras

    I've certainly been thinking about fleshing out the effects of the plague. One thing that I would like to see or know is how the plague behaves when it's on a server with more than just me and my one test buddy.

    So anyone that has feedback, good or bad, please post it here. Leave me with a general description of your impression of it- was the spreading mechanic behaving well? How did players react to it?
     
  23. Offline

    Spectre

    Well you'll have to find a different guy for that, I have a small server, so I have no idea if it lags or messes up when there is a ton of players. I won't mind joining a server if you need me for a big test. So PM me if you need me.
     
  24. Offline

    Moe041991

    sweeeet!

    the notepad and notepad++ screw up the config. How to open it properly?

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

    Everdras

    Config is only done in-game. The config file is a serialized java object, don't try to edit it. It should've had the .ser file extension unless I suck. It is marked as a .ser. So yeah. Don't try to edit it manually.
     
  26. Offline

    Moe041991

    It does Sir Everdras. Looking forward to the update!

    A flatfile config would be nice tho

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

    locutus

    I concur. Also, this seems to use a whole bunch of CPU. I had craftbukkit eat a whole second core after I installed it.

    I would also like an exposed function to give someone the plague. I have a plugin that needs to punish certain behavior, and giving them the plague is perfect!
     
  28. Offline

    Everdras

    Hotfixed the cpu issue, I think. Redownload and try it now, please report back with the results.

    I'll see what I can do about an exposed function.

    Putting flatfile config into the next release.
     
    locutus likes this.
  29. Offline

    pherce

    We usually have 40 people online at night and would love to give this a go, but we constantly keep getting this error and everyone times out. Only fix is a stop/start.

    Code:
    2011-08-03 11:58:50 [SEVERE] java.lang.NullPointerException
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.EntityLiving.v(EntityLiving.java:711)
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.EntityLiving.m_(EntityLiving.java:218)
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.World.entityJoinedWorld(World.java:1198)
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.World.playerJoinedWorld(World.java:1180)
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.World.cleanUp(World.java:1104)
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:447)
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    2011-08-03 11:58:50 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-03 11:58:50 [SEVERE] Unexpected exception
    java.lang.NullPointerException
        at net.minecraft.server.EntityLiving.v(EntityLiving.java:711)
        at net.minecraft.server.EntityLiving.m_(EntityLiving.java:218)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1198)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1180)
        at net.minecraft.server.World.cleanUp(World.java:1104)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:447)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-03 11:58:50 [SEVERE] Exception in thread "Thread-140299"
    2011-08-03 11:58:50 [SEVERE] java.lang.NullPointerException
    2011-08-03 11:58:50 [SEVERE]     at org.bukkit.craftbukkit.entity.CraftEntity.getNearbyEntities(CraftEntity.java:149)
    2011-08-03 11:58:50 [SEVERE]     at me.everdras.blackPlague.PlagueThread.run(PlagueThread.java:68)
    
     
  30. Offline

    Everdras

    That's odd. I'll look into it, but from what I can tell at this point a null entity is getting passed into the array of people to infect. Which is weird, and I've never seen before. I'll try for a hotfix right now though.

    EDIT: Hotfixed. Please redownload and report back with results. Or more stack traces. Also make sure you're on RB 1000 or higher.
     

Share This Page