08-23-2013, 09:33 PM
Chatter
Is a plugin I worked on for a while. It basicly allows you to change the way chat is shown.
Note:
Config:
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:
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
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.
- {PLAYERNAME}
- 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 endIn 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