Stats & Achievements
This Project is currently abandoned (and probably will forever be). See here for a alternative plugin
2-in-1 Stats and Achievements
This plugin logs various player activity as stats in a MySQL or SQLite database. With the integrated achievement system it is possible to award players when they reached a predefined target.
Features
- Logs block, mob, pvp and miscellaneous player statistics very detailled
- Logs also crafting statistics when spout is installed
- Integrated achievements system
- New database format which is more performant than older databases
- Integrated time delay to reduce server load and the number of SQL queries
- Planned web stats system
- Compatible with every Bukkit version since 1.1-R4
Tools
- You can convert older databases using our utility: http://89.144.25.51:8888/convert.php
- Achievements generator (will be extended soon): http://plugins.maniacraft.de/SaAPlugin/achgen
Requirements
- Vault (Permissions)
- Spout (if you want to get crafting stats)
Commands
- /stats help - General Help
- /stats [<player>] - Shows your stats or stats by <player>.
- /stats block [<player>] <block>[:<data>] - Shows stats for <block>.
- /stats pvp [<player>] [<player2>] - Shows PVP stats.
- /stats mob [<player>] [<mob>] - Shows mob damage stats.
- /achievements help - General Help
- /achievements [<player>] - Shows your obtained achievements or achievements obtained by <player>.
- /achievements list [<page>] - Lists all available achievements.
- /achievements admin add <name> <description> <category> <block> <data> <value> <command> - Adds a new achievement.
- /achievements admin remove <id> - Removes the achievement <id>.
- /achievements admin convert - Convert old achievements.
Achievement Commands
- /give <block>[:<data>] [<amount>] - gives the player the item <block> <data>
- All commands available on your server. Example (Essentials warp): /warp darkroom %player%
Permissions
Permission | Description |
---|---|
stats.show.blocks.own | Show own block stats |
stats.show.blocks.other | Show block stats by others |
stats.show.pvp.own | Show own pvp stats |
stats.show.pvp.other | Show pvp stats by others |
stats.show.mob.own | Show own mob stats |
stats.show.mob.other | Show mob stats by others |
stats.overview.own | Show your overview |
stats.overview.other | Show overview by others |
stats.receive | Log stats at all (for example not for Guests) |
achievements.receive | Gives achievements at all (for example not for Guests) |
achievements.admin.remove | Admin Command Remove |
achievements.admin.add | Admin Command Add |
achievements.admin.convert | Admin Command Convert achievements from old DB |
achievements.list | List all achievements |
achievements.show.own | Show obtained achievements |
achievements.show.other | Show achievements obtained by others |
Config
general: language: en # Language (Available: en/de, other languages can be added in plugins/StatsAndAchievements/lang/) update-delay: 30 # The time interval in seconds how often the stats will be updated in the database (Default and recommended: 30) achievements: true # Activating and deactivating Achievements text_color: '&6' # Color of command texts (1st color) data_color: '&7' # Color of data output (2nd color) debug: false # Debug output (Default and recommended: false) database: type: mysql # Database type, either mysql or sqlite table_prefix: '' # Table prefix to save stats of more than one server in a single database host: localhost # Only MySQL: Database server (Default: localhost) port: 3306 # Only MySQL: Database server port (MySQL default 3306) database: minecraft # Only MySQL: Database name user: root # Only MySQL: Database user password: stats123 # Only MySQL: Database password DisabledWorlds: # In this worlds the stats will be deactivated - disabledworld1 - creative listeners: blockStats: true # Block related stats brewingStats: true # Brewing related stats (maybe bugged) craftingStats: true # Crafting related stats (maybe bugged) enchantingStats: true # Enchanting related stats (maybe bugged) entityStats: true # Entity related stats playerStats: true # Player related stats (Your really should NOT disable this or you'll break everything!) playerMoveStats: true # Player move stats (if you experience lags you should set this to false) vehicleStats: true # Vehicle related stats
Language file formating
{br} - Line break &[0-f] - Color codes (http://img109.imageshack.us/img109/4334/mccolors.png) %[A-Z0-9]% - Internal variables, don't supposed to be translated!
Hey, just want to tell you that I currently have due to real-life reasons no time for doing something on the plugin and will begin to fix the bugs you reported in a couple of days. ;)
Also i have started to test various types of playtime logging, but until now none of them are performant enough in my eyes, so i will keep on testing
Hello, I know this has nothing to do with your plugin, but I have just one small request about your converter. I had Stats, Stats 2.0 and BeardStat plugin and my stats db is messed up like this:
I see you managed to writhe this nifty useful convert php thingie that strips data values from items and unites all item names (ids). Could you please modify that script for BeardStat plugin to unify and clean this kind of database to have result like this?
I see you did id<->name mapping and I'm not skilled enough to try to reinvent the wheel. I know this has nothing to do woth your plugin, but I would really appreciate this. (I could give you my stats db to try it on that)
If player doesnt log out cleanly, the last logout time is not updated. This results to off-line time being logged as online time. There should be check for this ie. discard last sessions gametime, or better. periodically (during login and once in a minute) update online players logout time to current time
Hey can you post a link on my project HERE with a demo MySQL of all the data types. So that I can start adding this plugin.
@ManiacTwister
I'll be looking forward to that.
Hi, could it be that if the Achievement is LOGIN 2 that you don't receive the reward when you have 2 Logins? I only get the reward when I have 3 Logins :D
Iconomy Command is:
and not
All other things work now, nice! ;) how is it with item rewards as raw prokshop? Must I write "item raw_porkshop" or with space or how? ;)
And how is it with Mob Kills. I set as type "KILLS" and at block the Mob ID or how does this work :)?
I will fix the errors with playtime logging and output in the next release.
@Qazedt
We are currently working on a documentation ;)
Could you give a more detailed explanation of how the /ach admin add [achievement details] command is used please?
@ManiacTwister
From /stats. No import, brand new database.
I was reading the comments on TerraNetworkOrg's Tno-stats.
You said you were re-writing his plugin from scratch. Could you please add /played if it isn't added already. It's not a part of your command list. This command is vital to my server.
I need something that logs user playtime, and stops logging when the player goes afk.
Thanks!
Im having the same problem as a previous poster. I have some users showing up with plenty of unearned hours on /stats. Should I convert it again? Any idea what is causing this?
Hmm.. I just got this in the log about 5 times:
14:46:59 [WARNING] [StatsAndAchievements] [MySQL]: Error in SQL query: Data truncation: Out of range value for column 'data' at row 1
Play time doesn't seem to update with the other stats. It only updates when the player logs off and then on again.
I got it all working, database is imported and the plugin running. Buuut; How do I check played time? It doesnt show up on /stats. I know it's in the sql file but it doesnt show up ingame :( Thanks! FerkSwe
EDIT: Stupid stupid me. Somehow the download button took me to an older version? :S
Also, could it be possible to add Days, hours, minutes, seconds?
@judam Hm, have you looked in the database itself or with the "/stats" command? In the database the time is saved in seconds, so 370005seconds are ~ 102hours
If @ /stats:
Have you converted a old database? If yes, the time is to 99,9% in the old database the same time..
Umm.. One user has 370005h play time. Not sure if others are affected.
@ManiacTwister
okay thank you ;)
Yes I am using iConomy and at your Generator isn't an example with the commands that's a bit bad, but thank you now I know how :)
Edit:
Found a little problem. The size of the field command is only 32 characters, but if you are using item cake 10 and money grant %player% 500 you have to much characters, because this are about 36 letters ;)
Would be nice if you could add these to about 100 characters, if users run it for the first time that it is default more.
@Schlumpf9
As there are many different economy plugins, you have to use the command for your used economy plugin (for example in iconomy 6 you use /money grant %player% <amount>). Multiple commands are now seperated with a new line, in most database interfaces you can input multiple lines using "\n", or the return key, so try to use /item ...\n/item ...". Unfortunately this does not work with phpMyAdmin directly, so please use our Achievement generator http://plugins.maniacraft.de/SaAPlugin/achgen and import the sql statement in phpMyAdmin
hello, I have a question :) In the old Version of Achievemtns the Command to give someone money was just "money <amount>". Has this changed or is it still the same?
Or must I use another Command to get money rewards? And how must I split 2 rewards for 1 Achievement? Is it in the command field like this: "item pumpkin 5;item sand 20" or must I use : , or something else?
Just getting into the db and possibilities. Really nice. I like it :) I would like to see a nice leaderboards/highscore list implemented. Thanks!