Project Mango.

Brad

Well-Known Member
Jun 5, 2012
2,319
992
yRtnqQl.png

Mango Emulator for Habbo revision PRODUCTION-201802201205-141713395​

HI all,

As some will know I started working on Mango around 1 year ago, but I abandoned it when I got too busy and never really thought about continuing it until recently. If you don't know what Mango is you can find the link to the original release below. First off, credits go to @Sledmore, for starting this off (this is not the one he started before he released his PlusEmu) & of course, to the original creators of Mango. This is currently a solo project & I hope to release this as a solid Emulator.

Red = Not Started.
Yellow = In Progress.
Green = Live.

  • Navigator
  • Messenger
  • Catalog
  • Pets
  • Bots
  • Item handling.
  • Trading.
  • Wired.
  • Moderation.
PHP:
using Mango.Communication.Sessions;
using Mango.Catalog;

namespace Mango.Communication.Packets.Incoming.Catalog
{
    class PurchaseFromCatalogEvent : IPacketEvent
    {
        public void parse(Session session, ClientPacket packet)
        {
            if (session == null || session.GetPlayer() == null)
                return;

            int PageId = packet.PopWiredInt();
            int ItemId = packet.PopWiredInt();
            string Data = packet.PopString();
            int Amount = packet.PopInt();

            if (!Mango.GetServer().GetCatalogManager().TryGetPage(PageId, out CatalogPage Page))
                return;

            if (!Page.Visible || (Page.MinRank > session.GetPlayer().Rank))
                return;

            Page.PageType.OnPurchase(session, Page, ItemId, Data, Amount);      
        }  
    }
}
PHP:
using Mango.Players;
using Mango.Rooms.AI.Bots;
using Mango.Rooms.AI.Pets;
using Mango.Rooms.AI.Pets.Interfaces;
using Mango.Rooms.Bots;
using Mango.Rooms.Bots.Interfaces;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Concurrent;
using System.Data;

namespace Mango.Rooms.AI
{
   class AIManager
    {
        private ConcurrentDictionary<int, Pet> _pets = null;
        public ConcurrentDictionary<int, Bot> _bots = null;

        private readonly BotComponent botComponent = null;
        private readonly PetComponent petComponent = null;
        public readonly RoomInstance roomInstance = null;

        public AIManager()
        {

            this._bots = new ConcurrentDictionary<int, Bot>();
            this._pets = new ConcurrentDictionary<int, Pet>();
       
            this.InitializeBots();
            this.InitializePets();

            this.botComponent = new BotComponent(_bots);
            this.petComponent = new PetComponent(_pets);

        }

        public void InitializePets()
        {
            if (this._pets.Count > 0)
                this._pets.Clear();

            using (var DbCon = Mango.GetServer().GetDatabaseManager().GetQueryReactor())
            {

                DbCon.SetQuery("SELECT `id`, `race`, `name` FROM `pets`;");
                DataTable Pets = DbCon.getTable();
                if (Pets != null)
                {
                    foreach (DataRow Reader in Pets.Rows)
                    {
                        {
                            int Id = Convert.ToInt32(Reader["id"]);
                            int Race = Convert.ToInt32(Reader["race"]);
                            string Name = Convert.ToString(Reader["name"]);
                            IPetType Type = PetType.GetPetTypeFromPetRaceId(Race);
                         
                            if (!this._pets.ContainsKey(Id))
                            {
                                this._pets.TryAdd(Id, new Pet(Id, Name, Type));
                            }
                        }
                    }
                }

            }
        }

