GameServer Channels Help Source ?

Status
Not open for further replies.
🚫
Exiled
Joined
Nov 26, 2012
Messages
242
Reaction score
102
Code:
using GameServer.Networking.Packets;

using GameServer.Managers;

namespace GameServer.Networking.Handlers
{
    class HANDLE_CHANNEL_SWITCH : PacketHandler
    {
        public override void Handle(GameServer.Virtual_Objects.User.virtualUser User)
        {
            try
            {
                int TargetChannel = int.Parse(getNextBlock());

                if (TargetChannel == 1 || User.Rank > 2 || TargetChannel == 4)
                {
                    User.Channel = TargetChannel;
                    User.Page = 0;
                    User.send(new PACKET_CHANGE_CHANNEL(User));
                    User.send(new PACKET_ROOM_LIST(User, User.Page));
                }
                else
                {
                    User.Channel = 1;
                    User.Page = 0;
                    User.send(new PACKET_CHANGE_CHANNEL(User));
                    User.send(new PACKET_ROOM_LIST(User, User.Page));
                    if (TargetChannel != -1)
                    {
                        User.send(new PACKET_CHAT("SYSTEM", PACKET_CHAT.ChatType.Room_ToAll, "SYSTEM >> This Channel is not avaible yet!", 999, "NULL"));
                    }
                }
            }
            catch { }
        }
    }
}

This Channel is not avaible yet!.??
 
Last edited:
I would assume this is a fix in the wrong area. looks like it to me atleast. gonna test it out and will post here if it works or not.
 
The Script you posted can be found in virtualRoom.cs not in virtualUser.cs

These are the modi:
case 3: Conquest (Urban Ops)
The other Modi are already implemented
#Edited
 
Last edited:
It's in HANDLE_CHANNEL_SWITCH.cs not virtualUser.cs or virtualRoom.csm but I think you should edit other related files too.
 
Status
Not open for further replies.
Back