Sultan 68 Report post Posted March 23, 2016 (edited) [Script] KickAllPlayers This function is helpful to kick everyone out of the game to ensure no one is lost item during restart or attempted to dupe. KickCha Function, Add it inside your Functions.lua function KickCha(character) local pkt = GetPacket() WriteCmd(pkt,1505) SendPacket(character,pkt) end Add this inside your Variable.lua KickAllPlayers = false Put this inside your cha_timer at Functions.lua if(KickAllPlayers == true)then if(IsPlayer(role) == 1)then KickCha(role) end end Use the following function in-game to start Gameserver closing: "Stop( time in seconds )" &lua_all Stop(20) When system display like 5 second(s) remaining to close Gameserver, use this function in-game instantly to kick everyone out: &lua_all KickAllPlayers = true Edited March 23, 2016 by Sultan 2 Quote Share this post Link to post Share on other sites
Syfax 2 Report post Posted April 1, 2016 Can you share Maintenance &lua_all command script? thanks Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted April 1, 2016 28 минуты назад, Syfax сказал: Can you share Maintenance &lua_all command script? thanks variable.lua Maintenance = false functions.lua, cha_timer() if (IsPlayer(role) == 1) then if (Maintenance == true and GetGmLv(role) == 0) then HelpInfo(role, 0, "Server is under maintenance, please try again later!") KickCha(role) end end Usage: &lua_all Maintenance = true 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
Syfax 2 Report post Posted April 1, 2016 Have to use HandleChat? Quote Share this post Link to post Share on other sites
Syfax 2 Report post Posted April 1, 2016 It doesn't work o_o Quote Share this post Link to post Share on other sites
Yomazu 20 Report post Posted April 1, 2016 Read again, v3ct0r means use char_timer function: functions.lua, cha_timer() . Quote Share this post Link to post Share on other sites
Syfax 2 Report post Posted April 2, 2016 14 hours ago, V3ct0r said: variable.lua Maintenance = false functions.lua, cha_timer() if (IsPlayer(role) == 1) then if (Maintenance == true and GetGmLv(role) == 0) then HelpInfo(role, 0, "Server is under maintenance, please try again later!") KickCha(role) end end Usage: &lua_all Maintenance = true It didn't work even while using your HandleChat GS Quote Share this post Link to post Share on other sites
Syfax 2 Report post Posted April 2, 2016 8 hours ago, Yomazu said: Read again, v3ct0r means use char_timer function: functions.lua, cha_timer() . Uhm , i know what's a cha_timer Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted April 2, 2016 @Syfax Do you use GameServer.exe with GetGmLv(role) function? try if (IsPlayer(role) == 1) then if (Maintenance == true) then HelpInfo(role, 0, "Server is under maintenance, please try again later!") KickCha(role) end end 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
dragontechi 68 Report post Posted November 6, 2022 @V3ct0r the command works excellent but for some reason I always kick everyone who is lv 0 but the helpinfo does not come up saying that it is under maintenance Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted November 8, 2022 On 11/6/2022 at 8:06 PM, dragontechi said: @V3ct0r the command works excellent but for some reason I always kick everyone who is lv 0 but the helpinfo does not come up saying that it is under maintenance I am sorry, but looks like I don't quite understand your problem. The script should kick all players, not only characters with level 0. 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
dragontechi 68 Report post Posted November 8, 2022 4 hours ago, V3ct0r said: I am sorry, but looks like I don't quite understand your problem. The script should kick all players, not only characters with level 0. sorry my english the command is taking out the players that are not gm but it is not sending the maintenance message Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted December 3, 2022 On 11/8/2022 at 10:28 PM, dragontechi said: sorry my english the command is taking out the players that are not gm but it is not sending the maintenance message Try to remove or comment the line: KickCha(role) Will a HelpInfo window appear? 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