Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Bcstorm Emulator Fixes & tweaks thread

Status
Not open for further replies.
Junior Spellweaver
Joined
Feb 7, 2011
Messages
120
Reaction score
12
have any the incoming and outgoing packet for save branding? i can't find out.
 
Newbie Spellweaver
Joined
Oct 21, 2012
Messages
44
Reaction score
13
Wordfilter fix!:

Go to core -> LanguageLocale.cs and replace the entire thing with this:

Code:
namespace Butterfly.Core
{
    using Butterfly;
    using Database_Manager.Database.Session_Details.Interfaces;
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.IO;
    using System.Windows.Forms;
    using Database_Manager.Database;

    internal class LanguageLocale
    {
        private static List<string> swearwords;
        private static Dictionary<string, string> values;
        internal static string welcomeAlert;
        internal static bool welcomeAlertEnabled;

        internal static string FilterSwearwords(string original)
        {
            foreach (string str in swearwords)
            {
                original = ReplaceEx(original, str, "bobba");
            }
            return original;
        }

        internal static string GetValue(string value)
        {
            if (!values.ContainsKey(value))
            {
                throw new MissingLocaleException("Missing language locale for [" + value + "]");
            }
            return values[value];
        }

        internal static void Init()
        {
            values = IniReader.ReadFile(Path.Combine(Application.StartupPath, "System/locale.ini"));
            InitWelcomeMessage();
        }

        internal static void InitSwearWord()
        {
            DataTable table;
            swearwords = new List<string>();
            using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
            {
                adapter.setQuery("SELECT word FROM room_swearword_filter");
                table = adapter.getTable();
            }
            foreach (DataRow row in table.Rows)
            {
                string item = (string) row[0];
                swearwords.Add(item);
            }
        }

        private static void InitWelcomeMessage()
        {
            welcomeAlertEnabled = IniReader.ReadFile(Path.Combine(Application.StartupPath, "System/welcome_config.ini"))["welcome.alert.enabled"] == "true";
            if (welcomeAlertEnabled)
            {
                welcomeAlert = File.ReadAllText(Path.Combine(Application.StartupPath, "System/welcome_message.ini"));
            }
        }

        private static string ReplaceEx(string original, string pattern, string replacement)
        {
            int count, position0, position1;

            count = position0 = position1 = 0;

            string upperString = original.ToUpper();
            string upperPattern = pattern.ToUpper();
            int inc = (original.Length / pattern.Length) * (replacement.Length - pattern.Length);

            char[] chars = new char[original.Length + Math.Max(0, inc)];

            while ((position1 = upperString.IndexOf(upperPattern, position0)) != -1)
            {
                for (int i = position0; i < position1; ++i)
                    chars[count++] = original[i];
                for (int i = 0; i < replacement.Length; ++i)
                    chars[count++] = replacement[i];
                position0 = position1 + pattern.Length;
            }

            if (position0 == 0) return original;
            
            for (int i = position0; i < original.Length; ++i)
                chars[count++] = original[i];
            return new string(chars, 0, count);
        }
    }
}

:)
 
Junior Spellweaver
Joined
Nov 27, 2011
Messages
176
Reaction score
74
I've got all of these fixes working on my server currently. I am waiting for some more before I decide to release the source.
 
Experienced Elementalist
Joined
Oct 5, 2010
Messages
260
Reaction score
109
Where do I add this code?

if (TextColor == 0 && Session.GetHabbo().GetBadgeComponent().BadgeHasSlot("ADM"))
{
TextColor = 1; // 1 for exclamation mark OR 2 for Bot
}
 
Junior Spellweaver
Joined
Nov 11, 2012
Messages
144
Reaction score
11
where should I drop this code?
Why so complicated? also a little fix to use the other bubbles!

Code:
if (TextColor == 0 && Session.GetHabbo().GetBadgeComponent().BadgeHasSlot("ADM"))
{
TextColor = 1; // 1 for exclamation mark OR 2 for Bot
}
 
Experienced Elementalist
Joined
Sep 19, 2010
Messages
210
Reaction score
74
Add:

if (TextColor == 0 && Session.GetHabbo().Rank == 7 || Session.GetHabbo().Rank == 6)
{
TextColor = 1;
}

before:

InvokedChatMessage message3 = new InvokedChatMessage(this, Message, Shout, TextColor);

Regards, Imagician.
 
[̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅]
Joined
May 4, 2008
Messages
831
Reaction score
741
Add:

if (TextColor == 0 && Session.GetHabbo().Rank == 7 || Session.GetHabbo().Rank == 6)
{
TextColor = 1;
}

before:

InvokedChatMessage message3 = new InvokedChatMessage(this, Message, Shout, TextColor);

Regards, Imagician.


