Jelly 0 Report post Posted May 21, 2016 if i want so that if a player says messages over X times a minute, for example, if he exceeds the limit it will mute him how to script it? Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted May 21, 2016 What channel? Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Foxseiz 138 Report post Posted May 21, 2016 Local? World? Trade? Quote Share this post Link to post Share on other sites
Jelly 0 Report post Posted May 21, 2016 @V3ct0r @Foxseiz local chat Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted May 21, 2016 @Jelly You need GameServer.exe with HandleChat function. In that function you can write script which will check how many times player send messages to chat. For example: variable.lua LocalChat = {} functions.lua function HandleChat(role, message) local minute = os.date("%M") if (LocalChat[role] == nil) then LocalChat[role] = {} else if (LocalChat[role].minute == minute) then -- 25 messages are maximum if (LocalChat[role].number > 25) then -- Mute player SystemNotice(role, "Don't flood in local chat please!") return 0 else LocalChat[role].number = LocalChat[role].number + 1 end else LocalChat[role].minute = minute LocalChat[role].number = 1 end end return 1 end Note: haven't tested 1 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Jelly 0 Report post Posted May 22, 2016 19 hours ago, V3ct0r said: @Jelly You need GameServer.exe with HandleChat function. In that function you can write script which will check how many times player send messages to chat. For example: variable.lua LocalChat = {} functions.lua function HandleChat(role, message) local minute = os.date("%M") if (LocalChat[role] == nil) then LocalChat[role] = {} else if (LocalChat[role].minute == minute) then -- 25 messages are maximum if (LocalChat[role].number > 25) then -- Mute player SystemNotice(role, "Don't flood in local chat please!") return 0 else LocalChat[role].number = LocalChat[role].number + 1 end else LocalChat[role].minute = minute LocalChat[role].number = 1 end end return 1 end Note: haven't tested i tested. it works! thanks @V3ct0r! can u give me a list of the variables that handlechat has? (example: LocalChat) Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted May 22, 2016 @Jelly LocalChat is my variable (array) that I defined in file variables.lua to use it for counting player's messages. Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Giampy 2 Report post Posted September 21, 2016 (edited) On 21/5/2016 at 5:17 PM, V3ct0r said: What channel? And for example if i want to make it for World-Trade or PM Chat? Edited September 21, 2016 by Giampy Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted September 21, 2016 5 часов назад, Giampy сказал: And for example if i want to make it for World-Trade or PM Chat? You can't. World, Trade, PM and guild chats are in the GroupServer.exe. So you have to patch GroupServer to make it call some LUA functions before message will be sent to selected chat channel. 1 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Shako 97 Report post Posted September 21, 2016 6 hours ago, Giampy said: And for example if i want to make it for World-Trade or PM Chat? Groupserver.cfg "WorldInterval = 60 TradeInterval = 300" 2 Quote Sunny Go! Online pko.host Share this post Link to post Share on other sites