예제 #1
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (!Room.CheckRights(Session, true))
            {
                Session.SendWhisper("Oops, only the room owner can run this command!");
                return;
            }

            foreach (RoomUser User in Room.GetRoomUserManager().GetUserList().ToList())
            {
                if (User == null || User.IsPet || !User.IsBot)
                    continue;

                RoomUser BotUser = null;
                if (!Room.GetRoomUserManager().TryGetBot(User.BotData.Id, out BotUser))
                    return;

                using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                {
                    dbClient.SetQuery("UPDATE `bots` SET `room_id` = '0' WHERE `id` = @id LIMIT 1");
                    dbClient.AddParameter("id", User.BotData.Id);
                    dbClient.RunQuery();
                }

                Session.GetHabbo().GetInventoryComponent().TryAddBot(new Bot(Convert.ToInt32(BotUser.BotData.Id), Convert.ToInt32(BotUser.BotData.ownerID), BotUser.BotData.Name, BotUser.BotData.Motto, BotUser.BotData.Look, BotUser.BotData.Gender));
                Session.SendMessage(new BotInventoryComposer(Session.GetHabbo().GetInventoryComponent().GetBots()));
                Room.GetRoomUserManager().RemoveBot(BotUser.VirtualId, false);
            }

            Session.SendWhisper("Success, removed all bots.");
        }
예제 #2
0
        protected override void DoTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            ServerMessage message = PacketHandelingManager.GetRecycledItem(OutputCode.WiredFurniTriggerEvent);
            message.AddBoolean(false);
            message.AddInt32(5);
            message.AddInt32(0);
            message.AddInt32(Item.GetBaseItem().SpriteId);
            message.AddUInt32(Item.Id);

            message.AddString(string.Empty);
            message.AddInt32(1);

            if (Item.wiredHandler != null)
            {
                ScoreAchieved handler = (ScoreAchieved)Item.wiredHandler;
                message.AddInt32(handler.scoreLevel);
            }
            else
            {
                message.AddInt32(0);
            }

            message.AddInt32(0);
            message.AddInt32(10);
            message.AddInt32(0);
            message.AddString(string.Empty);

            Session.SendMessage(message);
                        
        }
예제 #3
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (User == null || User.GetClient() == null)
                return;

            string[] headParts;
            string[] figureParts = Session.GetHabbo().Look.Split('.');
            foreach (string Part in figureParts)
            {
                if (Part.StartsWith("hd"))
                {
                    headParts = Part.Split('-');
                    if (!headParts[1].Equals("99999"))
                        headParts[1] = "99999";
                    else
                        return;

                    Session.GetHabbo().Look = Session.GetHabbo().Look.Replace(Part, "hd-" + headParts[1] + "-" + headParts[2]);
                    break;
                }
            }
            Session.GetHabbo().Look = PlusEnvironment.GetGame().GetAntiMutant().RunLook(Session.GetHabbo().Look);
            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.RunQuery("UPDATE `users` SET `look` = '" + Session.GetHabbo().Look + "' WHERE `id` = '" + Session.GetHabbo().Id + "' LIMIT 1");
            }

            Session.SendMessage(new UserChangeComposer(User, true));
            Session.GetHabbo().CurrentRoom.SendMessage(new UserChangeComposer(User, false));
            return;
        }
예제 #4
0
        protected override void DoTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            ServerMessage message = PacketHandelingManager.GetRecycledItem(OutputCode.WiredFurniActionEvent);
            message.AddBoolean(false);
            message.AddInt32(0);
            message.AddInt32(0);
            message.AddInt32(Item.GetBaseItem().SpriteId);
            message.AddUInt32(Item.Id);

            message.AddString(string.Empty);
            message.AddInt32(2);

            if (Item.wiredHandler != null)
            {
                GiveScore handler = (GiveScore)Item.wiredHandler;
                message.AddInt32(handler.scoreToGive);
                message.AddInt32(handler.maxCountPerGame);
            }
            else
            {
                message.AddInt32(0); //Points 
                message.AddInt32(0); //Rounds
            }

            message.AddInt32(0);
            message.AddInt32(6);
            message.AddInt32(0);
            message.AddInt32(0);
            message.AddString(string.Empty);

            Session.SendMessage(message);
                        
        }
예제 #5
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            int TotalValue = 0;

            try
            {
                DataTable Table = null;
                using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                {
                    dbClient.SetQuery("SELECT `id` FROM `items` WHERE `user_id` = '" + Session.GetHabbo().Id + "' AND (`room_id`=  '0' OR `room_id` = '')");
                    Table = dbClient.getTable();
                }

                if (Table == null)
                {
                    Session.SendWhisper("You currently have no items in your inventory!");
                    return;
                }

                foreach (DataRow Row in Table.Rows)
                {
                    Item Item = Session.GetHabbo().GetInventoryComponent().GetItem(Convert.ToInt32(Row[0]));
                    if (Item == null)
                        continue;

                    if (!Item.GetBaseItem().ItemName.StartsWith("CF_") && !Item.GetBaseItem().ItemName.StartsWith("CFC_"))
                        continue;

                    if (Item.RoomId > 0)
                        continue;

                    string[] Split = Item.GetBaseItem().ItemName.Split('_');
                    int Value = int.Parse(Split[1]);

                    using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                    {
                        dbClient.RunQuery("DELETE FROM `items` WHERE `id` = '" + Item.Id + "' LIMIT 1");
                    }

                    Session.GetHabbo().GetInventoryComponent().RemoveItem(Item.Id);

                    TotalValue += Value;

                    if (Value > 0)
                    {
                        Session.GetHabbo().Credits += Value;
                        Session.SendMessage(new CreditBalanceComposer(Session.GetHabbo().Credits));
                    }
                }

                if (TotalValue > 0)
                    Session.SendNotification("All credits have successfully been converted!\r\r(Total value: " + TotalValue + " credits!");
                else
                    Session.SendNotification("It appears you don't have any exchangeable items!");
            }
            catch
            {
                Session.SendNotification("Oops, an error occoured whilst converting your credits!");
            }
        }
예제 #6
0
        protected override void DoTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            ServerMessage message = PacketHandelingManager.GetRecycledItem(OutputCode.WiredFurniTriggerEvent);
            message.AddBoolean(false);
            message.AddInt32(0);
            message.AddInt32(0);
            message.AddInt32(Item.GetBaseItem().SpriteId);
            message.AddUInt32(Item.Id);

            if (Item.wiredHandler != null)
            {
                EntersRoom handler = (EntersRoom)Item.wiredHandler;

                if (!string.IsNullOrEmpty(handler.userName))
                    message.AddString(handler.userName);
                else
                    message.AddString(string.Empty);
            }
            else
            {
                message.AddString(string.Empty);
            }

            message.AddInt32(0);
            message.AddInt32(0);
            message.AddInt32(7);
            message.AddInt32(0);
            message.AddString(string.Empty);

            Session.SendMessage(message);
                        
        }
예제 #7
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (!this.CanChangeName(Session.GetHabbo()))
            {
                Session.SendWhisper("Sorry, it seems you currently do not have the option to change your username!");
                return;
            }

            Session.GetHabbo().ChangingName = true;
            Session.SendNotification("Please be aware that if your username is deemed as inappropriate, you will be banned without question.\r\rAlso note that Staff will NOT change your username again should you have an issue with what you have chosen.\r\rClose this window and click yourself to begin choosing a new username!");
            Session.SendMessage(new UserObjectComposer(Session.GetHabbo()));
        }
