Plus Emulation Server Edited

Parsov

Active Member
Messages
126
Likes
67
#1
Howdy Devbest Community! Today I'm releasing an emulator that me and a few people have worked on. The purpose of the release is because I witnessed that my work is in too many peoples hands and it's better off just releasing as most people can release it under their own name.
This Emulator is functional however you might face issues if so contact me about it and I'll definitely try to help.

This Emulator is very old it's using a very old Production aswell and there a few things that are not supported like the Group Forums however as an alternative we've made Group Chats.
I would say this is one of the most up-to-date Plus Emulator's out there rarely you will come across people using edits like my own.

Emulators Special Features:

  • 900 Achievements including many Game Achievements (I've been working on the Games like Freeze, Banzai and Football).
  • Skateboarding Achievements & Snowboarding
  • 80% Functioning Football and all working football achievements
  • 2 Types of Crackables (You can make literally any item crackable)
  • Group Chats
  • Habbo Olympics furniture working with timer achievements same for Skating.
  • Viking
  • Astar PathFinding
  • Ride Horse
  • Santa Shop
  • All latest wired effects conditions and custom wired
  • Staff Picks
  • Room Polls
  • A few custom commands
  • Lot's of fixes like Ignore Event (don't think it worked on Revision 1).
  • Maze features example = We have a Halloween Frank Item which when you click on sends you to a room which can be a maze and when they come to the final room they get their prize and it gets saved to the database.
  • The Maze is linked to Seasonal Manager which is where we put some data.
  • Immune system by @Meap
  • Event System thanks to @Berk
  • Random LTD
  • Way too many things you will find out!


[ To view this link you must register here. ]
[ To view this link you must register here. ]
[ To view this link you must register here. ]
[ To view this link you must register here. ]
[ To view this link you must register here. ]
[ To view this link you must register here. ]
[ To view this link you must register here. ]
[ To view this link you must register here. ]
[ To view this link you must register here. ]
[ To view this link you must register here. ]

(Images are from a hotel that the emulator used to run on).



The main functionality of this Emulator is that it has a lot of achievements coded to it. It's a pretty much vanilla emulator and there are a few things missing like Crafting, Ecotron (I think), JukeBox and Nux Alerts which are custom alerts.

If you want more features coming your way or you have a hard time using something hit me up on this thread and i'll definetly help you with that.

Here is the release link:
[ To view this link you must register here. ]


I won't be providing the database as I don't have a cleaned one it's just Plus Emulator with a few extra tables and columns which I'm sure people who are willing to use this Emulator will be able to figure.
Some might disagree that I did not do the work but I couldn't care less what people think.

Credits:
  • Myself For the edit
  • @Sledmore Plus Emulator and without him I wouldn't be posting this!
  • @Hvmada For letting me run my work on HabDab Hotel and also helping with somethings.
  • @Platinum without him and his hotel I wouldn't make this Edit.
  • @Meap for always anoyying me

Enjoy the Emulator!
You won't find another like this one! :)

If you have issues with AntiMutant.cs
Just do this:
C#:
using System;
using System.Linq;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Net;
using System.IO;
using System.Xml;
using System.Windows.Forms;

namespace Plus.HabboHotel.Global
{
    public class AntiMutant
    {
        private Dictionary<string, Dictionary<string, Figure>> _parts;

        public AntiMutant()
        {
            _parts = new Dictionary<string, Dictionary<string, Figure>>();
            Init();
        }

