public void HandleChatClientMultiMessage(Bot bot, ChatClientMultiMessage message)
 {
     if (message.content == ".test")
     {
         bot.Character.OpenPopup("Yes Man !");
         message.BlockNetworkSend();
     }
     else if (message.content == ".nop")
     {
         bot.RemoveHandler(this);
         message.BlockNetworkSend();
     }
 }
Пример #2
0
        public static void HandleChatMessage(Bot bot, ChatClientMultiMessage message)
        {
            // if the client sends ".hello" in the chat
            if (message.content == ".fight on")
            {
                message.BlockNetworkSend();// do not send this message to the server

                bot.AddHandler(new AutoFight(bot));
                bot.Character.SendMessage("Auto fight started");
            }
            else if (message.content == ".fight off")
            {
                message.BlockNetworkSend();// do not send this message to the server

                bot.RemoveHandler<AutoFight>();
                bot.Character.SendMessage("Auto fight stopped");

            }
        }