[RPG/FUN] PvPReward v1.1 - Killers steal money from their victims [953]

Discussion in 'Inactive/Unsupported Plugins' started by Codisimus, Mar 31, 2011.

  1. Offline

    Codisimus

    This page will no longer be updated. Please follow this project at the Bukkit Dev Page

    PvPReward - Killers steal money from their victims:
    Version: 1.1 (7/16/2011)
    Supports iConomy, BOSEconomy, Essentials, Permissions
    Download Page

    This plugin adds to PvP, in addition to any items that may be dropped, players also steal money from the players they kill. The amount stolen is configurable but is defaulted as follows. (Other variations explained below)

    This plugin does more than just add to PvP, it has many other features for when a player dies of natural causes.

    [​IMG]
    Description:
    Show Spoiler

    Scene01:
    Bob and Jacob have done nothing, all stats are base:
    KARMA POINTS: 0
    DROP PERCENT: 10%
    500 COINS IN ACCOUNT

    Scene02:
    Bob attacks and kills Jacbob, this will do the following things:

    - Bob will gain 2 karma points
    - Jacob will lose 1 karma point ( if he is at 0, it will stay at 0 )
    - Bob's chance for drop of gold will be increased by a 2% modifier if his karma is less than 50
    - If the chance for drop of coins from Jacob ( the killed ) is a success, a random value ( default range of 0%-5% ) will be taken from Jacob's bank account

    Scene03:
    Bob has been bad, and has killed lots of people, he kills Jacob again, the following things occur.

    - Bob will gain 2 karma points putting him over the 50 karma making him an outlaw
    - Jacob will lose 1 karma point ( cannot go below 0 )
    - Bob's chance for drop of gold will be increased to 100% since he is considered an ( outlaw ) and still gains +2 karma
    - If the chance for drop of coins from Jacob ( the killed ) is a success, a random value (default range of 0%-5% ) will be taken from Jacob's bank account

    Scene04:
    Jacob kills bob after bob has 52 karma, the following occurs:

    - Bob will lose 1 point of karma taking him down to 51
    - Bob is still an outlaw so he has 100% chance of drop of gold/coins
    - Jacob WILL NOT earn karma points because he killed an outlaw

    Show Spoiler

    For example: If the modifier is set to 20, whenever an outlaw kills a non-outlaw, he gets 20% more coin on top of the rewards he already would have gotten (if he successfully gets the drops in the first place). Likewise, if the modifier was set to 150, he'd get 150% more coin.

    Now, more in-depth and complex mode: The modifier increases after certain karma thresholds. For example: You have set your options in the config file as follow: karmaThreshold: 10, outlawModifier: 2, modifierMax: 50

    With this, every 10 karma after 50 (60, 70, 80, etc.) will grant the outlaw a 2% bonus to all drops stolen. After it reaches 50% extra drops stolen, it stops increasing (as based on the modifierMax variable). It seems complex, and it's probably not for everyone, but it'd be cool in my opinion.

    (All of that is amount of coin stolen, not the rate at which they drop them, to make it clear!)

    Config Settings:
    Show Spoiler

    RewardType may be any of the following:
    • Karma
    • FlatRate
    • Range
    • Percent
    • PercentRange
    • PercentKDR
    All other settings depend on what the reward type is set to.
    Karma:
    This type has the most features, It is explained above^, the settings are as follows:
    • Percent - The base percentage for calculating whether there will be a drop
    • Amount - The amount of Karma needed to be considered an Outlaw
    • High - The maximum percentage that could be taken from a killed players account
    • Low - The minimum percentage that could be taken from a killed players account
    • OutlawModifier - Outlaws steal an additional x%
    • KarmaThreshold - Increase OutlawModifier every x kills
    • ModifierMax - OutlawModifier will not go beyond x
    • Last three are further explained above
    FlatRate:
    The Killer will always steal a specific amount from the killed, the settings are as follows:
    • Amount - The amount of money that will be stolen upon each murder
    • All other settings don't matter
    Range:
    The Killer will steal an amount of money within a given range, the settings are as follows:
    • High - The maximum amount that could be taken from a killed players account
    • Low - The minimum amount that could be taken from a killed players account
    • All other settings don't matter
    Percent:
    The Killer will steal a certain percent of the killed players total balance, the settings are as follows:
    • Percent - The percent of money that will be taken from a killed player account
    • All other settings don't matter
    PercentRange:
    The Killer will steal a percent of money within a given range, the settings are as follows:
    • High - The maximum percent that could be taken from a killed players account
    • Low - The minimum percent that could be taken from a killed players account
    • All other settings don't matter
    PercentKDR:
    The Killer will steal an percent of money based on the two players KDRs. You receive a higher percent from players with a higher KDR (formula is killedKDR/killerKDR). This percent is taken from the killed players total balance. No settings are used.

    Features:
    • Configure how much money people get
    • Several reward methods/algorithms
    • Option to lose money upon death, whether PvP or not
    • Option of having tombstones instead of players dropping items
    • KDR Leaderboard
    • Configurable combat time
    • Optional penalties for logging or teleporting while in combat
    • Fully customizable messages
    • MultiWorld support
    • Uses iConomy, BOSEconomy or Essentials for money
    • Restrict use with Permissions
    • Included in CraftBukkitUpToDate for easy updating (make sure you come check the changelog if somthing is not working right)
    Commands:
    • /pvp kdr - Display total kills and deaths
    • /pvp karma - Display current Karma level and Karma level to be an Outlaw
    • /pvp outlaws - List current Outlaws
    • /pvp kdr - Display total kills and deaths
    • /pvp rank - List current rank
    • /pvp top - List top 5 KDRs
    Permissions:
    • pvpreward.getreward - no reward if killer does not have this node
    • pvpreward.givereward - no reward if killed does not have this node
    • pvpreward.ignoredeathtoll - will not be charged money when dying
    ToDo:
    • Add Leaderboard
    • Add option of changing an Outlaws permission group *Still trying to figure out the Permissions API
    • Add cooldown for Karma
    • Add drop options
    Changelog:
    Old Versions + ChangeLog can be found at Download Page
    Show Spoiler

    Version 1.1 (7/16/2011)
    • Added Permission node for Ignoring DeathToll
    • Fixed kdr values getting reset
    • Fixed errors when Logging in combat
    • Added color support for all customizable messages
    Version 1.0 (6/26/2011)
    • Added config options
    • Penalties are now optional
    • Added a Penalty Message (DenyTeleMessage)
    Version 0.9 (6/26/2011)
    • Improved OP options
    • Updated Economy support
    • Got rid of Karma commands for non Karma users
    • Added grave feature
    • Added Leaderboard
    • Added cooldown for Karma
    Version 0.8.1 (6/13/2011)
    • Fixed PvP registering
    • Fixed money amount messages
    Version 0.8 (6/12/2011)
    • Cleaned up code/fixed errors
    Version 0.7.2 (6/4/2011)
    • Cleaned up errors and added error messages
    Version 0.7.1 (6/3/2011)
    • Various fixes and code cleanup
    Version 0.7 (6/3/2011)
    • Added Essentials support
    • Added customization options
    • Added option of losing money open death
    • Changed ModifierMax to support negative values
    • Added configurable combat time
    • Added penalty for logging or teleporting
    Version 0.6 (5/4/2011)
    • Updated to iConomy 5
    • Updated to build 740
    • Few various fixes
    Version 0.5 (4/15/2011)
    • Improved Karma system
    • Fixed percent of steal
    • Added /pvp commands
    • Added [Outlaw] tag
    Version 0.4 (4/4/2011)
    • New karma based reward system (set as default)
    • Added Permissions support
    Version 0.3 (3/31/2011)
    • Initial Release
     
    Joh, kahlilnc and Mitsugaru like this.
  2. Offline

    Tauryuu

    Can you make an OP Permissions for this as well?

    Non-OPs have getreward and givereward.
    OPs get everything.
     
  3. Offline

    Codisimus

    I have to relook all of my op permissions bc I must not have coded them right, so I will do this for all my plugins
     
  4. Offline

    Vittek

    Sure server name is swisscraft.eu just connect and if I'm not around ask a admin to check things out and reload plugins.
    Also worth noting that it worked ONCE for once player, where he'd got karma and money. It never worked again after that. Combat time at 5 seconds.
     
  5. Offline

    embty

    This my servers ip you are welcome to test it: FactionAction.fragnet.net
     
  6. Offline

    Codisimus

  7. Offline

    Vittek

    ok heres some of the log:

     
  8. Offline

    Codisimus

  9. Offline

    Vittek

    Testing...

    Seems to work. People are registering kills.
    Now just need a non debug version and it's awesome!

    A new problem: People getting karma and it says the loot money, but the money doesnt get added to them. iConomy5

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

    Codisimus

    sweet I was pretty sure it would work but didn't want to take out the debuggers till I was certain I'll push an update now
     
  11. Offline

    Vittek

    As said, everything seems to work, with karma, but it only says money gets stolen but it's not actually getting added to their account.
     
  12. Offline

    Codisimus

    using iConomy? is money lost from the deathtoll?
    anyways v0.8.1 is up
     
  13. Offline

    Vittek

    iConomy5 on my case. Neither lost or gained, only the message popped up.
     
  14. Offline

    Courtney

    Sorry to ask but on the downloads page which old build would I download to work with CB 818?
     
  15. Offline

    Codisimus

    I am just about to release the next version which should work on build 818 as well as 860
     
  16. Excellent, just in time! About to release our server ;)
     
  17. Offline

    Courtney

    Oh alright, thanks :3
     
  18. Offline

    Codisimus

    UPDATED! I tested it myself but maybe just to be safe try it out first

    forgot to tag you ^

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

    embty

    Just installed it. Server restart everytime someone is killed :eek:
    this the config:
    Code:
    #Config file for PvPReward
    #Plugin made by Codisimus
    
    #Supported Economy plugins:
    #BOSEconomy, iConomy (4 or 5), Essentials
    
    Economy=Essentials
    
    #If set to true, money amount will not use decimals
    
    WholeNumbers=true
    
    #This is the amount of time that you will stay in combat (in seconds)
    
    CombatTime=30
    
    #These are the messages that players will see while using PvPReward
    
    KilledMessage=<amount> was stolen from you upon death\!
    KillerMessage=You stole <amount> from <killed>
    KilledNotEnoughMoney=<killer> took pity on you for being so poor\!
    KillerNotEnoughMoney=It was not worth stealing from <killed>.
    OutlawBroadcast=<killer> is now an outlaw\!
    NoLongerOutlawBroadcast=<killer> is no longer an outlaw\!
    KarmaDecreased=Karma decreased to <karma> for being killed\!
    KarmaIncreased=Karma increased to <karma> for killing <killed>\!
    KarmaNoChange=No change in Karma because <killed> was an outlaw\!
    DeathTollMessage=You dropped <amount> while dying\!
    
    OutlawTag=[&9Outlaw&f] <name>
    KarmaName=karma
    OutlawName=outlaw
    
    #Seperate from the RewardType, players will lose money everytime they die
    #DeathTollType can be set to Percent or FlatRate
    
    DeathTollType=Percent
    DeathToll=1
    
    #List of possible values for RewardType
    #Karma, FlatRate, Range, Percent, PercentRange, PercentKDR
    
    RewardType=Karma
    
    #The following settings only matter if the RewardType is Karma
    #KarmaThreshold - Increase OutlawModifier every x kills
    #OutlawModifier - Outlaws steal an additional x%
    #ModifierMax - OutlawModifier will not go beyond x
    
    KarmaThreshold=10
    OutlawModifier=20
    ModifierMax=200
    
    #The following settings depend on the RewardType(more info below)
    
    High=10
    Low=1
    Percent=100
    Amount=20
    
    ##Karma:
    
    #Percent - The base percentage for calculating whether there will be a drop
    #Amount - The amount of Karma needed to be considered an Outlaw
    #High - The maximum percentage that could be taken from a killed players account
    #Low - The minimum percentage that could be taken from a killed players account
    
    ##FlatRate:
    #The Killer will always steal a specific amount from the killed
    
    #Amount - The amount of money that will be stolen upon each murder
    #All other settings don't matter
    
    ##Range:
    #The Killer will steal an amount of money within a given range
    
    #High - The maximum amount that could be taken from a killed players account
    #Low - The minimum amount that could be taken from a killed players account
    #All other settings don't matter
    
    ##Percent:
    #The Killer will steal a certain percent of the killed players total balance
    
    #Percent - The percent of money that will be taken from a killed player account
    #All other settings don't matter
    
    ##PercentRange:
    #The Killer will steal a percent of money within a given range
    
    #High - The maximum percent that could be taken from a killed players account
    #Low - The minimum percent that could be taken from a killed players account
    #All other settings don't matter
    
    ##PercentKDR:
    
    #The Killer will steal a percent of money based on the two players  KDRs. You receive a higher percent from players with a #higher KDR  (formula is killedKDR/killerKDR). This percent is taken from the killed  players total balance. No settings are used.
    this is the log error:
    Code:
    2011-06-13 23:47:52 [SEVERE] Could not pass event ENTITY_DEATH to PvPReward
    java.lang.IndexOutOfBoundsException: No group 2
    at java.util.regex.Matcher.group(Unknown Source)
    at java.util.regex.Matcher.appendReplacement(Unknown Source)
    at java.util.regex.Matcher.replaceAll(Unknown Source)
    at java.lang.String.replaceAll(Unknown Source)
    at PvPReward.PvPRewardEntityListener.getMsg(PvPRewardEntityListener.java:177)
    at PvPReward.PvPRewardEntityListener.dropMoney(PvPRewardEntityListener.java:77)
    at PvPReward.PvPRewardEntityListener.onEntityDeath(PvPRewardEntityListener.java:59)
    at org.bukkit.plugin.java.JavaPluginLoader$52.execute(JavaPluginLoader.java:605)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:146)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:393)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:432)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:184)
    at net.minecraft.server.EntityHuman.d(EntityHuman.java:542)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:861)
    at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Using bukkit 860 with combattag 2.4 just incase its needed.
     
  20. Offline

    Codisimus

    does it still crash with only PvPReward running (not CombatTag)
     
  21. Offline

    embty

    Ill remove CombatTag.
    Edit: its still does after removing combattag.

    Code:
    2011-06-14 00:05:37 [SEVERE] Could not pass event ENTITY_DEATH to PvPReward
    java.lang.IndexOutOfBoundsException: No group 2
    at java.util.regex.Matcher.group(Unknown Source)
    at java.util.regex.Matcher.appendReplacement(Unknown Source)
    at java.util.regex.Matcher.replaceAll(Unknown Source)
    at java.lang.String.replaceAll(Unknown Source)
    at PvPReward.PvPRewardEntityListener.getMsg(PvPRewardEntityListener.java:177)
    at PvPReward.PvPRewardEntityListener.dropMoney(PvPRewardEntityListener.java:77)
    at PvPReward.PvPRewardEntityListener.onEntityDeath(PvPRewardEntityListener.java:59)
    at org.bukkit.plugin.java.JavaPluginLoader$52.execute(JavaPluginLoader.java:605)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:146)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:393)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:432)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:184)
    at net.minecraft.server.EntityHuman.d(EntityHuman.java:542)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:861)
    at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-14 00:05:37 [INFO] [HeroicDeath] Aced killed embty wielding diamond sword
    2011-06-14 00:05:37 [INFO] [CONSOLE] Server is restarting. World is being saved.
    A longer version.

    any ideas?

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

    GmK

    @Codisimus

    I know you want to use your page for downloads, but could you please please add wget-friendly download links? I cannot update your plugins at all via my dedi :/
     
  23. Offline

    Codisimus

    I am currently moving to a different website and I'll try to make it more continent but wut is dedi?
     
  24. Offline

    Blackstorm72

    Dedi = Dedicated Server. Likely he/she uses SSH tunneling and needs a wget linux version (direct download link)
     
  25. Offline

    NEO

    @Codisimus

    8.1 Confirmed working on CB 860. The only thing that doesn't seem to work is getting a players money when killing them. The first kill i get the message i stole some of there money, second kill i didn't get a message at all. Using iconomy 5.01. Thanks for the update :)
     
  26. Offline

    embty

    Do you use heroic death in your server?
     
  27. Offline

    NEO

    Yes, getting no errors and the death message displays fine after a kill.
     
  28. Offline

    embty

    Ok I think the crash is happening for me because Im using essentials eco.
     
  29. Offline

    mattekure

    CB 860, PVP 0.8.1

    getting error on death

    Code:
     [SEVERE] Could not pass event ENTITY_DEATH to PvPReward
    java.lang.NoSuchMethodError: com.nijikokun.register.payment.methods.iCo5$iCoAccount.<init>(Lcom/iConomy/system/Account;)V
    at com.nijikokun.register.payment.methods.iCo5.getAccount(iCo5.java:47)
    at PvPReward.Register.getPercentMoney(Register.java:24)
    at PvPReward.PvPRewardEntityListener.dropMoney(PvPRewardEntityListener.java:74)
    at PvPReward.PvPRewardEntityListener.onEntityDeath(PvPRewardEntityListener.java:59)
    at org.bukkit.plugin.java.JavaPluginLoader$52.execute(JavaPluginLoader.java:605)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:146)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:393)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:432)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:184)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:727)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:678)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:671)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  30. Offline

    Codisimus

  31. Offline

    mattekure

Share This Page