RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Old Status Bar

Hello everyone,

I have a live shard and I made a 3rd party program in order to limit players like not using speed, easy uo injection etc. The thing that I just want to do is like Razor does, changing 6.0.9 client version's status bar with Oldest one like 2.0.3 clients. I mean pre-aos status bar. I recognized that Razor makes it with crypt.dll but I dont understand the logic of that.

Regarding that , If there is one who know something about that how to do , so and so forth, please let me know , help me in short.

Note: Please do not advise me to use Razor, I dont. My players have some physcologic problems , therefore they donot like using Razor, I used to use that :)

Thanks in advance.
 
Siriously ? It seems, no one can help. Even the creator of Razor :(

Below, you see that ,how razor does status change. But I cannot achieve. I achieved loading client with Loader.dll and the rest so simple like below but I cannot. Help me pls.

Code:
internal static unsafe bool InstallHooks(IntPtr mainWindow)
        {
            int features = 0;
            if (Config.GetBool("Negotiate"))
            {
                features |= 4;
            }
            if (ClientEncrypted)
            {
                features |= 8;
            }
            if (ServerEncrypted)
            {
                features |= 0x10;
            }
            WaitForWindow(ClientProc.Id);
            InitError error = (InitError) InstallLibrary(mainWindow, ClientProc.Id, features);
            if (error != InitError.SUCCESS)
            {
                FatalInit(error);
                return false;
            }
            byte* numPtr = (byte*) GetSharedAddress().ToPointer();
            m_InRecv = (Buffer*) numPtr;
            m_OutRecv = (Buffer*) (numPtr + sizeof(Buffer));
            m_InSend = (Buffer*) (numPtr + (sizeof(Buffer) * 2));
            m_OutSend = (Buffer*) (numPtr + (sizeof(Buffer) * 3));
            m_TitleStr = numPtr + (sizeof(Buffer) * 4);
            SetServer(m_ServerIP, m_ServerPort);
            CommMutex = new Mutex();
            CommMutex.Handle = GetCommMutex();
            try
            {
                string filePath = Client.GetFilePath("art.mul");
                if ((filePath != null) && (filePath != string.Empty))
                {
                    SetDataPath(Path.GetDirectoryName(filePath));
                }
                else
                {
                    SetDataPath(Path.GetDirectoryName(Client.Directories[0]));
                }
            }
            catch
            {
                SetDataPath("");
            }
            if (Config.GetBool("OldStatBar"))
            {
                RequestStatbarPatch(true);
            }
            return true;
        }

Code:
public static void RequestStatbarPatch(bool preAOS)
        {
            PostMessage(FindUOWindow(), 0x401, (IntPtr) 12L, preAOS ? ((IntPtr) 1) : IntPtr.Zero);
        }

Code:
 [DllImport("Crypt.dll")]
internal static extern IntPtr FindUOWindow();

I just want to do that in my application.
 

Praxiiz

Sorceror
Since you're not using Razor, crypt.dll most likely hasn't been injected into the client.

Since you don't want to use razor, you should probably just look up the windows API calls for altering the title text (and other properties) of a window and start from there. Write a simple dll file to make the changes for you and inject the dll into the client. Then you will understand what the crypt.dll is doing on a basic level, and you won't need to look at razor for examples.
 
In my application, by using loader.dll of Razor, I achieve injecting crypt.dll into my client. The thing that, as you guess, automatically, it is not activated. Razor has a option to active pre-aos stat bar. After injection, when that statbar option changed, I think Razor call a function or something I dont know to active. I'm not actially programmer in advance. Therefore, I could not able to achieve what I want. The most important thing in Razor I achive ,that is injection dll.

How about the rest is the question ? Razor just posting message then activated , I do same thing, but does not work and I dont know why.
 
Top