public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet) { Room Room = null; if (!BiosEmuThiago.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room)) { return; } if (!Room.CheckRights(Session)) { return; } int itemID = Packet.PopInt(); string wallPositionData = Packet.PopString(); Item Item = Room.GetRoomItemHandler().GetItem(itemID); if (Item == null) { return; } try { string WallPos = Room.GetRoomItemHandler().WallPositionCheck(":" + wallPositionData.Split(':')[1]); Item.wallCoord = WallPos; } catch { return; } Room.GetRoomItemHandler().UpdateItem(Item); Room.SendMessage(new ItemUpdateComposer(Item, Room.OwnerId)); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (ExtraSettings.STAFF_EFFECT_ENABLED_ROOM) { if (Session.GetHabbo().isLoggedIn&& Session.GetHabbo().Rank > Convert.ToInt32(BiosEmuThiago.GetConfig().data["MineRankStaff"])) { } else { Session.SendWhisper("Você precisa estar logado como staff para usar este comando."); return; } } if (Session.GetHabbo()._guidelevel < 1) { Session.SendWhisper("Você não pode enviar alertas para guias, se não estiver rank."); return; } if (Params.Length == 1) { Session.SendWhisper("Digite a mensagem que deseja enviar."); return; } string Message = CommandManager.MergeParams(Params, 1); BiosEmuThiago.GetGame().GetClientManager().GuideAlert(new MOTDNotificationComposer("[GUÍAS][" + Session.GetHabbo().Username + "]\r\r" + Message)); return; }
public void Execute(GameClient Session, Room Room, string[] Params) { long nowTime = BiosEmuThiago.CurrentTimeMillis(); long timeBetween = nowTime - Session.GetHabbo()._lastTimeUsedHelpCommand; if (timeBetween < 60000) { Session.SendMessage(RoomNotificationComposer.SendBubble("abuse", "Espere pelo menos 1 minuto para reutilizar o sistema de apoio", "")); return; } Session.GetHabbo()._lastTimeUsedHelpCommand = nowTime; string Request = CommandManager.MergeParams(Params, 1); if (Params.Length == 1) { Session.SendMessage(new RoomNotificationComposer("Sistema de suporte:", "<font color='#B40404'><b>Atenção, " + Session.GetHabbo().Username + "!</b></font>\n\n<font size=\"11\" color=\"#1C1C1C\">O sistema de suporte foi criado para fazer solicitações detalhadas de ajuda. Então você não pode enviar uma mensagem vazia porque é inútil.\n\n" + "Se você quiser pedir ajuda, descrever <font color='#B40404'> <b> detalhadamente o seu problema</b></font>. \n\nO sistema detecta se você abusar estes pedidos, então não enviar mais do que um ou você será bloqueado.\n\n" + "Lembre-se que você também tem ajuda central para resolver seus problemas.", "help_user", "")); return; } else { BiosEmuThiago.GetGame().GetClientManager().GuideAlert(new RoomNotificationComposer("Novo caso de atenção!", "O usuario " + Session.GetHabbo().Username + " Ele requer a ajuda de um guia, o embaixador ou moderador.<br></font></b><br>Sua pergunta ou problema é este:<br><b>s" + Request + "</b></font><br><br>Atender ao usuário mais rapidamente possível para resolver a sua pergunta, lembre-se que em breve sua ajuda vai ser marcado e que serão considerados para a promoção.", "Ajude-me", "Seguir a " + Session.GetHabbo().Username + "", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId)); } BiosEmuThiago.GetGame().GetAchievementManager().ProgressAchievement(Session, "ACH_GuideEnrollmentLifetime", 1); Session.SendMessage(RoomNotificationComposer.SendBubble("ambassador", "Seu pedido de ajuda foi enviada com sucesso, aguarde.", "")); }
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet) { if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom) { return; } Room Room; if (!BiosEmuThiago.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room)) { return; } if (!Room.CanTradeInRoom) { return; } Trade Trade = Room.GetUserTrade(Session.GetHabbo().Id); if (Trade == null) { return; } Trade.Unaccept(Session.GetHabbo().Id); }
public HabboSearchResultComposer(List <SearchResult> Friends, List <SearchResult> OtherUsers) : base(ServerPacketHeader.HabboSearchResultMessageComposer) { WriteInteger(Friends.Count); foreach (SearchResult Friend in Friends.ToList()) { bool Online = (BiosEmuThiago.GetGame().GetClientManager().GetClientByUserID(Friend.UserId) != null); WriteInteger(Friend.UserId); WriteString(Friend.Username); WriteString(Friend.Motto); WriteBoolean(Online); WriteBoolean(false); WriteString(string.Empty); WriteInteger(0); WriteString(Online ? Friend.Figure : ""); WriteString(Friend.LastOnline); } WriteInteger(OtherUsers.Count); foreach (SearchResult OtherUser in OtherUsers.ToList()) { bool Online = (BiosEmuThiago.GetGame().GetClientManager().GetClientByUserID(OtherUser.UserId) != null); WriteInteger(OtherUser.UserId); WriteString(OtherUser.Username); WriteString(OtherUser.Motto); WriteBoolean(Online); WriteBoolean(false); WriteString(string.Empty); WriteInteger(0); WriteString(Online ? OtherUser.Figure : ""); WriteString(OtherUser.LastOnline); } }
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet) { int SlotId = Packet.PopInt(); string Look = Packet.PopString(); string Gender = Packet.PopString(); Look = BiosEmuThiago.GetGame().GetFigureManager().ProcessFigure(Look, Gender, Session.GetHabbo().GetClothing().GetClothingParts, true); using (IQueryAdapter dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("SELECT null FROM `user_wardrobe` WHERE `user_id` = @id AND `slot_id` = @slot"); dbClient.AddParameter("id", Session.GetHabbo().Id); dbClient.AddParameter("slot", SlotId); if (dbClient.getRow() != null) { dbClient.SetQuery("UPDATE `user_wardrobe` SET `look` = @look, `gender` = @gender WHERE `user_id` = @id AND `slot_id` = @slot LIMIT 1"); dbClient.AddParameter("id", Session.GetHabbo().Id); dbClient.AddParameter("slot", SlotId); dbClient.AddParameter("look", Look); dbClient.AddParameter("gender", Gender.ToUpper()); dbClient.RunQuery(); } else { dbClient.SetQuery("INSERT INTO `user_wardrobe` (`user_id`,`slot_id`,`look`,`gender`) VALUES (@id,@slot,@look,@gender)"); dbClient.AddParameter("id", Session.GetHabbo().Id); dbClient.AddParameter("slot", SlotId); dbClient.AddParameter("look", Look); dbClient.AddParameter("gender", Gender.ToUpper()); dbClient.RunQuery(); } } }
public void OnTrigger(GameClient Session, Item Item, int Request, bool HasRights) { int Modes = Item.GetBaseItem().Modes - 1; if (Session == null || !HasRights || Modes <= 0) { return; } BiosEmuThiago.GetGame().GetQuestManager().ProgressUserQuest(Session, QuestType.FURNI_SWITCH); int CurrentMode = 0; int NewMode = 0; if (!int.TryParse(Item.ExtraData, out CurrentMode)) { } if (CurrentMode <= 0) { NewMode = 1; } else if (CurrentMode >= Modes) { NewMode = 0; } else { NewMode = CurrentMode + 1; } Item.ExtraData = NewMode.ToString(); Item.UpdateState(); }
public static List <Item> GetItemsForUser(int UserId) { DataTable Items = null; List <Item> I = new List <Item>(); using (IQueryAdapter dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("SELECT `items`.*, COALESCE(`items_groups`.`group_id`, 0) AS `group_id` FROM `items` LEFT OUTER JOIN `items_groups` ON `items`.`id` = `items_groups`.`id` WHERE `items`.`room_id` = 0 AND `items`.`user_id` = @uid;"); dbClient.AddParameter("uid", UserId); Items = dbClient.getTable(); if (Items != null) { foreach (DataRow Row in Items.Rows) { ItemData Data = null; if (BiosEmuThiago.GetGame().GetItemManager().GetItem(Convert.ToInt32(Row["base_item"]), out Data)) { I.Add(new Item(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["room_id"]), Convert.ToInt32(Row["base_item"]), Convert.ToString(Row["extra_data"]), Convert.ToInt32(Row["x"]), Convert.ToInt32(Row["y"]), Convert.ToDouble(Row["z"]), Convert.ToInt32(Row["rot"]), Convert.ToInt32(Row["user_id"]), Convert.ToInt32(Row["group_id"]), Convert.ToInt32(Row["limited_number"]), Convert.ToInt32(Row["limited_stack"]), Convert.ToString(Row["wall_pos"]))); } else { // Item data does not exist anymore. } } } } return(I); }
public void Parse(GameClient Session, ClientPacket Packet) { var length = Packet.PopInt(); for (var i = 0; i < length; i++) { var forumid = Packet.PopInt(); //Forum ID var postid = Packet.PopInt(); //Post ID var readall = Packet.PopBoolean(); //Make all read var forum = BiosEmuThiago.GetGame().GetGroupForumManager().GetForum(forumid); if (forum == null) { continue; } var post = forum.GetPost(postid); if (post == null) { continue; } var thread = post.ParentThread; var index = thread.Posts.IndexOf(post); thread.AddView(Session.GetHabbo().Id, index + 1); } //Thread.AddView(Session.GetHabbo().Id); }
public void Execute(GameClients.GameClient Session, Room Room, string[] Params) { if (ExtraSettings.STAFF_EFFECT_ENABLED_ROOM) { if (Session.GetHabbo().isLoggedIn&& Session.GetHabbo().Rank > Convert.ToInt32(BiosEmuThiago.GetConfig().data["MineRankStaff"])) { } else { Session.SendWhisper("Você precisa estar logado como staff para usar este comando."); return; } } if (Params.Length == 2) { Session.SendWhisper("Por favor, escreva uma mensagem e uma URL para enviar."); return; } string URL = Params[2]; string Message = CommandManager.MergeParams(Params, 2); BiosEmuThiago.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Alerta do Hotel!", Params[1] + "\r\n" + "- " + Session.GetHabbo().Username, "", URL, URL)); return; }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Por favor, introduzca el nombre de usuario del usuario que desea congelar."); return; } GameClient TargetClient = BiosEmuThiago.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Se produjo un error mientras que la búsqueda de usuario, tal vez no están en línea."); return; } RoomUser TargetUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Params[1]); if (TargetUser != null) { TargetUser.Frozen = true; } Session.SendWhisper("Se congelo exitosamente a " + TargetClient.GetHabbo().Username + "!"); }
public void Parse(HabboHotel.GameClients.GameClient session, ClientPacket packet) { string Category = packet.PopString(); string Search = packet.PopString(); ICollection <SearchResultList> Categories = new List <SearchResultList>(); if (!string.IsNullOrEmpty(Search)) { SearchResultList QueryResult = null; if (BiosEmuThiago.GetGame().GetNavigator().TryGetSearchResultList(0, out QueryResult)) { Categories.Add(QueryResult); } } else { Categories = BiosEmuThiago.GetGame().GetNavigator().GetCategorysForSearch(Category); if (Categories.Count == 0) { //Are we going in deep?! Categories = BiosEmuThiago.GetGame().GetNavigator().GetResultByIdentifier(Category); if (Categories.Count > 0) { session.SendMessage(new NavigatorSearchResultSetComposer(Category, Search, Categories, session, 2, 100)); return; } } } session.SendMessage(new NavigatorSearchResultSetComposer(Category, Search, Categories, session)); }
public BonusRareMessageComposer(GameClient Session) : base(ServerPacketHeader.BonusRareMessageComposer) { string product = BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_productdata_name"); int baseid = int.Parse(BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_item_baseid")); int score = int.Parse(BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_total_score")); base.WriteString(product); base.WriteInteger(baseid); base.WriteInteger(score); base.WriteInteger(Session.GetHabbo().BonusPoints >= score ? score : score - Session.GetHabbo().BonusPoints); //Total To Gain if (Session.GetHabbo().BonusPoints >= score) { Session.GetHabbo().BonusPoints -= score; Session.SendMessage(new HabboActivityPointNotificationComposer(Session.GetHabbo().BonusPoints, score, 101)); Session.SendMessage(new RoomAlertComposer("Você completou o seu Bônus Raro, você já possui seu prêmio no inventário! Você receberá outro quando você pega novos bônus.")); ItemData Item = null; if (!BiosEmuThiago.GetGame().GetItemManager().GetItem((baseid), out Item)) { return; } Item GiveItem = ItemFactory.CreateSingleItemNullable(Item, Session.GetHabbo(), "", ""); if (GiveItem != null) { Session.GetHabbo().GetInventoryComponent().TryAddItem(GiveItem); Session.SendMessage(new FurniListNotificationComposer(GiveItem.Id, 1)); Session.SendMessage(new FurniListUpdateComposer()); } Session.GetHabbo().GetInventoryComponent().UpdateItems(false); } }
public void Parse(GameClient Session, ClientPacket Packet) { string PetName = Packet.PopString(); string word; if (PetName.Length < 2) { Session.SendMessage(new CheckPetNameComposer(2, "2")); return; } else if (PetName.Length > 15) { Session.SendMessage(new CheckPetNameComposer(1, "15")); return; } else if (!BiosEmuThiago.IsValidAlphaNumeric(PetName)) { Session.SendMessage(new CheckPetNameComposer(3, "")); return; } else if (BiosEmuThiago.GetGame().GetChatManager().GetFilter().IsUnnaceptableWord(PetName, out word)) { Session.SendMessage(new CheckPetNameComposer(4, "" + word)); return; } Session.SendMessage(new CheckPetNameComposer(0, "")); }
public void Execute(GameClient Session, Room Room, string[] Params) { if (ExtraSettings.STAFF_EFFECT_ENABLED_ROOM) { if (Session.GetHabbo().isLoggedIn&& Session.GetHabbo().Rank > Convert.ToInt32(BiosEmuThiago.GetConfig().data["MineRankStaff"])) { } else { Session.SendWhisper("Você precisa estar logado como staff para usar este comando."); return; } } if (Params.Length == 1) { Session.SendWhisper("Escreva o nome do usúario que você deseja limpar."); return; } GameClient TargetClient = BiosEmuThiago.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("¡Oops! Provavelmente o usuário não está online."); return; } if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank) { Session.SendWhisper("Você não pode limpar o inventário desse usuário."); return; } TargetClient.GetHabbo().GetInventoryComponent().ClearItems(); }
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet) { if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom) { return; } int ItemId = Packet.PopInt(); int GroupId = Packet.PopInt(); Item Item = Session.GetHabbo().CurrentRoom.GetRoomItemHandler().GetItem(ItemId); if (Item == null) { return; } if (Item.Data.InteractionType != InteractionType.GUILD_GATE) { return; } Group Group = null; if (!BiosEmuThiago.GetGame().GetGroupManager().TryGetGroup(GroupId, out Group)) { return; } Session.SendMessage(new GroupFurniSettingsComposer(Group, ItemId, Session.GetHabbo().Id)); Session.SendMessage(new GroupInfoComposer(Group, Session, false)); }
public bool TryExecute(string[] parameters) { int userId = 0; if (!int.TryParse(parameters[0].ToString(), out userId)) { return(false); } GameClient client = BiosEmuThiago.GetGame().GetClientManager().GetClientByUserID(userId); if (client == null || client.GetHabbo() == null) { return(false); } using (IQueryAdapter dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("SELECT `rank` FROM `users` WHERE `id` = @userId LIMIT 1"); dbClient.AddParameter("userId", userId); client.GetHabbo().Rank = dbClient.getInteger(); } client.GetHabbo().GetPermissions().Init(client.GetHabbo()); if (client.GetHabbo().GetPermissions().HasRight("mod_tickets")) { client.SendMessage(new ModeratorInitComposer( BiosEmuThiago.GetGame().GetModerationManager().UserMessagePresets, BiosEmuThiago.GetGame().GetModerationManager().RoomMessagePresets, BiosEmuThiago.GetGame().GetModerationManager().GetTickets)); } return(true); }
public GetRelationshipsComposer(Habbo Habbo, int Loves, int Likes, int Hates) : base(ServerPacketHeader.GetRelationshipsMessageComposer) { WriteInteger(Habbo.Id); WriteInteger(Habbo.Relationships.Count); // Count foreach (Relationship Rel in Habbo.Relationships.Values) { UserCache HHab = BiosEmuThiago.GetGame().GetCacheManager().GenerateUser(Rel.UserId); if (HHab == null) { WriteInteger(0); WriteInteger(0); WriteInteger(0); // Their ID WriteString("Placeholder"); WriteString("hr-115-42.hd-190-1.ch-215-62.lg-285-91.sh-290-62"); } else { WriteInteger(Rel.Type); WriteInteger(Rel.Type == 1 ? Loves : Rel.Type == 2 ? Likes : Hates); WriteInteger(Rel.UserId); // Their ID WriteString(HHab.Username); WriteString(HHab.Look); } } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (ExtraSettings.STAFF_EFFECT_ENABLED_ROOM) { if (Session.GetHabbo().isLoggedIn&& Session.GetHabbo().Rank > Convert.ToInt32(BiosEmuThiago.GetConfig().data["MineRankStaff"])) { } else { Session.SendWhisper("Você precisa estar logado como staff para usar este comando."); return; } } if (Params.Length == 1) { Session.SendWhisper("Digite uma palavra."); return; } using (IQueryAdapter dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor()) { dbClient.runFastQuery("INSERT INTO `wordfilter` (id, word, replacement, strict, addedby, bannable) VALUES (NULL, '" + Params[1] + "', '" + BiosEmuThiago.HotelName + "', '1', '" + Session.GetHabbo().Username + "', '0')"); } BiosEmuThiago.GetGame().GetChatManager().GetFilter().InitWords(); BiosEmuThiago.GetGame().GetChatManager().GetFilter().InitCharacters(); Session.SendWhisper("Sucesso, continue lutando contra spammers"); }
public ProfileInformationComposer(Habbo Data, GameClient Session, List <Group> Groups, int friendCount) : base(ServerPacketHeader.ProfileInformationMessageComposer) { DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Data.AccountCreated); WriteInteger(Data.Id); WriteString(Data.Username); WriteString(Data.Look); WriteString(Data.Motto); WriteString(origin.ToString("dd/MM/yyyy")); WriteInteger(Data.GetStats().AchievementPoints); WriteInteger(friendCount); // Friend Count WriteBoolean(Data.Id != Session.GetHabbo().Id&& Session.GetHabbo().GetMessenger().FriendshipExists(Data.Id)); // Is friend WriteBoolean(Data.Id != Session.GetHabbo().Id&& !Session.GetHabbo().GetMessenger().FriendshipExists(Data.Id) && Session.GetHabbo().GetMessenger().RequestExists(Data.Id)); // Sent friend request WriteBoolean((BiosEmuThiago.GetGame().GetClientManager().GetClientByUserID(Data.Id)) != null); WriteInteger(Groups.Count); foreach (Group Group in Groups) { WriteInteger(Group.Id); WriteString(Group.Name); WriteString(Group.Badge); WriteString(BiosEmuThiago.GetGame().GetGroupManager().GetColourCode(Group.Colour1, true)); WriteString(BiosEmuThiago.GetGame().GetGroupManager().GetColourCode(Group.Colour2, false)); WriteBoolean(Data.GetStats().FavouriteGroupId == Group.Id); // todo favs WriteInteger(0); //what the f**k WriteBoolean(Group != null ? Group.ForumEnabled : true); //HabboTalk } WriteInteger(Convert.ToInt32(BiosEmuThiago.GetUnixTimestamp() - Data.LastOnline)); // Last online WriteBoolean(true); // Show the profile }
public void Execute(GameClient Session, Room Room, string[] Params) { if (Session != null) { if (Room != null) { if (Params.Length == 1) { Session.SendWhisper("Por favor, digite uma mensagem para enviar."); return; } foreach (GameClient client in BiosEmuThiago.GetGame().GetClientManager().GetClients.ToList()) { if (client.GetHabbo().AllowEvents == true) { string Message = CommandManager.MergeParams(Params, 1); client.SendMessage(new RoomNotificationComposer("Está acontecendo um evento!", "Está acontecendo um novo jogo realizado pela equipe Staff! <br><br>Este, tem o intuito de proporcionar um entretenimento a mais para os usuários!<br><br>Evento:<b> " + Message + "</b><br>Por:<b> " + Session.GetHabbo().Username + "</b> <br><br>Caso deseje participar, clique no botão abaixo! <br><br>Caso não queira ser notificado sobre os eventos digite esse comando<b> :alertas</b> !", "events", "Participar do Evento", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId)); } else { client.SendWhisper("Parece que está havendo um novo evento em nosso hotel. Para reativar as mensagens de eventos digite ;alertas", 1); } } } } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (ExtraSettings.STAFF_EFFECT_ENABLED_ROOM) { if (Session.GetHabbo().isLoggedIn&& Session.GetHabbo().Rank > Convert.ToInt32(BiosEmuThiago.GetConfig().data["MineRankStaff"])) { } else { Session.SendWhisper("Você precisa estar logado como staff para usar este comando."); return; } } if (Params.Length == 1) { Session.SendWhisper("Por favor, digite o usuário que deseja premiar!"); return; } GameClient Target = BiosEmuThiago.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (Target == null) { Session.SendWhisper("Opa, não foi possível encontrar esse usuário!"); return; } RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Target.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Usuário não encontrado! Talvez ele não esteja online ou nesta sala."); return; } if (Target.GetHabbo().Username == Session.GetHabbo().Username) { string product = BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_productdata_name"); int baseid = int.Parse(BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_item_baseid")); int score = int.Parse(BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_total_score")); Session.GetHabbo().BonusPoints += 1; Session.SendMessage(new HabboActivityPointNotificationComposer(Session.GetHabbo().BonusPoints, score, 101)); Session.SendMessage(new RoomAlertComposer("Parabéns! Você recebeu um ponto bônus! Você tem agora: (" + Session.GetHabbo().BonusPoints + ") bônus")); Session.SendMessage(new BonusRareMessageComposer(Session)); return; } if (Target.GetHabbo().Username != Session.GetHabbo().Username) { string product = BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_productdata_name"); int baseid = int.Parse(BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_item_baseid")); int score = int.Parse(BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("bonus_rare_total_score")); Target.GetHabbo().BonusPoints += 1; Target.SendMessage(new HabboActivityPointNotificationComposer(Session.GetHabbo().BonusPoints, score, 101)); Target.SendMessage(new RoomAlertComposer("Parabéns! Você recebeu um ponto bônus! Você tem agora: (" + Target.GetHabbo().BonusPoints + ") bônus")); Target.SendMessage(new BonusRareMessageComposer(Target)); Session.SendMessage(new RoomAlertComposer("Parabéns! Você deu com exito os pontos bônus!")); } }
public void Parse(GameClient Session, ClientPacket Packet) { var ForumId = Packet.PopInt(); //Maybe Forum ID var ThreadId = Packet.PopInt(); //Maybe Thread ID var StartIndex = Packet.PopInt(); //Start index var length = Packet.PopInt(); //List Length var Forum = BiosEmuThiago.GetGame().GetGroupForumManager().GetForum(ForumId); if (Forum == null) { Session.SendNotification("Forum não encontrato!"); return; } var Thread = Forum.GetThread(ThreadId); if (Thread == null) { Session.SendNotification("Tópico deste Fórum não foi encontrado!"); return; } Session.SendMessage(new ThreadDataComposer(Thread, StartIndex, length)); }
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet) { ICollection <Promotion> LandingPromotions = BiosEmuThiago.GetGame().GetLandingManager().GetPromotionItems(); Session.SendMessage(new PromoArticlesComposer(LandingPromotions)); BiosEmuThiago.GetGame().GetLandingManager().LoadHallOfFame(); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (ExtraSettings.STAFF_EFFECT_ENABLED_ROOM) { if (Session.GetHabbo().isLoggedIn&& Session.GetHabbo().Rank > Convert.ToInt32(BiosEmuThiago.GetConfig().data["MineRankStaff"])) { } else { Session.SendWhisper("Você precisa estar logado como staff para usar este comando."); return; } } if (Room == null) { return; } var predesignedId = 0U; using (var dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("SELECT id FROM catalog_predesigned_rooms WHERE room_id = " + Room.Id + ";"); predesignedId = (uint)dbClient.getInteger(); dbClient.RunQuery("DELETE FROM catalog_predesigned_rooms WHERE room_id = " + Room.Id + " AND id = " + predesignedId + ";"); } BiosEmuThiago.GetGame().GetCatalog().GetPredesignedRooms().predesignedRoom.Remove(predesignedId); Session.SendWhisper("Você tiro a sala dos pack do hotel!"); }
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet) { int UserId = Packet.PopInt(); int RoomId = Packet.PopInt(); int Time = Packet.PopInt(); string HotelName = BiosEmuThiago.HotelName; Room Room = Session.GetHabbo().CurrentRoom; RoomUser Target = Room.GetRoomUserManager().GetRoomUserByHabbo(BiosEmuThiago.GetUsernameById(UserId)); if (Target == null) { return; } long nowTime = BiosEmuThiago.CurrentTimeMillis(); long timeBetween = nowTime - Session.GetHabbo()._lastTimeUsedHelpCommand; if (timeBetween < 60000) { Session.SendMessage(RoomNotificationComposer.SendBubble("Abuso", "Espere pelo menos 1 minuto para enviar um alerta de novo.", "")); return; } else { BiosEmuThiago.GetGame().GetClientManager().StaffAlert(RoomNotificationComposer.SendBubble("advice", "" + Session.GetHabbo().Username + " acaba de mandar um alerta embaixador a " + Target.GetClient().GetHabbo().Username + ", clique aqui para ir.", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId)); } Target.GetClient().SendMessage(new BroadcastMessageAlertComposer("<b><font size='15px' color='#c40101'>Mensagem de embaixadores<br></font></b>embaixadores de " + HotelName + " considerar que o seu comportamento não é o melhor. Por favor, reconsidere a sua atitude, antes de um moderador tomar medidas.")); Session.GetHabbo()._lastTimeUsedHelpCommand = nowTime; }
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet) { int GroupId = Packet.PopInt(); int UserId = Packet.PopInt(); Group Group = null; if (!BiosEmuThiago.GetGame().GetGroupManager().TryGetGroup(GroupId, out Group)) { return; } if (Session.GetHabbo().Id != Group.CreatorId && !Group.IsAdmin(Session.GetHabbo().Id)) { return; } if (!Group.HasRequest(UserId)) { return; } Group.HandleRequest(UserId, false); Session.SendMessage(new UnknownGroupComposer(Group.Id, UserId)); }
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket packet) { string word; string Name = packet.PopString(); Name = BiosEmuThiago.GetGame().GetChatManager().GetFilter().IsUnnaceptableWord(Name, out word) ? "Spam" : Name; string Description = packet.PopString(); Description = BiosEmuThiago.GetGame().GetChatManager().GetFilter().IsUnnaceptableWord(Description, out word) ? "Spam" : Description; int RoomId = packet.PopInt(); int Colour1 = packet.PopInt(); int Colour2 = packet.PopInt(); int Unknown = packet.PopInt(); int groupCost = Convert.ToInt32(BiosEmuThiago.GetGame().GetSettingsManager().TryGetValue("catalog.group.purchase.cost")); if (Session.GetHabbo().Credits < groupCost) { Session.SendMessage(new BroadcastMessageAlertComposer("Um grupo custa " + groupCost + " creditos! E você tem " + Session.GetHabbo().Credits + "!")); return; } else { Session.GetHabbo().Credits -= groupCost; Session.SendMessage(new CreditBalanceComposer(Session.GetHabbo().Credits)); } RoomData Room = BiosEmuThiago.GetGame().GetRoomManager().GenerateRoomData(RoomId); if (Room == null || Room.OwnerId != Session.GetHabbo().Id || Room.Group != null) { return; } string Badge = string.Empty; for (int i = 0; i < 5; i++) { Badge += BadgePartUtility.WorkBadgeParts(i == 0, packet.PopInt().ToString(), packet.PopInt().ToString(), packet.PopInt().ToString()); } Group Group = null; if (!BiosEmuThiago.GetGame().GetGroupManager().TryCreateGroup(Session.GetHabbo(), Name, Description, RoomId, Badge, Colour1, Colour2, out Group)) { Session.SendNotification("Houve um erro ao tentar criar este grupo.\n\nTenta de novo.Se você receber esta mensagem mais de uma vez, fale com o moderador.\r\r"); return; } Session.SendMessage(new PurchaseOKComposer()); Room.Group = Group; if (Session.GetHabbo().CurrentRoomId != Room.Id) { Session.SendMessage(new RoomForwardComposer(Room.Id)); } Session.SendMessage(new NewGroupInfoComposer(RoomId, Group.Id)); }
public void CreateFriendship(int friendID) { using (IQueryAdapter dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor()) { dbClient.RunQuery("REPLACE INTO messenger_friendships (user_one_id,user_two_id) VALUES (" + _userId + "," + friendID + ")"); } OnNewFriendship(friendID); GameClient User = BiosEmuThiago.GetGame().GetClientManager().GetClientByUserID(friendID); if (User != null && User.GetHabbo().GetMessenger() != null) { User.GetHabbo().GetMessenger().OnNewFriendship(_userId); } if (User != null) { BiosEmuThiago.GetGame().GetAchievementManager().ProgressAchievement(User, "ACH_FriendListSize", 1); } GameClient thisUser = BiosEmuThiago.GetGame().GetClientManager().GetClientByUserID(_userId); if (thisUser != null) { BiosEmuThiago.GetGame().GetAchievementManager().ProgressAchievement(thisUser, "ACH_FriendListSize", 1); } }
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet) { if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom) { return; } Room Room; if (!BiosEmuThiago.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room)) { return; } if (!Room.CanTradeInRoom) { return; } Trade Trade = Room.GetUserTrade(Session.GetHabbo().Id); if (Trade == null) { return; } Item Item = Session.GetHabbo().GetInventoryComponent().GetItem(Packet.PopInt()); if (Item == null) { return; } Trade.TakeBackItem(Session.GetHabbo().Id, Item); }