[INACTIVE][INFO] Stats [v0.99] and Achievements [v0.99][1000]

Discussion in 'Inactive/Unsupported Plugins' started by nidefawl, Jan 20, 2011.

  1. Offline

    nidefawl

    Stats and Achievements

    This plugin will be found at dev-bukkit soon
    sockenklaus will manage this project in the future (thank you!)

    Features:
    • Stats
      • Logs many actions that players do!
      • Block Destoys(for each block), Item Uses, Damage Dealt, Deaths per type, Kills per type, Played-Time (with AFK flags!)...
      • '/stats' shows basic stats and more
      • '/played' shows your play-time on the server
      • Keeps all stats within a SQLite or MySQL Database
      • Your plugin can support Stats!
    • Achievements
      • Give users achievements when they have completed something!
      • e.g. MintyAnt mined 500 obsidian. Message "You have no life!" Appears, and they recieve the "No Life" achievment and 10 Diamond as a prize
      • Achievement-Conditions:
        • <achievement-name>
        • New in 0.9:
          • group <group-name>
          • permission <permissionstring>
        • can be multiple seperated by ;
        • each of them can have a inverting '!' (!group jailed;!badachievement)
        • can be none of course :)
      • Reward-Commands:
        • /item <name or id>
        • /money <negative or postive amount>
        • /group <group-name>, /warp <warp-name>
        • New in 0.9: Native console commands:
          • /op *;/time 13500;/god *;/kick *
          • use any console command that works on your console
        • New in 0.9 (GroupManager):
          • addsubgroup <groupname>
          • removesubgroup <groupname>
          • addpermission <permissionstring>
          • removepermission <permissionstring>
    Source:
    Download:
    Newest (Fix for updated plugins (iConomy, BOSEconomy, Essentials, Permissions 3)
    Old (Tested with #617 (works up to 1000!))
    If you still have problems with CraftIRC or iConomy + Achievements try one of the following version:
    Outdated versions:
    Configuration:
    Permissions for v0.9+:
    Show Spoiler

    Achievements:
    achievements.check - only players that have that permissions will be checked + awarded
    achievements.view.own - grants access to /achievements (/ach)
    achievements.view.list - grants access to /listachievements (/listach)
    achievements.admin.check - grants access to /checkachievements (/chekcach)
    achievements.admin.reload - grants access to /reloadachievements (/reloadach)

    Stats:
    stats.log - only actions of players that have that permissions will logged
    stats.view.own - allows a player to watch his own stats with the /stats command
    stats.view.others - allows a player to watch other players stats with the /stats <player> command
    stats.view.playtime - allows a player to watch his play-time with the /played command
    stats.admin - grants access to /stats debug + /stats set + /stats list

    Latest Changes:
    Show Spoiler

    Stats v0.99
    • Fix for Permissions 3.0
    Stats v0.985
    • Permissions fixed
    • Code cleanup
    • More settings, to disable logging of some events
    Stats v0.98
    • Attempt to fix plugin dependencies
    Stats v0.972
    • Attempt to fix Classpath and Updater... again
    Stats v0.96 (03-04-11)
    • Forgot to update internal version
    • Forgot wolf
    Stats v0.95 (03-04-11)
    • Updated to latest RB (617)
    • Better Permissions/GroupManager plugin handling
    • removed the usage of os-specific sqlite libraries. (lets see what happens)
    Achievements v0.99
    • Fix for newest Economy plugins
    Achievements v0.981
    • Attempt to fix plugin dependencies
    • fixed a typo with the 'achievements-definitions-sql'. Check your config!
    Achievements v0.972
    • Attempt to fix Classpath and Updater... again
    Achievements v0.96 (03-04-11)
    • Forgot internal version
    • Forgot wolf
    Achievements v0.95 (03-04-11)
    • Updated to latest RB (617)
    • Better warp-command handling for Essentials


    full Stats changelog
    full Achievements changelog

    Supported plugins:
    Tools:
    Please donate --> [​IMG]


    Please read the Wiki before posting:

     
  2. Offline

    nidefawl

    neither do I....
    show your Permissions/config.yml + startuplog
     
  3. Offline

    ssechaud

    CB build 491 and v0.7 stats & achi :
    21:03:45 [SEVERE] java.util.ConcurrentModificationException
    21:03:45 [SEVERE] at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810)
    21:03:45 [SEVERE] at java.util.HashMap$ValueIterator.next(HashMap.java:839)
    21:03:45 [SEVERE] at com.nidefawl.Stats.Stats.saveAll(Stats.java:873)
    21:03:45 [SEVERE] at com.nidefawl.Stats.Stats.access$0(Stats.java:870)
    21:03:45 [SEVERE] at com.nidefawl.Stats.Stats$SaveTask.run(Stats.java:606)
    21:03:45 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    21:03:45 [SEVERE] at java.lang.Thread.run(Thread.java:636)

    EDIT: Wrote build 291 instead of 491
     
  4. Offline

    3nkao

    Woops forget me, i'm just a noob :p I fixed my issues with permissions.

    BUT still a problem :

    When you try to pick up something and your inventory is full, you get tons of " [DEBUG]: adding 1 to itempickup/dirt of 3nkao" if you stay on the dirt block standing on the floor, like :

    Code:
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:30 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    22:16:31 [INFO] [Stats-0.7] [DEBUG]: adding 1 to itempickup/dirt of 3nkao
    Thank's for this plugin :)
    --- merged: Mar 2, 2011 9:32 PM ---
    Mh is it possible to restructure the mysql tables in a next version ?
    I would like to add stats on my website but there's too many datas in the Player field, you could make one unique row per player and add fields for each stat ?

    (sorry for my english)
     
  5. Offline

    nidefawl

    you are jokin, right?

    Finally a useful post. Thx
    --- merged: Mar 2, 2011 9:34 PM ---
    Nope, sorry. Go read through the whole thread, we had a discussion on this before...
    Learn how to read databases/use php.

    You can private message me, I speak german too.
     
  6. Offline

    3nkao

    I'll read the thread then :)
    I know how to read databases using PHP but I wanted to make a player list with all infos from all players using a While loop, i know it's possible but it's a lot of code just for that ;/ Mh gonna try

    (I'll MP if I find more bugs or if I need help, thank's :) )
     
  7. Offline

    nidefawl

    its not to hard to read it into one array:
    http://craftland.org/?s=playerstats&p=nidefawl

    Code:
            $query = "select * from stats where category = 'blockdestroy' AND player='".EscapeMe($_GET['player'])."' order by value desc;";
            $result = mysql_query($query,$link)  or die("Query failed: ".$query."<br>" . mysql_error());
            $blocksDestroyed = Array();
            while($row=mysql_fetch_assoc($result)) {
                $blocksDestroyed[$row['stat']] = $row['value'];
            }
            mysql_free_result($result);
            ?>
            <div class="statsDiv" style="width: 290px"><img src="img/blocks/<?=$itemImg['ironpick']?>" class="pHighscoreIcon"><p style="font: 1.3em arial, verdana, sans-serif;margin-top:11px">Blocks destroyed</p><?
            echo '<div class="clearfix pStatsList">';
            if(count($blocksDestroyed)<=0) {
                echo "<div class=\"error\">none so far</div>";
            } else foreach($blocksDestroyed as $key => $value) {
                echo '<div class="pBox" style="width: 250px"><img src="img/blocks/'.$itemImg[$key].'" class="pImg pSmallIcon"><div class="pName">'.ucfirst($key).'</div><div class="pScore">'.number_format($value,0,'','.').'</div></div>';
            }
            echo '</div></div>';
    you could also select everthing, group by category and read it into an 3-dimensional array
     
  8. Offline

    ssechaud

    Nope, this is all that popped up in the console, do you need more information?
     
  9. Offline

    nidefawl

    no
     
  10. Offline

    3nkao

    CB Build 291 ? lol..

    (thx nidefawl)
     
  11. Offline

    ssechaud

    Ah I see, sorry, typo, meant build 491, will update the post...
     
  12. Offline

    turtlelink2

    When players log in, they are not always put on the /ach list and their data isn't recorded even though they have the /ach command and should be recorded, after logging out and in they are then added to the list....sometimes....
     
  13. Offline

    scar413

    what are the comands to trigger these plugins? :money x and :setgroup x? or do they have different triggers.
     
  14. Offline

    nidefawl

    setgroup command got removed some time ago.
    the commands are money <amount> and group <groupname>
    i did not test both... please give me some feedback
    --- merged: Mar 2, 2011 10:49 PM ---
    Is there some information on the console at player-join when you enable debug with /stats debug ?
    --- merged: Mar 2, 2011 10:51 PM ---
    Did you get that error once in a while or does it happen several times?
     
  15. Offline

    ssechaud

    It just happened once. Think I did a reload, not sure. It all seems to be working fine now.
     
  16. Offline

    nidefawl

    Sorry for beeing a jerk about the version number... Some ppl just won't read release notes.
    Thanks for reporting it. Found that error in my server.log as well.
    It happens when a player logs out/in while stats are saved (saveAll() runs) . I will look into it
     
  17. Offline

    scar413

    i mean the difference between the iconomy/ecoessentials and permissions/groupmanager command, are they the same and detect which plugin is running on the server?
     
  18. Offline

    nidefawl

    they are the same, it detects the plugin, just use money/group
     
  19. Offline

    scar413

    ok thanks
     
  20. Offline

    SweetCraft Girl

    Why oh Why is this for Craftbukkit 578 - when [440] is the last RECOMMENDED BUILD?

    Wtf is up with you plug-in makers? Why can't recommended builds be the only build you code for? If you code for 487, the next guy does 452, someone does 441, another person does 481 - and what the hell do we have after that? We have diff plugins all coded for a diff version of Craftbukkit - and NONE of them are recommended builds while the majority of us *smart* ServerOps are staying with RECOMMENDED BUILDS and plug-ins that are specifically built for RECOMMENDED BUILDS.

    This entire mind set around this place of twitchy finger compile OCD is really screwing up this "service" that Bukkit offers and makes Bukkit look like its crewed by teens who do have a modicum of awareness regarding "project development" and "quality assurance". Being able to click COMPILE and UPLOAD and type out a build name umpteen times a day is nothing but confusing to the community and I really do not get why more people are not saying something instead of joining in the circle jerk of pied-piper craftbukkit releases by the daily dozen.

    Jeeezus.

    </bitch mode off>
     
    LokeDK and Vaupell like this.
  21. Offline

    ShoTro

    Bukkit is still considered 0.01 not even BETA. It is basically use at your own risk and nowhere near feature complete. The plugin developers are trying to work with the bukkit team to get the features they NEED added to the baseline as well as getting everyones act together. Please, show restraint before downloading plugins and bukkit versions each release (yes, I am pointing the finger at you) until things are at least remotely standardized.

    I am patiently awaiting the next "stable" bukkit release before implementing this excellent plugin back into my server.
     
  22. Offline

    turtlelink2

    It looks like players are only loaded if anjosecurity (witch I have) autologs in the player, if they login with their password it does not load them.
     
  23. Offline

    SweetCraft Girl

    Um..

    I do show restraint by only using "recommended builds". You are completely clueless as to how any sort of real development and Q&A operation and production should work.

    Every other plugin maker pumping out a plug-in for every other odd build that comes out -which is not a recommended- build, not only creates chaos but gives it ongoing life as plug-in developers each choose a different build to code for leaving server admins with their normal plug-in set diverging between build numbers and conflicting when they once did not on the RECOMMENDED BUILD.

    You literally addressed nothing of what i said and assuaged the matter at hand with willful ignorant statements like your "remotely standardized" remark - "recommended builds" are the closest thing to standardization bukkit releases thus far, therefore the plug-in dev's should focus on recommend builds first, and then compile for other builds 2nd while maintaining the focus on the recommended, since after all - bukkit pumps out 3+ builds a day so it can be many builds before a "Recommended", therefore it is completely inane to code towards any other build when your fellow developers are coding towards different builds than yours AND the recommended build.

    I mean really. FFS.... It is not so much bukkit as it is the plug-in devs racing towards any random release when they should stand fast on the recommended so that they can best insure their build works with other plug-in devs who also make that wise choice of staying with the recommended build.

    But no, you go ahead supporting 50+ plug-in devs building between 20 plus non-recommended Bukkit builds because that somehow sounds logical and more importantly, rational, to you.

    And since you are "patiently waiting the next stable bukkit release" -as am i, hovering on [440] still and building a MineOS server on that now, you should expect the same of plug-in devs instead of supporting this willy nilly Bukkit build chasing when they are not as you say "stable" , as are "recommended builds".
     
  24. Offline

    treepunch

    Okay so I tried looking through the whole thread for an answer so forgive me if this has already been brought up. I'm running v0.7 of stats on CB#493 and everything is working good except it's not tracking deaths.

    When I try /stats deaths in the game, I receive this message:
    [​IMG]
    [Stats] stat/category 'deaths' not found. Possible values;
    [Stats] blockdestroy, itemuse, damagedealt, stats, blockcreate, kills, itempickup, damagetaken

    When I try /stats stats I get:
    [Stats] Please choose: (/stats stats <stat-name>)
    [Stats] lastlogin, chat, chatletters, lastlgout, totalblockcreate, armswing, respawn, command, playedfor, login, teleport, move, totalblockdestroy

    Could someone please advise me how I would get it to make a deaths category? Also, are there any other categories that I can be tracking and how would I add those as well. Sorry for the n00b question. Thanks in advance.
     
  25. Offline

    Jandalf

    did u ever die since u have stats? because u only have access to categories, which have stats in it
     
  26. Offline

    treepunch

    Yes, I killed myself a few times via drowning and fall deaths and still no luck.
     
  27. Offline

    Jandalf

    ok then i dont have any idea...
     
  28. Offline

    Vaupell

    Love you!!!

    and agree
     
    SweetCraft Girl likes this.
  29. Offline

    nidefawl

    You could have just asked for it..
    Its on my todo list (to be more bukkit conform)

    This is a free plugin and I dont have infinite free time to work on it.
    Why it is for 478? Because thats the version I want it to work with.
    If you really think that this is a problem I can stop supporting it right now and just release the source (as I would have to)

    Seems like you are not able to adapt it to #440 and "click COMPILE and UPLOAD and type out a build name"
     
  30. Offline

    Butzenbaer

    First of all: Thank you for this awesome plugin!

    Im developing a webtool, which reads and output the stats and achievements from the mysql database (and yes, i know about webstats from chris, but i dont really like his tool).

    I found some issues with stats:
    • category: kill; stats: total -> only counts to '343'
    • category: blockcreate; stats: signblock, signblocktop, 26 (bed) -> no data
    • category: blockcreate; stats: redstonewire, crops -> no data (not shure, if it should/could be...)
    • stats: bed(block: 26,item: 355), Redstone Repeater off(Block: 93, Item: 356) and Redstone Repeater on (94), -> named by the id and not by the name like the other blocks and items.
    I´ve found some other issues in the categories 'itemdrop' and 'itempickup' (e.g. category: itempickup, stat: bread doesnt seem to work correctly(value is much to high)), but im not shure about them yet.
     
  31. Offline

    nidefawl

    you need to add the item names to the items.txt and update the stats-table, it does not update items itself yet.
    maybe a feature soon. Don't know about crops/redstonewire right now

    kill; stats: total -> only counts to '343'
    could it be it stopped working with adding a new plugin?

    I really invite poeple to test out installed plugins one-by-one if any of it causes problems.
    If you name me the plugin it would be SO MUCH EASIER for me to make it work with all kinds of plugin combinations!!!
     

Share This Page