[WIP] KillDeath Leaderboards

Discussion in 'WIP and Development Status' started by unv_annihlator, Jan 4, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    unv_annihlator


    This is a simple yet very expandable plugin that keeps track of player's kills, deaths, and their kill/death ratio. It uses MySQL database for storage which allows it to be hooked into your server's website to provide user stats online.

    Currently there are no features to prevent players killing each other and boosting up their scores but I am considering adding this in the future along with bounties on the top 10 players.

    Thanks to PatPeter for the SQLibrary.

    Install:
    1. Put the .jar into your severs plugin's folder.
    2. Open the jar with winrar or similar tool.
    3. Edit the Config.yml file putting in your server database properties.
    4. Enjoy! :D

    Commands:
    /kd [player] (returns specified user's k/d)
    /kd (returns sender's k/d)
    /topkills [number] (returns top # players by k/d
    /topkills (defaults to 10)
    /rankkills (returns sender's k/d)

    Current Version v1.1
    (Download it from the dev. bukkit page)
    Source

    Todo:
    Do more with the plugin
    Prevent boosting
    Possibly do bounties
     
  2. Offline

    ZNickq

    Don't attach the files, use dropbox ;)
     
  3. Offline

    unv_annihlator

    Sorry, updating first post now.

    Bump can I get some people testing this please? I'd like to get some feedback so I can fix it if there are any bugs. Works my end though.

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

    Mick666

    Yeah, im using this.
    Feedback: Stores kills only in the /topkills, /kd reports nothing.
    The editing teh jar for the config is annoying. Please do what every other plugin does when you get a chance.
    Im using this on our hardcore server, its essential for a server like that.
    PLEASE fix the bugs.
     
  5. Offline

    unv_annihlator

    Sorry I've been a little busy with college, I'll take a look at it later today and work out the bugs. Thank you for your feedback.
     
  6. Offline

    beatcomet

    Do you need any help with that?
    I will be glad to assist :)
     
  7. Offline

    unv_annihlator

    If you wish to work on it I just threw a source jar on my dropbox. I put the link in my first post (ignore my terrible coding I put this together pretty quickly and haven't been able to go back and improve it since).

    -Anni
     
  8. Offline

    beatcomet

    I have downloaded the source, I will look into at as soon as I get back from school

    I'm almost done, I just don't really understand the last commnd "rankkills"
    Here is the download link for the source :

    http://dl.dropbox.com/u/31756725/LeaderBoards/Leaderboards.7z

    The original source code is inside a folder named Original Source
     
  9. Offline

    unv_annihlator

    I'm skimming through the code as I type this.

    On the note of rankkills, it was really supposed to be a command to show the player his rank overall but I couldn't think of an easy way of doing this. I mean sure I could get a query of all players, then do a while loop that goes until the name is equal to the sender and have a counter going the whole time. However that just seems really inefficient. I wanted to save it in the database somehow but again, not quite sure how I'd get it to calculate/update the rank. Maybe if I was better at sql I could think of a way :p but yea I hope you understand why that was there.

    I put it in doing the same function as /kd except it just returns the senders k/d and doesn't take any extra parameters.

    Side note: inside the SQL.java you created functions to handle KDR calculations, but when you checked if the player had kills and 0 deaths (preventing the divide by zero) you had it return -1, should be returning kills.

    -Anni

    Edit: I understand the reasoning behind returning -1 now however I still feel that having the ratio be -1 inside of the table would cause the player to not be in the top 10 even if they were lets say 1000 - 0. So although a person who is 1000 - 0 actually doesn't have a k/d of 1000 it'd be better to give them that then to not count them in the rankings.

    Also I just finished up the (probably super inefficient) ranking system.

    - LINK

    Also by seeing separate functions for having it sorted by kills or kdr makes me figure you were wanting to add in an option in the config to choose sort method maybe? If so I like the idea and I made the rank functions compatible with it.
     
  10. Offline

    beatcomet

    I'm happy you like what I did, the problem with -1 ratio can be solved fairly quickly by checking the amount of kills.
    It might be a problem because looping through multiple times is just stupid so I will try to find a solution in the next couple of days.

    I will download the source later on (it's 2:30 AM here :)) and work on it.
     
  11. Offline

    beatcomet

    Version 1.2 will be up soon, as well as a repo (it depands on @unv_annihilator 's decision)
    Edit : As for now the new config system is working well, the file will be added as soon as unv_annihilator will approve it
    Also I changed the fornt page in bukkit dev (link in the first post)

    Edit 2 : Great news :) Just added a functional sqlite support, along with some bug fixes and an improved configuration system. The new configuration file will be located at a seperate folder. In the config you will be able to choose your driver (either mysql or sqlite). For sqlite you don't need to change any paramete in the configuration other than the driver.
    Download link for test .jar : [Download]
     
Thread Status:
Not open for further replies.

Share This Page