Add %ESCAPE

This commit is contained in:
SilicaAndPina 2021-02-09 22:19:26 +13:00
parent 39057e59ab
commit 04c56a669d
2 changed files with 15 additions and 0 deletions

View file

@ -68,6 +68,8 @@ namespace HISP.Game.Chat
return Command.Ban(message, args, user);
if (message.StartsWith("%UNBAN"))
return Command.UnBan(message, args, user);
if (message.StartsWith("%ESCAPE"))
return Command.Escape(message, args, user);
return false;
}
if (message[0] == '!')

View file

@ -123,7 +123,20 @@ namespace HISP.Game.Chat
return true;
}
public static bool Escape(string message, string[] args, User user)
{
if (args.Length <= 0)
return false;
if (!user.Administrator || !user.Moderator)
return false;
user.Teleport(Map.ModIsleX, Map.ModIsleY);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)) + Messages.ModIsleMessage, PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
public static bool Stickbug(string message, string[] args, User user)
{
if (args.Length <= 0)