[FUN/MECH] reAnimator v2.2 - bring back the dead [1185]

Discussion in 'Inactive/Unsupported Plugins' started by DKDunnings, Sep 20, 2011.

  1. Offline

    DKDunnings

    reAnimator - Dead bodies come back with vengeance.
    Version: v2.2
    Once a player dies, his/her body comes back to life in the form of a zombie. The corpse holds all the items they would have lost when dying and by slaying it, the items can be retrieved. The spawned entity has a tenth of the players experience as health (eg 100 xp = 10hp).

    Commands:
    • /rest [default: op] - Puts all reAnimated corpses to rest.

    Permissions:
    • 'reanimator.corpse' [default: true] - Corpse spawns at player's death location.
    • 'reanimator.items' [default: true] - Players drops are stored in corpse's inventory.
    • 'reanimator.rest' [default: op] - Allows player to use /rest.
    Download Now v2.2

    Todo:
    • '/rest' command will give all livingDead zombie's items back to their rightful owners.
    Changelog:
    Version 2.2
    • Added /rest command.
    • Added new messages.
    • Fixed loads of bugs.
    Version 2.1
    • Added messages to corpse killer and corpse owner when corpse is slain.
    Version 2.0
    • Renamed from 'Living Dead' to 'reAnimator'.
    • Fixed a few bugs.
    Version 1.2
    • Spawning zombie is configurable.
    • Giving items to zombie is configurable.
    • Lose xp orbs on death.
    • Zombie spawns with 'xp/10' health.
    Version 1.1
    • livingDead zombies spawn with double health.
    Version 1.0
    • Plugin release.
    A BIG THANKS TO Zaros FOR THE AMAZING IDEAS.
     
    Spiritwind and kahlilnc like this.
  2. Offline

    Quizdonkey

    This seems fun!
    Any chance of the ability to configure how strong the zombie is? Or is that impossible without affecting all other zombies
     
  3. Offline

    DKDunnings

    Great suggestion, please explain in a bit more detail what you mean by stronger?
     
  4. Offline

    Zaros

    Attack damage, health, speed? Possibly make it vary by how much xp a user had on them(when the API is available, cancel the xp drop obvs).
     
  5. Offline

    DKDunnings

    Zaros, I love your ideas bro. I'll explore craftbukkit a bit and see how much of this is possible, feedback coming soon.
     
  6. Offline

    Zaros

    If you would like any help, I'll do what I can.

    Edit: I would reccomend decompiling one of the current orb plugins to see what API they use. You would probably find a API that handles the amount on drop(You would figure they set it to 0, so just use the same thing but get the amount they had first. Then, you would want to use that number as a multiplier for the zombie health.
     
    DKDunnings likes this.
  7. Offline

    DKDunnings

    I already coded the orbs not to drop and got the amount of xp the player had. I just need to devise an algorithm suitable for converting xp between 0 and 1000+ to the health of a zombie (who's normal health is 10).

    Maybe something like: health = xp/100 + 10
    Then an xp of 150 (bar and a half) would give the zombie 11.5 health?
    And an xp of 500 (more realistic) would give the zombie 15 health?

    Okay that's done, now just trying to find a way to identify that a zombie is a powerful livingDead zombie. Maybe a puff of smoke on target or perhaps always smoking, like an enderman does.
     
  8. Offline

    Zaros

    I think xp/100 + 10 is too low, I think zombies should go up to like 25-35 health max :cool:. Also, any possible way to cancel the drops onPlayerDeath and instead use them as the drops from the zombie? Maybe random items from the drop instead of everything.
     
  9. Offline

    DKDunnings

    You are full of brilliant ideas. I can store the players drops to the zombie and drop them, but only if the zombie is killed before a server restart. If the server is reloaded or restarted the link between the items and the zombie is broken and the items will be lost forever :eek:.
    For the new algorithm how about just using: [health = xp/10]. This would mean if a player had a lot of experience, say 1000, the zombie would have 100hp and be more difficult to kill.. Hence the more you player the greater risk of losing your items when you die?

    Probably a bit of a silly question, where has onPlayerDeath gone!?
     
  10. Offline

    Zaros

    No one ever asks, so I have them coming out my ears. I got more for ya, you get to pick and choose. :cool:

    Most servers don't go down a lot, so it should be an issue. Even then, if you don't find the zombie a lot will exist. This makes a server restart/reload the perfect cleanser to fix this issue. You might want to add a limit to the amount of zombie that can exist at one time in the config.

    In all honest, I was thinking xp/10 to before you said /100. I changed my mind after thinking how much health 100 health really is (A diamond sword does 5 hearts of damage, where as a human only has 10 hearts.) Bring into consideration that the zombie's damage will also recieve this multiplier (also possibly speed) and it becomes massively unfair and one-sided against the player.

    Not sure, I've never used it. Its probably named something different, peek around bukkit.

    I'll add more info to this in a moment, just want to get this post out first.

    Few more ideas:
    • Zombies killed in sunlight do not drop the items (or possibly anything but player).
    • Zombies give % (configurable) of spawning player's iconomy money (player loses that $ on death, and it is assigned to the zombie with the drops).
    • On zombie death, a message such as "You have freed " + playerName + 's soul and have been rewarded with their items!"
    • Possibly a zombie slay command that cuts the item link (for refresh purposes).
     
  11. Offline

    DKDunnings

    Okay, well I believe onPlayerDeath() has been removed, not to worry. I am using onEntityDeath and checking if entity is a player.
    I am currently using this code to assign the Zombie's health:
    Code:
    Integer exp = (Integer) (p.getTotalExperience()/10);
    if (exp > 200) exp = 200;
    if (exp < 10) exp = 10;
    I then set the players experience to 0 and save their items to a hashMap linked with the zombie entity. This should allow me to check whenever a zombie is killed, whether or not he had a players inventory, if he did then drop the items on the floor.
    I may implement a section of code later to give back any player's inventories..

    What will happen if say Player1 dies, then Player2 kills the zombie? Will Player2 get all of Player1's items!? I think that is a bit overpowered/unfair.
     
  12. Offline

    Zaros

    Not only is the zombie more hard to kill than Player1, but Player2 would get Player1's drops if he killed him anyways. Also, the zombie gives Player1 a chance to get his items back.

    Also might want to implement that people with a certain permission don't pass items to a zombie on death, nor spawn one. What would happen if an Admin died and a player found a zombie full of Lava, TNT and bedrock. Either than or exclude certain items from the hashMap.
     
  13. Offline

    DKDunnings

    I finally got the plugin to set inventory to the zombie and when the zombie dies players items are dropped. Please give it a go see what you think: download
    I need a way to be able to identify regular zombies from livingDead zombies. Maybe change entity from zombie to monster.
     
  14. Offline

    ChumChum

    Can another player kill that zombie?
     
  15. Offline

    DKDunnings

    Yes, and the items will still drop.
     
  16. Offline

    Zaros

    Unfortunately I can't test it because I am at school til 3 and work right after til 10...

    I don't know how you could indentify them, as I have not done much work with mobs other than canceling their spawn. If you set them to Monster, keep in mind that the three new mobs also seem to fall under monster (Or they did before CreatureType.Endermen/Cavespider/Silverfish).

    As for the despawning, yes. It is a draw back, but it is also convenient like server reloads. It will keep it so that not to many zombies are being tracked. I wouldn't reccomend having them drop the items to the ground though. Random item drops all over the world would probably be more laggy than tracking the entities.
     
  17. Offline

    Quizdonkey

    I'm loving how this plugin is turning out, I will definitely use it once all this has been implemented.
    Though I would like to see it configurable weather the zombie has the items, or they just drop as normal, I would hate to see my zombie de-spawn with all my items.
     
  18. Offline

    DKDunnings

    It is currently toggle-able, via permissions. For example if you would like your corpse to re-animate but don't want your items to be given to said corpse.. Just change your permissions to 'reanimator.corpse: true' and 'reanimator.items: false'.
     
  19. Offline

    Quizdonkey

    Fair enough :)
    I do really like the higher experience -> stronger zombie idea
     
  20. Offline

    Plague

    tag me when a stable CB is ready for this
     
  21. Offline

    MHarrison

    Nice plugin, very useful. :D
     
  22. Offline

    kahlilnc

    WOWOWOW I love this idea adding it! :D
     
  23. Offline

    DKDunnings

    I'm glad you like it, if you have any problems PM me or post them here. :)
     
  24. Offline

    kahlilnc

    Ah man cant really test it out. Tried, I cant use 1.8 yet. ;( host wont let me use a bukkit build that is not yet recommended.
     
  25. Offline

    DKDunnings

    This one's ready.
     
  26. Offline

    LlmDl

    @DKDunnings
    Some questions about your plugin:
    I'd like to use your plugin on my temporary-1.8 worlds, but not in my pre-1.8 main world. If a player goes to a 1.8 world, dies and spawns a zombie, then respawns in the main world, will the zombie still exist in the 1.8 world? Can the player travel to where he died and find his corpse/zombie there every time? If they persist, how long do zombies persist for?
     
  27. Offline

    kahlilnc

    Oh great works for me now. Could you please add this to bukkit dev if not yet.
     
  28. Offline

    DKDunnings

    If the zombie despawns then the items are lost. As of yet there is no persistance.
     
  29. Offline

    AVirusC

    Love the plugin, any way you can use the player skin as the zombie for players using spoutcraft? Maybe replace the headblock with the default zombie head, lol. That would rock.
     
  30. Offline

    kahlilnc

    Hm some people cant seem to find a zombie with there stuff on death sometimes. Does it despawn?
     

Share This Page