Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Help with :eha command
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Dan3212" data-source="post: 409686" data-attributes="member: 67317"><p>I'm following this:</p><p></p><p><a href="https://devbest.com/threads/plusemu-change-eventalert.82802/" target="_blank">https://devbest.com/threads/plusemu-change-eventalert.82802/</a></p><p></p><p>I modified EventAlertCommand.cs from:</p><p>[code]</p><p>using Plus.Communication.Packets.Outgoing.Moderation;</p><p>using Plus.HabboHotel.GameClients;</p><p>using System;</p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Events</p><p>{</p><p> internal class EventAlertCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get</p><p> {</p><p> return "command_event_alert";</p><p> }</p><p> }</p><p> public string Parameters</p><p> {</p><p> get</p><p> {</p><p> return "";</p><p> }</p><p> }</p><p> public string Description</p><p> {</p><p> get</p><p> {</p><p> return "Send a hotel alert for your event!";</p><p> }</p><p> }</p><p> public void Execute(GameClient Session, Room Room, string[] Params)</p><p> {</p><p> if (Session != null)</p><p> {</p><p> if (Room != null)</p><p> {</p><p> if (Params.Length != 1)</p><p> {</p><p> Session.SendWhisper("Invalid command! :eventalert", 0);</p><p> }</p><p> else if (!PlusEnvironment.Event)</p><p> {</p><p> PlusEnvironment.GetGame().GetClientManager().SendPacket(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), "");</p><p> PlusEnvironment.lastEvent = DateTime.Now;</p><p> PlusEnvironment.Event = true;</p><p> }</p><p> else</p><p> {</p><p> TimeSpan timeSpan = DateTime.Now - PlusEnvironment.lastEvent;</p><p> if (timeSpan.Hours >= 1)</p><p> {</p><p> PlusEnvironment.GetGame().GetClientManager().SendPacket(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), "");</p><p> PlusEnvironment.lastEvent = DateTime.Now;</p><p> }</p><p> else</p><p> {</p><p> int num = checked(60 - timeSpan.Minutes);</p><p> Session.SendWhisper("Event Cooldown! " + num + " minutes left until another event can be hosted.", 0);</p><p> }</p><p> }</p><p> }</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/code]</p><p></p><p>and I changed it to:</p><p></p><p>[code]</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p>using System;</p><p>using Plus.HabboHotel.Users;</p><p>using Plus.Database.Interfaces;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Events</p><p>{</p><p> internal class EhaCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get</p><p> {</p><p> return "command_eha";</p><p> }</p><p> }</p><p> public string Parameters</p><p> {</p><p> get</p><p> {</p><p> return "%message%";</p><p> }</p><p> }</p><p> public string Description</p><p> {</p><p> get</p><p> {</p><p> return "Send a hotel alert for your event!";</p><p> }</p><p> }</p><p> public void Execute(GameClient Session, Room Room, string[] Params)</p><p> {</p><p></p><p> if (Session != null)</p><p> {</p><p> if (Room != null)</p><p> {</p><p> string Message = "" + "Hey! There's an event going on right now you might want to head down there to win some Hobba Points & prizes!";</p><p> if (Params.Length > 2)</p><p> Message = CommandManager.MergeParams(Params, 1);</p><p></p><p> PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Atomic Events (Supervised)", Message + "\r\n- <b>" + Session.GetHabbo().Username + "</b>\r\n<i></i>", "figure/" + Session.GetHabbo().Username + "", "Go to \"" + Session.GetHabbo().CurrentRoom.Name + "\"!", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));</p><p> }</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/code]</p><p></p><p>It is still doing the regular EHA thats based around a regular hotel alert when im wanting <strong>the new layout when a GVIP or Staff member types :eha and displays a alert saying like "Hey theres an event happening right now! Click the button below to go to the event" and theres a button saying "Go to Event"</strong>.</p><p>AND NO COOLDOWN <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p><p></p><p>Can someone give me a working code for this?</p><p></p><p>Btw i'm using Release 2</p></blockquote><p></p>
[QUOTE="Dan3212, post: 409686, member: 67317"] I'm following this: [URL]https://devbest.com/threads/plusemu-change-eventalert.82802/[/URL] I modified EventAlertCommand.cs from: [code] using Plus.Communication.Packets.Outgoing.Moderation; using Plus.HabboHotel.GameClients; using System; namespace Plus.HabboHotel.Rooms.Chat.Commands.Events { internal class EventAlertCommand : IChatCommand { public string PermissionRequired { get { return "command_event_alert"; } } public string Parameters { get { return ""; } } public string Description { get { return "Send a hotel alert for your event!"; } } 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().SendPacket(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), ""); PlusEnvironment.lastEvent = DateTime.Now; PlusEnvironment.Event = true; } else { TimeSpan timeSpan = DateTime.Now - PlusEnvironment.lastEvent; if (timeSpan.Hours >= 1) { PlusEnvironment.GetGame().GetClientManager().SendPacket(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), ""); PlusEnvironment.lastEvent = DateTime.Now; } else { int num = checked(60 - timeSpan.Minutes); Session.SendWhisper("Event Cooldown! " + num + " minutes left until another event can be hosted.", 0); } } } } } } } [/code] and I changed it to: [code] using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.GameClients; using System; using Plus.HabboHotel.Users; using Plus.Database.Interfaces; namespace Plus.HabboHotel.Rooms.Chat.Commands.Events { internal class EhaCommand : IChatCommand { public string PermissionRequired { get { return "command_eha"; } } public string Parameters { get { return "%message%"; } } public string Description { get { return "Send a hotel alert for your event!"; } } public void Execute(GameClient Session, Room Room, string[] Params) { if (Session != null) { if (Room != null) { string Message = "" + "Hey! There's an event going on right now you might want to head down there to win some Hobba Points & prizes!"; if (Params.Length > 2) Message = CommandManager.MergeParams(Params, 1); PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Atomic Events (Supervised)", Message + "\r\n- <b>" + Session.GetHabbo().Username + "</b>\r\n<i></i>", "figure/" + Session.GetHabbo().Username + "", "Go to \"" + Session.GetHabbo().CurrentRoom.Name + "\"!", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId)); } } } } } [/code] It is still doing the regular EHA thats based around a regular hotel alert when im wanting [B]the new layout when a GVIP or Staff member types :eha and displays a alert saying like "Hey theres an event happening right now! Click the button below to go to the event" and theres a button saying "Go to Event"[/B]. AND NO COOLDOWN :) Can someone give me a working code for this? Btw i'm using Release 2 [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Help with :eha command
Top