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!
any solution to the playtime bug where it uses the value in lastlogout? its wrecking havoc with the autopromo.
sorry I did not set the permissions the problem is resolved
@cyberieur
Do you use MySQL or SQLite?
Has this project gone inactive? You converted our database but something went wrong so some people had thousands of hours played so we still don't have any stats up. :(
What steps Will Reproduce the problem? 1. I run the server 2. I play with several players 3. when I looked on the db, stats only appear on a player when I played with several players, the stats of other players stuck on 0.
What is the Expected output? What do you see instead? stats only appear on a player when there are several player on the server. The stats of other players still on 0. I want to have the stats of all players
What version of the product are you using? I have the stable version of craftbukkit 1.2.4 and version 1.3 of the plugin
Do you have an error log of what happened? there is no error in the log
Any additional information Please provide statement below. if you do not understand let me know, I am French and I use a translator
@ManiacTwister
Everything is working fine by now. Have made 31 achievements and it's very nice!
I have made some alteration in the data sizes (32 chars to 200 in some columns so I can place some cool names in my home language).
The color aren't working to say the true. It outputs: &6Gidedin have been awarded.
Can you make it custom? So I can show to server: %PLAYERNAME% achieved %ACHIEVEMENTNAME%.
Would be cool.
Another thing: How do I install spout? I tried to search for the 123+ Bukkit version but wasn't able to. Can you explain? I want to log Exp/Statistics/etc too :)
@ManiacTwister
I haven't seen any errors with MySQL, but wait till late today.
Tonight, when I get home, I'll reset all my statistics (:() and start with MySQL again. Just to know:
My character have got 1000 Stone Blocks ( Block ID 1, Data Value 0 ). Now, I have made a new Achievement ( Bronze#Stonecutter ; Get 100 Stone Blocks! ; 1 ; 0 ; 100 ). The player with already 1000 stones gathered will be able to get the Achievement?
If yes, they'll get the achievement after the first stone break or they'll really have to go and break 100?
Some questions like that could be gone in a FAQ :-)
Now, let me say: Awesome Job. Any idea if it's possible to get the Minecraft Achievements on Server Side? The normal ones that came with Minecraft. I think they're only store in user's local folder =/
I talk too much don't I? :P
@Gidedin
Hm, with MySQL it works for me without problems, SQLite not, but i have already commented the ticket you made about this.
Do have any errors in your Console? (with MySQL)
@wattzy
Meh =/
I did all that already.
I made an achievement for every single Data type, made it for Dirt (Get 1 / 100 / 1000 ) Dirt Blocks, tried ItemUse, Item Pickup, BlockPlaced... and so on.
I think there is something wrong in 1.2.3.
I tried both in MySQL and SQLite. None have worked.
Would be good to have an answer from the author about this, maybe it is really a glitch?
Something good to add would be a 'Difficulty' Column. I would like to make the achievements: Bronze, Silver, Gold and Platinum. So far I'm using, on name:
Bronze#Achievement_Name; Silver#Achievement_Name and so on.
On my website i explode that by '#' and can show what are the prize for it :)
Something that would make my users more likely to go and achieve the best!
I noticed another playtime bug. Sometimes when a new player joins their playtime is set with their LASTLOGOUT value. Anyone else having this issue? Any quick fixes?
Hi nice plugin, this just made my day easier so i dont need to search more ^^
I just got one question, about the spout. I know people dont need spout to play, but will it still log the crafting table if they dont use spout? or does they need to use spout to be able to log the crafting table?
This is awesome! I'm running 1.3.4 and it seems there is still some work to be done but you guys rock! I will be keeping an eye on this one for sure :D
@Gidedin
Ah, OK. Maybe it's a problem with the achievements you have setup. I noticed the one you put up 'Get 1 Log', and there could be a few things wrong.
Is it set to ITEMPICKUP type? Maybe you aren't picking up the correct log.
(From the correct tree, the 'data' value allows you to specify which one, so block 17 data 0 would be Normal wood, block 17 data 1 would be Pine, 17 2 birch (the white/black one))
If you can view the database, try and look at the stats table and see what is being saved. I've noticed some stats on my server aren't tracking correctly, itemuse, crafting etc (possibly due to 1.2.3/4).
For your 'Get 1 Log' example, I did a quick SQL query on my database (I'm using MySQL) and returned all the ITEMPICKUP types with a block of 17, and I get 3 different data types pop up, 0, 1 and 2 (no-one on my server has harvested jungle logs yet, so I don' have any 3's).
I hope this makes sense and gives you a good idea of where to try and find out what might be wrong. :)
@wattzy
As an OP, I should have all permissions, because I can get stats without setting any node. Only achievements don't work. And I have tried that now, haven't work.
I have tested both in SQLite and MySQL. None have worked =/
@Gidedin
Are you using permissions? If you are, you need to add '- achievements.receive' to the ones you want to receive the achievements. It seems ManiacTwister forgot to mention this in the permissions section. ;)
As for the command part, this part allows you to get the server to run a command once a player receives an achievement, like adding money, or adding new permissions for that player. Pretty much any command you can run on the server you can have as a reward run when the/a player gets an achievement.
Hope this makes sense.
Hey there.
Can you explain me how to make the achievements work? I made it a sqlite database and already made the Stats page on my website. Everything is working like expected but the achievements.
I placed a simples achievement: Get 1 Log. Block ID 17, Data 0 and Value 1. Haven't set the command because I don't know what that do.
Can you explain a little better how to make achievements? Thank you very much!
This is an awesome mod. Ah, by the way, I'm running it on 1.2.3 r02.
-I have sent you a ticket because I found a an error. I don't know what to do about it.
@wattzy
Haha thanks soo much that did it! :)
@Justins210
Make sure its receive and not recieve, like I had for ages. Took me two days to realise I had spelt it wrong :p
@dickwick
This can be done through php. I was going to do that untill I got so many stat plugins working that I am puting them on hold.
Okay, so I gave my ranks all the - stats.recieve node, but only the groups with the - '*' node actually have any stats. The groups with the - stats.recieve node just have all 0's. I dont understand what to do.