public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Session.GetRoleplay().TexasHoldEmPlayer > 0) { Session.Shout("*Sai do Texas Hold 'Em *", 4); TexasHoldEmManager.RemovePlayer(Session.GetHabbo().Id); return; } if (Session.GetRoleplay().Game == null) { Session.SendWhisper("Você não está dentro de um evento!", 1); return; } if (Session.GetRoleplay().Game.IsGameStarting() && !Session.GetRoleplay().Game.HasGameStarted()) { Session.SendWhisper("Você não pode deixar um jogo enquanto está começando!", 1); return; } if (RoleplayGameManager.RunningGames.ContainsKey(Session.GetRoleplay().Game.GetGameMode())) { if (Session.GetRoleplay().Game.GetGameMode() == GameMode.Brawl || Session.GetRoleplay().Game.GetGameMode() == GameMode.SoloQueue || Session.GetRoleplay().Game.GetGameMode() == GameMode.SoloQueueGuns) { if (Session.GetRoomUser() != null) { Session.GetRoomUser().ClearMovement(true); } RoleplayGameManager.GetGame(Session.GetRoleplay().Game.GetGameMode()).RemovePlayerFromGame(Session); RoleplayManager.SpawnChairs(Session, "es_bench"); } else { RoleplayGameManager.GetGame(Session.GetRoleplay().Game.GetGameMode()).RemovePlayerFromGame(Session); } Session.GetRoleplay().Game = null; Session.GetRoleplay().Team = null; return; } else { Session.SendWhisper("Um erro ocorreu!", 1); return; } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { var Game = TexasHoldEmManager.GetGameForUser(Session.GetHabbo().Id); if (Game == null || Session.GetRoleplay().TexasHoldEmPlayer <= 0) { Session.SendWhisper("Você deve estar em um Texas Hold para usar esse comando!", 1); return; } if (!Game.GameStarted) { Session.SendWhisper("O Texas Holdainda não começou!", 1); return; } if (Params[0].ToLower() == "apostar" || Params[0].ToLower() == "passar") { ExecuteBet(Session, Room, Params, Game); return; } }
/// <summary> /// Responds to the event /// </summary> public void Execute(object Source, object[] Params) { GameClient Client = (GameClient)Source; if (Client == null || Client.GetRoleplay() == null || Client.GetHabbo() == null) { return; } Room Room = (Room)Params[0]; TutorialBadge(Client, Params); if (Client.GetRoleplay().PoliceTrial) { Client.GetRoleplay().PoliceTrial = false; } #region WebSocket Dialogue Check Client.GetRoleplay().ClearWebSocketDialogue(); #endregion #region Police Car Enable Check if (Client.GetRoomUser() != null) { if (Client.GetRoomUser().CurrentEffect == EffectsList.CarPolice) { Client.GetRoomUser().ApplyEffect(EffectsList.None); } } #endregion #region Spawn/Update Texas Hold 'Em Furni if (TexasHoldEmManager.GetGamesByRoomId(Room.RoomId).Count > 0) { List <TexasHoldEm> Games = TexasHoldEmManager.GetGamesByRoomId(Room.RoomId); foreach (TexasHoldEm Game in Games) { if (Game != null) { #region PotSquare Check if (Game.PotSquare.Furni != null) { if (Game.PotSquare.Furni.GetX != Game.PotSquare.X && Game.PotSquare.Furni.GetY != Game.PotSquare.Y && Game.PotSquare.Furni.GetZ != Game.PotSquare.Z && Game.PotSquare.Furni.Rotation != Game.PotSquare.Rotation) { if (Room.GetRoomItemHandler().GetFloor.Contains(Game.PotSquare.Furni)) { Room.GetRoomItemHandler().RemoveFurniture(null, Game.PotSquare.Furni.Id); } Game.PotSquare.SpawnDice(); } } else { Game.PotSquare.SpawnDice(); } #endregion #region JoinGate Check if (Game.JoinGate.Furni != null) { if (Game.JoinGate.Furni.GetX != Game.JoinGate.X && Game.JoinGate.Furni.GetY != Game.JoinGate.Y && Game.JoinGate.Furni.GetZ != Game.JoinGate.Z && Game.JoinGate.Furni.Rotation != Game.JoinGate.Rotation) { if (Room.GetRoomItemHandler().GetFloor.Contains(Game.JoinGate.Furni)) { Room.GetRoomItemHandler().RemoveFurniture(null, Game.JoinGate.Furni.Id); } Game.JoinGate.SpawnDice(); } } else { Game.JoinGate.SpawnDice(); } #endregion #region Player1 Check foreach (TexasHoldEmItem Item in Game.Player1.Values) { if (Item.Furni != null) { if (Item.Furni.GetX != Item.X && Item.Furni.GetY != Item.Y && Item.Furni.GetZ != Item.Z && Item.Furni.Rotation != Item.Rotation) { if (Room.GetRoomItemHandler().GetFloor.Contains(Item.Furni)) { Room.GetRoomItemHandler().RemoveFurniture(null, Item.Furni.Id); } Item.SpawnDice(); } } else { Item.SpawnDice(); } } #endregion #region Player2 Check foreach (TexasHoldEmItem Item in Game.Player2.Values) { if (Item.Furni != null) { if (Item.Furni.GetX != Item.X && Item.Furni.GetY != Item.Y && Item.Furni.GetZ != Item.Z && Item.Furni.Rotation != Item.Rotation) { if (Room.GetRoomItemHandler().GetFloor.Contains(Item.Furni)) { Room.GetRoomItemHandler().RemoveFurniture(null, Item.Furni.Id); } Item.SpawnDice(); } } else { Item.SpawnDice(); } } #endregion #region Player3 Check foreach (TexasHoldEmItem Item in Game.Player3.Values) { if (Item.Furni != null) { if (Item.Furni.GetX != Item.X && Item.Furni.GetY != Item.Y && Item.Furni.GetZ != Item.Z && Item.Furni.Rotation != Item.Rotation) { if (Room.GetRoomItemHandler().GetFloor.Contains(Item.Furni)) { Room.GetRoomItemHandler().RemoveFurniture(null, Item.Furni.Id); } Item.SpawnDice(); } } else { Item.SpawnDice(); } } #endregion #region Banker Check foreach (TexasHoldEmItem Item in Game.Banker.Values) { if (Item.Furni != null) { if (Item.Furni.GetX != Item.X && Item.Furni.GetY != Item.Y && Item.Furni.GetZ != Item.Z && Item.Furni.Rotation != Item.Rotation) { if (Room.GetRoomItemHandler().GetFloor.Contains(Item.Furni)) { Room.GetRoomItemHandler().RemoveFurniture(null, Item.Furni.Id); } Item.SpawnDice(); } } else { Item.SpawnDice(); } } #endregion } } } #endregion #region Spawn/Update Turf Flag Furni if (Room.TurfEnabled) { Turf Turf = TurfManager.GetTurf(Room.RoomId); if (Turf != null) { if (Turf.FlagSpawned) { if (Turf.Flag.GroupId != Turf.GangId || (Turf.Flag.GetX != Turf.FlagX && Turf.Flag.GetY != Turf.FlagY)) { Turf.SpawnFlag(); } } else { Turf.SpawnFlag(); } } } #endregion #region Spawn/Update House Signs List <House> Houses = PlusEnvironment.GetGame().GetHouseManager().GetHousesBySignRoomId(Room.Id); if (Houses.Count > 0) { foreach (House House in Houses) { if (House.Sign.Spawned) { if (House.Sign.Item.GetX != House.Sign.X && House.Sign.Item.GetY != House.Sign.Y && House.Sign.Item.GetZ != House.Sign.Z) { House.SpawnSign(); } } else { House.SpawnSign(); } } } #endregion #region Spawn/Update Farming Spaces List <FarmingSpace> FarmingSpaces = FarmingManager.GetFarmingSpacesByRoomId(Room.Id); if (FarmingSpaces.Count > 0) { foreach (FarmingSpace Space in FarmingSpaces) { if (Space.Spawned) { if (Space.Item.GetX != Space.X && Space.Item.GetY != Space.Y && Space.Item.GetZ != Space.Z) { Space.SpawnSign(); } } else { Space.SpawnSign(); } } } #endregion #region Spawn Jailbreak Fence if (Room.RoomId == Convert.ToInt32(RoleplayData.GetData("jail", "outsideroomid")) && !JailbreakManager.JailbreakActivated) { int X = Convert.ToInt32(RoleplayData.GetData("jailbreak", "fencex")); int Y = Convert.ToInt32(RoleplayData.GetData("jailbreak", "fencey")); int Rot = Convert.ToInt32(RoleplayData.GetData("jailbreak", "fencerotation")); if (Room.GetRoomItemHandler().GetFloor.Where(x => x.BaseItem == 8049 && x.GetX == X && x.GetY == Y).ToList().Count <= 0) { double MaxHeight = 0.0; Item ItemInFront; if (Room.GetGameMap().GetHighestItemForSquare(new Point(X, Y), out ItemInFront)) { if (ItemInFront != null) { MaxHeight = ItemInFront.TotalHeight; } } RoleplayManager.PlaceItemToRoom(null, 8049, 0, X, Y, MaxHeight, Rot, false, Room.RoomId, false); } } #endregion #region Taxi Message if (Client.GetRoleplay().AntiArrowCheck) { Client.GetRoleplay().AntiArrowCheck = false; } if (Client.GetRoleplay().InsideTaxi) { int Bubble = (Client.GetHabbo().GetPermissions().HasRight("mod_tool") && Client.GetRoleplay().StaffOnDuty) ? 23 : 4; Client.GetRoleplay().InsideTaxi = false; new Thread(() => { Thread.Sleep(500); RoleplayManager.Shout(Client, "*Chega ao meu destino*", Bubble); }).Start(); } else { PlusEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Client, QuestType.SOCIAL_VISIT); } #endregion #region Room Entrance Message if (Room.EnterRoomMessage != "none") { new Thread(() => { Thread.Sleep(500); Client.SendWhisper(Room.EnterRoomMessage, 34); }).Start(); } #endregion #region Main checks BotInteractionCheck(Client, Params); if (Client.GetRoleplay().Game == null && Client.GetRoleplay().Team == null) { HomeRoomCheck(Client, Params); JobCheck(Client, Params); SendhomeCheck(Client, Params); DeathCheck(Client, Params); JailCheck(Client, Params); WantedCheck(Client, Params); ProbationCheck(Client, Params); #region AFK check if (Client.GetRoomUser() != null) { Client.GetHabbo().Poof(true); } #endregion } #endregion #region Event/Game Checks else { if (Client.GetRoleplay().Game != null && Client.GetRoleplay().Team != null) { if (!Client.GetRoleplay().GameSpawned || Client.GetRoleplay().NeedsRespawn) { if (Client.GetRoleplay().Game != Games.RoleplayGameManager.GetGame(Games.GameMode.Brawl)) { var OldCoord = new Point(Client.GetRoomUser().Coordinate.X, Client.GetRoomUser().Coordinate.Y); var NewCoord = new Point(Client.GetRoleplay().Team.SpawnPoint.X, Client.GetRoleplay().Team.SpawnPoint.Y); Client.GetHabbo().CurrentRoom.GetGameMap().UpdateUserMovement(OldCoord, NewCoord, Client.GetRoomUser()); Client.GetRoomUser().SetPos(NewCoord.X, NewCoord.Y, Client.GetHabbo().CurrentRoom.GetGameMap().GetHeightForSquare(NewCoord)); if (Client.GetRoleplay().NeedsRespawn) { if (Client.GetRoomUser() != null) { Client.GetRoomUser().CanWalk = false; } } if (!Client.GetRoleplay().GameSpawned) { Client.GetRoleplay().GameSpawned = true; Client.SendNotification(Client.GetRoleplay().Game.GetName() + " Começou! Boa sorte!"); } } } } } #endregion }
/// <summary> /// Responds to the event /// </summary> public void Execute(object Source, object[] Params) { GameClient Client = (GameClient)Source; if (Client == null) { return; } if (Client.GetRoleplay() == null) { return; } if (Client.GetHabbo() == null) { return; } if (Client.GetHabbo()._disconnected) { return; } if (Client.GetRoleplay().IsWorking) { WorkManager.RemoveWorkerFromList(Client); } if (RoleplayManager.InvitedUsersToJuryDuty.Contains(Client)) { RoleplayManager.InvitedUsersToJuryDuty.Remove(Client); } if (Client.GetRoleplay().TexasHoldEmPlayer > 0) { var Game = TexasHoldEmManager.GetGameForUser(Client.GetHabbo().Id); if (Game != null) { Game.RemovePlayerFromGame(Client.GetHabbo().Id); } } Client.GetRoleplay().CloseInteractingUserDialogues(); var GuideManager = PlusEnvironment.GetGame().GetGuideManager(); if (GuideManager != null && Client != null) { if (GuideManager.AllPolice.Contains(Client)) { GuideManager.AllPolice.Remove(Client); } if (GuideManager.GuardiansOnDuty.Contains(Client)) { GuideManager.GuardiansOnDuty.Remove(Client); } if (GuideManager.GuidesOnDuty.Contains(Client)) { GuideManager.GuidesOnDuty.Remove(Client); } if (GuideManager.HelpersOnDuty.Contains(Client)) { GuideManager.HelpersOnDuty.Remove(Client); } #region End Existing Calls if (Client.GetRoleplay() != null && Client.GetRoleplay().GuideOtherUser != null) { Client.GetRoleplay().GuideOtherUser.SendMessage(new OnGuideSessionDetachedComposer(0)); Client.GetRoleplay().GuideOtherUser.SendMessage(new OnGuideSessionDetachedComposer(1)); if (Client.GetRoleplay().GuideOtherUser.GetRoleplay() != null) { Client.GetRoleplay().GuideOtherUser.GetRoleplay().Sent911Call = false; Client.GetRoleplay().GuideOtherUser.GetRoleplay().GuideOtherUser = null; } Client.GetRoleplay().GuideOtherUser = null; Client.SendMessage(new OnGuideSessionDetachedComposer(0)); Client.SendMessage(new OnGuideSessionDetachedComposer(1)); } #endregion } if (RoleplayData.GetData("farming", "room") != null) { int RoomId = Convert.ToInt32(RoleplayData.GetData("farming", "room")); var Room = RoleplayManager.GenerateRoom(RoomId); if (Room != null && Room.GetRoomItemHandler() != null && Room.GetRoomItemHandler().GetFloor != null) { List <Item> Items = Room.GetRoomItemHandler().GetFloor.Where(x => x.GetBaseItem().InteractionType == InteractionType.FARMING && x.FarmingData != null && x.FarmingData.OwnerId == Client.GetHabbo().Id).ToList(); foreach (Item Item in Items) { Room.GetRoomItemHandler().RemoveFurniture(null, Item.Id); } } } Client.GetRoleplay().EndCycle(); if (RoleplayManager.WantedList != null) { if (RoleplayManager.WantedList.ContainsKey(Client.GetHabbo().Id)) { Wanted Junk; RoleplayManager.WantedList.TryRemove(Client.GetHabbo().Id, out Junk); } } Logging.WriteLine(Client.GetHabbo().Username + " has logged out!", ConsoleColor.DarkGray); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Você deve incluir uma coisa para atualizar, e.x. :atualizar catalogo", 1); return; } string UpdateVariable = Params[1]; switch (UpdateVariable.ToLower()) { case "cata": case "catalog": case "catalogue": case "catalogo": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_catalog")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_catalog'.", 1); break; } PlusEnvironment.GetGame().GetCatalog().Init(PlusEnvironment.GetGame().GetItemManager()); PlusEnvironment.GetGame().GetClientManager().SendMessage(new CatalogUpdatedComposer()); Session.SendWhisper("Catálogo atualizado com sucesso.", 1); break; } case "items": case "furni": case "furniture": case "mobis": case "mobi": case "mobilias": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_furni")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_furni'.", 1); break; } PlusEnvironment.GetGame().GetItemManager().Init(); Session.SendWhisper("Itens/Mobis atualizados com sucesso.", 1); break; } case "models": case "modelos": case "model": case "quartos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_models")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_models'.", 1); break; } PlusEnvironment.GetGame().GetRoomManager().LoadModels(); Session.SendWhisper("Modelos de quartos atualizados com sucesso.", 1); break; } case "promotions": case "promocoes": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_promotions")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_promotions'.", 1); break; } PlusEnvironment.GetGame().GetLandingManager().LoadPromotions(); Session.SendWhisper("Landing view promotions successfully updated.", 1); break; } case "youtube": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_youtube")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_youtube'", 1); break; } PlusEnvironment.GetGame().GetTelevisionManager().Init(); Session.SendWhisper("A lista de televisões do Youtube foi atualizada com sucesso. ", 1); break; } case "filter": case "filtro": case "filtros": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_filter")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_filter'", 1); break; } PlusEnvironment.GetGame().GetChatManager().GetFilter().Init(); Session.SendWhisper("Definições de filtro atualizadas com sucesso.", 1); break; } case "navigator": case "navegador": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_navigator")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_navigator'.", 1); break; } PlusEnvironment.GetGame().GetNavigator().Init(); Session.SendWhisper("Itens do navegador atualizados com sucesso.", 1); break; } case "ranks": case "rights": case "permissions": case "cargos": case "permissao": case "permissoes": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_permissions")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_rights'.", 1); break; } PlusEnvironment.GetGame().GetPermissionManager().Init(); foreach (GameClient Client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList()) { if (Client == null || Client.GetHabbo() == null || Client.GetHabbo().GetPermissions() == null) { continue; } Client.GetHabbo().GetPermissions().Init(Client.GetHabbo()); } Session.SendWhisper("Definições de Cargo atualizadas com sucesso.", 1); break; } case "config": case "settings": case "configuracoes": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_configuration")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_configuration'.", 1); break; } PlusEnvironment.ConfigData = new ConfigData(); Session.SendWhisper("Configuração do servidor atualizada com sucesso.", 1); break; } case "bans": case "ban": case "banimentos": case "banidos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bans")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_bans'.", 1); break; } PlusEnvironment.GetGame().GetModerationManager().ReCacheBans(); Session.SendWhisper("A lista de banidos foi atualizada com sucesso.", 1); break; } case "quests": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_quests")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_quests'.", 1); break; } PlusEnvironment.GetGame().GetQuestManager().Init(); Session.SendWhisper("Definições de Tarefas atualizadas com êxito.", 1); break; } case "achievements": case "conquistas": case "conquista": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_achievements")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_achievements'.", 1); break; } PlusEnvironment.GetGame().GetAchievementManager().LoadAchievements(); Session.SendWhisper("Definições de conquistas atualizadas com êxito.", 1); break; } case "clothing": case "visuais": case "roupas": case "visual": case "roupa": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_clothing")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_clothing'.", 1); break; } PlusEnvironment.GetGame().GetCatalog().GetClothingManager().Init(); Session.SendWhisper("Mobiliário de vestuário e preços recarregados.", 1); break; } case "moderation": case "moderacao": case "mods": case "moderadores": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_moderation")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_moderation'.", 1); break; } PlusEnvironment.GetGame().GetModerationManager().Init(); PlusEnvironment.GetGame().GetClientManager().ModAlert("As predefinições de moderação foram atualizadas. Recarregue o cliente para ver as novas predefinições."); Session.SendWhisper("Configuração de moderação atualizada com sucesso.", 1); break; } case "tickets": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_tickets")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_tickets'.", 1); break; } if (PlusEnvironment.GetGame().GetModerationTool().Tickets.Count > 0) { PlusEnvironment.GetGame().GetModerationTool().Tickets.Clear(); } PlusEnvironment.GetGame().GetClientManager().ModAlert("Os ingressos foram atualizados. Recarregue o cliente."); Session.SendWhisper("Os ingressos foram atualizados com sucesso.", 1); break; } case "vouchers": case "brindes": case "codigos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_vouchers")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_vouchers'.", 1); break; } PlusEnvironment.GetGame().GetCatalog().GetVoucherManager().Init(); Session.SendWhisper("Vouchers/Códigos brinde atualizado com sucesso.", 1); break; } case "polls": case "perguntas": case "quiz": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_polls")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_polls'.", 1); break; } int PollLoaded; PlusEnvironment.GetGame().GetPollManager().Init(out PollLoaded); Session.SendWhisper("Polls successfully updated.", 1); break; } case "gamecenter": case "centrodejogos": case "cjogos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_game_center")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_game_center'.", 1); break; } PlusEnvironment.GetGame().GetGameDataManager().Init(); Session.SendWhisper("Cache do Centro de Jogos atualizado com sucesso.", 1); break; } case "pet_locale": case "lpet": case "petl": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_pet_locale")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_pet_locale'.", 1); break; } PlusEnvironment.GetGame().GetChatManager().GetPetLocale().Init(); Session.SendWhisper("Pet locale cache successfully updated.", 1); break; } case "locale": case "local": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_locale")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_locale'.", 1); break; } PlusEnvironment.GetGame().GetLanguageLocale().Init(); Session.SendWhisper("Local cache atualizado com sucesso.", 1); break; } case "mutant": case "mutante": case "mutantes": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_anti_mutant")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_anti_mutant'.", 1); break; } PlusEnvironment.GetGame().GetAntiMutant().Init(); Session.SendWhisper("Anti mutante recarregado com sucesso.", 1); break; } case "bots": case "bot": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bots")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_bots'.", 1); break; } PlusEnvironment.GetGame().GetBotManager().Init(); Session.SendWhisper("O gerenciador de Bots foi recarregado com sucesso", 1); break; } case "bots_speech": case "bots speech": case "speech": case "speeches": case "response": case "responses": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bots")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_bots'", 1); break; } RoleplayBotManager.FetchCachedSpeeches(); Session.SendWhisper("Bots speech and responses successfully reloaded", 1); break; } case "rewards": case "premios": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_rewards")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_rewards'.", 1); break; } PlusEnvironment.GetGame().GetRewardManager().Reload(); Session.SendWhisper("O Gerenciador de recompensas foi recarregado com sucesso.", 1); break; } case "chat_styles": case "echats": case "estilos": case "estilo": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_chat_styles")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_chat_styles'.", 1); break; } PlusEnvironment.GetGame().GetChatManager().GetChatStyles().Init(); Session.SendWhisper("Estilos de bate-papo recarregados com sucesso.", 1); break; } case "badges": case "badge_definitions": case "emblemas": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_badge_definitions")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_badge_definitions'.", 1); break; } PlusEnvironment.GetGame().GetBadgeManager().Init(); Session.SendWhisper("Definições de emblemas recarregadas com sucesso.", 1); break; } case "rpdata": case "roleplaydata": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_roleplay_data")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_roleplaydata'.", 1); break; } RoleplayData.Initialize(); RoleplayManager.UpdateRPData(); Session.SendWhisper("Dados do Roleplay recarregados com sucesso.", 1); break; } case "blacklist": case "listanegra": case "ln": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_blacklist")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_blacklist'.", 1); break; } BlackListManager.Initialize(); Session.SendWhisper("Lista negra recarregada com sucesso.", 1); break; } case "farming": case "agricultura": case "agricolas": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_farming")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_farming'.", 1); break; } FarmingManager.Initialize(); Session.SendWhisper("Artigos agrícolas recarregados com sucesso.", 1); break; } case "events": case "games": case "jogos": case "eventos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_events")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_events'.", 1); break; } RoleplayGameManager.Initialize(); Session.SendWhisper("Eventos recarregados com sucesso.", 1); break; } case "corps": case "jobs": case "corporations": case "gangs": case "gangues": case "empregos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_jobs")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_jobs'.", 1); break; } PlusEnvironment.GetGame().GetGroupManager().Initialize(); Session.SendWhisper("Trabalhos e Gangues recarregados com sucesso.", 1); break; } case "turfs": case "turfcaptures": case "gangcaptures": case "territorio": case "territorios": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_turfs")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_turfs'.", 1); break; } TurfManager.Initialize(); Session.SendWhisper("Territórios e Zona de Captura recarregados com sucesso.", 1); break; } case "weapons": case "guns": case "armas": case "arma": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_weapons")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_weapons'.", 1); break; } WeaponManager.Initialize(); #region Refresh User Weapons lock (PlusEnvironment.GetGame().GetClientManager().GetClients) { foreach (GameClient Client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList()) { if (Client == null || Client.GetHabbo() == null || Client.GetRoleplay() == null) { continue; } if (Client.GetRoleplay().EquippedWeapon == null) { continue; } Client.GetRoleplay().EquippedWeapon = null; Client.GetRoleplay().OwnedWeapons = null; Client.GetRoleplay().OwnedWeapons = Client.GetRoleplay().LoadAndReturnWeapons(); Client.SendWhisper("Um administrador atualizou as armas, sua arma foi retirada, equipe de novo!", 1); } } #endregion Session.SendWhisper("Armas recarregadas com sucesso.", 1); break; } case "food": case "drinks": case "bebidas": case "bebida": case "alimentos": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_food")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_food'.", 1); break; } FoodManager.Initialize(); Session.SendWhisper("Alimentos e bebidas recarregados com sucesso.", 1); break; } case "houses": case "house": case "casas": case "casa": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_houses")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_houses'.", 1); break; } PlusEnvironment.GetGame().GetHouseManager().Init(); Session.SendWhisper("Casas recarregadas com sucesso.", 1); break; } case "crafting": case "construir": case "construcao": case "craft": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_crafting")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_crafting'.", 1); break; } CraftingManager.Initialize(); Session.SendWhisper("Áreas de construção recarregadas com sucesso..", 1); break; } case "lottery": case "loteria": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_lottery")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_lottery'.", 1); break; } LotteryManager.Initialize(); Session.SendWhisper("Loteria recarregados com sucesso.", 1); break; } case "todo": case "tarefas": case "tarefa": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_todo")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_todo'.", 1); break; } ToDoManager.Initialize(); Session.SendWhisper("Lista de Tarefas recarregada com sucesso.", 1); break; } case "bounty": case "bl": case "bounties": case "recompensa": case "recompensas": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_bounty")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_bounty'.", 1); break; } BountyManager.Initialize(); Session.SendWhisper("Lista de recompensas recarregada com sucesso.", 1); break; } case "court": case "jury": case "juiz": case "politica": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_court")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_court'.", 1); break; } RoleplayManager.CourtVoteEnabled = false; RoleplayManager.InnocentVotes = 0; RoleplayManager.GuiltyVotes = 0; RoleplayManager.CourtJuryTime = 0; RoleplayManager.CourtTrialIsStarting = false; RoleplayManager.CourtTrialStarted = false; RoleplayManager.Defendant = null; RoleplayManager.InvitedUsersToJuryDuty.Clear(); Session.SendWhisper("Juiz atualizado com sucesso.", 1); break; } case "chat": case "chats": case "chatroom": case "chatrooms": case "batepapos": case "batepapo": case "whatsapps": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_websocket_chat")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_websocket_chat'.", 1); break; } HabboRoleplay.Web.Util.ChatRoom.WebSocketChatManager.Initialiaze(); Session.SendWhisper("Salas de chat atualizadas com sucesso.", 1); break; } case "gambling": case "texash": case "texas": case "texasholdem": { if (!Session.GetHabbo().GetPermissions().HasCommand("command_update_gambling")) { Session.SendWhisper("Opa, você não tem permissão em 'command_update_gambling'.", 1); break; } TexasHoldEmManager.Initialize(); Session.SendWhisper("Jogos do Texas Holdem atualizados com sucesso.", 1); break; } default: Session.SendWhisper("'" + UpdateVariable + "' não é uma coisa válida para recarregar.", 1); break; } }
public Game() { this._packetManager = new PacketManager(); this._clientManager = new GameClientManager(); this._modManager = new ModerationManager(); this._moderationTool = new ModerationTool(); this._itemDataManager = new ItemDataManager(); this._itemDataManager.Init(); this._catalogManager = new CatalogManager(); this._catalogManager.Init(this._itemDataManager); this._televisionManager = new TelevisionManager(); this._navigatorManager = new NavigatorManager(); this._roomManager = new RoomManager(); this._chatManager = new ChatManager(); this._questManager = new QuestManager(); this._achievementManager = new AchievementManager(); this._talentTrackManager = new TalentTrackManager(); this._landingViewManager = new LandingViewManager(); this._gameDataManager = new GameDataManager(); this._globalUpdater = new ServerStatusUpdater(); this._globalUpdater.Init(); this._languageLocale = new LanguageLocale(); this._antiMutant = new AntiMutant(); this._botManager = new BotManager(); this._cacheManager = new CacheManager(); this._rewardManager = new RewardManager(); this._badgeManager = new BadgeManager(); this._badgeManager.Init(); this._permissionManager = new PermissionManager(); this._permissionManager.Init(); this._subscriptionManager = new SubscriptionManager(); this._subscriptionManager.Init(); this._guideManager = new GuideManager(); int pollLoaded; this._pollManager = new PollManager(); this._pollManager.Init(out pollLoaded); #region Roleplay Section RoleplayData.Initialize(); EventManager.Initialize(); CombatManager.Initialize(); RoleplayGameManager.Initialize(); this._groupManager = new GroupManager(); this._groupManager.Initialize(); TexasHoldEmManager.Initialize(); TurfManager.Initialize(); WeaponManager.Initialize(); FoodManager.Initialize(); FarmingManager.Initialize(); CraftingManager.Initialize(); LotteryManager.Initialize(); ToDoManager.Initialize(); BlackListManager.Initialize(); BountyManager.Initialize(); WebSocketChatManager.Initialiaze(); this._houseManager = new HouseManager(); this._houseManager.Init(); this._webEventManager = new WebEventManager(); this._webEventManager.Init(); #endregion }
public void UnloadRoom(Room Room, bool RemoveData = false) { if (Room == null) { return; } #region Roleplay Checks #region Turf Turf Turf = TurfManager.GetTurf(Room.RoomId); if (Turf != null) { Turf.Flag = null; Turf.FlagSpawned = false; } #endregion #region Texas Hold Em List <TexasHoldEm> Games = TexasHoldEmManager.GetGamesByRoomId(Room.Id); if (Games.Count > 0) { foreach (TexasHoldEm Game in Games) { if (Game != null) { #region PotSquare Check Game.PotSquare.Furni = null; #endregion #region JoinGate Check Game.JoinGate.Furni = null; #endregion #region Player1 Check foreach (TexasHoldEmItem Item in Game.Player1.Values) { Item.Furni = null; } #endregion #region Player2 Check foreach (TexasHoldEmItem Item in Game.Player2.Values) { Item.Furni = null; } #endregion #region Player3 Check foreach (TexasHoldEmItem Item in Game.Player3.Values) { Item.Furni = null; } #endregion #region Banker Check foreach (TexasHoldEmItem Item in Game.Banker.Values) { Item.Furni = null; } #endregion } } } #endregion #region Farming List <FarmingSpace> FarmingSpaces = FarmingManager.GetFarmingSpacesByRoomId(Room.Id); if (FarmingSpaces.Count > 0) { foreach (FarmingSpace Space in FarmingSpaces) { if (Space != null) { Space.Item = null; Space.Spawned = false; } } } #endregion #region Houses List <House> Houses = PlusEnvironment.GetGame().GetHouseManager().GetHousesBySignRoomId(Room.Id); if (Houses.Count > 0) { foreach (House House in Houses) { if (House.Sign != null) { House.Sign.Item = null; House.Sign.Spawned = false; } } } #endregion #region Bots RoleplayBotManager.EjectRoomsDeployedBots(Room); #endregion #endregion new Thread(() => { Thread.Sleep(200); Room room = null; if (this._rooms.TryRemove(Room.RoomId, out room)) { Room.Dispose(); if (RemoveData) { RoomData Data = null; this._loadedRoomData.TryRemove(Room.Id, out Data); } } }).Start(); }
public void OnTrigger(GameClient Session, Item Item, int Request, bool HasRights) { #region Check Banker Dice Roll if (TexasHoldEmManager.GameList.Count > 0) { if (TexasHoldEmManager.GameList.Values.Where(x => x != null && x.Banker != null && x.Banker.Values.Where(y => y != null && y.Furni != null && y.Furni == Item).ToList().Count > 0).ToList().Count > 0) { if (Item.ExtraData != "-1" && Item.TexasHoldEmData != null && Item.TexasHoldEmData.Value == 0) { Item.ExtraData = "-1"; Item.UpdateState(false, true); Item.RequestUpdate(3, true); } return; } } #endregion RoomUser User = null; if (Session != null) { User = Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); } if (User == null) { return; } if (TexasHoldEmManager.GameList.Count > 0) { if (Session.GetRoleplay() != null && Session.GetRoleplay().TexasHoldEmPlayer > 0) { TexasHoldEm Game = TexasHoldEmManager.GetGameForUser(Session.GetHabbo().Id); if (Game != null) { if (Game.PlayersTurn == Session.GetRoleplay().TexasHoldEmPlayer) { Game.RollDice(Session, Item, Request); } return; } } } if (Gamemap.TilesTouching(Item.GetX, Item.GetY, User.X, User.Y)) { if (Item.ExtraData != "-1") { if (Request == -1) { Item.ExtraData = "0"; Item.UpdateState(); } else { Item.ExtraData = "-1"; Item.UpdateState(false, true); Item.RequestUpdate(3, true); } } } else { User.MoveTo(Item.SquareInFront); } }