Ejemplo n.º 1
0
        public static bool HandleCommandChase(Character character, string initialCommand,
                                              CommandHandling.CommandArgs Args)
        {
            if (Args.Count > 0)
            {
                string other     = Args[0].Value.ToLower();
                var    otherChar = Server.Instance.GetCharacter(other);
                if (otherChar != null)
                {
                    if (character.MapID != otherChar.MapID)
                    {
                        character.ChangeMap(otherChar.MapID);
                    }

                    var p = new Packet(0xC1);
                    p.WriteShort(otherChar.Position.X);
                    p.WriteShort(otherChar.Position.Y);
                    character.SendPacket(p);
                    return(true);
                }

                MessagePacket.SendText(MessagePacket.MessageTypes.RedText, "Victim not found.",
                                       character, MessagePacket.MessageMode.ToPlayer);
            }
            return(true);
        }
Ejemplo n.º 2
0
        public static void SendResponse(MessagePacket.MessageTypes type, string message)
        {
            if (MainCommandHandler.CommandCharacter == null)
            {
                return;
            }

            MessagePacket.SendText(
                type,
                message,
                MainCommandHandler.CommandCharacter,
                MessagePacket.MessageMode.ToPlayer
                );
        }