Event Alert for R2

Status
Not open for further replies.

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
Hey!
Before you say "Search for it and you may find it" I tried, and I did find one but it didn't work so I'm coming here.
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 GOTW Points & prizes!";
                    if (Params.Length > 2)
                        Message = CommandManager.MergeParams(Params, 1);

                    PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Zebbo 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));
                }
            }
        }
    }
}
Above is the code I used for the eha command that does not work. Yeah it was already built in but I wanted to change it to include the go to room button stuff.

Can anyone help me with the code or give me a code that works? Thank you!
 

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
Add it to your permissions commands or add the R1 one? Both work fine.
The original one was just a simple hotel alert in which I had changed to a one which displayed a go to room button and well extra things in the alert itself. It's added to the database already, the default worked but when it come to changing it, you type :eha and it doesn't say the command out loud and doesn't even alert the whole hotel or even alert anyone in why I'm coming here.
 

JMS

Posting Freak
Aug 25, 2014
563
269
Here you go :)

Code:
using Plus.Communication.Packets.Outgoing.Moderation;
using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
using Plus.HabboHotel.GameClients;
using System;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Events
{
    internal class EventAlertCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get
            {
                return "events";
            }
        }
        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)
                {
                    string Message = "" + "Hey! There's an event going on right now you might want to head down there to win some Xabbo Points & prizes!";
                    if (Params.Length > 2)
                        Message = CommandManager.MergeParams(Params, 1);

                    PlusEnvironment.GetGame().GetClientManager().SendPacket(new RoomNotificationComposer("Xabbo Events", Message + "\r\n- <b>" + Session.GetHabbo().Username + "</b>\r\n<i></i>", "event", "Go to \"" + Session.GetHabbo().CurrentRoom.Name + "\"!", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
                }
            }
        }
    }
}
 
Status
Not open for further replies.

Users who are viewing this thread

Top