Some hotels use admin ranks greater that 7... On my test server my rank is super admin : rank 100
So.. Any rank 6 or greater....

PHP:
if (TextColor == 0 && Session.GetHabbo().Rank >= 6)
{
    TextColor = 1;
}
 
Experienced Elementalist
Joined
Dec 25, 2011
Messages
278
Reaction score
57
BC storm fixes Thread​


First of all this isn't a help thread so don't post for help here

Well the official bcstorm thread was overloading with post and it was hard to find fixes so here you go


Text colors exploit fix by =dj.matias= :
I found one exploit on text colors: You can crash all room clients, when you send too big text color id to emulator (No validating) (Text colors ids 0-22)

You can fix it add it to right place (Needs small edit):
Code:
if (Color > 0 && !Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip") || Color > 22)
            {
                Color = 0;
            }

Were can i fix this?
 
Experienced Elementalist
Joined
Oct 17, 2008
Messages
293
Reaction score
64
People who have furni disappearing, be sure to type "shutdown" on the EMU so It can save the items and shutdown efficiently.
 
Experienced Elementalist
Joined
Aug 28, 2011
Messages
211
Reaction score
240
People who have furni disappearing, be sure to type "shutdown" on the EMU so It can save the items and shutdown efficiently.

You're meant to do this with every emulator...
 
Junior Spellweaver
Joined
Jan 31, 2009
Messages
162
Reaction score
44
Were can i fix this?

Search in RoomUser.cs:
Code:
internal void Chat(GameClient Session, string Message, bool Shout, int TextColor = 0)
        {

Replace:
Code:
internal void Chat(GameClient Session, string Message, bool Shout, int TextColor = 0)
        {
            if (TextColor > 0 && !Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip") || TextColor > 22)
            {
                TextColor = 0;
                Session.SendNotif("You need to be VIP to use color in text.");
            }

Sorry my english, :)
I'm brazilian.
 
Initiate Mage
Joined
Mar 30, 2008
Messages
3
Reaction score
0
People who have furni disappearing, be sure to type "shutdown" on the EMU so It can save the items and shutdown efficiently.
I always use "shutdown", the problem is when I reboot the client, then all furni desapears.
 
Junior Spellweaver
Joined
Sep 2, 2008
Messages
113
Reaction score
27
Here a little Fix for the Landing View!

Download and save the following pictures to your
c_images/reception/ folder.









and now, you must add these to your external_variables data
Code:
landing.view.ny2013maina.layout=bitmap.uri,${image.library.url}reception/reception_ny2013_textblock.png;content.x,85;content.y,25;bitmap.width,494;bitmap.height,292;bitmap.x,0;bitmap.y,0;content.width,350
landing.view.ny2013recycle.conf=caption,landing.view.ny2013recycle.header;bodytext,landing.view.ny2013recycle.bodytext;spacing,10;catalogbutton,landing.view.ny2013maina.button,category_ecotron
landing.view.ny2013maina.conf=caption,landing.view.ny2013maina.header;bodytext,landing.view.ny2013maina.bodytext;spacing,10;catalogbutton,landing.view.ny2013maina.button,ecotron_transform
landing.view.ny2013maina.widget=generic

and edit following things
Code:
landing.view.background_gradient.uri=
landing.view.background_gradient_top.uri=
landing.view.background_horizon.uri=
landing.view.background_left.uri=
landing.view.background_right.uri=

to

Code:
landing.view.background_gradient.uri=${image.library.url}reception/reception_ny2013_stretch.png
landing.view.background_gradient_top.uri=${image.library.url}reception/reception_ny2013_stretch_top_pixel.png
landing.view.background_horizon.uri=${image.library.url}reception/reception_ny2013_l_horiz.png
landing.view.background_left.uri=${image.library.url}reception/reception_ny2013_backdrop_l.png
landing.view.background_right.uri=${image.library.url}reception/reception_ny2013_backdrop_r.png

Now, your Landview looks like the newest Maya Events.
 
Experienced Elementalist
Joined
Dec 25, 2011
Messages
278
Reaction score
57
Search in RoomUser.cs:
Code:
internal void Chat(GameClient Session, string Message, bool Shout, int TextColor = 0)
        {

Replace:
Code:
internal void Chat(GameClient Session, string Message, bool Shout, int TextColor = 0)
        {
            if (TextColor > 0 && !Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip") || TextColor > 22)
            {
                TextColor = 0;
                Session.SendNotif("You need to be VIP to use color in text.");
            }

Sorry my english, :)
I'm brazilian.

Thanks :)
 
Run, but I'll find you.
Joined
Jan 29, 2011
Messages
777
Reaction score
327
Does anyone know how to fix the interaction states for Wall items?
 
Status
Not open for further replies.
Back
Top