public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oops, Somente o proprietário da sala pode executar esse comando!"); return; } Room.GetGameMap().DiagonalEnabled = !Room.GetGameMap().DiagonalEnabled; Session.SendWhisper("Comando executado com Sucesso!."); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oops, only the owner of this room can run this command!"); return; } Room.GetGameMap().DiagonalEnabled = !Room.GetGameMap().DiagonalEnabled; Session.SendWhisper("Successfully updated the diagonal boolean value for this room."); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oops, solo el dueño de la sala puede ejecutar el comando!"); return; } Room.GetGameMap().DiagonalEnabled = !Room.GetGameMap().DiagonalEnabled; Session.SendWhisper("Nadie puede caminar en diagonal en la sala"); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oeps! Alleen de kamer eigenaar heeft de bevoegdheid om deze actie uit te voeren."); return; } Room.GetGameMap().DiagonalEnabled = !Room.GetGameMap().DiagonalEnabled; Session.SendWhisper("Gelukt! Diagonaal lopen is nu gewijzigd."); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { return; } Room.GetRoomItemHandler().RemoveItems(Session); Room.GetGameMap().GenerateMaps(); 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.SendPacket(new FurniListUpdateComposer()); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { return; } Room.GetRoomItemHandler().RemoveItems(Session); Room.GetGameMap().GenerateMaps(); using (IQueryAdapter dbClient = BiosEmuThiago.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(); Session.LogsNotif("Todos mobis foram coletados", "command_notification"); } List <Item> Items = Room.GetRoomItemHandler().GetWallAndFloor.ToList(); if (Items.Count > 0) { Session.SendWhisper("Ainda há mais elementos nesta sala, removidos manualmente ou usar: ejectall expulsá-los!"); } Session.SendMessage(new FurniListUpdateComposer()); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username); if (User == null) { return; } var Items = Room.GetGameMap().GetAllRoomItemForSquare(User.X, User.Y); bool HasChair = Items.ToList().Where(x => x != null && x.GetBaseItem().IsSeat).Count() > 0; bool HasBed = Items.ToList().Where(x => x != null && x.GetBaseItem().IsBed()).Count() > 0; if (HasChair || HasBed) { return; } if (User.isSitting) { User.Z += 0.35; User.RemoveStatus("sit"); User.isSitting = false; User.UpdateNeeded = true; } else if (User.isLying) { User.Z += 0.35; User.RemoveStatus("lay"); User.isLying = false; User.UpdateNeeded = true; } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oeps! Alleen de kamer eigenaar kan deze actie uitvoeren."); return; } Room.GetGameMap().GenerateMaps(); Session.SendWhisper("De kamer-map is hersteld."); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oops, only the owner of this room can run this command!"); return; } Room.GetGameMap().GenerateMaps(); Session.SendWhisper("Game map of this room successfully re-generated."); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Bem, somente o proprietário da sala pode executar este comando!"); return; } Room.GetGameMap().GenerateMaps(); Session.SendWhisper("mapa do jogo desta sala regenerado com sucesso."); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oops, solo el dueño de la sala puede ejecutar este comando!"); return; } Room.GetGameMap().GenerateMaps(); Session.SendWhisper("Excelente, el mapa del juego ha sido regenerado."); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (User == null) { return; } User.TeleportEnabled = !User.TeleportEnabled; Room.GetGameMap().GenerateMaps(); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Você esqueceu de inserir uma mensagem!", 1); return; } RoomUser User = Session.GetRoomUser(); if (User == null) { return; } string Message = CommandManager.MergeParams(Params, 1); var Items = Room.GetGameMap().GetAllRoomItemForSquare(User.Coordinate.X, User.Coordinate.Y); bool HasWhisperTile = Items.Where(x => x.GetBaseItem().InteractionType == HabboHotel.Items.InteractionType.WHISPER_TILE).ToList().Count > 0; if (HasWhisperTile) { var Item = Items.FirstOrDefault(x => x.GetBaseItem().InteractionType == HabboHotel.Items.InteractionType.WHISPER_TILE); if (Item == null) { Session.SendWhisper("O mobi não pôde ser encontrado!", 1); return; } if (Item.WhisperTileData == null) { Item.WhisperTileData = new Items.Data.WhisperTile.WhisperTileData(Item.Id); } using (var dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `room_items_whisper_tile` SET `message` = @message WHERE `item_id` = @itemid LIMIT 1"); dbClient.AddParameter("itemid", Item.Id); dbClient.AddParameter("message", Message); dbClient.RunQuery(); } Item.WhisperTileData.Message = Message; Session.SendWhisper("Você atualizou com êxito esta mensagem de sussurro deste mobi!", 1); return; } else { Session.SendWhisper("Você não está de pé em um mobi!", 1); return; } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { RoomUser User = Session.GetRoomUser(); if (User == null) { return; } User.TeleportEnabled = !User.TeleportEnabled; Room.GetGameMap().GenerateMaps(); Session.SendWhisper("Modo Teleporte atualizado.", 1); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (!Room.CheckRights(Session, true)) { return; } RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (User == null) { return; } User.TeleportEnabled = !User.TeleportEnabled; Room.GetGameMap().GenerateMaps(); Session.SendMessage(RoomNotificationComposer.SendBubble("builders_club_room_locked_small", "Acaba de ativar o modo construtor.", "")); }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Oeps! Je bent vergeten een gebruikersnaam in te voeren.", 34); return; } if (!Room.SPullEnabled && !Room.CheckRights(Session, true) && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) { Session.SendWhisper("Oeps! De eigenaar van de kamer heeft :spull uitgeschakeld in deze kamer.", 34); return; } GameClient TargetClient = QuasarEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Oeps! Deze gebruiker is niet in het hotel.", 34); return; } RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Oeps! Deze gebruiker is niet in de kamer.", 34); return; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Oeps! Je kan jezelf niet naar je toe halen.", 34); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Oeps! Deze gebruiker heeft de command :warp aanstaan.", 34); return; } RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } if (ThisUser.SetX - 1 == Room.GetGameMap().Model.DoorX) { Session.SendWhisper("Heyy! Je gaat toch niet een ander de kamer uit sturen :-(!", 34); return; } if (ThisUser.RotBody % 2 != 0) { ThisUser.RotBody--; } if (ThisUser.RotBody == 0) { TargetUser.MoveTo(ThisUser.X, ThisUser.Y - 1); } else if (ThisUser.RotBody == 2) { TargetUser.MoveTo(ThisUser.X + 1, ThisUser.Y); } else if (ThisUser.RotBody == 4) { TargetUser.MoveTo(ThisUser.X, ThisUser.Y + 1); } else if (ThisUser.RotBody == 6) { TargetUser.MoveTo(ThisUser.X - 1, ThisUser.Y); } Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Trekt " + Params[1] + " van ver naar zich toe*", 0, ThisUser.LastBubble)); return; }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { #region Variables RoomUser User = Session.GetRoomUser(); Group Group = GroupManager.GetJob(Session.GetRoleplay().JobId); GroupRank GroupRank = GroupManager.GetJobRank(Session.GetRoleplay().JobId, Session.GetRoleplay().JobRank); #endregion #region Conditions if (User == null) { return; } if (Params.Length == 1) { Session.SendWhisper("Digite [:servir (item)]! Você só pode servir os seguintes itens: " + FoodManager.GetServableItems(Session) + "!", 1); return; } string FoodName = Params[1].ToString(); Food Food = FoodManager.GetFoodAndDrink(FoodName); if (!Session.GetRoleplay().IsWorking) { Session.SendWhisper("Você deve estar trabalhando para fazer isso!", 1); return; } if (Session.GetRoleplay().IsDead) { Session.SendWhisper("Você não pode servir alimentos ou bebidas enquanto está morto!", 1); return; } if (Session.GetRoleplay().IsJailed) { Session.SendWhisper("Você não pode servir alimentos ou bebidas enquanto está preso!", 1); return; } if (!GroupManager.HasJobCommand(Session, "serve")) { Session.SendWhisper("Você não tem permissão para usar este comando!", 1); return; } if (!GroupRank.CanWorkHere(Session.GetHabbo().CurrentRoomId)) { Session.SendWhisper("Você não trabalha aqui! Seu(s) quarto de trabalho é [Quarto ID(s): " + String.Join(",", GroupRank.WorkRooms) + "]", 1); return; } if (Food == null) { Session.SendWhisper("Este não é um tipo de alimento ou bebida válido! Você só pode servir: " + FoodManager.GetServableItems(Session) + "!", 1); return; } if (!FoodManager.CanServe(User)) { Session.SendWhisper("Encontre uma mesa agradável para servir!", 1); return; } if (Food.Type == "food" && !GroupManager.HasJobCommand(Session, "food")) { Session.SendWhisper("Desculpe! Você só pode servir: " + FoodManager.GetServableItems(Session) + "!", 1); return; } if (Food.Type == "drink" && !GroupManager.HasJobCommand(Session, "drinks")) { Session.SendWhisper("Desculpe! Você só pode servir: " + FoodManager.GetServableItems(Session) + "!", 1); return; } if (!Food.Servable) { if (Food.Type == "drink") { Session.SendWhisper("Desculpe! Você só pode servir: " + FoodManager.GetServableItems(Session) + "!", 1); } else { Session.SendWhisper("Desculpe! Você só pode servir: " + FoodManager.GetServableItems(Session) + "!", 1); } return; } #endregion #region Execute double MaxHeight = 0.0; Item ItemInFront; if (Room.GetGameMap().GetHighestItemForSquare(User.SquareInFront, out ItemInFront)) { if (ItemInFront != null) { MaxHeight = ItemInFront.TotalHeight; } } Session.Shout(Food.ServeText, 4); RoleplayManager.PlaceItemToRoom(Session, Food.ItemId, 0, User.SquareInFront.X, User.SquareInFront.Y, MaxHeight, User.RotBody, false, Room.Id, false, Food.ExtraData, true); #endregion }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (User == null) { return; } if (!Room.GetGameMap().ValidTile(User.X + 2, User.Y + 2) && !Room.GetGameMap().ValidTile(User.X + 1, User.Y + 1)) { Session.SendWhisper("Oops, no te puedes acostar aqui!"); return; } if (User.Statusses.ContainsKey("sit") || User.isSitting || User.RidingHorse || User.IsWalking) { return; } if (Session.GetHabbo().Effects().CurrentEffect > 0) { Session.GetHabbo().Effects().ApplyEffect(0); } if (!User.Statusses.ContainsKey("lay")) { if ((User.RotBody % 2) == 0) { if (User == null) { return; } try { User.Statusses.Add("lay", "1.0 null"); User.Z -= 0.35; User.isLying = true; User.UpdateNeeded = true; } catch { } } else { User.RotBody--;// User.Statusses.Add("lay", "1.0 null"); User.Z -= 0.35; User.isLying = true; User.UpdateNeeded = true; } } else { User.Z += 0.35; User.Statusses.Remove("lay"); User.Statusses.Remove("1.0"); User.isLying = false; User.UpdateNeeded = true; } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Introduce el Nombre del usuario el cual quieres atraer"); return; } //if (!Room.PullEnabled && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) //{ // Session.SendWhisper("Oops, el dueño de la sala no permite que hales a otros en su sala"); // return; //} GameClient TargetClient = RavenEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Ocurrio un error, no se consigue al usuario, tal vez no esta online."); return; } RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Ocurrio un error, escribe correctamente el nombre, el usuario NO se encuentra online o en la sala."); return; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Vamos! No te puedes jalar a ti mismo.."); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Oops, you cannot push a user whilst they have their teleport mode enabled."); return; } RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } if (ThisUser.SetX - 1 == Room.GetGameMap().Model.DoorX) { Session.SendWhisper("Por favor no lo tires de la sala :(!"); return; } string PushDirection = "down"; if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId&& (Math.Abs(ThisUser.X - TargetUser.X) < 3 && Math.Abs(ThisUser.Y - TargetUser.Y) < 3)) { Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*He atraído a " + Params[1] + "*", 0, ThisUser.LastBubble)); if (ThisUser.RotBody == 0) { PushDirection = "up"; } if (ThisUser.RotBody == 2) { PushDirection = "right"; } if (ThisUser.RotBody == 4) { PushDirection = "down"; } if (ThisUser.RotBody == 6) { PushDirection = "left"; } if (PushDirection == "up") { TargetUser.MoveTo(ThisUser.X, ThisUser.Y - 1); } if (PushDirection == "right") { TargetUser.MoveTo(ThisUser.X + 1, ThisUser.Y); } if (PushDirection == "down") { TargetUser.MoveTo(ThisUser.X, ThisUser.Y + 1); } if (PushDirection == "left") { TargetUser.MoveTo(ThisUser.X - 1, ThisUser.Y); } return; } else { Session.SendWhisper("Este usuario no esta lo suficientemente cerca, acercate!!"); return; } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Introduce el nombre del usuario que deseas empujar"); return; } //if (!Room.PushEnabled && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) //{ // Session.SendWhisper("Oops, al parecer el dueño de la sala ha deshabilitado la capacidad de usar el comando Push"); // return; //} GameClient TargetClient = RavenEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Ocurrio un problema, al parecer el usuario no se encuentra online o usted no escribio bien el nombre"); return; } RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Ocurrio un error, escribe correctamente el nombre, el usuario NO se encuentra online o en la sala."); return; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Vamos! no querras empujarte a ti mismo"); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Oops, you cannot push a user whilst they have their teleport mode enabled."); return; } RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } if (!((Math.Abs(TargetUser.X - ThisUser.X) >= 2) || (Math.Abs(TargetUser.Y - ThisUser.Y) >= 2))) { if (TargetUser.SetX - 1 == Room.GetGameMap().Model.DoorX) { Session.SendWhisper("Por favor no lo empujes hacia la salida :(!"); return; } if (TargetUser.RotBody == 4) { TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1); } if (ThisUser.RotBody == 0) { TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1); } if (ThisUser.RotBody == 6) { TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y); } if (ThisUser.RotBody == 2) { TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y); } if (ThisUser.RotBody == 3) { TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1); } if (ThisUser.RotBody == 1) { TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1); } if (ThisUser.RotBody == 7) { TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1); } if (ThisUser.RotBody == 5) { TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1); } Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*He empujado a " + Params[1] + "*", 0, ThisUser.LastBubble)); } else { Session.SendWhisper("Oops, " + Params[1] + " no esta lo suficientemente cerca!"); } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { RoomUser User = Session.GetRoomUser(); if (User == null) { return; } if (User.Statusses.ContainsKey("lay") || User.isLying || User.RidingHorse || User.IsWalking) { return; } var Items = Room.GetGameMap().GetAllRoomItemForSquare(User.X, User.Y); bool HasChair = Items.ToList().Where(x => x != null && x.GetBaseItem().IsSeat).Count() > 0; if (User.ForceSit || User.ForceLay) { return; } if (HasChair) { return; } if (!User.Statusses.ContainsKey("sit")) { if ((User.RotBody % 2) == 0) { if (User == null) { return; } try { User.Statusses.Add("sit", "1.0"); User.Z -= 0.35; User.isSitting = true; User.UpdateNeeded = true; } catch { } } else { User.RotBody--; User.Statusses.Add("sit", "1.0"); User.Z -= 0.35; User.isSitting = true; User.UpdateNeeded = true; } } else { User.Z += 0.35; User.RemoveStatus("sit"); User.isSitting = false; User.UpdateNeeded = true; } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { #region Conditions if (Session.GetRoleplay().Game == null) { Session.SendWhisper("Você não está dentro de um evento para usar esse comando!", 1); return; } var Teams = Session.GetRoleplay().Game.GetTeams(); if (Session.GetRoleplay().TimerManager.ActiveTimers.ContainsKey("capturar")) { Session.SendWhisper("Você já está capturando uma base de equipes!", 1); return; } if (Room.Id == Session.GetRoleplay().Team.CaptureRoom) { Session.SendWhisper("Você não pode capturar sua própria base de equipes!", 1); return; } if (Teams == null) { return; } var Zones = Teams.Values.Select(x => x.CaptureRoom).ToList(); if (!Zones.Contains(Room.Id)) { Session.SendWhisper("Você não está dentro de uma base de equipes, ou essa equipe já foi capturada!", 1); return; } var Items = Room.GetGameMap().GetRoomItemForSquare(Session.GetRoomUser().Coordinate.X, Session.GetRoomUser().Coordinate.Y); if (Items.Count < 1) { Session.SendWhisper("Você deve estar parado no topo de um Tele Banzai para capturar uma base!", 1); return; } bool HasCaptureTile = Items.ToList().Where(x => x.GetBaseItem().ItemName == "bb_rnd_tele").ToList().Count() > 0; if (!HasCaptureTile) { Session.SendWhisper("Você deve estar parado no topo de um Tele Banzai para capturar uma base!", 1); return; } #endregion #region Execute var CaptureTeam = Teams.Values.FirstOrDefault(x => x.CaptureRoom == Room.Id); Session.Shout("*Começa a Capturar a Base do Time [" + CaptureTeam.Name + "]*", 4); Session.GetRoleplay().TimerManager.CreateTimer("capturar", 1000, false); if (Session.GetRoomUser().CurrentEffect != 59) { Session.GetRoomUser().ApplyEffect(59); } foreach (var Player in CaptureTeam.Members) { var Client = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(Player); if (Client == null) { continue; } Client.SendWhisper("[Alerta de Evento] " + Session.GetHabbo().Username + " começou a capturar sua base de equipes!", 34); } #endregion }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length < 2) { Session.SendWhisper("Sintaxe de comando inválida! Use :montar <usuário>", 1); return; } string Username = Convert.ToString(Params[1]); RoomUser UserHorsie = Room.GetRoomUserManager().GetRoomUserByHabbo(Username); #region Conditions if (UserHorsie == null) { Session.SendWhisper("Usuário não encontrado ou não é um cavalo!", 1); return; } if (UserHorsie.GetClient() == null) { Session.SendWhisper("Usuário não encontrado ou não é um cavalo!", 1); return; } if (UserHorsie.GetClient().GetHabbo() == null) { Session.SendWhisper("Usuário não encontrado ou não é um cavalo!", 1); return; } if (UserHorsie.GetClient().GetHabbo().PetId <= 0) { Session.SendWhisper("Usuário não é um cavalo!", 1); return; } #endregion if (UserHorsie.RidingHorse) { Session.SendWhisper("Este usuário já está sendo montado!", 1); return; } if (UserHorsie.HorseID == Session.GetRoomUser().VirtualId) { // unmount UserHorsie.Statusses.Remove("sit"); UserHorsie.Statusses.Remove("lay"); UserHorsie.Statusses.Remove("snf"); UserHorsie.Statusses.Remove("eat"); UserHorsie.Statusses.Remove("ded"); UserHorsie.Statusses.Remove("jmp"); Session.GetRoomUser().RidingHorse = false; Session.GetRoomUser().HorseID = 0; UserHorsie.RidingHorse = false; UserHorsie.HorseID = 0; Session.GetRoomUser().MoveTo(new Point(Session.GetRoomUser().X + 2, Session.GetRoomUser().Y + 2)); Session.GetRoomUser().ApplyEffect(-1); Session.GetRoomUser().UpdateNeeded = true; UserHorsie.UpdateNeeded = true; } else { int NewX2 = Session.GetRoomUser().X; int NewY2 = Session.GetRoomUser().Y; Room.SendMessage(Room.GetRoomItemHandler().UpdateUserOnRoller(UserHorsie, new Point(NewX2, NewY2), 0, Room.GetGameMap().SqAbsoluteHeight(NewX2, NewY2))); Room.SendMessage(Room.GetRoomItemHandler().UpdateUserOnRoller(Session.GetRoomUser(), new Point(NewX2, NewY2), 0, Room.GetGameMap().SqAbsoluteHeight(NewX2, NewY2) + 1)); Session.GetRoomUser().MoveTo(NewX2, NewY2); UserHorsie.ClearMovement(true); Session.GetRoomUser().RidingHorse = true; UserHorsie.RidingHorse = true; UserHorsie.HorseID = Session.GetRoomUser().VirtualId; Session.GetRoomUser().HorseID = UserHorsie.VirtualId; Session.GetRoomUser().ApplyEffect(77); Session.GetRoomUser().RotBody = UserHorsie.RotBody; Session.GetRoomUser().RotHead = UserHorsie.RotHead; Session.GetRoomUser().UpdateNeeded = true; UserHorsie.UpdateNeeded = true; Session.Shout("*Pula em " + UserHorsie.GetClient().GetHabbo().Username + ", e começa a cavalgar como sua vadia*"); } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } Session.SendNotification("X: " + ThisUser.X + "\n - Y: " + ThisUser.Y + "\n - Z: " + ThisUser.Z + "\n - Rot: " + ThisUser.RotBody + ", sqState: " + Room.GetGameMap().GameMap[ThisUser.X, ThisUser.Y].ToString() + "\n\n - RoomID: " + Session.GetHabbo().CurrentRoomId); }
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 pull."); return; } if (!Room.PullEnabled && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) { Session.SendWhisper("Oops, it appears that the room owner has disabled the ability to use the pull command in here."); 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; } RoomUser TargetUser = Room.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; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Come on, surely you don't want to push yourself!"); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Oops, you cannot push a user whilst they have their teleport mode enabled."); return; } RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } if (ThisUser.SetX - 1 == Room.GetGameMap().Model.DoorX) { Session.SendWhisper("Please don't pull that user out of the room :(!"); return; } string PushDirection = "down"; if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId&& (Math.Abs(ThisUser.X - TargetUser.X) < 3 && Math.Abs(ThisUser.Y - TargetUser.Y) < 3)) { Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*pulls " + Params[1] + " to them*", 0, ThisUser.LastBubble)); if (ThisUser.RotBody == 0) { PushDirection = "up"; } if (ThisUser.RotBody == 2) { PushDirection = "right"; } if (ThisUser.RotBody == 4) { PushDirection = "down"; } if (ThisUser.RotBody == 6) { PushDirection = "left"; } if (PushDirection == "up") { TargetUser.MoveTo(ThisUser.X, ThisUser.Y - 1); } if (PushDirection == "right") { TargetUser.MoveTo(ThisUser.X + 1, ThisUser.Y); } if (PushDirection == "down") { TargetUser.MoveTo(ThisUser.X, ThisUser.Y + 1); } if (PushDirection == "left") { TargetUser.MoveTo(ThisUser.X - 1, ThisUser.Y); } return; } else { Session.SendWhisper("That user is not close enough to you to be pulled, try getting closer!"); return; } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Digite o nick de quem você quer puxar!"); return; } GameClient TargetClient = CloudServer.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Ocorreu um erro o usuário não se encontra online!"); return; } RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Ocorreu um erro, parece que o usuário não está na sala e nem no quarto!"); return; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Não se puxe, tá doidão?"); return; } if (TargetClient.GetHabbo().GetPermissions().HasRight("mod_tool")) { Session.SendWhisper("Não pode puxa esse usuário."); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Você não pode puxa um usuário se ele estiver usando builder!"); return; } RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } if (ThisUser.SetX - 1 == Room.GetGameMap().Model.DoorX) { Session.SendWhisper("Por favor, não puxe esse usuário pra fora do quarto! :("); return; } string PushDirection = "down"; if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId&& (Math.Abs(ThisUser.X - TargetUser.X) < 3 && Math.Abs(ThisUser.Y - TargetUser.Y) < 3)) { Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Puxei " + Params[1] + " pra mim*", 0, ThisUser.LastBubble)); if (ThisUser.RotBody == 0) { PushDirection = "up"; } if (ThisUser.RotBody == 2) { PushDirection = "right"; } if (ThisUser.RotBody == 4) { PushDirection = "down"; } if (ThisUser.RotBody == 6) { PushDirection = "left"; } if (PushDirection == "up") { TargetUser.MoveTo(ThisUser.X, ThisUser.Y - 1); } if (PushDirection == "right") { TargetUser.MoveTo(ThisUser.X + 1, ThisUser.Y); } if (PushDirection == "down") { TargetUser.MoveTo(ThisUser.X, ThisUser.Y + 1); } if (PushDirection == "left") { TargetUser.MoveTo(ThisUser.X - 1, ThisUser.Y); } return; } else { Session.SendWhisper("Esse usuário não está perto o bastante para você puxar!"); return; } }
public void Execute(GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Opa, você esqueceu de escolher um usuário-alvo!"); return; } GameClient TargetSession = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Params[1]); if (User == null) { return; } if (User == null) { return; } if (User.ForceSit) { return; } if (User.Statusses.ContainsKey("sit") || User.isSitting || User.RidingHorse || User.IsWalking) { return; } var Items = Room.GetGameMap().GetAllRoomItemForSquare(User.X, User.Y); bool HasBed = Items.ToList().Where(x => x != null && x.GetBaseItem().IsBed()).Count() > 0; if (HasBed || TargetSession.GetHabbo().VIPRank > 2) { return; } if (TargetSession.GetHabbo().Effects().CurrentEffect > 0) { TargetSession.GetHabbo().Effects().ApplyEffect(0); } if (!User.Statusses.ContainsKey("lay")) { if ((User.RotBody % 2) == 0) { if (User == null) { return; } try { User.Statusses.Add("lay", "1.0 null"); User.Z -= 0.35; User.isLying = true; User.UpdateNeeded = true; } catch { } } else { User.RotBody--; User.Statusses.Add("lay", "1.0 null"); User.Z -= 0.35; User.isLying = true; User.UpdateNeeded = true; } User.Frozen = true; User.ClearMovement(true); User.ForceLay = true; PlusEnvironment.GetGame().GetChatManager().GetCommands().Parse(User.GetClient(), ":unequip"); Session.Shout("*Olha para " + User.GetClient().GetHabbo().Username + " forçando ele a sentar*", 23); } else { User.Z += 0.35; User.RemoveStatus("lay"); User.isLying = false; User.UpdateNeeded = true; User.Frozen = false; User.ClearMovement(true); User.ForceLay = false; Session.Shout("*Olha para " + User.GetClient().GetHabbo().Username + " fazendo ele se levantar*", 23); } }
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 push."); return; } if (!Room.SPushEnabled && !Room.CheckRights(Session, true) && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) { Session.SendWhisper("Oops, it appears that the room owner has disabled the ability to use the push command in here."); 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; } RoomUser TargetUser = Room.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; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Come on, surely you don't want to push yourself!"); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Oops, you cannot push a user whilst they have their teleport mode enabled."); return; } RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } if (!((Math.Abs(TargetUser.X - ThisUser.X) >= 2) || (Math.Abs(TargetUser.Y - ThisUser.Y) >= 2))) { if (TargetUser.SetX - 1 == Room.GetGameMap().Model.DoorX || TargetUser.SetY - 1 == Room.GetGameMap().Model.DoorY) { Session.SendWhisper("Please don't push that user out of the room :(!"); return; } if (TargetUser.SetX - 2 == Room.GetGameMap().Model.DoorX || TargetUser.SetY - 2 == Room.GetGameMap().Model.DoorY) { Session.SendWhisper("Please don't push that user out of the room :(!"); return; } if (TargetUser.SetX - 3 == Room.GetGameMap().Model.DoorX || TargetUser.SetY - 3 == Room.GetGameMap().Model.DoorY) { Session.SendWhisper("Please don't push that user out of the room :(!"); return; } if (TargetUser.RotBody == 4) { TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 3); } if (ThisUser.RotBody == 0) { TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 3); } if (ThisUser.RotBody == 6) { TargetUser.MoveTo(TargetUser.X - 3, TargetUser.Y); } if (ThisUser.RotBody == 2) { TargetUser.MoveTo(TargetUser.X + 3, TargetUser.Y); } if (ThisUser.RotBody == 3) { TargetUser.MoveTo(TargetUser.X + 3, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 3); } if (ThisUser.RotBody == 1) { TargetUser.MoveTo(TargetUser.X + 3, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 3); } if (ThisUser.RotBody == 7) { TargetUser.MoveTo(TargetUser.X - 3, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 3); } if (ThisUser.RotBody == 5) { TargetUser.MoveTo(TargetUser.X - 3, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 3); } Room.SendPacket(new ChatComposer(ThisUser.VirtualId, "*super pushes " + Params[1] + "*", 0, ThisUser.LastBubble)); } else { Session.SendWhisper("Oops, " + Params[1] + " is not close enough!"); } }
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 empujar."); return; } GameClient TargetClient = CloudServer.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 = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Se produjo un error mientras que la búsqueda de usuario, tal vez no están en línea o en esta sala."); return; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Vamos, seguramente usted no quiere empujar a sí mismo!"); return; } if (TargetClient.GetHabbo().GetPermissions().HasRight("mod_tool")) { Session.SendWhisper("No puedes empujar a este usuario."); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Vaya, no se puede empujar a un usuario al mismo tiempo que han permitido a su modo de teletransporte."); return; } RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } if (!((Math.Abs(TargetUser.X - ThisUser.X) >= 2) || (Math.Abs(TargetUser.Y - ThisUser.Y) >= 2))) { if (TargetUser.SetX - 1 == Room.GetGameMap().Model.DoorX) { Session.SendWhisper("Por favor, no empujar a ese usuario fuera de la habitación :(!"); return; } if (TargetUser.RotBody == 4) { TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1); } if (ThisUser.RotBody == 0) { TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1); } if (ThisUser.RotBody == 6) { TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y); } if (ThisUser.RotBody == 2) { TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y); } if (ThisUser.RotBody == 3) { TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1); } if (ThisUser.RotBody == 1) { TargetUser.MoveTo(TargetUser.X + 1, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1); } if (ThisUser.RotBody == 7) { TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y - 1); } if (ThisUser.RotBody == 5) { TargetUser.MoveTo(TargetUser.X - 1, TargetUser.Y); TargetUser.MoveTo(TargetUser.X, TargetUser.Y + 1); } Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*pushes " + Params[1] + "*", 0, ThisUser.LastBubble)); } else { Session.SendWhisper("Oops, " + Params[1] + " is not close enough!"); } }
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 súper tirón."); return; } if (!Room.SPullEnabled && !Room.CheckRights(Session, true) && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) { Session.SendWhisper("Vaya, parece que el propietario de la sala ha deshabilitado la capacidad de utilizar el comando spull aquí."); 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 = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Se produjo un error mientras que la búsqueda de usuario, tal vez no están en línea o en esta sala."); return; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Vamos, seguramente usted no quiere empujar a sí mismo!"); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Vaya, no se puede empujar a un usuario al mismo tiempo que han permitido a su modo de teletransporte."); return; } RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (ThisUser == null) { return; } if (ThisUser.SetX - 1 == Room.GetGameMap().Model.DoorX) { Session.SendWhisper("Por favor, no tire de ese usuario fuera de la habitación :(!"); return; } if (ThisUser.RotBody % 2 != 0) { ThisUser.RotBody--; } if (ThisUser.RotBody == 0) { TargetUser.MoveTo(ThisUser.X, ThisUser.Y - 1); } else if (ThisUser.RotBody == 2) { TargetUser.MoveTo(ThisUser.X + 1, ThisUser.Y); } else if (ThisUser.RotBody == 4) { TargetUser.MoveTo(ThisUser.X, ThisUser.Y + 1); } else if (ThisUser.RotBody == 6) { TargetUser.MoveTo(ThisUser.X - 1, ThisUser.Y); } Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*super pulls " + Params[1] + " to them*", 0, ThisUser.LastBubble)); return; }