• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Hang Glider - 2.0 [Butterfly, R63, MySQL]

Status
Not open for further replies.
Not so spooky...
Loyal Member
Joined
May 22, 2010
Messages
1,017
Reaction score
276
Error in packet F_@gST-540332-2852514301-8804435872-otaku-1XhQ:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Hang.HabboHotel.Achievements.AchievementManager.UnlockAchievement(GameClient Session, UInt32 AchievementId, Int32 Level)
at Hang.HabboHotel.GameClients.GameClient.Login(String AuthTicket)
at Hang.Messages.GameClientMessageHandler.SSOLogin()
at Hang.Messages.GameClientMessageHandler.HandleRequest(ClientMessage pRequest)
at Hang.HabboHotel.GameClients.GameClient.HandleConnectionData(Byte[]& data)


Im getting this error ive done all thats been said in this tread and
it could be the cms im useing as it looks like a ticket error
 
Junior Spellweaver
Joined
Aug 30, 2010
Messages
172
Reaction score
35
Hmmm, why we should to use it when we have the original source leaked (on another topic)? The mankind is going for a stable version, no retarded stuff.

We must forward, not backward!

- Yesser
 
swagggggg
Loyal Member
Joined
Oct 28, 2008
Messages
1,557
Reaction score
368
Yesser, hush up, you hardly know what you're Ducking talking about,

anyway after craig just explained, i was checking through the source with your errors, when someone new registers on uberEmulator, they automatically get an achievement (badge) of beta testing I think? And that wasn't in the achievements table.
 
ส็็็็็็็
Loyal Member
Joined
Sep 21, 2009
Messages
2,005
Reaction score
594
Yesser, hush up, you hardly know what you're Ducking talking about,

anyway after craig just explained, i was checking through the source with your errors, when someone new registers on uberEmulator, they automatically get an achievement (badge) of beta testing I think? And that wasn't in the achievements table.

Thats in Gameclient.cs I think, Every user is awarded that badge.
 
Divine Celestial
Loyal Member
Joined
Oct 2, 2011
Messages
858
Reaction score
272
Does anyone know what swf version works for this emu?
 
Divine Celestial
Loyal Member
Joined
Oct 2, 2011
Messages
858
Reaction score
272
I tried his swfs and the other swfs but for strange reason I am unable to enter rooms.
 
Divine Celestial
Loyal Member
Joined
Oct 2, 2011
Messages
858
Reaction score
272
Okay that issue if fixed, now when ever I click on the achievement tab I get an error in the emu. I tried using the codes from other emu that don't have the issue but nothing. Any help?

Here is the error:
Error in packet Er:
System.NullReferenceException: Object reference not set to an instance of an object.
at Hang.HabboHotel.Achievements.AchievementManager.SerializeAchievementList(GameClient Session) in C:\Users\Danny\Desktop\Hang Glider v.2.0.1\HabboHotel\Achievements\AchievementManager.cs:line 76
at Hang.Messages.GameClientMessageHandler.GetAchievements() in C:\Users\Danny\Desktop\Hang Glider v.2.0.1\Messages\Requests\Users.cs:line 191
at Hang.Messages.GameClientMessageHandler.HandleRequest(ClientMessage pRequest) in C:\Users\Danny\Desktop\Hang Glider v.2.0.1\Messages\GameClientMessageHander.cs:line 62
at Hang.HabboHotel.GameClients.GameClient.HandleConnectionData(Byte[]& data) in C:\Users\Danny\Desktop\Hang Glider v.2.0.1\HabboHotel\GameClients\GameClient.cs:line 292
 
Last edited:
topkek amirite??
Joined
May 16, 2009
Messages
751
Reaction score
696
Okay that issue if fixed, now when ever I click on the achievement tab I get an error in the emu. I tried using the codes from other emu that don't have the issue but nothing. Any help?

Here is the error:

Try going to that void and commenting out its contents and putting
return true;

I guess that'll be a fast solution? :8:
 
Divine Celestial
Loyal Member
Joined
Oct 2, 2011
Messages
858
Reaction score
272
That still don't work, unless I am doing it to the incorrect void.

Does anyone has the fix for the achievement tab?

Willing to pay.
 

bot

Newbie Spellweaver
Joined
Oct 26, 2009
Messages
40
Reaction score
3
That still don't work, unless I am doing it to the incorrect void.

Does anyone has the fix for the achievement tab?

Willing to pay.

