A script written for TrinityCore that rewards players for their /played time.
Script in action:
- Place played_rewards.diff patch in your TrinityCore source folder run git and type
git apply played_rewards.diff
- Apply characters.played_rewards.sql to your "characters" database using MySQL.
- Compile your TrinityCore source.
- After compilation replace your worldserver.conf with the worldserver.conf.dist
- Modify the PlayedRewards configuration values in your worldserver.conf
# Example of a correct configuration
PlayedRewards.Enable = 1
PlayedRewards.SiteDB = "fusion_cms"
PlayedRewards.SiteTable = "account_data"
PlayedRewards.SiteColumnID = "id"
PlayedRewards.SiteColumnVP = "vp"
PlayedRewards.SiteColumnDP = "dp"
Use any MySQL editor and navigate to your characters database and played_rewards table.
Example of a reward:
- rewardId the unique id of your reward it's auto incremented so you don't have to worry about it.
- playedTime in format of Hour:Minute:Second in this case when the player reaches 5 minutes of /played time he will receive a reward
- gold amount
- title id (List of title ids https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2129939/CharTitles)
- achievement id (List of achievement ids https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2129931/Achievement)
- experience amount
- level amount
- items itemid itemCount multiple items are supported so you can do "49623 1 29434 25" in this case player will recieve 1x of 49623 and 25x of 29434
- honorPoints amount
- arenaPoints amount
- votePoints amount
- donationPoints amount
So, in the picture when the player reaches 5 minutes of /played time he will receive 10 gold and 1x of item 49623