[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

    BlancoLanda

    I hope I get this plugin fixed for my server... It would be awesome :O.
     
  3. Offline

    BlancoLanda

    Please help! Noone knows why am I having these problems?
     
  4. Offline

    Zaros

    Work on plugins isn't instant. He needs to find exactly what to fix first.
     
  5. Offline

    Codisimus

    @Zaros
    @BlancoLanda
    Try this dev build here
    If it works I'll release it as a stable built. I can't test it by myself but it should work. Also you can now set Economy to 'iConomy' (case sensitive) to get it to link.
     
  6. Offline

    BlancoLanda

    I have a problem with that build, when a player kills other player it just show the message "KilledNotEnoughMoney". That happens with all players... The plugin detects iconomy 6 and PEX successfully, and I have already set the nodes to my player!
    Code:
    pvpreward.getreward
    pvpreward.givereward
    I try to give one millon dollars to my user and still it gives that message (I have it configured for 10 Percent of killed money...) This is my configuration:

    Code:
    ###Config file for PvPReward###
    ###Plugin made by Codisimus###
    
    ###General settings###
    
    ##Supported Economy plugins:
    ##BOSEconomy, iConomy, Essentials, MultiCurrency
    ##If set to auto, PvPReward will use the first Economy Plugin found
    ##If set to none, PvPReward will not link to any Economy Plugin
    Economy=iConomy
    
    ##If set to true, there will be no restrictions
    UseOP=false
    
    ##If set to true, money amount will not use decimals
    WholeNumbers=true
    
    ###Death settings (includes PvP and non-PvP)###
    
    ##Players will lose money everytime they die
    ##DeathTollType can be set to Percent or FlatRate
    DeathTollType=Percent
    DeathToll=2
    
    ##Graves contain all items a Player dropped when they died
    ##If a Player clicks on the Sign before it vanishes they retrieve their items
    ##**Note Graves is still a beta feature and does not fully work properly
    ##Graves will only be used if DigGraves is set to true
    DigGraves=false
    ##The amount of time before a grave disappears (in seconds)
    GraveTime=300
    
    ###Message settings###
    
    ##These are the messages that players will see while using PvPReward
    ##Type \! instead of ! in order to use an exclamation point (ex. hi\!)
    ##Use & to specify colors for messages (ex. &3hi&a.)
    KilledMessage=Te han robado <amount> al morir. \!
    KillerMessage=Has robado <amount> de <killed>
    KilledNotEnoughMoney=<killer> no te quitó nada de dinero porque no llevabas nada encima\!
    KillerNotEnoughMoney=No le has quitado nada a <killed>.
    OutlawBroadcast=<killer> is now an outlaw\!
    NoLongerOutlawBroadcast=<killed> 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=Has perdido <amount> por morir\!
    GraveRobMessage=Has recuperado tus objetos del suelo
    DenyTeleMessage=No puedes teletransportarte mientras estás en batalla!\!
    
    OutlawTag=[&9Outlaw&f] <name>
    KarmaName=karma
    OutlawName=outlaw
    
    ###Penalty Settings###
    
    ##This is the amount of time that you will stay in combat (in seconds)
    CombatTime=1
    ##If set to true then Players who log-off while in combat will still lose money
    ##Set to false if running CombatTag (CombatTag checks for client crashes)
    PenalizeLoggers=true
    ##If set to true then a Player will not be able to teleport while in combat
    DenyTele=true
    ##This is how many half hearts the Player will lose after trying to teleport
    TelePenalty=6
    
    ###Reward Settings###
    
    ##List of possible values for RewardType
    ##Karma, FlatRate, Range, Percent, PercentRange, PercentKDR
    RewardType=Percent
    
    ##The following settings only matter if the RewardType is Karma
    ##Increase OutlawModifier every x kills
    KarmaThreshold=10
    ##Outlaws steal an additional x% (can be set to a negative number)
    OutlawModifier=20
    ##OutlawModifier will not go beyond x (should be negative if above is negative)
    ModifierMax=200
    ##Every x minutes, each online player will lose one Karma Point
    ##If set to 0 then there will be no Karma cooldown
    CooldownTime=0
    ##If set to true, all Karma values will be displayed as negative
    ##All numbers in config should still be positive numbers (unless stated otherwise)
    Negative=false
    
    ##The following settings depend on the RewardType(more info below)
    High=5
    Low=0
    Percent=8
    Amount=15
    
    ##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.
    Can you help me with this issue?

    btw. Another recommendation, make the "DeathTollType" (which yeh, this is working right for me atm, the PVP isn't :() not work at PVP! Because we already lose money because the killer stole our money! So I think DeathTollType must only work with MOBs, suicides... but not PVP.
     
  7. Offline

    Codisimus

    @BlancoLanda
    And you're positive that the killed player has at least 10 coins?

    I will add an option to the config to turn of the Death Toll during PvP
     
  8. Offline

    BlancoLanda

    yes, both with 5000 aproximately and the config was set with a percent of 10, so I don't think it's about the money of the players.
     
  9. Offline

    BlancoLanda

    Anyone knows what's happening with me? Do you have these errors too or it's just me?
     
  10. Offline

    Zaros

    I don't have any one on to test it it, but I may try it one more time before I release tonight.
     
  11. Offline

    Codisimus

    @Zaros
    This plugin isn't really working that well at the moment :( There are a couple issues that I can't figure out what's causing them.

    Also, You sure you want to open your server tonight? you will proly have to generate a new world once 1.9 comes out which I thought was soon. Idk just something to keep in mind
     
  12. Offline

    Abnormal Zombie

    I would very much like to see a "reset' command for the kdr. This would be extremely useful for when a player is constantly being killed by a same group of people or person.

    I for one was being punched as I was training acrobatics for the plugin MCMMO and whenever I had died from falling the other guy got a kill even though he only dealt half a heart of damage. I didn't notice this for a while and my kdr dropped rock bottom and there's no reset command. :( Making one would be greatly appreciated, thank you!
     
  13. Offline

    BlancoLanda

    @Codisimus so bad :(, this plugin was fantastic for me, those options for anti-tp and anti-quit at fights are awesome... I'm sad because I really liked it. Do you know any plugin similar than this that I can set in my server while this one isn't ready?
     
  14. Offline

    Codisimus

    @Abnormal Zombie
    I'll be sure to add that.

    @BlancoLanda
    Don't worry, I'm not letting this plugin die. It is just taking me a while to find the problem. I'll rewrite the whole thing again if I need to. Like I said b4, my weekend starts on Thursdays so I should soon be able to get a lot of work done on this.
     
  15. Offline

    BlancoLanda

    @Codisimus ohhh cool, I'm going to wait then :)

    Thank you.
     
  16. Offline

    Codisimus

    @BlancoLanda
    Hopefully its not too much longer... I still have 3 new plugins I want to make
     
  17. Offline

    Zaros

    Thought about this, but they'll understand when the time comes. Besides, gives us a chance to see how it will work out with the current settings.
     
  18. Offline

    Codisimus

    @Zaros
    @BlancoLanda
    Here is another DevBuild
    I fixed a lot of things...
    Things I need tested (not sure if it's not working or my setup with iConomy is messed up)
    1. Percentages aren't always calculated correctly.
    2. Tells that money is being exchanged but seems that everyone keeps their money
    3. Reset Commands (These most likely work fine)
    4. Karma as negative values (This will most likely work fine but may be hard to understand?)
    5. Option of disabling the DeathToll for PvP (This should also work fine)
    I am still testing but if you guys want to try it out go ahead.
    Perhaps if any of you know java and would like to look at the source it can be found here

    @Abnormal Zombie
    Added a reset command (actually like 6)
    still needs to be tested but it should work fine.
     
  19. Offline

    Zaros

    I'll see if I have time tomorrow.... Work and school.

    I'm amateur at best, but I'll take a look...
     
  20. Offline

    Codisimus

    Good luck lol, its got some long methods and nasty nested ifs that I should get around to fixing...
     
  21. Offline

    BlancoLanda

    OK nice :), if sometime you get the kill "percent" reward fixed, and the option for disabling deathtoll in PvP (the only things I want, I don't care about karma system, etc. in my server), upload de build! Anyways it would be nice to see the options for Anti-quitting in combat and Anti-TPing in combat working! Those are really nice. Good luck and thank you for taking your time in this.
     
  22. Offline

    Codisimus

    @BlancoLanda
    I will not rest till this is stable for CB 1240!
    I think I'll be able to find the problem pretty easily after that refreshing night of sleep.
     
  23. Offline

    Zaros

    @Codisimus

    Your 'nasty nested ifs' would give my programming professor a heart attack. I already do with my pseudocode :cool:
     
  24. Offline

    Codisimus

    Haha, I really want to use switch case with strings but I doubt everyone has java 7 :(
     
  25. Offline

    BlancoLanda

  26. Offline

    Zaros

    You could make a separate version for 7 ;o
     
  27. Offline

    Codisimus

    ehh this way works for now, just easier to screw things up when I make changes. Oh and hard to find these problems when they occur :p

    @Zaros
    @BlancoLanda
    Here is another DevBuild
    This should be it everything seems to work perfectly (accept for graves which is still beta and off by default)
    unless there are any issues I will release it as stable later tonight.
    Don't mind the debug messages. They are there in case it is not working correctly

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

    BlancoLanda

    @Codisimus

    Reward "Percent" system: Working
    Anti-TP during combat: Working
    Anti-Quit during combat: It works, the killer get money from the "quitter". But when the "quitter" tries to rejoin, it gives this error: (The "quitter" in that case is the user titi)

    Code:
    11:00:49 [INFO] titi [/127.0.0.1:1248] logged in with entity id 57 at ([world] -
    252.26978947875918, 67.0, 203.85387189877665)
    11:00:50 [WARNING] Can't keep up! Did the system time change, or is the server o
    verloaded?
    11:00:50 [WARNING] Failed to handle packet: java.lang.NullPointerException
    java.lang.NullPointerException
            at com.bergerkiller.bukkit.sl.VirtualLines.updateSign(VirtualLines.java:
    46)
            at com.bergerkiller.bukkit.sl.VirtualSign.update(VirtualSign.java:296)
            at com.bergerkiller.bukkit.sl.VirtualSign.update(VirtualSign.java:293)
            at com.bergerkiller.bukkit.sl.VirtualSign.update(VirtualSign.java:266)
            at com.bergerkiller.bukkit.sl.TileEntityVirtualSign.l(TileEntityVirtualS
    ign.java:51)
            at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:318)
            at net.minecraft.server.EntityPlayer.b(EntityPlayer.java:261)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:305)
            at net.minecraft.server.Packet10Flying.a(SourceFile:126)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    >
    The only way to make the user able to join again is restarting the server!

    btw. This plugin is fantastic! I congratulate you for this work. I think that bug is one of the last to fix :)

    EDIT: Well... I just announced this is probably for joining my own server with two minecraft clients? Because I tried with other people and they cought join... mmm...
     
  29. Offline

    Codisimus

    @BlancoLanda
    So is this resolved? It doesn't look related to my plugin...
     
    BlancoLanda likes this.
  30. Offline

    BlancoLanda

    Yeah it is, sorry... And I have to see your work is amazing! Keep it up :)
     
  31. Offline

    Codisimus

    Well I finally updated all my plugins and figured out how to use BukkitDev. Now I can get started on some new projects :)

    @Zaros
    @Abnormal Zombie
    @BlancoLanda
    @Danton1983
    @wachnlurn
    @Bjourk
    @slimpyman
    @Sergeant1337
    @riuthamus


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

Share This Page