Well first of all you will NEED to add this: http://forum.ragezone.com/f353/fix-w...ry-fix-730940/
Once you are finnshed adding that...
Find this inside AchievementManager.cs
*UPDATED* Under it Add:Code:// Give the user the pixels he deserves Session.GetHabbo().ActivityPoints += Value; Session.GetHabbo().UpdateActivityPointsBalance(true, Value);
In Messages > Requests > Users.cs Replace:Code:using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient()) { int ach_score_amount; ach_score_amount = dbClient.ReadInt32("SELECT ach_score_amount FROM achievements WHERE id = '" + Achievement.Id + "' LIMIT 1"); dbClient.ExecuteQuery("UPDATE users SET ach_score = ach_score + " + ach_score_amount * Level + " WHERE id = '" + Session.GetHabbo().Id + "' LIMIT 1"); }
With:Code:private void GetWinScore() { GetResponse().Init(443); GetResponse().AppendInt32(99); //value GetResponse().AppendStringWithBreak(""); SendResponse(); }
Finally Add these Sql's into your Database:Code:private void GetWinScore() { using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient()) { int ach_score; ach_score = dbClient.ReadInt32("SELECT ach_score FROM users WHERE id = '" + Session.GetHabbo().Id + "' LIMIT 1"); GetResponse().Init(443); GetResponse().AppendInt32(ach_score); //value GetResponse().AppendStringWithBreak(""); SendResponse(); } }
Plus,Code:CREATE TABLE IF NOT EXISTS `users` ( `ach_score` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) )
______________________________________________________________Code:CREATE TABLE IF NOT EXISTS `achievements` ( `ach_score_amount` int(11) NOT NULL DEFAULT '11', PRIMARY KEY (`id`) )
Find:
Replace with:Code:// Notify the user of the achievement gain Session.GetMessageHandler().GetResponse().Init(437); Session.GetMessageHandler().GetResponse().AppendUInt(Achievement.Id); Session.GetMessageHandler().GetResponse().AppendInt32(Level); Session.GetMessageHandler().GetResponse().AppendStringWithBreak(FormatBadgeCode(Achievement.BadgeCode, Level, Achievement.DynamicBadgeLevel)); Session.GetMessageHandler().GetResponse().AppendInt32(10); // pixels or achievement points Session.GetMessageHandler().GetResponse().AppendInt32(10); // pixels or achievement points
Remember to Like!Code:// Notify the user of the achievement gain Session.GetMessageHandler().GetResponse().Init(437); Session.GetMessageHandler().GetResponse().AppendUInt(Achievement.Id); Session.GetMessageHandler().GetResponse().AppendInt32(Level); Session.GetMessageHandler().GetResponse().AppendStringWithBreak(FormatBadgeCode(Achievement.BadgeCode, Level, Achievement.DynamicBadgeLevel)); using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient()) { int ach_score_amount; ach_score_amount = dbClient.ReadInt32("SELECT ach_score_amount FROM achievements WHERE id = '" + Achievement.Id + "' LIMIT 1"); Session.GetMessageHandler().GetResponse().AppendInt32(ach_score_amount * Level); // pixels or achievement points Session.GetMessageHandler().GetResponse().AppendInt32(10); // pixels or achievement points }