예제 #8
0
        protected override void DoTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            ServerMessage message = PacketHandelingManager.GetRecycledItem(OutputCode.WiredFurniActionEvent);

            if (Item.wiredHandler != null)
            {
                MoveRotate handler = (MoveRotate)Item.wiredHandler;
                message.AddBoolean(false);
                message.AddInt32(MAX_FURNI_SELECTION);

                message.AddInt32(handler.items.Count);
                foreach (RoomItem item in handler.items)
                {
                    message.AddInt32((int)item.Id);
                }

                message.AddInt32(Item.GetBaseItem().SpriteId);
                message.AddUInt32(Item.Id);

                message.AddString(string.Empty);
                message.AddInt32(2);
                message.AddInt32((int)handler.movement);
                message.AddInt32((int)handler.rotation);
                message.AddInt32(0);
                message.AddInt32(4);
                message.AddInt32(handler.delay);
                message.AddInt32(0);
                message.AddString(string.Empty);
            }
            else
            {
                message.AddBoolean(false);
                message.AddInt32(MAX_FURNI_SELECTION);
                message.AddInt32(0);
                message.AddInt32(Item.GetBaseItem().SpriteId);
                message.AddUInt32(Item.Id);

                message.AddString(string.Empty);
                message.AddInt32(2);
                message.AddInt32(0);
                message.AddInt32(0);
                message.AddInt32(0);
                message.AddInt32(4);
                message.AddInt32(0);
                message.AddInt32(0);
                message.AddString(string.Empty);
            }

            Session.SendMessage(message);
                        
        }
예제 #9
0
파일: MimicCommand.cs 프로젝트: BjkGkh/Boon
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter the username of the user you wish to mimic.");
                return;
            }

            GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
            if (TargetClient == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online.");
                return;
            }

            if (!TargetClient.GetHabbo().AllowMimic)
            {
                Session.SendWhisper("Oops, you cannot mimic this user - sorry!");
                return;
            }

            RoomUser TargetUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
            if (TargetUser == null)
            {
                Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online or in this room.");
                return;
            }

            Session.GetHabbo().Gender = TargetUser.GetClient().GetHabbo().Gender;
            Session.GetHabbo().Look = TargetUser.GetClient().GetHabbo().Look;

            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("UPDATE `users` SET `gender` = @gender, `look` = @look WHERE `id` = @id LIMIT 1");
                dbClient.AddParameter("gender", Session.GetHabbo().Gender);
                dbClient.AddParameter("look", Session.GetHabbo().Look);
                dbClient.AddParameter("id", Session.GetHabbo().Id);
                dbClient.RunQuery();
            }

            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (User != null)
            {
                Session.SendMessage(new UserChangeComposer(User, true));
                Room.SendMessage(new UserChangeComposer(User, false));
            }
        }
예제 #10
0
        protected override void DoTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            ServerMessage message = PacketHandelingManager.GetRecycledItem(OutputCode.WiredFurniTriggerEvent);
            message.AddBoolean(false);
            message.AddInt32(0);
            message.AddInt32(0);
            message.AddInt32(Item.GetBaseItem().SpriteId);
            message.AddUInt32(Item.Id);
            message.AddString(string.Empty);
            message.AddInt32(0);
            message.AddInt32(0);
            message.AddInt32(8);
            message.AddInt32(0);
            message.AddString(string.Empty);

            Session.SendMessage(message);
        }
예제 #11
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (!Room.CheckRights(Session, true))
                return;

            Room.GetRoomItemHandler().RemoveItems(Session);

            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("UPDATE `items` SET `room_id` = '0' WHERE `room_id` = @RoomId AND `user_id` = @UserId");
                dbClient.AddParameter("RoomId", Room.Id);
                dbClient.AddParameter("UserId", Session.GetHabbo().Id);
                dbClient.RunQuery();
            }

            List<Item> Items = Room.GetRoomItemHandler().GetWallAndFloor.ToList();
            if (Items.Count > 0)
                Session.SendWhisper("There are still more items in this room, manually remove them or use :ejectall to eject them!");

            Session.SendMessage(new FurniListUpdateComposer());
        }
예제 #12
0
        protected override void DoTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            ServerMessage message = PacketHandelingManager.GetRecycledItem(OutputCode.WiredFurniTriggerEvent);
            message.AddBoolean(false);
            message.AddInt32(0);
            message.AddInt32(0);
            message.AddInt32(Item.GetBaseItem().SpriteId);
            message.AddUInt32(Item.Id);

            if (Item.wiredHandler != null)
            {
                UserSays trigger = (UserSays)Item.wiredHandler;
                message.AddString(trigger.triggerMessage);
            }
            else
            {
                message.AddString(string.Empty);  // What is said
            }

            message.AddInt32(1);
            if (Item.wiredHandler != null && Item.wiredHandler as UserSays != null)
            {
                UserSays says = (Item.wiredHandler as UserSays);
                message.AddInt32(says.IsOwnerOnly ? 1 : 0);
            }
            else
            {
                message.AddInt32(0);
            }
            message.AddInt32(0);
            message.AddInt32(0);
            message.AddInt32(0);
            message.AddString(string.Empty);


            Session.SendMessage(message);
        }
예제 #13
0
        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            if (!Room.CheckRights(Session, true))
            {
                Session.SendWhisper("Oops, only the room owner can run this command!");
                return;
            }

            if (Room.GetRoomUserManager().GetPets().Count > 0)
            {
                foreach (RoomUser Pet in Room.GetRoomUserManager().GetUserList().ToList())
                {
                    if (Pet == null)
                        continue;

                    if (Pet.RidingHorse)
                    {
                        RoomUser UserRiding = Room.GetRoomUserManager().GetRoomUserByVirtualId(Pet.HorseID);
                        if (UserRiding != null)
                        {
                            UserRiding.RidingHorse = false;
                            UserRiding.ApplyEffect(-1);
                            UserRiding.MoveTo(new Point(UserRiding.X + 1, UserRiding.Y + 1));
                        }
                        else
                            Pet.RidingHorse = false;
                    }

                    Pet.PetData.RoomId = 0;
                    Pet.PetData.PlacedInRoom = false;

                    Pet pet = Pet.PetData;
                    if (pet != null)
                    {
                        using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                        {
                            dbClient.RunQuery("UPDATE `bots` SET `room_id` = '0', `x` = '0', `Y` = '0', `Z` = '0' WHERE `id` = '" + pet.PetId + "' LIMIT 1");
                            dbClient.RunQuery("UPDATE `bots_petdata` SET `experience` = '" + pet.experience + "', `energy` = '" + pet.Energy + "', `nutrition` = '" + pet.Nutrition + "', `respect` = '" + pet.Respect + "' WHERE `id` = '" + pet.PetId + "' LIMIT 1");
                        }
                    }

                    if (pet.OwnerId != Session.GetHabbo().Id)
                    {
                        GameClient Target = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(pet.OwnerId);
                        if (Target != null)
                        {
                            Target.GetHabbo().GetInventoryComponent().TryAddPet(Pet.PetData);
                            Room.GetRoomUserManager().RemoveBot(Pet.VirtualId, false);

                            Target.SendMessage(new PetInventoryComposer(Target.GetHabbo().GetInventoryComponent().GetPets()));
                            return;
                        }
                    }

                    Session.GetHabbo().GetInventoryComponent().TryAddPet(Pet.PetData);
                    Room.GetRoomUserManager().RemoveBot(Pet.VirtualId, false);
                    Session.SendMessage(new PetInventoryComposer(Session.GetHabbo().GetInventoryComponent().GetPets()));
                }
                Session.SendWhisper("Success, removed all pets.");
            }
            else
            {
                Session.SendWhisper("Oops, there isn't any pets in here!?");
            }
        }
