Quote:
using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Engine;
using System.Linq;
using Plus.Communication.Packets.Outgoing.Inventory.Purse;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Events
{
internal class EventAlertCommand : IChatCommand
{
public string PermissionRequired
{
get
{
return "command_event_alert";
}
}
public string Parameters
{
get
{
return "%message%";
}
}
public string Description
{
get
{
return "Enviar um alerta de evento";
}
}
public void Execute(GameClient Session, Room Room, string[] Params)
{
if (Session != null)
{
if (Room != null)
{
if (Params.Length == 1)
{
Session.SendWhisper("Por favor, digite uma mensagem para enviar.");
return;
}
foreach (GameClient client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
{
if (client.GetHabbo().AllowEvents == false)
Session.SendWhisper("Parece que está havendo um novo evento em nosso hotel. Para reativar as mensagens de eventos digite ;eventosoff");
}
foreach (GameClient client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
{
string Message = CommandManager.MergeParams(Params, 1);
if (client.GetHabbo().AllowEvents == true)
PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Está acontecendo um evento!",
"Está acontecendo um novo jogo realizado pela equipe Staff! <br><br>Este, tem o intuito de proporcionar um entretenimento a mais para os usuários!<br><br>Evento: <b>" + Message +
"</b><br>Por: <b>" + Session.GetHabbo().Username +
"</b> <br><br>Caso deseje participar, clique no botão abaixo!",
"sp_staffevent", "Participar do Evento", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
}
}
}
}
}
}
Pastebin: