How to Add Hotkeys!

Posts 1–2 of 2 · Page 1 of 1
How to Add Hotkeys!
Ok so I'm gonna use Vault as an example (but if you use your brain, you can add other hotkeys too )

Client Side
Navigate to Parameter.asⓘ and add:
Code:
 setDefaultKey("reconVault", KeyCodes.UNSET);
Then go to MapUserInput.asⓘ and add this in the function OnKeyDown AND in the switch
Code:
    case Parameters.data_.reconVault:
                this.gs_.gsc_.playerText("/vault");
                break;
Finally go to Options.asⓘ and add this somewhere in addHotKeyOptions
Code:
     this.addOptionAndPosition(new KeyMapper("reconVault", "Recon Vault", "Allows you to reconnect to Vault!"));
Server Side
Navigate to AdminCommands.cs and add your vault command and your done!
Code:
 internal class VaultCommand : Command
    {
        public VaultCommand()
            : base("vault", (set rank number here yourself))
        {
        }

        protected override bool Process(Player player, RealmTime time, string[] args)
        {
            player.Client.Reconnect(new ReconnectPacket
            {
                Host = "",
                Port = Program.Settings.GetValue<int>("port"),
                GameId = player.Manager.PlayerVault(player.Client).Id,
                Name = player.Manager.PlayerVault(player.Client).Name,
                Key = player.Manager.PlayerVault(player.Client).PortalKey,
            });
            return true;
        }
    }
(BTW this vault command was from FlashFlyyy's tutorial since I'm using LoE source ya know)
AND... Your done!
I was hoping people already knew this.
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us