I just commented out the achivements for now and built the solution again and it was fine. Seems to incomplete probably just a small problem. Anyways do that for now or just see whats going wrong with it and try to fix it.
 
Divine Celestial
Loyal Member
Joined
Oct 2, 2011
Messages
858
Reaction score
272
I just commented out the achivements for now and built the solution again and it was fine. Seems to incomplete probably just a small problem. Anyways do that for now or just see whats going wrong with it and try to fix it.

May you please post the code? Thanks!
 

bot

Newbie Spellweaver
Joined
Oct 26, 2009
Messages
40
Reaction score
3
May you please post the code? Thanks!

Yeah its just a temp fix till I can fully look at it for more than 5 minutes.

Replace your whole AchievementManager.cs with this.

Code:
using System;
using System.Collections.Generic;
using System.Data;
using Hang.HabboHotel.GameClients;
using Hang.HabboHotel.Users.Badges;
using Hang.Messages;
using Hang.Storage;

// namespace Hang.HabboHotel.Achievements
// {
   // class AchievementManager
   // {
       // private Dictionary<uint, Achievement> Achievements;

       // internal AchievementManager()
       // {
        //    this.Achievements = new Dictionary<uint, Achievement>();
      //  }

       // internal void LoadAchievements(DatabaseClient MySQL)
       // {
           // Achievements.Clear();
          //  DataTable Data = new DataTable();

          //  Data = MySQL.query_read("SELECT * FROM achievements");

           // if (Data == null)
           // {
            //    return;
           // }

           // foreach (DataRow Row in Data.Rows)
           // {
           //     Achievements.Add((uint)Row["id"], new Achievement((uint)Row["id"], (int)Row["levels"], (string)Row["badge"], (int)Row["pixels_base"], (double)Row["pixels_multiplier"], Convert.ToString(Row["category"]), HangEnvironment.EnumToBool(Row["dynamic_badgelevel"].ToString())));
         //   }
       // }

       // internal static Boolean UserHasAchievement(GameClient Session, uint Id, int MinLevel)
       // {
         //   if (!Session.GetHabbo().Achievements.ContainsKey(Id))
          //  {
            //    return false;
           // }

           // if (Session.GetHabbo().Achievements[Id] >= MinLevel)
           // {
             //   return true;
           // }
            
           // return false;
       // }

       // internal ServerMessage SerializeAchievementList(GameClient Session)
       // {
         //   List<Achievement> AchievementsToList = new List<Achievement>();
          //  Dictionary<uint, int> NextAchievementLevels = new Dictionary<uint, int>();

          //  using (TimedLock.Lock(Achievements))
           // {
             //   foreach (Achievement Achievement in Achievements.Values)
              //  {
                 //   if (!Session.GetHabbo().Achievements.ContainsKey(Achievement.Id))
                   // {
                    //    AchievementsToList.Add(Achievement);
                      //  NextAchievementLevels.Add(Achievement.Id, 1);
                   // }
                   // else
                   // {
                     //   if (Session.GetHabbo().Achievements[Achievement.Id] >= Achievement.Levels)
                       // {
                         //   continue;
                       // }

                       // AchievementsToList.Add(Achievement);
                       // NextAchievementLevels.Add(Achievement.Id, Session.GetHabbo().Achievements[Achievement.Id] + 1);
                   // }
               // }
           // }

           // ServerMessage Message = new ServerMessage(436);
           // Message.AppendInt32(AchievementsToList.Count);

            // foreach (Achievement Achievement in AchievementsToList)
           // {
              //  int Level = NextAchievementLevels[Achievement.Id];
               // int Pixels = CalculateAchievementValue(Achievement.PixelBase, Level);

                //Fix achivements 90%

           //     Achievement.Serialize(Message, Pixels, Level, FormatBadgeCode(Achievement.BadgeCode, Level, Achievement.DynamicBadgeLevel), Achievement.category, Achievement.Levels);
           // }

         //   return Message;
       // }

      //  internal void UnlockAchievement(GameClient Session, uint AchievementId, int Level)
      //  {
     //       // Get the achievement
       //     Achievement Achievement = Achievements[AchievementId];

            // Make sure the achievement is valid and has not already been unlocked
         //   if (Achievement == null || UserHasAchievement(Session, Achievement.Id, Level) || Level < 1 || Level > Achievement.Levels)
           // {
              //  return;
           // }

            // Calculate the pixel value for this achievement
          //  int Value = CalculateAchievementValue(Achievement.PixelBase, Level);

            // Remove any previous badges for this achievement (old levels)
           // using (TimedLock.Lock(Session.GetHabbo().GetBadgeComponent().BadgeList))
           // {
            //    List<string> BadgesToRemove = new List<string>();

              //  foreach (Badge Badge in Session.GetHabbo().GetBadgeComponent().BadgeList)
               // {
                 //   if (Badge.Code.StartsWith(Achievement.BadgeCode))
                   // {
                     //   BadgesToRemove.Add(Badge.Code);
                   // }
               // }

              //  foreach (string Badge in BadgesToRemove)
               // {
                //    Session.GetHabbo().GetBadgeComponent().RemoveBadge(Badge);
               // }
           // }

            // Give the user the new badge
           // Session.GetHabbo().GetBadgeComponent().GiveBadge(FormatBadgeCode(Achievement.BadgeCode, Level, Achievement.DynamicBadgeLevel), true);

            // Update or set the achievement level for the user
           // if (Session.GetHabbo().Achievements.ContainsKey(Achievement.Id))
           // {
             //   Session.GetHabbo().Achievements[Achievement.Id] = Level;

              //  using (DatabaseClient MySQL = HangEnvironment.GetDatabase().GetClient())
               // {
               //     MySQL.query("UPDATE user_achievements SET achievement_level = '" + Level + "' WHERE user_id = '" + Session.GetHabbo().Id + "' AND achievement_id = '" + Achievement.Id + "' LIMIT 1");
               // }
           // }
           // else
           // {
             //   Session.GetHabbo().Achievements.Add(Achievement.Id, Level);

               // using (DatabaseClient MySQL = HangEnvironment.GetDatabase().GetClient())
               // {
                 //   MySQL.query("INSERT INTO user_achievements (user_id,achievement_id,achievement_level) VALUES ('" + Session.GetHabbo().Id + "','" + Achievement.Id + "','" + Level + "')");
               // }
           // }

            // Notify the user of the achievement gain
           // ServerMessage Message = new ServerMessage(437);
           // Message.AppendUInt(Achievement.Id); //id del achivements
           // Message.AppendInt32(Level); //nivel
           // string L = "";
           // if (Achievement.Levels > 1)
           //     L = Achievement.Levels.ToString(); //niveles
           // Message.AppendInt32(182); // ? 
           // Message.AppendStringWithBreak(FormatBadgeCode(Achievement.BadgeCode, Level, Achievement.DynamicBadgeLevel) + L); // datos de la placa

           // Message.AppendInt32(0); // Puntos de recompensas
           // Message.AppendInt32(Value); //valor
           // Message.AppendBoolean(false); //progreso
           // Message.AppendInt32(0); // puntos extras de facebook
           // Message.AppendInt32(-1);
           // Message.AppendByte(2);
           // Message.AppendStringWithBreak(Achievement.category); // categoria de la placa


          //  Session.GetConnection().SendMessage(Message);

            // Give the user the pixels he deserves 
            // Session.GetHabbo().ActivityPoints += Value; //valor de los pixeles
           // Session.GetHabbo().UpdateActivityPointsBalance(true);  // Pixeles

            // Give the user the pixels he deserves
            // Session.GetHabbo().ActivityPoints += Value;
            // Session.GetHabbo().UpdateActivityPointsBalance(Value);

            // [13-12-2009 17:03:34 from 62.50.35.181:30000] 
            // FvXXDRB

            // [13-12-2009 17:03:34 from 62.50.35.181:30000] 
            // FuQBIACH_Motto1

            // FuPBJACH_RoomEntry2ACH_RoomEntry1
       // }

       // internal static int CalculateAchievementValue(int BaseValue, int Level)
       // {
         //   return (BaseValue + (50 * Level));
       // }

       // internal static string FormatBadgeCode(string BadgeTemplate, int Level, bool Dyn)
       // {
         //   if (!Dyn)
           // {
             //   return BadgeTemplate;
           // }

           // return BadgeTemplate + Level;
      //  }
   // }
//}

^may be wrong but shurgs couldn't care.

Just a place holder for now makes the achievements none existent and you can't click them inside the client. Theres probably just a small problem with the code and thats why its throwing an error inside the emu.

tbh its not a horrible source at all been fun exploring it more and more.


bot
 
Status
Not open for further replies.
Back
Top