[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

    Vittek

    Well everything seems to work fine now on 860 with the latest PvPRewards! As promised here's the 50 bucks donated!
     
  3. Offline

    GmK

  4. Offline

    Vittek

    Just one minor issue though: The outlaw prefix disappears after a server restart. Or when the player with it relogs
     
  5. Offline

    Blackstorm72

    @Codisimus
    Try Dropbox - that file sharing with public links is direct download (wgettable) and works wonders for them.
    www.dropbox.com
     
  6. Offline

    Codisimus

    @Vittek
    Thanks for the support, I'll look into the prefix issue as soon as I get back home
    @GmK
    @Blackstorm72
    I use dropbox but never figured out how to create links for files. maybe you could point me in the right direction?
     
  7. Offline

    mattekure

    Ok, I did some testing and it turned out to be some kind of clash with the iConomyChestShop plugin. I updated to their latest beta and everything started working.
     
  8. Offline

    Blackstorm72

    When you go in dropbox look for your 'Public' folder.
    Click on that folder to enter that folder then click on the file that you wish to link and look for the arrow on the right of the file;
    Click that arrow and 'Copy public link' and then you can use that link :)
    If you need more help I'll gladly PM you - Dropbox is sometimes confusing :p
     
  9. Offline

    Vittek

    Oh one more thing I'm noticing whenever pvp is going on:

    Numbers like


    Will pop up in the console. Leftover debugging?
     
  10. Offline

    Codisimus

    uhh yes, sorry about that
     
  11. Offline

    Preston Taylor

    Server restarts upon killing somebody. using essentials economy.
     
  12. Offline

    jeffreylec

    iConomy 5, Permissions 2.x, bukkit 860, DeathTP, ecoCreature perhaps? I dk what else would make it do this.

    Code:
    2011-06-20 13:22:05 [SEVERE] Could not pass event ENTITY_DEATH to PvPReward
    java.lang.StringIndexOutOfBoundsException: String index out of range: 15
        at java.lang.String.charAt(String.java:694)
        at java.util.regex.Matcher.appendReplacement(Matcher.java:723)
        at java.util.regex.Matcher.replaceAll(Matcher.java:823)
        at java.lang.String.replaceAll(String.java:2201)
        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)
     
  13. Offline

    MG127

    on CB928
    Code:
    2011-06-24 08:38:36 [SEVERE] Error occurred while enabling PvPReward v0.8.1 (Is it up to date?): null
    java.lang.NullPointerException
        at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
        at java.lang.Double.parseDouble(Unknown Source)
        at PvPReward.PvPReward.loadConfig(PvPReward.java:133)
        at PvPReward.PvPReward.onEnable(PvPReward.java:44)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:157)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  14. Offline

    Hojop25

    Sorry bout this but im an UBER noob, basically... I have money that is "/money" and one that is "/balance" money only adds to the /money one which i cant use on my sign shops plugin.... Sorry for such idiorcy but PLEASE help!
     
  15. Offline

    Endign

    Add compatibility with Factions plugin, maybe?
     
  16. Offline

    T4L_Goose

    What's not compatible about it? I run factions and it works fine. You mean integrate it?
     
  17. Offline

    Endign

    Ah, yes. Sorry, wrong word choice.
     
  18. Offline

    embty

    Is this great plugin fixed?
    I set the config to Iconomy hoping to let Register handle it and server didnt crash but it didnt work so i set it back to essentials eco and the server directly restarted after a kill.
     
  19. Offline

    Lomz

    Loving the plugin, but we've come across a rather bothersome glitch, with the penalty for logging or teleporting while in combat, if they're in a Non-PvP area as defined by world guard and try to tele out of that while someone is hitting them, it counts as combat and they get damaged. If you could check for that flag or check for damage being done from the combat, etc., that'd be great.

    Thanks. :]
     
  20. Offline

    KarnEdge

    It seems to me that the Outlaw system is backwards... If you kill people and become an outlaw, you will get more and more money. This means you could use the money to buy more gear to protect you.

    Yet a non-outlaw has NO incentive to kill an outlaw because... 1) you don't get any extra rewards for doing so, in fact you are punished for killing an outlaw (no karma increase) and 2) they are more than likely way richer and have way better gear because of the system

    Also, the way you have this system setup means that it is possible for everyone (but 1 person) to become outlaws and no one else ever NOT be outlaws
     
  21. Offline

    Codisimus

    I'm updating soon with economy fixes.
    I double check to make sure damage occurred. Let me know if there are still problems in the next update
    If you kill an outlaw there is a 100% chance that you will steal money from them. (and the amount increases for higher levels of outlaws)

    EDIT: Nvm you're right Outlaws steal more... I just made it how people requested, If you have a suggestion of how to make this plugin better then please post it (perhaps I can make it so in the config you can set that Outlaws either steal more or get more stolen from them)
    /EDIT

    You don't want to gain karma (think of it as bad karma)
    I am adding a karma cooldown which will prevent this
     
  22. Offline

    jeffreylec

    Commands work, doesn't log the kill. Graves even work. We have the nodes, too.
    CB: 928

    Code:
    2011-06-26 11:21:46 [SEVERE] Could not pass event ENTITY_DEATH to PvPReward
    java.lang.StringIndexOutOfBoundsException: String index out of range: 15
        at java.lang.String.charAt(String.java:694)
        at java.util.regex.Matcher.appendReplacement(Matcher.java:723)
        at java.util.regex.Matcher.replaceAll(Matcher.java:823)
        at java.lang.String.replaceAll(String.java:2201)
        at PvPReward.PvPRewardEntityListener.getMsg(PvPRewardEntityListener.java:178)
        at PvPReward.PvPRewardEntityListener.dropMoney(PvPRewardEntityListener.java:80)
        at PvPReward.PvPRewardEntityListener.onEntityDeath(PvPRewardEntityListener.java:62)
        at org.bukkit.plugin.java.JavaPluginLoader$56.execute(JavaPluginLoader.java:635)
        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:403)
        at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:441)
        at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:184)
        at net.minecraft.server.EntityHuman.d(EntityHuman.java:569)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:880)
        at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:223)
        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:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  23. Offline

    Codisimus

    Update, lots of cool new feature. I hope I'll get a video up soon

    @jeffreylec
    You may have downloaded it while I was in the middle of updating... Try redownloading and let me know if there is still a problem
     
  24. Offline

    jeffreylec

    @Codisimus
    I just re-downloaded it, re-up'd up. Yet, same error.
    Code:
    2011-06-26 11:52:43 [SEVERE] Could not pass event ENTITY_DEATH to PvPReward
    java.lang.StringIndexOutOfBoundsException: String index out of range: 15
        at java.lang.String.charAt(String.java:694)
        at java.util.regex.Matcher.appendReplacement(Matcher.java:723)
        at java.util.regex.Matcher.replaceAll(Matcher.java:823)
        at java.lang.String.replaceAll(String.java:2201)
        at PvPReward.PvPRewardEntityListener.getMsg(PvPRewardEntityListener.java:178)
        at PvPReward.PvPRewardEntityListener.dropMoney(PvPRewardEntityListener.java:80)
        at PvPReward.PvPRewardEntityListener.onEntityDeath(PvPRewardEntityListener.java:62)
        at org.bukkit.plugin.java.JavaPluginLoader$56.execute(JavaPluginLoader.java:635)
        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:403)
        at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:441)
        at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:184)
        at net.minecraft.server.EntityHuman.d(EntityHuman.java:569)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:880)
        at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:223)
        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:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Thanks for the hard work :)
     
  25. Offline

    Codisimus

    @jeffreylec
    I'd love to help you out right now but it's 4am.

    msg me sometime tomorrow if I don't get back to you. It seems like it will be an easy fix but I'll proly just screw it up more if I try to do it while I'm this tired lol.
     
  26. Offline

    jeffreylec

    No worries. I definitely know how that is. I've crashed my server like 5 times due to working late nights/early mornings > <
     
  27. Offline

    VeryInsane

    Does this work with the newest RB? :oops:
     
  28. Offline

    Codisimus

    yes it does.

    @jeffreylec
    I am going to install combattag and try to resolve the conflicts

    @Everyone
    Let me know of other plugins that this conflicts with so I can try to fix it (even if you already posted please repost)

    EDIT: Ok I looked at CombatTag and now I realize why there are conflicts. I will make the penalties for logging optional (So ppl could still use CombatTag which proly works much better for that aspect) I will also make penalties for teleporting during combat optional (currently it simply cancels the teleport and takes one or two hearts)
     
    jeffreylec and embty like this.
  29. Offline

    Jinrai

    Hi, first of all I love your plugin.
    Thanks very much for making it.
    I have only one problem; I can't
    find the option in config file to
    install a teleport or relog penalty.
    I've looked everywhere but I just
    can't find it! Sorry if it's a dumb
    question but can someone point me
    in the right direction? Much appreciated.

    Regards,
     
  30. Offline

    Codisimus

    have you tried deleting the config, then reloading the plugin? This will cause it to create a new config file which you fill out again.
    You might want to backup your old config so you remember wut the settings were

    Niether of those plugins provide an API make it difficult (if not impossible) to integrate

    Hello All,
    I'm going to making a tutorial for this plugin tomorrow but need another player to show how things work. I'll be doing it around this time tomorrow. Might do it without but let me know if you have Skype. If interested in helping me out please message me.

    All you will have to do is proly kill me sometimes and let me kill you sometimes

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

    Endign

    Aw :( That's a shame.
     

Share This Page