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 = NeonEnvironment.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("@green@ Introduce el nombre del usuario que deseas quemar. { :quemar NOMBRE }"); return; } if (!Room.GolpeEnabled && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) { Session.SendWhisper("@red@ Oops, el dueño de la sala no permite que quemes a otros en su sala."); return; } GameClient TargetClient = QuasarEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Ocurrió 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("@red@ Ocurrió 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("@red@ ¿Te gusta el dolor? Lo siento pero hoy no es tu día amig@..."); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Oops, No puedes quemar a alguien si usas teleport."); 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))) { Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "@red@ *He empezado a quemar a " + Params[1] + "*", 0, ThisUser.LastBubble)); ThisUser.ApplyEffect(9); Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "@cyan@ Oh vaya... me han dado un beso :$", 0, ThisUser.LastBubble)); TargetUser.ApplyEffect(9); } else { Session.SendWhisper("@green@ ¡Oops, " + Params[1] + " no está lo suficientemente cerca!"); } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Oops, debes escribir un numero de 1-189! Para ver la lista de emoji escribe :emoji list"); return; } string emoji = Params[1]; if (emoji.Equals("list")) { Session.SendMessage(new MassEventComposer("habbopages/chat/emoji.txt")); } else { int emojiNum; bool isNumeric = int.TryParse(emoji, out emojiNum); if (isNumeric) { string chatcolor = Session.GetHabbo().chatHTMLColour; int chatsize = Session.GetHabbo().chatHTMLSize; Session.GetHabbo().chatHTMLColour = ""; Session.GetHabbo().chatHTMLSize = 12; switch (emojiNum) { default: bool isValid = true; if (emojiNum < 1) { isValid = false; } if (emojiNum > 189 && Session.GetHabbo().Rank < 6) { isValid = false; } if (isValid) { string Username; RoomUser TargetUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username); if (emojiNum < 10) { Username = "******" + emojiNum + ".png' height='20' width='20'><br> "; } else { Username = "******" + emojiNum + ".png' height='20' width='20'><br> "; } if (Room != null) { Room.SendMessage(new UserNameChangeComposer(Session.GetHabbo().CurrentRoomId, TargetUser.VirtualId, Username)); } string Message = " "; Room.SendMessage(new ChatComposer(TargetUser.VirtualId, Message, 0, TargetUser.LastBubble)); TargetUser.SendNamePacket(); } else { Session.SendWhisper("Emoji invalido, debe ser numero de 1-189. Para ver la lista de emojis escribe :emoji list"); } break; } Session.GetHabbo().chatHTMLColour = chatcolor; Session.GetHabbo().chatHTMLSize = chatsize; } else { Session.SendWhisper("Emoji invalido, debe ser numero de 1-189. Para ver la lista de emojis escribe :emoji list"); } } 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 = NeonEnvironment.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) { if (Params.Length == 1) { Session.SendWhisper("@green@ Introduce el nombre del usuario que deseas quemar. { :quemar NOMBRE }"); return; } //if (!Room.QuemarEnabled && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) //{ // Session.SendWhisper("@red@ Oops, el dueño de la sala no permite que quemes a otros en su sala."); // return; //} GameClient TargetClient = NeonEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Ocurrió 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("@red@ Ocurrió 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("@red@ No está mal que intentes quemarte a ti mismo... pero puede parecer extraño y pensarán que estás loco..."); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Oops, No puedes quemar a alguien si usas teleport."); 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))) { Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "@red@ *¡Empiezo a quemar a " + Params[1] + "!", 0, ThisUser.LastBubble)); ThisUser.ApplyEffect(5); Room.SendMessage(new ChatComposer(TargetUser.VirtualId, "@cyan@ ¡Ayuda! ¡Me están quemando!", 0, ThisUser.LastBubble)); TargetUser.ApplyEffect(25); } else { Session.SendWhisper("@green@ ¡Oops, " + Params[1] + " no está lo suficientemente cerca!"); } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Oeps! Je bent vergeten een functie in te voeren. (:lijst)", 34); return; } if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oeps! Je hebt niet de bevoegdheid om deze actie uit te voeren.", 34); return; } string Option = Params[1]; switch (Option) { case "lijst": { StringBuilder List = new StringBuilder(""); List.AppendLine("Lijst met kamer functies:"); List.AppendLine("-------------------------"); List.AppendLine("Huisdieren: " + (Room.PetMorphsAllowed == true ? "aan" : "uit")); List.AppendLine("Pull: " + (Room.PullEnabled == true ? "aan" : "uit")); List.AppendLine("Push: " + (Room.PushEnabled == true ? "aan" : "uit")); List.AppendLine("Super Pull: " + (Room.SPullEnabled == true ? "aan" : "uit")); List.AppendLine("Super Push: " + (Room.SPushEnabled == true ? "aan" : "uit")); List.AppendLine("Respect: " + (Room.RespectNotificationsEnabled == true ? "aan" : "uit")); List.AppendLine("Effects: " + (Room.EnablesEnabled == true ? "aan" : "uit")); Session.SendNotification(List.ToString()); break; } case "push": { Room.PushEnabled = !Room.PushEnabled; using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `push_enabled` = @PushEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PushEnabled", QuasarEnvironment.BoolToEnum(Room.PushEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Habbis kunnen nu " + (Room.PushEnabled == true ? "weer andere Habbis duwen!" : "niet meer andere Habbis duwen!"), 34); break; } case "spush": { Room.SPushEnabled = !Room.SPushEnabled; using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `spush_enabled` = @PushEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PushEnabled", QuasarEnvironment.BoolToEnum(Room.SPushEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Habbis kunnen nu " + (Room.SPushEnabled == true ? "weer andere Habbis super duwen!" : "niet meer andere Habbis super duwen!"), 34); break; } case "spull": { Room.SPullEnabled = !Room.SPullEnabled; using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `spull_enabled` = @PullEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PullEnabled", QuasarEnvironment.BoolToEnum(Room.SPullEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Habbis kunnen nu " + (Room.SPullEnabled == true ? "weer andere Habbis super trekken!" : "niet meer andere Habbis super trekken!"), 34); break; } case "pull": { Room.PullEnabled = !Room.PullEnabled; using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `pull_enabled` = @PullEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PullEnabled", QuasarEnvironment.BoolToEnum(Room.PullEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Habbis kunnen nu " + (Room.PullEnabled == true ? "weer andere Habbis trekken!" : "niet meer andere Habbis trekken!"), 34); break; } case "enable": case "effecten": { Room.EnablesEnabled = !Room.EnablesEnabled; using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `enables_enabled` = @EnablesEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("EnablesEnabled", QuasarEnvironment.BoolToEnum(Room.EnablesEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Habbis kunnen nu " + (Room.EnablesEnabled == true ? "weer effecten gebruiken!" : "geen effecten meer gebruiken!"), 34); break; } case "respect": { Room.RespectNotificationsEnabled = !Room.RespectNotificationsEnabled; using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `respect_notifications_enabled` = @RespectNotificationsEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("RespectNotificationsEnabled", QuasarEnvironment.BoolToEnum(Room.RespectNotificationsEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Habbis kunnen nu " + (Room.RespectNotificationsEnabled == true ? "weer andere Habbis respecteren!" : "niet meer andere Habbis respecteren!"), 34); break; } case "dieren": case "huisdieren": { Room.PetMorphsAllowed = !Room.PetMorphsAllowed; using (IQueryAdapter dbClient = QuasarEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `pet_morphs_allowed` = @PetMorphsAllowed WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PetMorphsAllowed", QuasarEnvironment.BoolToEnum(Room.PetMorphsAllowed)); dbClient.RunQuery(); } Session.SendWhisper("Habbis kunnen nu " + (Room.PetMorphsAllowed == true ? "weer veranderen in een huisdier!" : "niet meer veranderen in een huisdier!"), 34); if (!Room.PetMorphsAllowed) { foreach (RoomUser User in Room.GetRoomUserManager().GetRoomUsers()) { if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null) { continue; } User.GetClient().SendWhisper("De kamer eigenaar heeft deze actie voor de kamer uitgezet.", 34); if (User.GetClient().GetHabbo().PetId > 0) { //Tell the user what is going on. User.GetClient().SendWhisper("Oeps! Je kan deze actie hier niet uitvoeren.", 34); //Change the users Pet Id. User.GetClient().GetHabbo().PetId = 0; //Quickly remove the old user instance. Room.SendMessage(new UserRemoveComposer(User.VirtualId)); //Add the new one, they won't even notice a thing!!11 8-) Room.SendMessage(new UsersComposer(User)); } } } break; } } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Opa, você deve escolher uma opção de sala para desativar.", 1); return; } string Option = Params[1]; switch (Option) { case "list": case "confs": case "lista": case "configuracoes": { StringBuilder List = new StringBuilder(); List.Append("---------- Configurações do Quarto ----------\n\n"); List.Append("[pets] Virar Pet: " + (Room.PetMorphsAllowed == true ? "ativado" : "desativado") + "\n"); List.Append("[puxar] Puxar: " + (Room.PullEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[empurrar] Empurrar: " + (Room.PushEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[puxao] Super puxar: " + (Room.SPullEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[empurrao] Super empurrar: " + (Room.SPushEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[respeito] Respeito: " + (Room.RespectNotificationsEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[efeitos] Efeitos: " + (Room.EnablesEnabled == true ? "ativado" : "desativado") + "\n\n"); List.Append("---------- Configurações de RolePlay ----------\n\n"); List.Append("[banco] Banco: " + (Room.BankEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[atirar] Atirar: " + (Room.ShootEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[bater] Bater: " + (Room.HitEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[seguro] Zona segura: " + (Room.SafeZoneEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[roubar] Roubar: " + (Room.RobEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[sexo] Comandos de Sexo: " + (Room.SexCommandsEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[territorio] Território: " + (Room.TurfEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[academia] Academia: " + (Room.GymEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[entrega] Entrega: " + (Room.DeliveryEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[tutorial] Tutorial: " + (Room.TutorialEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[dirigir] Dirigir: " + (Room.DriveEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[virtaxi] Vir de taxi: " + (Room.TaxiToEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[irtaxi] Ir de taxi: " + (Room.TaxiFromEnabled == true ? "ativado" : "desativado") + "\n"); List.Append("[mensagem] Mensagem de Entrada: " + Room.EnterRoomMessage + "\n"); Session.SendNotification(List.ToString()); break; } case "push": case "empurrar": { Room.PushEnabled = !Room.PushEnabled; Room.RoomData.PushEnabled = Room.PushEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `push_enabled` = @PushEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PushEnabled", PlusEnvironment.BoolToEnum(Room.PushEnabled)); dbClient.RunQuery(); } Session.SendWhisper("O modo de empurrar agora está " + (Room.PushEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "spush": case "sempurrar": case "empurrao": { Room.SPushEnabled = !Room.SPushEnabled; Room.RoomData.SPushEnabled = Room.SPushEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `spush_enabled` = @PushEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PushEnabled", PlusEnvironment.BoolToEnum(Room.SPushEnabled)); dbClient.RunQuery(); } Session.SendWhisper("O modo Super empurrar agora está " + (Room.SPushEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "spull": case "spuxar": case "puxao": { Room.SPullEnabled = !Room.SPullEnabled; Room.RoomData.SPullEnabled = Room.SPullEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `spull_enabled` = @PullEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PullEnabled", PlusEnvironment.BoolToEnum(Room.SPullEnabled)); dbClient.RunQuery(); } Session.SendWhisper("O modo Super puxar agora está " + (Room.SPullEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "pull": case "puxar": { Room.PullEnabled = !Room.PullEnabled; Room.RoomData.PullEnabled = Room.PullEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `pull_enabled` = @PullEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PullEnabled", PlusEnvironment.BoolToEnum(Room.PullEnabled)); dbClient.RunQuery(); } Session.SendWhisper("O modo puxar agora está" + (Room.PullEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "enable": case "enables": case "efeito": case "efeitos": { Room.EnablesEnabled = !Room.EnablesEnabled; Room.RoomData.EnablesEnabled = Room.EnablesEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `enables_enabled` = @EnablesEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("EnablesEnabled", PlusEnvironment.BoolToEnum(Room.EnablesEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Modo de enables agora está " + (Room.EnablesEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "respect": case "respeito": { Room.RespectNotificationsEnabled = !Room.RespectNotificationsEnabled; Room.RoomData.RespectNotificationsEnabled = Room.RespectNotificationsEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `respect_notifications_enabled` = @RespectNotificationsEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("RespectNotificationsEnabled", PlusEnvironment.BoolToEnum(Room.RespectNotificationsEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Notificações de respeito agora está " + (Room.RespectNotificationsEnabled == true ? "enabled!" : "disabled!"), 1); break; } case "bank": case "banco": { Room.BankEnabled = !Room.BankEnabled; Room.RoomData.BankEnabled = Room.BankEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `bank_enabled` = @BankEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("BankEnabled", PlusEnvironment.BoolToEnum(Room.BankEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Modo de Banco agora está " + (Room.BankEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "taxito": case "virtaxi": { Room.TaxiToEnabled = !Room.TaxiToEnabled; Room.RoomData.TaxiToEnabled = Room.TaxiToEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `taxi_to_enabled` = @TaxiToEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("TaxiToEnabled", PlusEnvironment.BoolToEnum(Room.TaxiToEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Taxi agora está " + (Room.TaxiToEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "taxifrom": case "irtaxi": { Room.TaxiFromEnabled = !Room.TaxiFromEnabled; Room.RoomData.TaxiFromEnabled = Room.TaxiFromEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `taxi_from_enabled` = @TaxiFromEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("TaxiFromEnabled", PlusEnvironment.BoolToEnum(Room.TaxiFromEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Taxi agora está " + (Room.TaxiFromEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "shoot": case "atirar": case "tiro": { Room.ShootEnabled = !Room.ShootEnabled; Room.RoomData.ShootEnabled = Room.ShootEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `shoot_enabled` = @ShootEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("ShootEnabled", PlusEnvironment.BoolToEnum(Room.ShootEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Tiro agora está " + (Room.ShootEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "hit": case "soco": case "bater": { Room.HitEnabled = !Room.HitEnabled; Room.RoomData.HitEnabled = Room.HitEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `hit_enabled` = @HitEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("HitEnabled", PlusEnvironment.BoolToEnum(Room.HitEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Soco agora está " + (Room.HitEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "drive": case "car": case "dirigir": { Room.DriveEnabled = !Room.DriveEnabled; Room.RoomData.DriveEnabled = Room.DriveEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `drive_enabled` = @DriveEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("DriveEnabled", PlusEnvironment.BoolToEnum(Room.DriveEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Dirigir agora está " + (Room.DriveEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "tutorial": { Room.TutorialEnabled = !Room.TutorialEnabled; Room.RoomData.TutorialEnabled = Room.TutorialEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `tutorial_enabled` = @TutorialEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("TutorialEnabled", PlusEnvironment.BoolToEnum(Room.TutorialEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Tutorial agora está " + (Room.TutorialEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "rob": case "roubar": { Room.RobEnabled = !Room.RobEnabled; Room.RoomData.RobEnabled = Room.RobEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `rob_enabled` = @RobEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("RobEnabled", PlusEnvironment.BoolToEnum(Room.RobEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Roubar agora está " + (Room.RobEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "sex": case "sexcommands": case "sexo": case "comandossexo": { Room.SexCommandsEnabled = !Room.SexCommandsEnabled; Room.RoomData.SexCommandsEnabled = Room.SexCommandsEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `sexcommands_enabled` = @SexCommandsEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("SexCommandsEnabled", PlusEnvironment.BoolToEnum(Room.SexCommandsEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Comandos de Sexo agora está " + (Room.SexCommandsEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "turf": case "territorio": { Room.TurfEnabled = !Room.TurfEnabled; Room.RoomData.TurfEnabled = Room.TurfEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `turf_enabled` = @TurfEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("TurfEnabled", PlusEnvironment.BoolToEnum(Room.TurfEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Território agora está " + (Room.TurfEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "gym": case "academia": case "malhar": { Room.GymEnabled = !Room.GymEnabled; Room.RoomData.GymEnabled = Room.GymEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `gym_enabled` = @GymEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("GymEnabled", PlusEnvironment.BoolToEnum(Room.GymEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Academia agora está " + (Room.GymEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "delivery": case "entrega": { Room.DeliveryEnabled = !Room.DeliveryEnabled; Room.RoomData.DeliveryEnabled = Room.DeliveryEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `delivery_enabled` = @DeliveryEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("DeliveryEnabled", PlusEnvironment.BoolToEnum(Room.DeliveryEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Entrega agora está " + (Room.DeliveryEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "message": case "mensagem": { if (Params.Length < 3) { Session.SendWhisper("Você precisa digitar uma mensagem de entrada do quarto!", 1); break; } string Message = CommandManager.MergeParams(Params, 2); Room.EnterRoomMessage = Message; Room.RoomData.EnterRoomMessage = Room.EnterRoomMessage; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `enter_message` = @EnterMessage WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("EnterMessage", Room.EnterRoomMessage); dbClient.RunQuery(); } Session.SendWhisper("A mensagem de entrada agora é: " + Room.EnterRoomMessage, 1); break; } case "safezone": case "seguro": { Room.SafeZoneEnabled = !Room.SafeZoneEnabled; Room.RoomData.SafeZoneEnabled = Room.SafeZoneEnabled; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rp_rooms` SET `safezone_enabled` = @SafeZoneEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("SafeZoneEnabled", PlusEnvironment.BoolToEnum(Room.SafeZoneEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de Zona Segura agora está " + (Room.SafeZoneEnabled == true ? "ativado!" : "desativado!"), 1); break; } case "pets": case "morphs": case "animais": { Room.PetMorphsAllowed = !Room.PetMorphsAllowed; Room.RoomData.PetMorphsAllowed = Room.PetMorphsAllowed; PlusEnvironment.GetGame().GetRoomManager().UpdateRoom(Room); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `pet_morphs_allowed` = @PetMorphsAllowed WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PetMorphsAllowed", PlusEnvironment.BoolToEnum(Room.PetMorphsAllowed)); dbClient.RunQuery(); } Session.SendWhisper("Configurações de pet/transformações agora está " + (Room.PetMorphsAllowed == true ? "ativado!" : "desativado!"), 1); if (!Room.PetMorphsAllowed) { foreach (RoomUser User in Room.GetRoomUserManager().GetRoomUsers()) { if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null) { continue; } User.GetClient().SendWhisper("O dono da sala desativou a habilidade de usar um animal de estimação em sua casa.", 1); if (User.GetClient().GetHabbo().PetId > 0) { // Tell the user what is going on. User.GetClient().SendWhisper("Opa, o dono da sala desativou a habilidade de usar um animal de estimação em sua casa.", 1); // Change the users Pet Id. User.GetClient().GetHabbo().PetId = 0; // Quickly remove the old user instance. Room.SendMessage(new UserRemoveComposer(User.VirtualId)); // Add the new one, they won't even notice a thing. Room.SendMessage(new UsersComposer(User)); } } } break; } } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Introduce el nombre del usuario que deseas hacer el super pull."); return; } if (!Room.SPullEnabled && !Room.CheckRights(Session, true) && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) { Session.SendWhisper("Oops, al parecer el dueño de la sala ha prohibido hacer los super pull en su sala."); return; } GameClient TargetClient = NeonEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Hay un Error, no se encuentra al usuario online o no se encuentra en la sala."); return; } RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Hay un Error, no se encuentra al usuario online o no se encuentra en la sala.."); return; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Vamos.. Seguramente usted no se querra empujar a si 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 tire a ese usuario fuera de la Habitacion :c "); 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; }
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 super pull."); return; } if (!Room.SPullEnabled && !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 spull 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; } 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; }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Opa, digite um número 1-189! Para ver a lista de gravações emoji :emoji lista"); return; } string emoji = Params[1]; if (emoji.Equals("lista")) { ServerPacket notif = new ServerPacket(ServerPacketHeader.NuxAlertMessageComposer); notif.WriteString("habbopages/chat/emoji.txt"); Session.SendMessage(notif); } else { int emojiNum; bool isNumeric = int.TryParse(emoji, out emojiNum); if (isNumeric) { switch (emojiNum) { default: bool isValid = true; if (emojiNum < 1) { isValid = false; } if (emojiNum > 189 && Session.GetHabbo().Rank < 6) { isValid = false; } // Comando editaveu abaixo mais cuidado pra não faze merda if (isValid) { string Username; RoomUser TargetUser = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username); if (emojiNum < 10) { Username = "******" + emojiNum + ".png' height='20' width='20'><br> >"; } else { Username = "******" + emojiNum + ".png' height='20' width='20'><br> >"; } if (Room != null) { Room.SendMessage(new UserNameChangeComposer(Session.GetHabbo().CurrentRoomId, TargetUser.VirtualId, Username)); } string Message = " "; Room.SendMessage(new ChatComposer(TargetUser.VirtualId, Message, 0, TargetUser.LastBubble)); TargetUser.SendNamePacket(); } else { Session.SendWhisper("Emoji inválido, deve ser 1-189 número. Para ver a lista de digite escreve: ':emoji lista'"); } break; } } else { Session.SendWhisper("Emoji inválido, deve ser 1-189 número. Para ver a lista de Emoji digite ':emoji lista'"); } } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Oops, debes elegir una opcion para desactivar. ejecuta el comando ':room list'"); return; } if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oops, solo el dueño de la sala puede ejecutar este comando"); return; } string Option = Params[1]; switch (Option) { case "list": { StringBuilder List = new StringBuilder(""); List.AppendLine("Lista de comando en salas"); List.AppendLine("-------------------------"); List.AppendLine("Pet Morphs: " + (Room.PetMorphsAllowed == true ? "Habilitado" : "Deshabilitado")); //List.AppendLine("Pull: " + (Room.PullEnabled == true ? "Habilitado" : "Deshabilitado")); //List.AppendLine("Push: " + (Room.PushEnabled == true ? "Habilitado" : "Deshabilitado")); //List.AppendLine("Golpes: " + (Room.GolpeEnabled == true ? "Habilitado" : "Deshabilitado")); //List.AppendLine("Super Pull: " + (Room.SPullEnabled == true ? "Habilitado" : "Deshabilitado")); //List.AppendLine("Super Push: " + (Room.SPushEnabled == true ? "Habilitado" : "Deshabilitado")); List.AppendLine("Respect: " + (Room.RespectNotificationsEnabled == true ? "Habilitado" : "Deshabilitado")); //List.AppendLine("Enables: " + (Room.EnablesEnabled == true ? "Habilitado" : "Deshabilitado")); //List.AppendLine("Besos: " + (Room.BesosEnabled == true ? "Habilitado" : "Deshabilitado")); //List.AppendLine("Quemar: " + (Room.QuemarEnabled == true ? "Habilitado" : "Deshabilitado")); Session.SendNotification(List.ToString()); break; } //case "golpe": //{ // Room.GolpeEnabled = !Room.GolpeEnabled; // using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) // { // dbClient.SetQuery("UPDATE `rooms` SET `golpe_enabled` = @GolpeEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); // dbClient.AddParameter("GolpeEnabled", RavenEnvironment.BoolToEnum(Room.GolpeEnabled)); // dbClient.RunQuery(); // } // Session.SendWhisper("Los golpes en esta sala estan " + (Room.GolpeEnabled == true ? "Habilitado!" : "Deshabilitado!")); // break; //} //case "quemar": // { // Room.QuemarEnabled = !Room.QuemarEnabled; // using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) // { // dbClient.SetQuery("UPDATE `rooms` SET `quemar_enabled` = @QuemarEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); // dbClient.AddParameter("QuemarEnabled", RavenEnvironment.BoolToEnum(Room.QuemarEnabled)); // dbClient.RunQuery(); // } // Session.SendWhisper("¡El poder de quemar en esta sala está " + (Room.QuemarEnabled == true ? "habilitado!" : "deshabilitado!")); // break; // } //case "beso": // { // Room.BesosEnabled = !Room.BesosEnabled; // using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) // { // dbClient.SetQuery("UPDATE `rooms` SET `besos_enabled` = @BesosENabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); // dbClient.AddParameter("BesosEnabled", RavenEnvironment.BoolToEnum(Room.QuemarEnabled)); // dbClient.RunQuery(); // } // Session.SendWhisper("¡El poder de besar en esta sala está " + (Room.QuemarEnabled == true ? "habilitado!" : "deshabilitado!")); // break; // } //case "push": // { // Room.PushEnabled = !Room.PushEnabled; // using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) // { // dbClient.SetQuery("UPDATE `rooms` SET `push_enabled` = @PushEnabled WHERE `id` = '" + Room.Id +"' LIMIT 1"); // dbClient.AddParameter("PushEnabled", RavenEnvironment.BoolToEnum(Room.PushEnabled)); // dbClient.RunQuery(); // } // Session.SendWhisper("Modo Push ahora esta " + (Room.PushEnabled == true ? "Habilitado!" : "Deshabilitado!")); // break; // } //case "spush": // { // Room.SPushEnabled = !Room.SPushEnabled; // using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) // { // dbClient.SetQuery("UPDATE `rooms` SET `spush_enabled` = @PushEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); // dbClient.AddParameter("PushEnabled", RavenEnvironment.BoolToEnum(Room.SPushEnabled)); // dbClient.RunQuery(); // } // Session.SendWhisper("Modo Super Push ahora esta " + (Room.SPushEnabled == true ? "Habilitado!" : "Deshabilitado!")); // break; // } //case "spull": // { // Room.SPullEnabled = !Room.SPullEnabled; // using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) // { // dbClient.SetQuery("UPDATE `rooms` SET `spull_enabled` = @PullEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); // dbClient.AddParameter("PullEnabled", RavenEnvironment.BoolToEnum(Room.SPullEnabled)); // dbClient.RunQuery(); // } // Session.SendWhisper("Modo Super Pull ahora esta " + (Room.SPullEnabled == true ? "Habilitado!" : "Deshabilitado!")); // break; // } //case "pull": // { // Room.PullEnabled = !Room.PullEnabled; // using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) // { // dbClient.SetQuery("UPDATE `rooms` SET `pull_enabled` = @PullEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); // dbClient.AddParameter("PullEnabled", RavenEnvironment.BoolToEnum(Room.PullEnabled)); // dbClient.RunQuery(); // } // Session.SendWhisper("Modo Pull ahora esta " + (Room.PullEnabled == true ? "Habilitado!" : "Deshabilitado!")); // break; // } //case "enable": //case "enables": // { // Room.EnablesEnabled = !Room.EnablesEnabled; // using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) // { // dbClient.SetQuery("UPDATE `rooms` SET `enables_enabled` = @EnablesEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); // dbClient.AddParameter("EnablesEnabled", RavenEnvironment.BoolToEnum(Room.EnablesEnabled)); // dbClient.RunQuery(); // } // Session.SendWhisper("Los efectos en esta sala estan " + (Room.EnablesEnabled == true ? "Habilitados!" : "Deshabilitados!")); // break; // } case "respect": { Room.RespectNotificationsEnabled = !Room.RespectNotificationsEnabled; using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `respect_notifications_enabled` = @RespectNotificationsEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("RespectNotificationsEnabled", RavenEnvironment.BoolToEnum(Room.RespectNotificationsEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Notificaciones de Respeto estan " + (Room.RespectNotificationsEnabled == true ? "Habilitado!" : "Deshabilitado!")); break; } case "pets": case "morphs": { Room.PetMorphsAllowed = !Room.PetMorphsAllowed; using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `pet_morphs_allowed` = @PetMorphsAllowed WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PetMorphsAllowed", RavenEnvironment.BoolToEnum(Room.PetMorphsAllowed)); dbClient.RunQuery(); } Session.SendWhisper("Que se convierta en mascotas esta " + (Room.PetMorphsAllowed == true ? "Habilitado!" : "Deshabilitado!")); if (!Room.PetMorphsAllowed) { foreach (RoomUser User in Room.GetRoomUserManager().GetRoomUsers()) { if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null) { continue; } User.GetClient().SendWhisper("El propietario de la sala ha deshabilitado la opcion de convertirse en mascota."); if (User.GetClient().GetHabbo().PetId > 0) { //Tell the user what is going on. User.GetClient().SendWhisper("Oops, el dueño de la sala solo permite Usuarios normales, no mascotas.."); //Change the users Pet Id. User.GetClient().GetHabbo().PetId = 0; //Quickly remove the old user instance. Room.SendMessage(new UserRemoveComposer(User.VirtualId)); //Add the new one, they won't even notice a thing!!11 8-) Room.SendMessage(new UsersComposer(User)); } } } break; } } }
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Oops, you must choose a room option to disable."); return; } if (!Room.CheckRights(Session, true)) { Session.SendWhisper("Oops, only the room owner or staff can use this command."); return; } string Option = Params[1]; switch (Option) { case "list": { StringBuilder List = new StringBuilder(""); List.AppendLine("Room Command List"); List.AppendLine("-------------------------"); List.AppendLine("Pet Morphs: " + (Room.PetMorphsAllowed == true ? "enabled" : "disabled")); List.AppendLine("Pull: " + (Room.PullEnabled == true ? "enabled" : "disabled")); List.AppendLine("Push: " + (Room.PushEnabled == true ? "enabled" : "disabled")); List.AppendLine("Super Pull: " + (Room.SPullEnabled == true ? "enabled" : "disabled")); List.AppendLine("Super Push: " + (Room.SPushEnabled == true ? "enabled" : "disabled")); List.AppendLine("Respect: " + (Room.RespectNotificationsEnabled == true ? "enabled" : "disabled")); List.AppendLine("Enables: " + (Room.EnablesEnabled == true ? "enabled" : "disabled")); Session.SendNotification(List.ToString()); break; } case "push": { Room.PushEnabled = !Room.PushEnabled; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `push_enabled` = @PushEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PushEnabled", PlusEnvironment.BoolToEnum(Room.PushEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Push mode is now " + (Room.PushEnabled == true ? "enabled!" : "disabled!")); break; } case "spush": { Room.SPushEnabled = !Room.SPushEnabled; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `spush_enabled` = @PushEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PushEnabled", PlusEnvironment.BoolToEnum(Room.SPushEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Super Push mode is now " + (Room.SPushEnabled == true ? "enabled!" : "disabled!")); break; } case "spull": { Room.SPullEnabled = !Room.SPullEnabled; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `spull_enabled` = @PullEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PullEnabled", PlusEnvironment.BoolToEnum(Room.SPullEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Super Pull mode is now " + (Room.SPullEnabled == true ? "enabled!" : "disabled!")); break; } case "pull": { Room.PullEnabled = !Room.PullEnabled; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `pull_enabled` = @PullEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PullEnabled", PlusEnvironment.BoolToEnum(Room.PullEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Pull mode is now " + (Room.PullEnabled == true ? "enabled!" : "disabled!")); break; } case "enable": case "enables": { Room.EnablesEnabled = !Room.EnablesEnabled; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `enables_enabled` = @EnablesEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("EnablesEnabled", PlusEnvironment.BoolToEnum(Room.EnablesEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Enables mode set to " + (Room.EnablesEnabled == true ? "enabled!" : "disabled!")); break; } case "respect": { Room.RespectNotificationsEnabled = !Room.RespectNotificationsEnabled; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `respect_notifications_enabled` = @RespectNotificationsEnabled WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("RespectNotificationsEnabled", PlusEnvironment.BoolToEnum(Room.RespectNotificationsEnabled)); dbClient.RunQuery(); } Session.SendWhisper("Respect notifications mode set to " + (Room.RespectNotificationsEnabled == true ? "enabled!" : "disabled!")); break; } case "pets": case "morphs": { Room.PetMorphsAllowed = !Room.PetMorphsAllowed; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("UPDATE `rooms` SET `pet_morphs_allowed` = @PetMorphsAllowed WHERE `id` = '" + Room.Id + "' LIMIT 1"); dbClient.AddParameter("PetMorphsAllowed", PlusEnvironment.BoolToEnum(Room.PetMorphsAllowed)); dbClient.RunQuery(); } Session.SendWhisper("Human pet morphs notifications mode set to " + (Room.PetMorphsAllowed == true ? "enabled!" : "disabled!")); if (!Room.PetMorphsAllowed) { foreach (RoomUser User in Room.GetRoomUserManager().GetRoomUsers()) { if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null) { continue; } User.GetClient().SendWhisper("The room owner has disabled the ability to use a pet morph in this room."); if (User.GetClient().GetHabbo().PetId > 0) { //Tell the user what is going on. User.GetClient().SendWhisper("Oops, the room owner has just disabled pet-morphs, un-morphing you."); //Change the users Pet Id. User.GetClient().GetHabbo().PetId = 0; //Quickly remove the old user instance. Room.SendMessage(new UserRemoveComposer(User.VirtualId)); //Add the new one, they won't even notice a thing!!11 8-) Room.SendMessage(new UsersComposer(User)); } } } break; } } }
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; } if (!Room.SPushEnabled && !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 push 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 (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 || TargetUser.SetY - 1 == Room.GetGameMap().Model.DoorY) { Session.SendWhisper("Por favor, no empujar a ese usuario fuera de la habitación :(!"); return; } if (TargetUser.SetX - 2 == Room.GetGameMap().Model.DoorX || TargetUser.SetY - 2 == Room.GetGameMap().Model.DoorY) { Session.SendWhisper("Por favor, no empujar a ese usuario fuera de la habitación:(!"); return; } if (TargetUser.SetX - 3 == Room.GetGameMap().Model.DoorX || TargetUser.SetY - 3 == Room.GetGameMap().Model.DoorY) { 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 + 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.SendMessage(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("Oeps! Je bent vergeten een gebruiker in te vullen."); return; } if (!Room.SPushEnabled && !Room.CheckRights(Session, true) && !Session.GetHabbo().GetPermissions().HasRight("room_override_custom_config")) { Session.SendWhisper("Oeps! De eigenaar van de kamer heeft uit de command :push voor deze kamer uitgeschakeld."); return; } GameClient TargetClient = QuasarEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("Oeps! Deze gebruiker bestaat niet of is op dit moment offline."); return; } RoomUser TargetUser = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id); if (TargetUser == null) { Session.SendWhisper("Oeps! Deze gebruiker is niet in de kamer aanwezig, of is momenteel offline."); return; } if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username) { Session.SendWhisper("Uhh.. jezelf duwen?"); return; } if (TargetUser.TeleportEnabled) { Session.SendWhisper("Oeps! Je kan deze gebruiker niet duwen omdat hij/zij in teleport-modes is."); 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("Hey! Je gaat toch niet iemand de kamer uit duwen. :(!", 34); return; } if (TargetUser.SetX - 2 == Room.GetGameMap().Model.DoorX || TargetUser.SetY - 2 == Room.GetGameMap().Model.DoorY) { Session.SendWhisper("Hey! Je gaat toch niet iemand de kamer uit duwen. :(!", 34); return; } if (TargetUser.SetX - 3 == Room.GetGameMap().Model.DoorX || TargetUser.SetY - 3 == Room.GetGameMap().Model.DoorY) { Session.SendWhisper("Hey!Je gaat toch niet iemand de kamer uit duwen. :(!", 34); 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.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Super duwt " + Params[1] + "*", 0, ThisUser.LastBubble)); } else { Session.SendWhisper("Oeps, " + Params[1] + " is te ver weg!"); } }