Supermario
Member
- Jan 5, 2016
- 99
- 0
Hi,
I am currently editing the EventAlert command in PlusEMU, and I want to add a button called Participate under the very last sentence. When they click 'Participate' they will go to the room where the event is hosted in. Also How do I get rid of the close button and the line above the close button? I also want to change the Frank avatar, to the person who is hosting the event. For a example. When I use the ;eha command, My avatar will be there Instead of Franks.
EventAlert.cs:
Picture:
Thank you,
I am currently editing the EventAlert command in PlusEMU, and I want to add a button called Participate under the very last sentence. When they click 'Participate' they will go to the room where the event is hosted in. Also How do I get rid of the close button and the line above the close button? I also want to change the Frank avatar, to the person who is hosting the event. For a example. When I use the ;eha command, My avatar will be there Instead of Franks.
EventAlert.cs:
Code:
public void Execute(GameClient Session, Room Room, string[] Params)
{
if (Session != null)
{
if (Room != null)
{
if (Params.Length != 1)
{
Session.SendWhisper("Invalid command! :eventalert", 0);
}
else if (!PlusEnvironment.Event)
{
PlusEnvironment.GetGame().GetClientManager().SendMessage(new BroadcastMessageAlertComposer("There's currently an event going on right now!\n\nThe event is in <b> " + Session.GetHabbo().CurrentRoom.RoomData.Name + " </b>and it's currently hosted by <b>" + Session.GetHabbo().Username + "</b>!\n\nIf you want to participate in the event, click 'Participate!' located on the bottom of the notification!\r\n" + "" ), "");
PlusEnvironment.lastEvent = DateTime.Now;
PlusEnvironment.Event = true;
}
else
{
TimeSpan timeSpan = DateTime.Now - PlusEnvironment.lastEvent;
if (timeSpan.Hours >= 1)
{
PlusEnvironment.GetGame().GetClientManager().SendMessage(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), "");
PlusEnvironment.lastEvent = DateTime.Now;
}
else
{
int num = checked(30 - timeSpan.Minutes);
Session.SendWhisper("Event Cooldown! " + num + " minutes left until another event can be hosted.", 0);
}
}
}
}
}
}
}
Picture:
Thank you,
Last edited: