Advertisement
Guest User

fff

a guest
Sep 6th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
  2. using Plus.HabboHotel.Rooms;
  3. using Plus.HabboHotel.GameClients;
  4. using Plus.Communication.Packets.Outgoing.Rooms.Engine;
  5. using System.Linq;
  6. using Plus.Communication.Packets.Outgoing.Inventory.Purse;
  7.  
  8. namespace Plus.HabboHotel.Rooms.Chat.Commands.Events
  9. {
  10. internal class EventAlertCommand : IChatCommand
  11. {
  12. public string PermissionRequired
  13. {
  14. get
  15. {
  16. return "command_event_alert";
  17. }
  18. }
  19. public string Parameters
  20. {
  21. get
  22. {
  23. return "%message%";
  24. }
  25. }
  26. public string Description
  27. {
  28. get
  29. {
  30. return "Enviar um alerta de evento";
  31. }
  32. }
  33. public void Execute(GameClient Session, Room Room, string[] Params)
  34. {
  35. if (Session != null)
  36. {
  37. if (Room != null)
  38. {
  39. if (Params.Length == 1)
  40. {
  41. Session.SendWhisper("Por favor, digite uma mensagem para enviar.");
  42. return;
  43. }
  44. foreach (GameClient client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
  45. {
  46.  
  47. if (client.GetHabbo().AllowEvents == false)
  48. Session.SendWhisper("Parece que está havendo um novo evento em nosso hotel. Para reativar as mensagens de eventos digite ;eventosoff");
  49. }
  50. foreach (GameClient client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
  51. {
  52. string Message = CommandManager.MergeParams(Params, 1);
  53. if (client.GetHabbo().AllowEvents == true)
  54.  
  55. PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Está acontecendo um evento!",
  56. "Está acontecendo um novo jogo realizado pela equipe Staff! <br><br>Este, tem o intuito de proporcionar um entretenimento a mais para os usuários!<br><br>Evento: <b>" + Message +
  57. "</b><br>Por: <b>" + Session.GetHabbo().Username +
  58. "</b> <br><br>Caso deseje participar, clique no botão abaixo!",
  59. "sp_staffevent", "Participar do Evento", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement