Achievement Score 85% Complete!

Results 1 to 19 of 19
  1. #1
    Proficient Member HabsHotel is offline
    MemberRank
    Jan 2011 Join Date
    CanadaLocation
    167Posts

    happy Achievement Score 85% Complete!

    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
    Code:
                // Give the user the pixels he deserves
                Session.GetHabbo().ActivityPoints += Value;
                Session.GetHabbo().UpdateActivityPointsBalance(true, Value);
    *UPDATED* Under it Add:
    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");
                }
    In Messages > Requests > Users.cs Replace:
    Code:
    private void GetWinScore()
            {
                GetResponse().Init(443);
                GetResponse().AppendInt32(99); //value 
                GetResponse().AppendStringWithBreak("");
                SendResponse();
            }
    With:
    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();
                }
            }
    Finally Add these Sql's into your Database:
    Code:
    CREATE TABLE IF NOT EXISTS `users` (
      `ach_score` int(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (`id`)
    )
    Plus,
    Code:
    CREATE TABLE IF NOT EXISTS `achievements` (
      `ach_score_amount` int(11) NOT NULL DEFAULT '11',
      PRIMARY KEY (`id`)
    )
    ______________________________________________________________


    Find:
    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
    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));
    
                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
                }
    Remember to Like!
    Last edited by HabsHotel; 13-04-11 at 03:55 AM.


  2. #2
    Proficient Member DjInTrouble is offline
    MemberRank
    Dec 2010 Join Date
    The NetherlandsLocation
    180Posts

    Re: Achievement Score 60% Complete!

    Hmm good but not very usefull.
    He gave 10 ach points(like in my emu) but you must make the achievement system with different ach points.

  3. #3
    Proficient Member HabsHotel is offline
    MemberRank
    Jan 2011 Join Date
    CanadaLocation
    167Posts

    Re: Achievement Score 60% Complete!

    Quote Originally Posted by DjInTrouble View Post
    Hmm good but not very usefull.
    He gave 10 ach points(like in my emu) but you must make the achievement system with different ach points.
    Yes that still needs to be completed.. I can start working on it :)

  4. #4
    Proficient Member DjInTrouble is offline
    MemberRank
    Dec 2010 Join Date
    The NetherlandsLocation
    180Posts

    Re: Achievement Score 60% Complete!

    Okay:)
    If you need help with it, ask me.

  5. #5
    Proficient Member HabsHotel is offline
    MemberRank
    Jan 2011 Join Date
    CanadaLocation
    167Posts

    Re: Achievement Score 60% Complete!

    Quote Originally Posted by DjInTrouble View Post
    Okay:)
    If you need help with it, ask me.
    Updated the code above now All I need to do is to make it multiply the number (10) to somthing higher.
    Last edited by HabsHotel; 26-02-11 at 10:13 AM.

  6. #6
    are you ******* kidding!! capostrike93 is offline
    MemberRank
    Jan 2011 Join Date
    366Posts

    Re: Achievement Score 60% Complete!

    private void GetScore()
    {
    GetResponse().Init(443);
    GetResponse().AppendInt32(Session.GetHabbo().Achievements.Count * 10);
    GetResponse().AppendStringWithBreak("");
    SendResponse();
    }

  7. #7
    Proficient Member HabsHotel is offline
    MemberRank
    Jan 2011 Join Date
    CanadaLocation
    167Posts

    Re: Achievement Score 60% Complete!

    Allright it now multiplys the achievement score you receive after unlocking an acheivment! *Codes Updated*
    And if somthing is wrong it mite because the fact that I did this at like 4:00 AM at night and am very tired.. Off to bed now!
    Last edited by HabsHotel; 26-02-11 at 10:35 AM.

  8. #8
    Member Habbi is offline
    MemberRank
    Feb 2011 Join Date
    88Posts

    Re: Achievement Score 85% Complete!

    Good.

  9. #9
    Proficient Member iDream is offline
    MemberRank
    May 2010 Join Date
    NorwayLocation
    176Posts

    Re: Achievement Score 85% Complete!

    Excellent.
    Thanks for this ;]

  10. #10
    Member EliteRoyal is offline
    MemberRank
    Mar 2011 Join Date
    Santo Domingo,Location
    55Posts

    Re: Achievement Score 85% Complete!

    I have One Error
    please help me!!!


  11. #11
    sexiess is a sin. Subway is offline
    MemberRank
    Jun 2010 Join Date
    2,491Posts

    Re: Achievement Score 85% Complete!

    Hm, seems good but not 100% :(

  12. #12
    Apprentice Ione is offline
    MemberRank
    Apr 2011 Join Date
    CanadaLocation
    11Posts

    Re: Achievement Score 85% Complete!

    This looks neat. Habbo has some new features that you guys have coded into your emulator well enough. Good luck with this, hopefully it works.

  13. #13
    hi i'm robbie Roper is offline
    MemberRank
    Oct 2008 Join Date
    /home/roperLocation
    2,283Posts

    Re: Achievement Score 85% Complete!

    Brilliant release, thanks for sharing with the community.

  14. #14
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: Achievement Score 85% Complete!

    @Velox / Roper, Lolwut!? This ain't cached when a user logins, and it aint the proper way to calculate the score.

  15. #15
    Account Upgraded | Title Enabled! Miggs is offline
    MemberRank
    Oct 2010 Join Date
    711Posts

    Re: Achievement Score 85% Complete!

    Stop Spamming !!

    PS: Nice :P

  16. #16
    Account Upgraded | Title Enabled! SlimHotel is offline
    MemberRank
    Mar 2011 Join Date
    c:\xampp\htdocsLocation
    390Posts

    Re: Achievement Score 85% Complete!

    10/10 veryyy nice!

  17. #17
    Member EliteRoyal is offline
    MemberRank
    Mar 2011 Join Date
    Santo Domingo,Location
    55Posts

    Re: Achievement Score 85% Complete!

    I Have problem but no one can help me so do you said you are godd people!!!

  18. #18
    hi i'm robbie Roper is offline
    MemberRank
    Oct 2008 Join Date
    /home/roperLocation
    2,283Posts

    Re: Achievement Score 85% Complete!

    Quote Originally Posted by PEjump2 View Post
    @Velox / Roper, Lolwut!? This ain't cached when a user logins, and it aint the proper way to calculate the score.
    Thats why it says '85%' bro - seriously, the trollin' is getting old now.

  19. #19
    Banned Someuser is offline
    BannedRank
    Aug 2010 Join Date
    466Posts

    Re: Achievement Score 85% Complete!

    Quote Originally Posted by Veelox View Post
    Thats why it says '85%' bro - seriously, the trollin' is getting old now.
    They should change the thread title to 35% then :P



Advertisement