[ECON/MISC] DeathPenalty v1.08 - Take money from players when they die [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Pandemoneus, Jul 11, 2011.

  1. DeathPenalty by Pandemoneus
    Version 1.08

    This plugin makes players lose money when they die. This includes a configurable threshold, amount lost and messages.

    Features:
    • Players lose money when they die
    • Gives money to player killers
    • Configurable via a YML file
    Downloads:
    Requirements:
    • iConomy 5.0 OR BOSEconomy 6.2 (if both installed for whatever reasons, iConomy will be used)
    • Permissions 3.x (optional)
    • WorldGuard 5.2.3 (optional)
    Configuration:

    Launch once to create a configuration file.
    It is then located at /plugins/DeathPenalty/config.yml.

    Options are:
    • Money: [amount] - money to lose on death
    • TargetMinMoney: [amount] - money a player must have at least to lose money at all
    • LosePercentage: [amount] - percentage of the money the player should lose when he dies -- NOTE: this will be used instead of "Money" if not 0.0
    • BalanceCanBeNegative: [true, false] - determines whether the player's money can be negative after subtracting
    • FloorAfterSubtraction: [true, false] - determines whether the player's money should be floored (rounded down) after subtracting (iConomy only)
    • ShowMsgOnDeath: [true, false] - determines whether a message is shown on the player's death
    • NotEnoughMoney: [message] - shows this message when a player dies but didn't have enough money
    • LostMoney: [message] - shows this message when a player dies and when he had enough money -- Use <Money> to make the plugin insert the amount lost, <Currency> to display the currency name and finally <Percentage> if you want to show the percentage defined in 'LosePercentage'
    • GiveMoneyToKiller: [true, false] - determines whether the player who killed the victim should receive the money lost by the victim
    Permission Nodes:

    Commands:
    • deathpenalty (alias: dp) - shows the help
    • deathpenalty reload (alias: dp reload) - reloads the plugin
    • deathpenalty info (alias: dp info) - shows the currently loaded config
    Donations:

    [​IMG]

    Changelog:
    Version 1.08
    • Penalty money is now cut off after the second decimal
    Version 1.07
    • Added PermissionBukkit support
    Version 1.06
    • Added customizable version for the killer message
    • Added new tag <Victim> to display the victim's name
    • Added new tag <Killer> to display the killer's name (only works when you were actually killed by a player, of course)
    Older Versions (open)

    Version 1.054
    • Slight restructuring of code which should also fix a NullPointerException
    Version 1.053
    • Attempt to fix multiple subtractions and loss of money although player did not die (NOTE: as always, needs testing for PvP)
    Version 1.052
    • Killer should really receive money now (NOTE: Test it)
    Version 1.051
    • Added message for the killer that he received money
    Version 1.05
    • Added PVP reward (NOTE: This needs testing, I can't do that on my own)

    Version 1.04
    • Added BOSEconomy support
    • Added Permission 'deathpenalty.losemoney' that makes only certain players lose money on death
    Version 1.03
    Note: Had a big typo in the plugin name. Make sure you reconfigure everything and delete the old plugin!
    • Added WorldGuard support
    • You can now set whether penalties get applied in WorldGuard regions
    Version 1.02
    • Added more tags, <Percentage> and <Currency>
    • Fixed bug causing an exception in replaceTag
    • Added support for more than one occurence of a tag in a string
    Version 1.01
    • Added percentage removal
    Version 1.0
    • Initial release
     
  2. Offline

    m0dulus

    Very nice, but there are many other plugins that does the same thing. I guess this is supposed to be lightweight since it only takes money.

    Why hasn't this been approved yet?
     
  3. I made the plugin on request, because the other available were outdated.
     
  4. Offline

    Khan Jal

    Thank you for the plugin :) Just installed to our server and already hated. They'll grow to love it. Muhaha.
     
  5. Offline

    morizuki

    can you add a permission that only a group will be penalty for dying??
     
  6. Offline

    Ratchet

    this would be good!
     
    morizuki likes this.
  7. Offline

    ROFLBOB

    How do you edit the WG regions so that it doesn't take money away on death? I have MobArena installed and it takes their money when they die, so I'd like to put the arena in a region to stop that.
     
    morizuki likes this.
  8. Offline

    Ratchet

    this is exactly what I use the region option for, mob arena. just create a worldguard region around the arena, and it works. you can't control specific regions it will not remove money when you die in ANY region.

    as an addition to the plugin could I request a PVP option so if you are killed by another player the money you lose goes to the killer?
     
  9. Offline

    ROFLBOB

    To add on to that, I'd also like to request that you be able to list and specify which WG regions would/wouldn't take money on death.
     
  10. Offline

    jckmcgraw

    I use BOSEconomy, not iConomy... No good for me. Maybe you could include BOSE?
     
  11. Sure.

    To be honest, there are already other plugins for that. =/

    Hey, at the moment there is no way for Plugin Devs to set custom tags to certain regions, that's why I couldn't include it in that release. I am sorry, but you will have to wait until WorldGuard enables that. =/

    I will see what I can do. ;)

    Version 1.04
    • Added BOSEconomy support
    • Added Permission 'deathpenalty.losemoney' that makes only certain players lose money on death

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

    Ratchet

    that's true, but this is nice and lightweight. plus, if I use another plugin to handle that, people who die in PVP will still lose their regular amount from dying, aswell as have money stolen when killed in PVP
     
  13. Offline

    Ratchet

  14. Version 1.05
    • Added PVP reward (NOTE: This needs testing, I can't do that on my own)
     
  15. Offline

    Ratchet

    my players report it not working, also could it tell the killer that they got the money from the person they killed?
     
  16. I just killed myself and it did work.

    Version 1.051
    • Added message for the killer that he received money
     
  17. Offline

    embty

    Ill test this.
    Edit: couldnt test since Im using essentials eco :(
     
  18. Offline

    Ratchet

    isn't working for me, tested a few times now, killer doesn't recieve money or get any message
     
  19. In that case: I need you to give me the plug-in names of the other plug-ins having a pvp reward and that are open source OR I need a server where someone can test with me.
     
  20. Offline

    Ratchet

    I don't have any other plugins that affect PVP / deaths
     
  21. No, that was not what I wanted from you. Earlier you said:

    Which are those other plug-ins you are talking about?
     
  22. Offline

    Ratchet

    any other plugin that I might have used to take money on pvp-death
     
  23. Offline

    panade

    for some reason it doesnt work for me. i use permissionbukkit cout that be a problem? (yes i also use the bridge)
    and does the plugin detect if a permission is intalled or how does it take this (optional) flag for permissions.
    this plugin would be realy what i need.

    if i try commands or killing someone (with permissions set) just nothing happens. if i ise /dp it says yopu are not authorized to use this command. unless i am in the group with the permissions for the help ... well
     
  24. Offline

    panade

    got it working now -> pvp reward also doesnt working for me :-\
     
  25. I can't do anything about that when I don't have a server (with another player) to test it on. =/

    [edit]
    Version 1.052
    • Killer should really receive money now (test that please)
     
  26. Offline

    dark_hunter

    Tested:
    [​IMG]
     
  27. @dark_hunter: Thanks, did you set the percentage to 100% or why was it 3x 0.0 Dollars afterwards? (assuming you did kill him 4 times)
     
  28. Offline

    dark_hunter

    Nope only once then it spat out the message 4 times. My config follows:
    Code:
    ### Learn more about how this config can be edited and changed to your preference on the forum page. ###
    Version: '1.052'
    Penalty:
        Money: 250
        TargetMinMoney: 0.0
        LosePercentage: 0.0
        FloorAfterSubtraction: false
        BalanceCanBeNegative: false
        WorldGuard:
            noPenaltyInWorldGuardRegions: false
        Messages:
            ShowMsgOnDeath: true
            NotEnoughMoney: Lucky you! You didn't lose any money.
            LostMoney: You lost <Money> for dying!
        PVP:
            GiveMoneyToKiller: true
    
     
  29. @dark_hunter: Could you do another test for me?
    Please kill someone with at least 1000 dollars. And which economy system are you using?
     
  30. Offline

    nightbird804

    i used this plugin and when a creeper explodes next to me it says i lose money from dying even though im still alive. this seems to happen every time i get hurt and it lowers my hearts significantly but not enough to die.
     

Share This Page