        public void InitializeBots()
        {
            if (this._bots.Count > 0)
                this._bots.Clear();

            using (var DbCon = Mango.GetServer().GetDatabaseManager().GetQueryReactor())
            {
             
                DbCon.SetQuery("SELECT `id`, `room_id`, `user_id`, `name`, `motto`, `figure`, `gender`,`ai_type` FROM `bots`;");
                DataTable Bots = DbCon.getTable();
                if(Bots != null)
                {              
                    foreach (DataRow Reader in Bots.Rows)
                    {

                        int Id = Convert.ToInt32(Reader["id"]);
                        int RoomId = Convert.ToInt32(Reader["room_id"]);
                        int UserId = Convert.ToInt32(Reader["user_id"]);
                        string Name = Convert.ToString(Reader["name"]);
                        string Motto = Convert.ToString(Reader["motto"]);
                        string Figure = Convert.ToString(Reader["figure"]);
                        string Gender = Convert.ToString(Reader["gender"]);
                        BotType Type = BotTypes.GetBotTypesFromString(Convert.ToString(Reader["ai_type"]));

                        if (!this._bots.ContainsKey(Id))
                        {                          
                            this._bots.TryAdd(Id, new Bot(Id, RoomId, UserId, Name, Motto, Figure, Gender, Type));
                        }
                    }
                }
            }
        }

        public BotComponent GetBotComponent()
        {
            return botComponent;
        }

        public PetComponent GetPetComponent()
        {
            return petComponent;
        }



        public void Dispose()
        {
            _bots.Clear();
            _pets.Clear();

            _bots = null;
            _pets = null;
        }
    }
}
e222c01319bf729f5a8bc4a37a28288d.png
Test Hotel: .

Original Release:
 
Last edited:
Jun 30, 2017
77
12
What features you can add? Please add camera, habbopathfinder, talent, polls, quickpolls, fix horse for saddle and fix sso ticket exploits.
 

Lotus

Legacy, it's all anyone leaves behind.
Jun 8, 2012
1,637
501
yRtnqQl.png

Mango Emulator for Habbo revision PRODUCTION-201802201205-141713395​

HI all,

As some will know I started working on Mango around 1 year ago, but I abandoned it when I got too busy and never really thought about continuing it until recently. If you don't know what Mango is you can find the link to the original release below. First off, credits go to @Sledmore, for starting this off (this is not the one he started before he released his PlusEmu) & of course, to the original creators of Mango. This is currently a solo project & I hope to release this as a solid Emulator.

Red = Not Started.
Yellow = In Progress.
Green = Live.

  • Navigator
  • Messenger
  • Catalog
  • Pets
  • Bots
  • Item handling.
  • Trading.
  • Wired.
  • Moderation.
PHP:
using Mango.Communication.Sessions;
using Mango.Catalog;

namespace Mango.Communication.Packets.Incoming.Catalog
{
    class PurchaseFromCatalogEvent : IPacketEvent
    {
        public void parse(Session session, ClientPacket packet)
        {
            if (session == null || session.GetPlayer() == null)
                return;

            int PageId = packet.PopWiredInt();
            int ItemId = packet.PopWiredInt();
            string Data = packet.PopString();
            int Amount = packet.PopInt();

            if (!Mango.GetServer().GetCatalogManager().TryGetPage(PageId, out CatalogPage Page))
                return;

            if (!Page.Visible || (Page.MinRank > session.GetPlayer().Rank))
                return;

            Page.PageType.OnPurchase(session, Page, ItemId, Data, Amount);      
        }  
    }
}
PHP:
using Mango.Players;
using Mango.Rooms.AI.Bots;
using Mango.Rooms.AI.Pets;
using Mango.Rooms.AI.Pets.Interfaces;
using Mango.Rooms.Bots;
using Mango.Rooms.Bots.Interfaces;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Concurrent;
using System.Data;

namespace Mango.Rooms.AI
{
   class AIManager
    {
        private ConcurrentDictionary<int, Pet> _pets = null;
        public ConcurrentDictionary<int, Bot> _bots = null;

        private readonly BotComponent botComponent = null;
        private readonly PetComponent petComponent = null;
        public readonly RoomInstance roomInstance = null;

        public AIManager()
        {

            this._bots = new ConcurrentDictionary<int, Bot>();
            this._pets = new ConcurrentDictionary<int, Pet>();
       
            this.InitializeBots();
            this.InitializePets();

            this.botComponent = new BotComponent(_bots);
            this.petComponent = new PetComponent(_pets);

        }