예제 #14
0
        public void OnTrigger(GameClients.GameClient Session, Item Item, int Request, bool HasRights)
        {
            if (Item.ExtraData.Contains(Convert.ToChar(5).ToString()))
            {
                String[] Stuff = Item.ExtraData.Split(Convert.ToChar(5));
                Session.GetHabbo().Gender = Stuff[0].ToUpper();
                Dictionary<String, String> NewFig = new Dictionary<String, String>();
                NewFig.Clear();
                foreach (String Man in Stuff[1].Split('.'))
                {
                    foreach (String Fig in Session.GetHabbo().Look.Split('.'))
                    {
                        if (Fig.Split('-')[0] == Man.Split('-')[0])
                        {
                            if (NewFig.ContainsKey(Fig.Split('-')[0]) && !NewFig.ContainsValue(Man))
                            {
                                NewFig.Remove(Fig.Split('-')[0]);
                                NewFig.Add(Fig.Split('-')[0], Man);
                            }
                            else if (!NewFig.ContainsKey(Fig.Split('-')[0]) && !NewFig.ContainsValue(Man))
                            {
                                NewFig.Add(Fig.Split('-')[0], Man);
                            }
                        }
                        else
                        {
                            if (!NewFig.ContainsKey(Fig.Split('-')[0]))
                            {
                                NewFig.Add(Fig.Split('-')[0], Fig);
                            }
                        }
                    }
                }

                string Final = "";
                foreach (String Str in NewFig.Values)
                {
                    Final += Str + ".";
                }


                Session.GetHabbo().Look = Final.TrimEnd('.');

                using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                {
                    dbClient.SetQuery("UPDATE users SET look = @look, gender = @gender WHERE id = '" + Session.GetHabbo().Id + "' LIMIT 1");
                    dbClient.AddParameter("look", Session.GetHabbo().Look);
                    dbClient.AddParameter("gender", Session.GetHabbo().Gender);
                    dbClient.RunQuery();
                }

                Room Room = Session.GetHabbo().CurrentRoom;
                if (Room != null)
                {
                    RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);
                    if (User != null)
                    {
                        Session.SendMessage(new UserChangeComposer(User, true));
                        Session.GetHabbo().CurrentRoom.SendMessage(new UserChangeComposer(User, false));
                    }
                }
            }
        }
예제 #15
0
 protected override void DoTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool UserHasRights)
 {
     if (UserHasRights)
         Session.SendMessage(ConditionPacketBuilder.GenerateMessage(Item));
 }
예제 #16
0
        protected override void DoTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            ServerMessage message = PacketHandelingManager.GetRecycledItem(OutputCode.WiredFurniActionEvent);
            TimerReset handler = null;

            message.AddBoolean(false);
            message.AddInt32(BaseWiredInteractor.MAX_FURNI_SELECTION);

            if (Item.wiredHandler != null && (handler = ((TimerReset)Item.wiredHandler)) != null)
            {
                message.AddInt32(handler.items.Count);
                foreach (RoomItem item in handler.items)
                    message.AddInt32((int)item.Id);
            }
            else
            {
                message.AddInt32(0);
            }

            message.AddInt32(Item.GetBaseItem().SpriteId);
            message.AddUInt32(Item.Id);

            message.AddString(string.Empty);
            message.AddInt32(1);
            message.AddInt32(0);
            message.AddInt32(0);

            message.AddInt32(0);
            message.AddInt32(handler != null ? handler.delay : 0);


            message.AddInt32(0);

            message.AddInt32(0);
            message.AddString(string.Empty);

            Session.SendMessage(message);
            /*
             * 
 message.AddBoolean(false);
            message.AddInt32(BaseWiredInteractor.MAX_FURNI_SELECTION);

            //if (Item.wiredHandler != null && (handler = ((ToggleItemState)Item.wiredHandler)) != null)
            //{
            //    message.AddInt32(handler.items.Count);
            //    foreach (RoomItem item in handler.items)
            //        message.AddInt32((int)item.Id);
            //}
            //else
            {
                message.AddInt32(0);
                message.AddInt32(0);
            }

            message.AddInt32(Item.GetBaseItem().SpriteId);
            message.AddUInt32(Item.Id);

            message.AddString(string.Empty);
            message.AddInt32(1);
            message.AddInt32(0);
            message.AddInt32(0);

            message.AddInt32(0);
            message.AddInt32(handler != null ? handler.delay : 0);


            message.AddInt32(0);

            message.AddInt32(0);
            message.AddString(string.Empty);

            Session.SendMessage(message);
                        
             */
        }
