Bits and bobs.

Status
Not open for further replies.

LeCeejay

Member
Dec 25, 2010
122
17
First off I was bored, so I decided I'd chuck a thread together where I put some things people MAY Not have, If you have - congratulations. Otherwise - Glad I could help.

So let's get started with a Run void, I know Sledmore released one of these (But It made you flash and wasn't the best) so here you go;

Where do I add this?
Well I've got it under the "public void Disconnect"


Code:
        public void Run()
        {
            {
                roomUser.Z1 = 16;
                roomUser.Z2 = 16;
                roomUser.H = .45;
                roomUser.statusManager.addStatus("mv", roomUser.X + "," + roomUser.Y + "," + roomUser.H + "," + roomUser.Z1 + "," + roomUser.Z2 + "," + Room.sqFLOORHEIGHT.ToString().Replace(',', '.'));
            }
        }
        public void Lay()
        {
            {
                roomUser.statusManager.addStatus("mv", roomUser.X + "," + roomUser.Y + "," + Room.sqFLOORHEIGHT.ToString().Replace(',', '.'));
            }
        }

If you want to use this, just simply add 'Run();' to your command (Obviously without the quotation marks)

Now, I stumbled upon this on a few servers - Most people will have this by now, but 'ey well no 'arm in releasin it then is there? This is the "Auto-Logout Feature" After 15 seconds;

How to install;
Best way is to search for 'Connection Management' and replace;
Code:
  #region Connection management
        /// <summary>
        /// Immediately completes the current data transfer [if any], disconnects the client and flags the connection slot as free.
        /// </summary>
        public void Run()
        {
            {
                roomUser.statusManager.addStatus("mv", roomUser.X + "," + roomUser.Y + "," + Room.sqFLOORHEIGHT.ToString().Replace(',', '.'));
            }
        }
        /// <summary>
        ///
        /// </summary>
        internal void Disconnect()
        {
            if (_isDisconnected)
                return;
            try { connectionSocket.Close(); }
            catch { }
            connectionSocket = null;
 
            if (Room != null && roomUser != null)
            {
                /*Room.sendShout(roomUser, "-- -- -- Auto Logoff - 10 Seconds -- -- --");
                Thread.Sleep(10000);*/
                Room.removeUser(roomUser.roomUID, false, "");
               
            }
 
            if (Messenger != null)
                Messenger.Clear();
 
            userManager.removeUser(userID);
            Socketservers.gameSocketServer.freeConnection(connectionID);
            _isDisconnected = true;
        }

with
Code:
#region Connection management
        /// <summary>
        /// Immediately completes the current data transfer [if any], disconnects the client and flags the connection slot as free.
        /// </summary>
 
        internal void Disconnect()
        {
            if (_isDisconnected)
                return;
            try
            {
                if (Room != null)
                {
                    _isDisconnected = true;
                    Room.sendShout(roomUser, "--- Automatic logout in 15 seconds ---");
                    Thread.Sleep(15000);
                }
                connectionSocket.Close();
            }
            catch { }
            connectionSocket = null;
 
            if (Room != null && roomUser != null)
            {
                Room.removeUser(roomUser.roomUID, false, "");
            }
 
            if (Messenger != null)
                Messenger.Clear();
 
            userManager.removeUser(userID);
            Socketservers.gameSocketServer.freeConnection(connectionID);
            _isDisconnected = true;
        }

Lastly, If you've created an extra rank for your server (E.G Rank 8), Here's two things you MIGHT want to edit;

First, search "7" In rankManager.cs, and replace with how many ranks you have (So if you have 9 ranks, put 9, 10 put 10 etc..)

Then search "7" in navigationManager.cs and change the 7 to the amount of ranks you have


That's it really

Creds:
Sledmore - Bein cool & Making tuts & for a layout sort of
Rasta - Rasta's RP edit
Anyone else I missed
 
Status
Not open for further replies.

Users who are viewing this thread

Top