        public void Init()
        {
            if (this._parts.Count > 0)
                this._parts.Clear();

            try
            {
                XDocument Doc = XDocument.Load(Path.Combine(Application.StartupPath, @"extra/figuredata.xml"));

                var data = (from item in Doc.Descendants("sets") from tItem in Doc.Descendants("settype") select new { Part = tItem.Elements("set"), Type = tItem.Attribute("type"), });
                foreach (var item in data.ToList())
                {
                    foreach (var part in item.Part.ToList())
                    {
                        string PartName = item.Type.Value;
                        if (!_parts.ContainsKey(PartName))
                            _parts.Add(PartName, new Dictionary<string, Figure>());

                        Figure toAddFigure = new Figure(PartName, part.Attribute("id").Value, part.Attribute("gender").Value, part.Attribute("colorable").Value);

                        if (!_parts[PartName].ContainsKey(part.Attribute("id").Value))
                            _parts[PartName].Add(part.Attribute("id").Value, toAddFigure);
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                //Was the file found?
            }
        }

        public string RunLook(string Look)
        {
            List<string> toReturnFigureParts = new List<string>();
            List<string> fParts = new List<string>();
            string[] requiredParts = { "hd", "ch" };
            bool flagForDefault = false;

            string[] FigureParts = Look.Split('.');
            string genderLook = GetLookGender(Look);

            foreach (string Part in FigureParts.ToList())
            {
                string newPart = Part;
                string[] tPart = Part.Split('-');
                if (tPart.Count() < 2)
                {
                    flagForDefault = true;
                    continue;
                }

                string partName = tPart[0];
                string partId = tPart[1];

                if (!_parts.ContainsKey(partName) || !_parts[partName].ContainsKey(partId) || (genderLook != "U" && _parts[partName][partId].Gender != "U" && _parts[partName][partId].Gender != genderLook))
                {
                    if (partName == "hd" && partId == "99999")
                    {
                        if (tPart.Count() == 2)
                        {
                            newPart = SetDefault(partName, genderLook);
                        }
                    }
                    else
                    {
                        newPart = SetDefault(partName, genderLook);
                    }
                }

                if (!fParts.Contains(partName)) fParts.Add(partName);
                if (!toReturnFigureParts.Contains(newPart)) toReturnFigureParts.Add(newPart);
            }

            if (flagForDefault)
            {
                toReturnFigureParts.Clear();
                toReturnFigureParts.AddRange("sh-3338-93.ea-1406-62.hr-831-49.ha-3331-92.hd-180-7.ch-3334-93-1408.lg-3337-92.ca-1813-62".Split('.'));
            }

            foreach (string requiredPart in requiredParts.Where(requiredPart => !fParts.Contains(requiredPart) && !toReturnFigureParts.Contains(SetDefault(requiredPart, genderLook))))
            {
                toReturnFigureParts.Add(SetDefault(requiredPart, genderLook));
            }

            return string.Join(".", toReturnFigureParts);
        }

        private string GetLookGender(string Look)
        {
            string[] FigureParts = Look.Split('.');

            foreach (string Part in FigureParts.ToList())
            {
                string[] tPart = Part.Split('-');
                if (tPart.Count() < 2)
                    continue;

                string partName = tPart[0];
                string partId = tPart[1];

                return this._parts.ContainsKey(partName) && this._parts[partName].ContainsKey(partId) ? this._parts[partName][partId].Gender : "U";
            }
            return "U";
        }

        private string SetDefault(string partName, string Gender)
        {
            string partId = "0";
            if (this._parts.ContainsKey(partName))
            {
                KeyValuePair<string, Figure> part = _parts[partName].FirstOrDefault(x => x.Value.Gender == Gender || Gender == "U");
                partId = part.Equals(default(KeyValuePair<string, Figure>)) ? "0" : part.Key;
            }
            return partName + "-" + partId + "-1";
        }
    }

    class Figure
    {
        private string Part;
        private string PartId;
        public string Gender;
        private string Colorable;

        public Figure(string Part, string PartId, string Gender, string Colorable)
        {
            this.Part = Part;
            this.PartId = PartId;
            this.Gender = Gender;
            this.Colorable = Colorable;
        }
    }
}
 
Last edited:

Berk

c00l c4n u g1mme ur c0d3 plox
Developer
Messages
755
Likes
132
#2
this is cancerous as fuck, especially the events system.


lmao
 

Parsov

Active Member
Messages
126
Likes
67
#12
Great release. I'm looking for the wired and crackables etc to add to my version of R2 Plus. I'm sure this will help me :)
Here are some crackables that can come in handy:

C#:
using Plus.Communication.Packets.Outgoing.Rooms.Engine;
using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
using Plus.HabboHotel.Rooms;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Plus.HabboHotel.Items.Interactor
{
    class InteractorMagicEgg : IFurniInteractor
    {
        public void OnPlace(GameClients.GameClient Session, Item Item)
        {
            Item.ExtraData = "0";
        }

        public void OnRemove(GameClients.GameClient Session, Item Item)
        {
        }

        public void OnTrigger(GameClients.GameClient Session, Item Item, int Request, bool HasRights)
        {
            if (Session == null || Session.GetHabbo() == null || Item == null)
                return;

            Room Room = Session.GetHabbo().CurrentRoom;
            if (Room == null)
                return;

            RoomUser Actor = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (Actor == null)
                return;

            var tick = int.Parse(Item.ExtraData);

            if (tick < Item.interactionCount)
            {
                if (Gamemap.TileDistance(Actor.X, Actor.Y, Item.GetX, Item.GetY) < 2)
                {
                    tick++;
                    Item.ExtraData = tick.ToString();
                    Item.UpdateState(true, true);
                    int X = Item.GetX, Y = Item.GetY, Rot = Item.Rotation;
                    Double Z = Item.GetZ;
                    if (tick == 19)
                    {
                        PlusEnvironment.GetGame().GetCrackableManager().ReceiveCrackableReward(Actor, Room, Item);
                        PlusEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Actor.GetClient(), "WhateverEggAchievementYouGot", 1);
                        //PlusEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Actor.GetClient(), "WhateverEggAchievementYouGot", 1);
                    }
                }
            }
        }

        public void OnWiredTrigger(Item Item)
        {

        }


C#:
using Plus.Communication.Packets.Outgoing.Inventory.Furni;
using Plus.Communication.Packets.Outgoing.Inventory.Purse;
using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
using Plus.HabboHotel.GameClients;
using Plus.HabboHotel.Rooms;
using Plus.Utilities;
using System;

namespace Plus.HabboHotel.Items.Interactor
{
    class InteractorEasterEgg : IFurniInteractor
    {
        public void OnPlace(GameClient Session, Item Item)
        {
            Item.ExtraData = "0";
            Item.FoundBy = string.Empty;
        }

        public void OnRemove(GameClient Session, Item Item)
        {
        }

        public void OnTrigger(GameClient Session, Item Item, int Request, bool HasRights)
        {
            if ((!string.IsNullOrEmpty(Item.FoundBy)))
            {
                if (Session.GetHabbo().Username != Item.FoundBy)
                {
                    Session.SendMessage(RoomNotificationComposer.SendBubble("easteregg", "This egg was found by " + Item.FoundBy + "!", ""));
                    return;
                }
            }
            else

            if (Session == null || Session.GetHabbo() == null || Item == null)
                return;

            Room Room = Session.GetHabbo().CurrentRoom;
            if (Room == null)
                return;

            RoomUser Actor = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (Actor == null)
                return;

            if (Gamemap.TileDistance(Actor.X, Actor.Y, Item.GetX, Item.GetY) < 2)
            {
                Item.FoundBy = Session.GetHabbo().Username;
            }

            var tick = int.Parse(Item.ExtraData);

            if (tick < 19)
            {
                if (Gamemap.TileDistance(Actor.X, Actor.Y, Item.GetX, Item.GetY) < 2)
                {
                    tick++;
                    Item.ExtraData = tick.ToString();
                    Item.UpdateState(true, true);
                    int X = Item.GetX, Y = Item.GetY, Rot = Item.Rotation;
                    Double Z = Item.GetZ;
                    if (tick == 19)
                    {
                        using (var dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                        {
                            Room.GetRoomItemHandler().RemoveFurniture(Session, Item.Id);
                            dbClient.runFastQuery("DELETE FROM items WHERE id = " + Item.Id);
                        }

                        // Generate Random Reward.
                        int RewardType = RandomNumber.GenerateRandom(1, 20);
                        switch (RewardType)
                        {
                            case 1:
                                int RewardDiamonds = RandomNumber.GenerateRandom(500, 1000);
                                Session.GetHabbo().Diamonds += RewardDiamonds;
                                Session.SendMessage(new HabboActivityPointNotificationComposer(Session.GetHabbo().Diamonds, RewardDiamonds, 5));
                                Session.SendWhisper("You won: " + RewardDiamonds + " Diamonds!.", 34);
                                break;
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                            case 8:
                            case 10:
                            case 11:
                            case 12:
                            case 13:
                            case 14:
                            case 15:
                            case 16:
                            case 17:
                            case 18:
                            case 19:
                            case 20:
                                Session.GetHabbo().Points += 50;
                                Session.SendMessage(new HabboActivityPointNotificationComposer(Session.GetHabbo().Points, 1, 103));
                                Session.SendMessage(RoomNotificationComposer.SendBubble("easteregg", "You just won a reward from the Easter Egg!", ""));
                                break;
                            case 7:
                                ItemData RewardItemPrize = null;
                                if (!PlusEnvironment.GetGame().GetItemManager().GetItem(9780, out RewardItemPrize))
                                { return; }

                                Item GiveItem = ItemFactory.CreateSingleItemNullable(RewardItemPrize, Session.GetHabbo(), "", "");
                                if (GiveItem != null)
                                {
                                    Session.GetHabbo().GetInventoryComponent().TryAddItem(GiveItem);
                                    Session.SendMessage(new FurniListNotificationComposer(GiveItem.Id, 1));
                                    Session.SendMessage(new FurniListUpdateComposer());
                                    Session.SendMessage(RoomNotificationComposer.SendBubble("easteregg", "You just got a reward! \n\n, " + Session.GetHabbo().Username + ", Click on here to open your inventory!", "inventory/open"));
                                }

                                Session.GetHabbo().GetInventoryComponent().UpdateItems(true);
                                break;
                        }

                        PlusEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Actor.GetClient(), "ACH_EggCracker", 1);
                        PlusEnvironment.GetGame().GetAchievementManager().ProgressAchievement(Actor.GetClient(), "ACH_EggMaster", 1);

                    }
                }

            }
        }

        public void OnWiredTrigger(Item Item)
        {

        }
    }
}


For the EasterEgg to work properly be sure to add this into Item.cs
C#:
// Under the Class Item add this:


        public string FoundBy;


You will also have to add into a few Composers:
C#:
else if (Item.Data.InteractionType == InteractionType.EASTEREGG)
            {
                base.WriteInteger(0);
                base.WriteInteger(7);
                base.WriteString(Item.ExtraData);
                if (Item.ExtraData.Length <= 0)
                {
                    base.WriteInteger(0);
                }
                else
                {
                    base.WriteInteger(int.Parse(Item.ExtraData));
                }
                base.WriteInteger(20);
            }

            else if (Item.Data.InteractionType == InteractionType.MAGICEGG)
            {
                base.WriteInteger(0);
                base.WriteInteger(7);
                base.WriteString(Item.ExtraData);
                if (Item.ExtraData.Length <= 0)
                {
                    base.WriteInteger(0);
                }
                else
                {
                    base.WriteInteger(int.Parse(Item.ExtraData));
                }
                base.WriteInteger(23);
            }


C#:
else if (Item.Data.InteractionType == InteractionType.EASTEREGG)
            {
                base.WriteInteger(0);
                base.WriteInteger(7);
                base.WriteString(Item.ExtraData);
                if (Item.ExtraData.Length <= 0)
                {
                    base.WriteInteger(0);
                }
                else
                {
                    base.WriteInteger(int.Parse(Item.ExtraData));
                }
                base.WriteInteger(20);
            }

            else if (Item.Data.InteractionType == InteractionType.MAGICEGG)
            {
                base.WriteInteger(0);
                base.WriteInteger(7);
                base.WriteString(Item.ExtraData);
                if (Item.ExtraData.Length <= 0)
                {
                    base.WriteInteger(0);
                }
                else
                {
                    base.WriteInteger(int.Parse(Item.ExtraData));
                }
                base.WriteInteger(23);
            }


C#:
else if (Item.Data.InteractionType == InteractionType.EASTEREGG)
            {
                base.WriteInteger(0);
                base.WriteInteger(7);
                base.WriteString(Item.ExtraData);
                if (Item.ExtraData.Length <= 0)
                {
                    base.WriteInteger(0);
                }
                else
                {
                    base.WriteInteger(int.Parse(Item.ExtraData));
                }
                base.WriteInteger(20);
            }

            else if (Item.Data.InteractionType == InteractionType.MAGICEGG)
            {
                base.WriteInteger(0);
                base.WriteInteger(7);
                base.WriteString(Item.ExtraData);
                if (Item.ExtraData.Length <= 0)
                {
                    base.WriteInteger(0);
                }
                else
                {
                    base.WriteInteger(int.Parse(Item.ExtraData));
                }
                base.WriteInteger(23);
            }


That should do the job for the existing crackables in the Emulator check the ItemBehaviour's the item "hits" should be located there.

I hope this helps with your project if I missed anything out let me know.
 

Parsov

Active Member
Messages
126
Likes
67
#20
@JMG
como fazer isso
Em db qual tabela?
Copy and paste me the error, I will not be providing the Database as I stated on the post. Nor the SWF. Paste the error here so I can tell you what you would need to do, I can't see it on that screenshot.
Post automatically merged:

Pretty sure its sarcasm. He contributed to the development.
He was joking 😂😂😂
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top