        public void InitializePets()
        {
            if (this._pets.Count > 0)
                this._pets.Clear();

            using (var DbCon = Mango.GetServer().GetDatabaseManager().GetQueryReactor())
            {

                DbCon.SetQuery("SELECT `id`, `race`, `name` FROM `pets`;");
                DataTable Pets = DbCon.getTable();
                if (Pets != null)
                {
                    foreach (DataRow Reader in Pets.Rows)
                    {
                        {
                            int Id = Convert.ToInt32(Reader["id"]);
                            int Race = Convert.ToInt32(Reader["race"]);
                            string Name = Convert.ToString(Reader["name"]);
                            IPetType Type = PetType.GetPetTypeFromPetRaceId(Race);
                         
                            if (!this._pets.ContainsKey(Id))
                            {
                                this._pets.TryAdd(Id, new Pet(Id, Name, Type));
                            }
                        }
                    }
                }

            }
        }

        public void InitializeBots()
        {
            if (this._bots.Count > 0)
                this._bots.Clear();

            using (var DbCon = Mango.GetServer().GetDatabaseManager().GetQueryReactor())
            {
             
                DbCon.SetQuery("SELECT `id`, `room_id`, `user_id`, `name`, `motto`, `figure`, `gender`,`ai_type` FROM `bots`;");
                DataTable Bots = DbCon.getTable();
                if(Bots != null)
                {              
                    foreach (DataRow Reader in Bots.Rows)
                    {

                        int Id = Convert.ToInt32(Reader["id"]);
                        int RoomId = Convert.ToInt32(Reader["room_id"]);
                        int UserId = Convert.ToInt32(Reader["user_id"]);
                        string Name = Convert.ToString(Reader["name"]);
                        string Motto = Convert.ToString(Reader["motto"]);
                        string Figure = Convert.ToString(Reader["figure"]);
                        string Gender = Convert.ToString(Reader["gender"]);
                        BotType Type = BotTypes.GetBotTypesFromString(Convert.ToString(Reader["ai_type"]));

                        if (!this._bots.ContainsKey(Id))
                        {                          
                            this._bots.TryAdd(Id, new Bot(Id, RoomId, UserId, Name, Motto, Figure, Gender, Type));
                        }
                    }
                }
            }
        }

        public BotComponent GetBotComponent()
        {
            return botComponent;
        }

        public PetComponent GetPetComponent()
        {
            return petComponent;
        }



        public void Dispose()
        {
            _bots.Clear();
            _pets.Clear();

            _bots = null;
            _pets = null;
        }
    }
}
e222c01319bf729f5a8bc4a37a28288d.png
There will be a URL for open testing shortly.

Original Release:

lol I forgot i even posted a release thread for this wtf I been looking for a copy forever too LMAO!

good luck Brad fam cant wait to see the outcome!
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
A few updates.
  • Implemented a new PathFinder Credits to @Damien.
  • Improved Users Data to a much more simpler format which corresponds with UserStats.
  • Implement a Notification System, each notif type being easier to recognize.
  • Bot & Pet data handling has been improved.
  • Started Wired Handling.

Not a lot has been done, been busy with work but I don't plan on finishing this anytime soon.
 

CXS7OM

New Member
Aug 12, 2017
23
12
Best of luck Brad, Mango used to be a big revolution at those times, hope you can bring it back on a huge revamp! :p
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
Hi, sorry for the lack of updates been busy with work lately.

I plan to have a open beta for a few days in the upcoming weeks, just to test User Interaction, Item Handling & the Messenger. I will post the URL here once ready.
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
Hi all,

Should be ready for testing very soon. I have something special coming along side this, which I will showcase soon. Development has been coming on nicely & has not been abandoned (for anyone wondering). Next time I update this thread hopefully will have a URL to openly test the Emulator.
 

Lotus

Legacy, it's all anyone leaves behind.
Jun 8, 2012
1,637
501
@Brad can we use the Emulator to create a own Habbo Retro? And will it be able to use it for a german Retro?

Upon Release you'll be able to create your own Habbo Retro with the Emulator & SWFs provided for it. You'll need to translate commands & flash texts, etc, In-order to use it for a German Retro.
 

Users who are viewing this thread

Top