Eviles 179 Report post Posted March 13, 2018 System Name: PK Mode - HandleChat Credits: Pirates Online, showcase; @Andrew and @Angelix help on is_friend(); Introduction: This system allow players to battle on Battle Zones when the PK Mode is activated only. To enable PK Mode player must type on local chat the following command /pkon or to disable it /pkoff. Change-Logs: - Release of scripts v1.0 (03/13/2018) - Client Archives TODO: - When player has PK Mode activated and use skills that does area damage or debuff skills target and role gets damaged/affected 5 Quote Share this post Link to post Share on other sites
Sultan 68 Report post Posted June 16, 2018 Nice system! 1 Quote Share this post Link to post Share on other sites
ruubi 51 Report post Posted June 17, 2018 Very nice! Quote Share this post Link to post Share on other sites
Julio 21 Report post Posted June 17, 2018 I really liked this conflict with V3ctor CTF Quote Share this post Link to post Share on other sites
Eviles 179 Report post Posted June 19, 2018 On 6/17/2018 at 6:39 PM, Julio said: I really liked this conflict with V3ctor CTF Well, u can fix it easily. I'm sure u can do that ... That happens because we calling native function on same way. 1 Quote Share this post Link to post Share on other sites
Julio 21 Report post Posted June 19, 2018 17 hours ago, Satan said: Well, u can fix it easily. I'm sure u can do that ... That happens because we calling native function on same way. Thankyou Quote Share this post Link to post Share on other sites
Terminix 1 Report post Posted June 20, 2018 (edited) is_friend = function(c, t) pk_mode.conf['hook'](c, t) local cMap,tMap = GetChaMapName(c),GetChaMapName(t) local cRole,tRole = CheckChaRole(c),CheckChaRole(t) local cEffect,tEffect = GetChaStateLv ( c , pk_mode.conf['state']),GetChaStateLv ( t , pk_mode.conf['state'] ) local Teammate = is_teammate(c,t) local cID,tID = GetCharID(c),GetCharID(t) for i,v in pairs(pk_mode.conf['maps']) do if cMap == v and tMap == v then if cRole == 1 and tRole == 1 then if cEffect == 1 and tEffect == 1 and Teammate == 0 and cID ~= tID then return pk_mode.conf['on'] else return pk_mode.conf['off'] end end end end end cha_timer = function(r, f, t) pk_mode.conf['timer'](r, f, t) local PID = GetCharID(r) if (file_exists(pk_mode.conf['path']..PID..'.txt') == true) then AddState(r, r, pk_mode.conf['state'], 1, 3600) else if GetChaStateLv(r, pk_mode.conf['state']) ~= 0 then RemoveState(r, pk_mode.conf['state']) end end end -- prevents self attack, party attack and reflectin' with main is_friend script. Handlechat() cmd.list['pk'] = function(role, param) if param.n ~= 1 then BickerNotice(role, 'This command requires an option "ON" OR "OFF"') return end param[1] = tostring(param[1]) param[1] = string.upper(param[1]) if (param[1]) == 'ON' then local PID = GetCharID(role) if (file_exists(pk_mode.conf['path']..PID..'.txt') == false) then BickerNotice(role, 'PK Mode: activated.') table.save({}, pk_mode.conf['path']..PID..'.txt', 'w') else BickerNotice(role, 'PK Mode already activated.') return end elseif (param[1]) == 'OFF' then local PID = GetCharID(role) if (file_exists(pk_mode.conf['path']..PID..'.txt') == true) then BickerNotice(role, 'PK Mode: deactivated.') os.remove(pk_mode.conf['path']..PID..".txt") else BickerNotice(role, 'PK Mode already disabled.') return end else BickerNotice(role, 'There are TWO options for this command "ON" OR "OFF"!') return end end Edited June 20, 2018 by Terminix 1 Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted June 23, 2018 On 6/18/2018 at 12:39 AM, Julio said: I really liked this conflict with V3ctor CTF I think you need add the following code to your is_friend() function in file functions.lua: -- At the beginning of function local map_name_cha1 = GetChaMapName(cha1) local map_name_cha2 = GetChaMapName(cha2) if (map_name_cha1 == map_name_cha2 and map_name_cha1 == "CTF") then if (GetChaSideID(cha1) == GetChaSideID(cha2)) then return 1 else return 0 end end 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
Inuarashi 5 Report post Posted August 5, 2018 On 3/13/2018 at 9:39 PM, Satan said: System Name: PK Mode - HandleChat Credits: Pirates Online, showcase; @Andrew and @Angelix help on is_friend(); Introduction: This system allow players to battle on Battle Zones when the PK Mode is activated only. To enable PK Mode player must type on local chat the following command /pkon or to disable it /pkoff. Change-Logs: - Release of scripts v1.0 (03/13/2018) - Client Archives TODO: - When player has PK Mode activated and use skills that does area damage or debuff skills target and role gets damaged/affected does this mean players can battle each other in zones like, argent west gate (where little shrubs are) and such if both players have this system activated? Quote Share this post Link to post Share on other sites
Eviles 179 Report post Posted August 6, 2018 @Inuarashi Battle zones only, as like, Outskirt of Argent City. 1 Quote Share this post Link to post Share on other sites
Inuarashi 5 Report post Posted August 6, 2018 4 hours ago, Satan said: @Inuarashi Battle zones only, as like, Outskirt of Argent City. I see, thank you! Quote Share this post Link to post Share on other sites