Chatter
#1
Chatter
Is a plugin I worked on for a while. It basicly allows you to change the way chat is shown.

Note:
  • It's recommended to load this plugin as one of the latest in case you have other plugins that might block/change the chat message.

Config:
  • UsePlayerColor
    If set to true then the player color will be the color defined in the player's rank.
  • UseRankColor
    The same as UsePlayerColor but then for the {RANK} tag.
  • ChatPerWorld
    If this is set to true then the chat will only be displayed to players who are in the same world as the talking player.
  • ColorSymbol
    With this you can set the symbol that says if there is a color.
  • Prefix
    This is the main feature of this plugin. It allows you to change the way chat is shown. Default is '<{PLAYERNAME}> {MESSAGE}' but you can change it completly how you want. You can use:
    • {PLAYERNAME}
      The name of the player
    • {GROUP}
      The groups where a player is in. If multiple it seperates them with a ','
    • {RANK}
      The rank where a player is in.
    • {WORLD}
      The world the player is in.
    • {WORLDINITIAL}
      The first letter of the world the player is in.
    • {MESSAGE}
      The message the player sends.


  • PersonalPrefixes
    A list with names of players who get their own personal prefix.
    An example can be found by pressing on the Example button below.

  • RankPrefix
    A list with ranks to give to a certain rank.
    An example can be found by pressing on the Example button below.

    Example:

    Prefix         = "@7[{WORLD}]@f<{PLAYERNAME}> {MESSAGE}",
    UsePlayerColor = true,
    UseRankColor   = false,
    ChatPerWorld   = true,
    ColorSymbol    = "@",
    
    PersonalPrefixes =
    {
    	-- You can add a player by using ["PlayerName"] = "Custom Prefix",
    	["STR_Warrior"] = "[{RANK}] <{PLAYERNAME}> {MESSAGE}",
    },
    
    RankPrefixes =
    {
    	-- You can add a specific prefix for a certain rank by using ["Rank"] = Custom Prefix
    	["Admin"] = "@c[Admin]@f {MESSAGE}",
    },
    


API:
API:

Other plugins can hook into Chatter. They can use the RegisterPlugin function using the cPluginManager:CallPlugin function
You use the RegisterPlugin(Tag, PluginObject, FunctionName) function. Here is an example:
--This goes in the OnPluginsLoaded function:
cPluginManager:CallPlugin("Chatter", "RegisterPlugin", "Faction", cPluginManager:Get():GetCurrentPlugin():GetName(), "MessageFunction")

--And this is an example of how the MessageFunction could look like:
function MessageFunction(a_Player)
      local PlayerName = a_Player:GetName()
      if Faction[PlayerName]~= nil then
            return Faction[PlayerName]
      else
            return "Fairy Tail"
      end
end
In this case when Chatter finds "{FACTION}" in the prefix it calls the given function with the player object as parameter. The given function should then return a string that shall replace "{FACTION}".

Note that Chatter automaticly adds the braces around the tag and capitalizes it.


Source: https://github.com/NiLSPACE/Chatter
Download: https://github.com/NiLSPACE/Chatter/archive/master.zip
Reply
Thanks given by: Antonio


Messages In This Thread
Chatter - by NiLSPACE - 08-23-2013, 09:33 PM
RE: Chatter - by NiLSPACE - 11-25-2013, 01:25 AM
RE: Chatter - by NiLSPACE - 08-29-2014, 03:47 AM
RE: Chatter - by NiLSPACE - 08-31-2014, 11:57 PM
RE: Chatter - by job_123 - 01-02-2015, 11:52 PM
RE: Chatter - by NiLSPACE - 01-04-2015, 03:14 AM
RE: Chatter - by NiLSPACE - 01-04-2015, 04:24 AM
RE: Chatter - by NiLSPACE - 05-03-2015, 06:21 AM
RE: Chatter - by Serial - 05-16-2015, 07:02 PM
RE: Chatter - by NiLSPACE - 05-16-2015, 07:50 PM
RE: Chatter - by JuliB - 12-27-2015, 10:32 PM
RE: Chatter - by NiLSPACE - 12-27-2015, 11:45 PM
RE: Chatter - by JuliB - 12-28-2015, 11:03 PM
RE: Chatter - by NiLSPACE - 12-28-2015, 11:42 PM
RE: Chatter - by JuliB - 12-29-2015, 05:09 AM
RE: Chatter - by eszlarie - 02-07-2016, 02:44 PM
RE: Chatter - by Schwertspize - 02-07-2016, 05:08 PM
RE: Chatter - by Angemessen - 03-30-2017, 01:57 AM
RE: Chatter - by NiLSPACE - 03-30-2017, 02:41 AM
RE: Chatter - by Angemessen - 03-30-2017, 11:01 PM
RE: Chatter - by NiLSPACE - 03-30-2017, 11:15 PM
RE: Chatter - by Angemessen - 03-31-2017, 01:59 AM
RE: Chatter - by NiLSPACE - 03-31-2017, 02:28 AM
RE: Chatter - by Serial - 01-13-2020, 02:59 AM
RE: Chatter - by xoft - 01-13-2020, 03:18 AM
RE: Chatter - by Serial - 01-13-2020, 03:40 AM
RE: Chatter - by xoft - 01-13-2020, 03:31 AM



Users browsing this thread: 1 Guest(s)