예제 #17
0
        public void OnTrigger(GameClients.GameClient Session, RoomItem Item, int Request, bool HasRights)
        {
            if (Session == null || Item == null)
                return;

            if (!HasRights)
                return;

            String ExtraInfo = "";
            int Delay = 0;
            List<RoomItem> items = new List<RoomItem>();

            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
            {
                dbClient.setQuery("SELECT * FROM wired_items WHERE id=@id LIMIT 1");
                dbClient.addParameter("id", Item.Id);
                DataRow Row = dbClient.getRow();

                ExtraInfo = Row["string"].ToString();
                Delay = (int)Row["delay"] / 500;
                foreach (String sItem in Row["items"].ToString().Split(';'))
                {
                    uint Id = 0;
                    if (uint.TryParse(sItem, out Id))
                    {
                        RoomItem rItem = Item.GetRoom().GetRoomItemHandler().GetItem(Id);

                        if (rItem == null || items.Contains(rItem))
                            continue;

                        items.Add(rItem);
                    }
                }
            }

            switch (Item.GetBaseItem().InteractionType)
            {
                #region Triggers

                case InteractionType.triggerwalkonfurni:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);

                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggergamestart:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredTrigger);
                        message.AppendBoolean(false);
                        message.AppendInt32(0);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggerroomenter:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredTrigger);
                        message.AppendBoolean(false);
                        message.AppendInt32(0);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(7);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggergameend:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredTrigger);
                        message.AppendBoolean(false);
                        message.AppendInt32(0);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggertimer:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredTrigger);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);

                        message.AppendString(ExtraInfo);
                        message.AppendInt32(1);
                        message.AppendInt32(1);
                        message.AppendInt32(1);
                        message.AppendInt32(3);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggerwalkofffurni:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);

                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggeronusersay:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredTrigger);
                        message.AppendBoolean(false);
                        message.AppendInt32(0);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggerscoreachieved:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredTrigger);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(1);
                        message.AppendInt32(100);
                        message.AppendInt32(0);
                        message.AppendInt32(10);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggerrepeater:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredTrigger);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(1);
                        message.AppendInt32(Delay);
                        message.AppendInt32(0);
                        message.AppendInt32(6);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.triggerstatechanged:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(Delay);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }
                #endregion

                #region Effects
                case InteractionType.actionposreset:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString("");
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(3);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.actiongivescore:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(2);
                        message.AppendInt32(5);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(6);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.actionresettimer:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.actiontogglestate:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(Delay);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.actionkickuser:
                case InteractionType.actionshowmessage:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(0);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(7);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.actionteleportto:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(Delay);
                        message.AppendInt32(0);
                        message.AppendByte(2);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.actionmoverotate:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(2);
                        message.AppendInt32(int.Parse(ExtraInfo.Split(';')[0]));
                        message.AppendInt32(int.Parse(ExtraInfo.Split(';')[1]));
                        message.AppendInt32(0);
                        message.AppendInt32(4);
                        message.AppendInt32(Delay);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                #endregion

                #region Add-ons
                case InteractionType.specialrandom:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.specialunseen:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredEffect);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendString(ExtraInfo);
                        message.AppendInt32(0);
                        message.AppendInt32(8);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }
                #endregion

                #region Conditions
                case InteractionType.conditiontimelessthan:
                case InteractionType.conditiontimemorethan:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredCondition);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);

                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.conditionfurnihasfurni:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredCondition);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);

                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendBoolean(false);
                        message.AppendBoolean(true);
                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.conditionfurnishaveusers:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredCondition);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);

                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendBoolean(false);
                        message.AppendBoolean(true);
                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.conditionstatepos:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredCondition);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);

                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendBoolean(false);
                        message.AppendBoolean(false);
                        Session.SendMessage(message);
                        break;
                    }

                case InteractionType.conditiontriggeronfurni:
                    {
                        ServerMessage message = new ServerMessage(Outgoing.WiredCondition);
                        message.AppendBoolean(false);
                        message.AppendInt32(5);
                        message.AppendInt32(items.Count);
                        foreach (RoomItem item in items)
                            message.AppendInt32(item.Id);
                        message.AppendInt32(Item.GetBaseItem().SpriteId);
                        message.AppendInt32(Item.Id);

                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendInt32(0);
                        message.AppendBoolean(false);
                        message.AppendBoolean(true);

                        Session.SendMessage(message);
                        break;
                    }

                //Unknown:
                //2 radio + 5 selct
                #endregion

            }
        }