Official PlusEMU - Help Thread

Page 102 of 128 FirstFirst ... 25292949596979899100101102103104105106107108109110112 ... LastLast
Results 1,516 to 1,530 of 1906
  1. #1516
    Member juust is offline
    MemberRank
    Feb 2014 Join Date
    BrazilLocation
    58Posts

    Re: Official PlusEMU - Help Thread

    Can anyone help me, I put mascot in a room but when it collects it does not appear in the inventory
    https://gyazo.com/607cc72a95d69ea9aeafbd8b68833800

  2. #1517
    Proficient Member Redirected is offline
    MemberRank
    Feb 2013 Join Date
    192Posts

    Re: Official PlusEMU - Help Thread

    Hello
    I'm using Plus Emu, and I'm having troubles loading into my client.
    It's definitely a swf problem but I just can't find the solution.

    I've looked all over the external variables, but nothing. When I load my client, It loads to 84% then quickly disconnects.

    I've made sure all the links are correct and gone to their pages to make sure. If I use another hotel's swf links, they seem to work. Just won't work for my localhost swf's. I've also tried copying the external vars from the hotel's swf's that do work, and still nothing.

    Has anyone experienced a disconnection at 84% and what could be causing my problem?

    Thanks

  3. #1518
    Member juust is offline
    MemberRank
    Feb 2014 Join Date
    BrazilLocation
    58Posts

    Re: Official PlusEMU - Help Thread

    Quote Originally Posted by Matthew Carter View Post
    Gave me 8 errors?
    Entered the wrong correction

    - - - Updated - - -

    Quote Originally Posted by XxMurphyxX View Post

    Horse energy zero - Fixed

    Emulator\HabboHotel\Rooms\AI\Types

    FILE: PetBot.cs



    Spoiler:

    Code:
    using System;
    using System.Linq;
    using System.Drawing;
    using Plus.Core;
    using Plus.HabboHotel.GameClients;
    using Plus.HabboHotel.Pathfinding;
    using Plus.HabboHotel.Rooms.AI;
    using Plus.HabboHotel.Rooms;
    using Plus.Utilities;
    using System.Collections.Generic;
    
    namespace Plus.HabboHotel.Rooms.AI.Types
    {
        public class PetBot : BotAI
        {
            private int ActionTimer;
            private int EnergyTimer;
            private int SpeechTimer;
    
            public PetBot(int VirtualId)
            {
                SpeechTimer = new Random((VirtualId ^ 2) + DateTime.Now.Millisecond).Next(10, 60);
                ActionTimer = new Random((VirtualId ^ 2) + DateTime.Now.Millisecond).Next(10, 30 + VirtualId);
                EnergyTimer = new Random((VirtualId ^ 2) + DateTime.Now.Millisecond).Next(10, 60);
            }
    
            private void RemovePetStatus()
            {
                RoomUser Pet = GetRoomUser();
                if (Pet != null)
                {
                    foreach (KeyValuePair<string, string> KVP in Pet.Statusses.ToList())
                    {
                        if (Pet.Statusses.ContainsKey(KVP.Key))
                            Pet.Statusses.Remove(KVP.Key);
                    }
                }
            }
    
            public override void OnSelfEnterRoom()
            {
                Point nextCoord = GetRoom().GetGameMap().getRandomWalkableSquare();
                //int randomX = PlusEnvironment.GetRandomNumber(0, GetRoom().Model.MapSizeX);
                //int randomY = PlusEnvironment.GetRandomNumber(0, GetRoom().Model.MapSizeY);
                if (GetRoomUser() != null)
                    GetRoomUser().MoveTo(nextCoord.X, nextCoord.Y);
            }
    
            public override void OnSelfLeaveRoom(bool Kicked)
            {
            }
    
    
            public override void OnUserEnterRoom(RoomUser User)
            {
                if (User.GetClient() != null && User.GetClient().GetHabbo() != null)
                {
                    RoomUser Pet = GetRoomUser();
                    if (Pet != null)
                    {
                        if (User.GetClient().GetHabbo().Username == Pet.PetData.OwnerName)
                        {
                            string[] Speech = PlusEnvironment.GetGame().GetChatManager().GetPetLocale().GetValue("welcome.speech.pet" + Pet.PetData.Type);
                            string rSpeech = Speech[RandomNumber.GenerateRandom(0, Speech.Length - 1)];
                            Pet.Chat(rSpeech, false);
                        }
                    }
                }
            }
    
            public override void OnUserLeaveRoom(GameClient Client)
            {
            }
    
            public override void OnUserShout(RoomUser User, string Message)
            {
            }
    
            public override void OnTimerTick()
            {
                RoomUser Pet = GetRoomUser();
                if (Pet == null)
                    return;
    
    
                #region Speech
    
                if (SpeechTimer <= 0)
                {
                    if (Pet.PetData.DBState != DatabaseUpdateState.NeedsInsert)
                        Pet.PetData.DBState = DatabaseUpdateState.NeedsUpdate;
    
                    if (Pet != null)
                    {
                        var RandomSpeech = new Random();
                        RemovePetStatus();
    
                        string[] Speech = PlusEnvironment.GetGame().GetChatManager().GetPetLocale().GetValue("speech.pet" + Pet.PetData.Type);
                        string rSpeech = Speech[RandomNumber.GenerateRandom(0, Speech.Length - 1)];
    
                        if (rSpeech.Length != 3)
                        {
                            Pet.Chat(rSpeech, false);
                        }
                        else
                            Pet.Statusses.Add(rSpeech, TextHandling.GetString(Pet.Z));
                    }
                    SpeechTimer = PlusEnvironment.GetRandomNumber(20, 120);
                }
                else
                {
                    SpeechTimer--;
                }
    
                #endregion
    
                #region Actions
    
                if (ActionTimer <= 0)
                {
                    try
                    {
                        RemovePetStatus();
                        ActionTimer = RandomNumber.GenerateRandom(15, 40 + GetRoomUser().PetData.VirtualId);
                        if (!GetRoomUser().RidingHorse)
                        {
                            // Remove Status
                            RemovePetStatus();
    
                            Point nextCoord = GetRoom().GetGameMap().getRandomWalkableSquare();
                            if (GetRoomUser().CanWalk)
                                GetRoomUser().MoveTo(nextCoord.X, nextCoord.Y);
                        }
                    }
                    catch (Exception e)
                    {
                        Logging.HandleException(e, "PetBot.OnTimerTick");
                    }
                }
                else
                {
                    ActionTimer--;
                }
    
                #endregion
    
                #region Energy
    
                if (EnergyTimer <= 0)
                {
                    RemovePetStatus(); // Remove Status
    
                    Pet.PetData.PetEnergy(true); // Add Energy
    
                    EnergyTimer = RandomNumber.GenerateRandom(30, 120); // 2 Min Max
                }
                else
                {
                    EnergyTimer--;
                }
    
                #endregion
            }
    
            #region Commands
    
            public override void OnUserSay(RoomUser User, string Message)
            {
                if (User == null)
                    return;
    
                RoomUser Pet = GetRoomUser();
                if (Pet == null)
                    return;
    
                if (Pet.PetData.DBState != DatabaseUpdateState.NeedsInsert)
                    Pet.PetData.DBState = DatabaseUpdateState.NeedsUpdate;
           
                if (Message.ToLower().Equals(Pet.PetData.Name.ToLower()))
                {
                    Pet.SetRot(Rotation.Calculate(Pet.X, Pet.Y, User.X, User.Y), false);
                    return;
                }
    
                //if (!Pet.Statusses.ContainsKey("gst thr"))
                //    Pet.Statusses.Add("gst thr", TextHandling.GetString(Pet.Z));
    
                if ((Message.ToLower().StartsWith(Pet.PetData.Name.ToLower() + " ") && User.GetClient().GetHabbo().Username.ToLower() == Pet.PetData.OwnerName.ToLower()) || (Message.ToLower().StartsWith(Pet.PetData.Name.ToLower() + " ") && PlusEnvironment.GetGame().GetChatManager().GetPetCommands().TryInvoke(Message.Substring(Pet.PetData.Name.ToLower().Length + 1)) == 8))
                {
                    string Command = Message.Substring(Pet.PetData.Name.ToLower().Length + 1);
    
                    int r = RandomNumber.GenerateRandom(1, 8); // Made Random
                    if (Pet.PetData.Energy > 10 && r < 6 || Pet.PetData.Level > 15 || PlusEnvironment.GetGame().GetChatManager().GetPetCommands().TryInvoke(Command) == 8)
                    {
                        RemovePetStatus(); // Remove Status
    
                        switch (PlusEnvironment.GetGame().GetChatManager().GetPetCommands().TryInvoke(Command))
                        {
                            // TODO - Level you can use the commands at...
    
    
    
                            #region free
    
                            case 1:
                                RemovePetStatus();
    
                                //int randomX = PlusEnvironment.GetRandomNumber(0, GetRoom().Model.MapSizeX);
                                //int randomY = PlusEnvironment.GetRandomNumber(0, GetRoom().Model.MapSizeY);
                                Point nextCoord = GetRoom().GetGameMap().getRandomWalkableSquare();
                                Pet.MoveTo(nextCoord.X, nextCoord.Y);
    
                                Pet.PetData.Addexperience(10); // Give XP
    
                                break;
    
                            #endregion
    
                            #region here
    
                            case 2:
    
                                RemovePetStatus();
    
                                int NewX = User.X;
                                int NewY = User.Y;
    
                                ActionTimer = 30; // Reset ActionTimer
    
                                #region Rotation
    
                                if (User.RotBody == 4)
                                {
                                    NewY = User.Y + 1;
                                }
                                else if (User.RotBody == 0)
                                {
                                    NewY = User.Y - 1;
                                }
                                else if (User.RotBody == 6)
                                {
                                    NewX = User.X - 1;
                                }
                                else if (User.RotBody == 2)
                                {
                                    NewX = User.X + 1;
                                }
                                else if (User.RotBody == 3)
                                {
                                    NewX = User.X + 1;
                                    NewY = User.Y + 1;
                                }
                                else if (User.RotBody == 1)
                                {
                                    NewX = User.X + 1;
                                    NewY = User.Y - 1;
                                }
                                else if (User.RotBody == 7)
                                {
                                    NewX = User.X - 1;
                                    NewY = User.Y - 1;
                                }
                                else if (User.RotBody == 5)
                                {
                                    NewX = User.X - 1;
                                    NewY = User.Y + 1;
                                }
    
                                #endregion
    
                                Pet.PetData.Addexperience(10); // Give XP
    
                                Pet.MoveTo(NewX, NewY);
                                break;
    
                            #endregion
    
                            #region sit
    
                            case 3:
                                // Remove Status
                                RemovePetStatus();
    
                                Pet.PetData.Addexperience(10); // Give XP
    
                                // Add Status
                                Pet.Statusses.Add("sit", TextHandling.GetString(Pet.Z));
                                Pet.UpdateNeeded = true;
    
                                ActionTimer = 25;
                                EnergyTimer = 10;
                                break;
    
                            #endregion
    
                            #region lay
    
                            case 4:
                                // Remove Status
                                RemovePetStatus();
    
                                // Add Status
                                Pet.Statusses.Add("lay", TextHandling.GetString(Pet.Z));
                                Pet.UpdateNeeded = true;
    
                                Pet.PetData.Addexperience(10); // Give XP
    
                                ActionTimer = 30;
                                EnergyTimer = 5;
                                break;
    
                            #endregion
    
                            #region dead
    
                            case 5:
                                // Remove Status
                                RemovePetStatus();
    
                                // Add Status 
                                Pet.Statusses.Add("ded", TextHandling.GetString(Pet.Z));
                                Pet.UpdateNeeded = true;
    
                                Pet.PetData.Addexperience(10); // Give XP
    
                                // Don't move to speak for a set amount of time.
                                SpeechTimer = 45;
                                ActionTimer = 30;
    
                                break;
    
                            #endregion
    
                            #region sleep
    
                            case 6:
                                // Remove Status
                                RemovePetStatus();
    
                                Pet.Chat("ZzzZZZzzzzZzz", false);
                                Pet.Statusses.Add("lay", TextHandling.GetString(Pet.Z));
                                Pet.UpdateNeeded = true;
    
                                Pet.PetData.Addexperience(10); // Give XP
    
                                // Don't move to speak for a set amount of time.
                                EnergyTimer = 5;
                                SpeechTimer = 30;
                                ActionTimer = 45;
                                break;
    
                            #endregion
    
                            #region jump
    
                            case 7:
                                // Remove Status
                                RemovePetStatus();
    
                                // Add Status 
                                Pet.Statusses.Add("jmp", TextHandling.GetString(Pet.Z));
                                Pet.UpdateNeeded = true;
    
                                Pet.PetData.Addexperience(10); // Give XP
    
                                // Don't move to speak for a set amount of time.
                                EnergyTimer = 5;
                                SpeechTimer = 10;
                                ActionTimer = 5;
                                break;
    
                            #endregion
    
                            #region breed
                            case 46:
    
                                break;
                            #endregion
    
                            default:
                                string[] Speech = PlusEnvironment.GetGame().GetChatManager().GetPetLocale().GetValue("pet.unknowncommand");
    
                                Pet.Chat(Speech[RandomNumber.GenerateRandom(0, Speech.Length - 1)], false);
                                break;
                        }
                        Pet.PetData.PetEnergy(false); // Remove Energy
                    }
                    else
                    {
                        RemovePetStatus(); // Remove Status
    
                        if (Pet.PetData.Energy < 10)
                        {
                            //GetRoomUser refers to the pet
                            //User refers to Owner
    
                            RoomUser UserRiding = GetRoom().GetRoomUserManager().GetRoomUserByVirtualId(Pet.HorseID); ;
    
                            if (UserRiding.RidingHorse)
                            {
                                Pet.Chat("Get out of my sit", false);
                                UserRiding.RidingHorse = false;
                                Pet.RidingHorse = false;
                                UserRiding.ApplyEffect(-1);
                                UserRiding.MoveTo(new Point(GetRoomUser().X + 1, GetRoomUser().Y + 1));
                            }                                            
                            
                            string[] Speech = PlusEnvironment.GetGame().GetChatManager().GetPetLocale().GetValue("pet.tired");
    
                            var RandomSpeech = new Random();
                            Pet.Chat(Speech[RandomNumber.GenerateRandom(0, Speech.Length - 1)], false);
    
                            Pet.Statusses.Add("lay", TextHandling.GetString(Pet.Z));
                            Pet.UpdateNeeded = true;
    
                            SpeechTimer = 50;
                            ActionTimer = 45;
                            EnergyTimer = 5;
                        }
                        else
                        {
                            string[] Speech = PlusEnvironment.GetGame().GetChatManager().GetPetLocale().GetValue("pet.lazy");
    
                            var RandomSpeech = new Random();
                            Pet.Chat(Speech[RandomNumber.GenerateRandom(0, Speech.Length - 1)], false);
    
                            Pet.PetData.PetEnergy(false); // Remove Energy
                        }
                    }
                }
                //Pet = null;
            }
    
            #endregion
        }
    }


    Before...

    Spoiler:



    Now...
    Spoiler:


    Still don't know about the bugs that I posted the previous page. Any questions I'll try to answer:)

    OH! ALMOST FORGOT....

    On your database, table bot_pet_responses, add pet_id called pet.tired0 and response, whatever you want (I added "Get out of my sit")
    My sql no have bot_pet_responses can you please share?

  4. #1519
    Member mokobe39000 is offline
    MemberRank
    Sep 2012 Join Date
    51Posts

    Re: Official PlusEMU - Help Thread

    Hi ragezone i need your help
    my chatlog is updated all the 10 messages. how to change 10 to 1 message please?

    and my profil badge dont show when my friend are offline
    screenshot: http://img15.hostingpics.net/pics/764274Sanstitre.png

    thank you for your answer
    Last edited by mokobe39000; 02-05-16 at 08:53 AM.

  5. #1520
    Proficient Member Articuz is offline
    MemberRank
    Jan 2016 Join Date
    157Posts

    Re: Official PlusEMU - Help Thread

    Quote Originally Posted by mokobe39000 View Post
    Hi ragezone i need your help
    my chatlog is updated all the 10 messages. how to change 10 to 1 message please?

    and my profil badge dont show when my friend are offline
    screenshot: http://img15.hostingpics.net/pics/764274Sanstitre.png

    thank you for your answer
    It probably doesn't show because of the account isn't loaded.
    If it isn't online it aint loaded, well that's what i think ofc.

  6. #1521
    Valued Member HabbixDK is offline
    MemberRank
    Mar 2013 Join Date
    121Posts

    Re: Official PlusEMU - Help Thread

    Anyone got a working download link for the original plus emu swf files with the gamecenter etc.?

  7. #1522
    Novice Airmax Hubix is offline
    MemberRank
    May 2016 Join Date
    3Posts

    Re: Official PlusEMU - Help Thread

    hi, i have a problem with plus emulator , the lights do not work , explain, when I click above does not check the panel and remains so : https://gyazo.com/c3c7ba51d9f816c0890b06e33657fa63

    how to resolve?

  8. #1523
    Enthusiast Seat Ibiza is offline
    MemberRank
    Jan 2016 Join Date
    25Posts

    Re: Official PlusEMU - Help Thread

    Quote Originally Posted by Seat Ibiza View Post
    Anybody know how to show all active rooms in the navigator? Without clicking on the expand icon, just the complete list.

    push up

  9. #1524
    Novice Airmax Hubix is offline
    MemberRank
    May 2016 Join Date
    3Posts

    Re: Official PlusEMU - Help Thread

    Hello everyone , I have another problem when I try to make the event alert me check this :
    https://gyazo.com/114befbf97e90062e44b056823bf41c2

  10. #1525
    Proficient Member </Meap> is offline
    MemberRank
    Jul 2010 Join Date
    159Posts

    Re: Official PlusEMU - Help Thread

    its :eha

  11. #1526
    Novice Airmax Hubix is offline
    MemberRank
    May 2016 Join Date
    3Posts

    Re: Official PlusEMU - Help Thread

    Quote Originally Posted by </Meap> View Post
    its :eha
    as you can see from the screen I tried with : eha however gives me the same
    error eventalert
    https://gyazo.com/688aca907b39310dbfbbe83afa1be480

  12. #1527
    Member juust is offline
    MemberRank
    Feb 2014 Join Date
    BrazilLocation
    58Posts

    Re: Official PlusEMU - Help Thread

    Hello can anyone help i have problem with the command :eha for event it does not work thank you ever since



    My CommandMenager.cs
    Spoiler:
    using System;using System.Linq;
    using System.Text;
    using System.Collections.Generic;


    using Plus.Utilities;
    using Plus.HabboHotel.Rooms;
    using Plus.HabboHotel.GameClients;


    using Plus.HabboHotel.Rooms.Chat.Commands.User;
    using Plus.HabboHotel.Rooms.Chat.Commands.User.Fun;
    using Plus.HabboHotel.Rooms.Chat.Commands.Moderator;
    using Plus.HabboHotel.Rooms.Chat.Commands.Moderator.Fun;
    using Plus.HabboHotel.Rooms.Chat.Commands.Administrator;


    using Plus.Communication.Packets.Outgoing.Rooms.Chat;
    using Plus.Communication.Packets.Outgoing.Notifications;
    using Plus.Database.Interfaces;
    using Plus.HabboHotel.Rooms.Chat.Commands.Events;
    using Plus.HabboHotel.Items.Wired;




    namespace Plus.HabboHotel.Rooms.Chat.Commands
    {
    public class CommandManager
    {
    /// <summary>
    /// Command Prefix only applies to custom commands.
    /// </summary>
    private string _prefix = ":";


    /// <summary>
    /// Commands registered for use.
    /// </summary>
    private readonly Dictionary<string, IChatCommand> _commands;


    /// <summary>
    /// The default initializer for the CommandManager
    /// </summary>
    public CommandManager(string Prefix)
    {
    this._prefix = Prefix;
    this._commands = new Dictionary<string, IChatCommand>();


    this.RegisterVIP();
    this.RegisterUser();
    this.RegisterEvents();
    this.RegisterModerator();
    this.RegisterAdministrator();
    }


    /// <summary>
    /// Request the text to parse and check for commands that need to be executed.
    /// </summary>
    /// <param name="Session">Session calling this method.</param>
    /// <param name="Message">The message to parse.</param>
    /// <returns>True if parsed or false if not.</returns>
    public bool Parse(GameClient Session, string Message)
    {
    if (Session == null || Session.GetHabbo() == null || Session.GetHabbo().CurrentRoom == null)
    return false;


    if (!Message.StartsWith(_prefix))
    return false;


    if (Message == _prefix + "commands")
    {
    StringBuilder List = new StringBuilder();
    List.Append("This is the list of commands you have available:\n");
    foreach (var CmdList in _commands.ToList())
    {
    if (!string.IsNullOrEmpty(CmdList.Value.PermissionRequired))
    {
    if (!Session.GetHabbo().GetPermissions().HasCommand(CmdList.Value.PermissionRequired))
    continue;
    }


    List.Append(":" + CmdList.Key + " " + CmdList.Value.Parameters + " - " + CmdList.Value.Description + "\n");
    }
    Session.SendMessage(new MOTDNotificationComposer(List.ToString()));
    return true;
    }


    Message = Message.Substring(1);
    string[] Split = Message.Split(' ');


    if (Split.Length == 0)
    return false;


    IChatCommand Cmd = null;
    if (_commands.TryGetValue(Split[0].ToLower(), out Cmd))
    {
    if (Session.GetHabbo().GetPermissions().HasRight("mod_tool"))
    this.LogCommand(Session.GetHabbo().Id, Message, Session.GetHabbo().MachineId);


    if (!string.IsNullOrEmpty(Cmd.PermissionRequired))
    {
    if (!Session.GetHabbo().GetPermissions().HasCommand(Cmd.PermissionRequired))
    return false;
    }




    Session.GetHabbo().IChatCommand = Cmd;
    Session.GetHabbo().CurrentRoom.GetWired().TriggerEvent(WiredBoxType.TriggerUserSaysCommand, Session.GetHabbo(), this);


    Cmd.Execute(Session, Session.GetHabbo().CurrentRoom, Split);
    return true;
    }
    return false;
    }


    /// <summary>
    /// Registers the VIP set of commands.
    /// </summary>
    private void RegisterVIP()
    {
    this.Register("spull", new SuperPullCommand());
    }


    /// <summary>
    /// Registers the Events set of commands.
    /// </summary>
    private void RegisterEvents()
    {
    this.Register("eha", new EventAlertCommand());
    this.Register("eventalert", new EventAlertCommand());
    }


    /// <summary>
    /// Registers the default set of commands.
    /// </summary>
    private void RegisterUser()
    {
    this.Register("about", new InfoCommand());
    this.Register("pickall", new PickAllCommand());
    this.Register("ejectall", new EjectAllCommand());
    this.Register("lay", new LayCommand());
    this.Register("sit", new SitCommand());
    this.Register("stand", new StandCommand());
    this.Register("mutepets", new MutePetsCommand());
    this.Register("mutebots", new MuteBotsCommand());


    this.Register("mimic", new MimicCommand());
    this.Register("dance", new DanceCommand());
    this.Register("push", new PushCommand());
    this.Register("pull", new PullCommand());
    this.Register("enable", new EnableCommand());
    this.Register("follow", new FollowCommand());
    this.Register("faceless", new FacelessCommand());
    this.Register("moonwalk", new MoonwalkCommand());


    this.Register("unload", new UnloadCommand());
    this.Register("regenmaps", new RegenMaps());
    this.Register("emptyitems", new EmptyItems());
    this.Register("setmax", new SetMaxCommand());
    this.Register("setspeed", new SetSpeedCommand());
    this.Register("disablediagonal", new DisableDiagonalCommand());
    this.Register("flagme", new FlagMeCommand());


    this.Register("stats", new StatsCommand());
    this.Register("kickpets", new KickPetsCommand());
    this.Register("kickbots", new KickBotsCommand());


    this.Register("room", new RoomCommand());
    this.Register("dnd", new DNDCommand());
    this.Register("disablegifts", new DisableGiftsCommand());
    this.Register("convertcredits", new ConvertCreditsCommand());
    this.Register("disablewhispers", new DisableWhispersCommand());
    this.Register("disablemimic", new DisableMimicCommand()); ;


    this.Register("pet", new PetCommand());
    this.Register("spush", new SuperPushCommand());
    this.Register("superpush", new SuperPushCommand());


    }


    /// <summary>
    /// Registers the moderator set of commands.
    /// </summary>
    private void RegisterModerator()
    {
    this.Register("ban", new BanCommand());
    this.Register("mip", new MIPCommand());
    this.Register("ipban", new IPBanCommand());


    this.Register("ui", new UserInfoCommand());
    this.Register("userinfo", new UserInfoCommand());
    this.Register("sa", new StaffAlertCommand());
    this.Register("roomunmute", new RoomUnmuteCommand());
    this.Register("roommute", new RoomMuteCommand());
    this.Register("roombadge", new RoomBadgeCommand());
    this.Register("roomalert", new RoomAlertCommand());
    this.Register("roomkick", new RoomKickCommand());
    this.Register("mute", new MuteCommand());
    this.Register("smute", new MuteCommand());
    this.Register("unmute", new UnmuteCommand());
    this.Register("massbadge", new MassBadgeCommand());
    this.Register("kick", new KickCommand());
    this.Register("skick", new KickCommand());
    this.Register("ha", new HotelAlertCommand());
    this.Register("hotelalert", new HotelAlertCommand());
    this.Register("hal", new HALCommand());
    this.Register("give", new GiveCommand());
    this.Register("givebadge", new GiveBadgeCommand());
    this.Register("dc", new DisconnectCommand());
    this.Register("kill", new DisconnectCommand());
    this.Register("disconnect", new DisconnectCommand());
    this.Register("alert", new AlertCommand());
    this.Register("tradeban", new TradeBanCommand());


    this.Register("teleport", new TeleportCommand());
    this.Register("summon", new SummonCommand());
    this.Register("override", new OverrideCommand());
    this.Register("massenable", new MassEnableCommand());
    this.Register("massdance", new MassDanceCommand());
    this.Register("freeze", new FreezeCommand());
    this.Register("unfreeze", new UnFreezeCommand());
    this.Register("fastwalk", new FastwalkCommand());
    this.Register("superfastwalk", new SuperFastwalkCommand());
    this.Register("coords", new CoordsCommand());
    this.Register("alleyesonme", new AllEyesOnMeCommand());
    this.Register("allaroundme", new AllAroundMeCommand());
    this.Register("forcesit", new ForceSitCommand());


    this.Register("ignorewhispers", new IgnoreWhispersCommand());
    this.Register("forced_effects", new DisableForcedFXCommand());


    this.Register("makesay", new MakeSayCommand());
    this.Register("flaguser", new FlagUserCommand());
    }


    /// <summary>
    /// Registers the administrator set of commands.
    /// </summary>
    private void RegisterAdministrator()
    {
    this.Register("bubble", new BubbleCommand());
    this.Register("update", new UpdateCommand());
    this.Register("deletegroup", new DeleteGroupCommand());
    this.Register("carry", new CarryCommand());
    this.Register("goto", new GOTOCommand());
    }


    /// <summary>
    /// Registers a Chat Command.
    /// </summary>
    /// <param name="CommandText">Text to type for this command.</param>
    /// <param name="Command">The command to execute.</param>
    public void Register(string CommandText, IChatCommand Command)
    {
    this._commands.Add(CommandText, Command);
    }


    public static string MergeParams(string[] Params, int Start)
    {
    var Merged = new StringBuilder();
    for (int i = Start; i < Params.Length; i++)
    {
    if (i > Start)
    Merged.Append(" ");
    Merged.Append(Params[i]);
    }


    return Merged.ToString();
    }


    public void LogCommand(int UserId, string Data, string MachineId)
    {
    using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
    {
    dbClient.SetQuery("INSERT INTO `logs_client_staff` (`user_id`,`data_string`,`machine_id`, `timestamp`) VALUES (@UserId @DaTa @MachineId @timestamp)");
    dbClient.AddParameter("UserId", UserId);
    dbClient.AddParameter("Data", Data);
    dbClient.AddParameter("MachineId", MachineId);
    dbClient.AddParameter("Timestamp", PlusEnvironment.GetUnixTimestamp());
    dbClient.RunQuery();
    }
    }


    public bool TryGetCommand(string Command, out IChatCommand IChatCommand)
    {
    return this._commands.TryGetValue(Command, out IChatCommand);
    }
    }
    }


    My EventAlertCommand.cs
    Spoiler:

    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().SendMessage(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().SendMessage(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);
    }
    }
    }
    }
    }
    }
    }

  13. #1528
    Member mokobe39000 is offline
    MemberRank
    Sep 2012 Join Date
    51Posts

    Re: Official PlusEMU - Help Thread

    Quote Originally Posted by Articuz View Post
    It probably doesn't show because of the account isn't loaded.
    If it isn't online it aint loaded, well that's what i think ofc.
    i dont know :/ i have testing that on many server, it works

    and for my chatlog, anyone for this request ?

    Thank you for your answer and sorry for my bad english

  14. #1529
    Enthusiast Seat Ibiza is offline
    MemberRank
    Jan 2016 Join Date
    25Posts

    Re: Official PlusEMU - Help Thread

    Quote Originally Posted by mokobe39000 View Post
    Hi ragezone i need your help
    my chatlog is updated all the 10 messages. how to change 10 to 1 message please?
    Download Visual Studio and open the project with it. Search for the file "ChatEvent.cs". Somewhere in the middle there's the code:

    Code:
     PlusEnvironment.GetGame().GetChatManager().GetLogs().StoreChatlog(new ChatlogEntry(Session.GetHabbo().Id, Room.Id, Message, PlusEnvironment.GetUnixTimestamp(), Session.GetHabbo(), Room));
                Room.AddChatlog(Session.GetHabbo().Id, Message);
    Just change it to
    Code:
     Room.AddChatlog(Session.GetHabbo().Id, Message);
    Should fix it. Don't forget to save, build and debug again!

    sincerely,
    seat

  15. #1530
    Apprentice SageRP is offline
    MemberRank
    Mar 2016 Join Date
    United KingdomLocation
    6Posts

    Re: Official PlusEMU - Help Thread

    OK, so im trying to load my Hotel client and the client stops on 59% and disconnects



Advertisement