Universal Automatic replies

Discussion in 'Plugin Requests' started by PreFiX, Apr 22, 2015.

  1. Hi, I am looking for a plugin that reads the chat and writes out information such as !wipe and it writes out a custom text set by me.

    CustomChatCommands and plugins like that does not show the command to all players when used and it also sends the answer to the specific person so not everyone can see it. RustAdmin (remote rcon tool has this feature which is nice but I like to not have my own computer running 24/7 for just those commands to work.)

    Any ideas?

    /Merpz
     
  2. How to set up when a player writes wipe or hacker or something and the server gives an insta response by itself?
    Could be it possible with a plugin?
    Thanks in advance.
     
  3. Easy using the chat function that gets the player's input, having some simple checks, and other checks that pertain to config so that if a player types a certain message, an action is taken. For instance, say that the config has an option if a player says "wipe", then the action could be to send the player a message on when the wipe day is.
     
  4. and how to do it?

    it's something like this¿? ----- if player {$player} say "wipe" do [say "next 10 days"]
     
  5. It's more something like
    Code:
    void OnPlayerChat(ConsoleSystem.Arg arg)
    {
        if(arg != null && arg.FullString.Contains("wipe"))
    {
       if(arg.Player() != null)
          SendReply(arg.Player(), "Wipe is every Thursday !");
    }
    }
    Not tested and I'm not sure about the arg.FullString

    Write from my phone...
     
  6. It's going to be quite a bit more complex than that. The hook you want to use is OnPlayerChat(ConsoleSystem.Arg message) and then you make sure that you have checks for NREs, and then a check for a config or whatever you want to have if you aren't using a config. Follow the example above of Sami's.
     
  7. CustomChatBot or SmartChatBot (not at home and can't remember the exact name) does this exactly. It replies whatever message you make it with whatever words you have set for trigger words
     
  8. sNT

    sNT

    Hey! Looking for a plugin which looks for if a specific word gets typed in chat, it wont show it but insted get an automated reply. Thanks
     
  9. Code:
            void OnPlayerChat(ConsoleSystem.Arg arg)
            {
                var player = arg.Player();
                if (arg.GetString(0).Contains("word"))
                {
                     rust.BroadcastChat("response");
                }
            }
     
  10. sNT

    sNT

    Its not suppose to broadcast it to the whole server, only to the player, and the other shouldnt see neither the response or the filtered word.
     
  11. Code:
                SendReply(player, "response");
     
  12. sNT

    sNT

    And the rest wont see the "word" the players is sending?
     
  13. Wulf

    Wulf Community Admin

    You'd have to stop the hook by returning it as an object, but keep in mind that other chat plugins will conflict and may still send.