dragontechi 68 Report post Posted January 7, 2022 How can I make a team to be merged maintain their special effects Quote Share this post Link to post Share on other sites
dragontechi 68 Report post Posted January 7, 2022 Well now you can perform the task of adding the effect to function, the only problem is that when you unequip the equipment, the bonus remains -- death set test function Setdeath_Timer( ignore, role, freq, time ) local statelv = 1 local statetime = 3600 local death_BODY = GetEquipItemP( role, 2 ) local death_GLOVE = GetEquipItemP( role, 3 ) local death_SHOES = GetEquipItemP( role, 4 ) local death_BODY_ID = GetItemID ( death_BODY ) local death_GLOVE_ID = GetItemID ( death_GLOVE ) local death_SHOES_ID = GetItemID ( death_SHOES ) local Fdeath_BODY_ID = GetItemAttr ( death_BODY , ITEMATTR_VAL_FUSIONID ) local Fdeath_GLOVE_ID = GetItemAttr ( death_GLOVE , ITEMATTR_VAL_FUSIONID ) local Fdeath_SHOES_ID = GetItemAttr ( death_SHOES , ITEMATTR_VAL_FUSIONID ) if(death_BODY_ID == 2817 and death_GLOVE_ID == 2818 and death_SHOES_ID == 2819)then AddState ( role , role , State_deathcruss , statelv , statetime ) elseif(Fdeath_BODY_ID == 2817 and Fdeath_GLOVE_ID == 2818 and Fdeath_SHOES_ID == 2819)then AddState ( role , role , State_deathcruss , statelv , statetime ) else local state_State_deathcruss = GetChaStateLv ( role , State_deathcruss ) if(state_State_deathcruss ~= 0 )then RemoveState ( role , State_deathcruss ) end end end Hook:AddPostHook("cha_timer", Setdeath_Timer) Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted January 7, 2022 @dragontechi Try this condition: local body = (death_BODY_ID == 2817 or Fdeath_BODY_ID == 2817) local glove = (death_GLOVE_ID == 2818 or Fdeath_GLOVE_ID == 2818) local shoes = (death_SHOES_ID == 2819 or Fdeath_SHOES_ID == 2819) if ( (body == true) and (glove == true) and (shoes == true) ) then AddState(role, role, State_deathcruss, statelv, statetime) else local state_State_deathcruss = GetChaStateLv(role, State_deathcruss) if ( state_State_deathcruss ~= 0 ) then RemoveState(role, State_deathcruss) 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
dragontechi 68 Report post Posted January 7, 2022 only death is giving the bonus -- Cloak System -- Author: techi -- Version 1.0 (compatible with version 1.36+ Files) print(">> Death Set Buff") -- death set test function Setdeath_Timer( ignore, role, freq, time ) local statelv = 1 local statetime = 3600 local death_BODY = GetEquipItemP( role, 2 ) local death_GLOVE = GetEquipItemP( role, 3 ) local death_SHOES = GetEquipItemP( role, 4 ) local death_BODY_ID = GetItemID ( death_BODY ) local death_GLOVE_ID = GetItemID ( death_GLOVE ) local death_SHOES_ID = GetItemID ( death_SHOES ) local body = (death_BODY_ID == 2817 or Fdeath_BODY_ID == 2817) local glove = (death_GLOVE_ID == 2818 or Fdeath_GLOVE_ID == 2818) local shoes = (death_SHOES_ID == 2819 or Fdeath_SHOES_ID == 2819) if ( (body == true) and (glove == true) and (shoes == true) ) then AddState(role, role, State_deathcruss, statelv, statetime) else local state_State_deathcruss = GetChaStateLv(role, State_deathcruss) if ( state_State_deathcruss ~= 0 ) then RemoveState(role, State_deathcruss) end end end Hook:AddPostHook("cha_timer", Setdeath_Timer) function State_deathcruss_Add ( role , statelv ) local job = GetChaAttr(role, ATTR_JOB) if job == 9 then --cruss local str_dif = 12 local strsb = StrSb( role ) + str_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local agi_dif = 5 local agisb = AgiSb( role ) + agi_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local con_dif = 4 local consb = ConSb( role ) + con_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) SystemNotice(role, "<Crusader Death Bonus>:Active!") SystemNotice(role, "<STR>12:!") SystemNotice(role, "<AGI>5:!") SystemNotice(role, "<CON>4:!") ALLExAttrSet(role) RefreshCha(role) end if job == 8 then --Champ local str_dif = 12 local strsb = StrSb( role ) + str_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local con_dif = 10 local consb = ConSb( role ) + con_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local hrecsb_dif = 8 local hrecsb = HrecSb( role ) + hrecsb_dif SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC ) SystemNotice(role, "<Champion Death Bonus>:Active!") SystemNotice(role, "<STR>12:!") SystemNotice(role, "<CON>10:!") SystemNotice(role, "<HPrecovery>8:!") ALLExAttrSet(role) RefreshCha(role) end if job == 12 then --ss local dex_dif = 12 local dexsb = DexSb( role ) + dex_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agi_dif = 5 local agisb = AgiSb( role ) + agi_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local con_dif = 4 local consb = ConSb( role ) + con_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) SystemNotice(role, "<Sharpshooter Death Bonus>:Active!") SystemNotice(role, "<ACC>12:!") SystemNotice(role, "<AGI>5:!") SystemNotice(role, "<CON>4:!") ALLExAttrSet(role) RefreshCha(role) end end ---- remover deatttttth function State_deathcruss_Rem ( role , statelv ) local job = GetChaAttr(role, ATTR_JOB) if job == 9 then --Crusader local str_dif = 12 local strsb = StrSb( role ) - str_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local agi_dif = 5 local agisb = AgiSb( role ) - agi_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local con_dif = 4 local consb = ConSb( role ) - con_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) SystemNotice(role, "<Crusader Death Bonus>:Remove!") SystemNotice(role, "<STR>12:!") SystemNotice(role, "<AGI>5:!") SystemNotice(role, "<CON>4:!") ALLExAttrSet(role) RefreshCha(role) end if job == 8 then --Champion local str_dif = 12 local strsb = StrSb( role ) - str_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local con_dif = 10 local consb = ConSb( role ) - con_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local hrecsb_dif = 8 local hrecsb = HrecSb( role ) - hrecsb_dif SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC ) SystemNotice(role, "<Champion Death Bonus>:Remove!") SystemNotice(role, "<STR>12:!") SystemNotice(role, "<CON>10:!") SystemNotice(role, "<HPrecovery>8:!") ALLExAttrSet(role) RefreshCha(role) end if job == 12 then --Sharpshooter local dex_dif = 12 local dexsb = DexSb( role ) - dex_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agi_dif = 5 local agisb = AgiSb( role ) - agi_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local con_dif = 4 local consb = ConSb( role ) - con_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) SystemNotice(role, "<Sharpshooter Death Bonus>:Remove!") SystemNotice(role, "<ACC>12:!") SystemNotice(role, "<AGI>5:!") SystemNotice(role, "<CON>4:!") ALLExAttrSet(role) RefreshCha(role) end end 32 minutes ago, V3ct0r said: @dragontechi Pruebe esta condición: Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted January 8, 2022 This have lots of bugs with cha_timer, Eviles had a nice script that included Add/Rem effects, along with cloak and the prawn dump bugs/fairy poss. I have his script he wrote long ago, but I rather not without his permission. Maybe if you can contact him, he may be able to sell it to you, it's organized and works well. Quote Share this post Link to post Share on other sites
dragontechi 68 Report post Posted January 8, 2022 23 hours ago, Dan said: Esto tiene muchos errores con cha_timer, Eviles tenía un buen script que incluía efectos Add/Rem, junto con cloak y los bugs/fairy poss de volcado de gambas. Tengo su guión que escribió hace mucho tiempo, pero prefiero no hacerlo sin su permiso. Tal vez si puede contactarlo, él puede vendérselo, está organizado y funciona bien. Thank you very much but I prefer to finish the script and share it publicly Quote Share this post Link to post Share on other sites
dragontechi 68 Report post Posted January 9, 2022 (edited) On 1/7/2022 at 8:22 PM, Dan said: This have lots of bugs with cha_timer, Eviles had a nice script that included Add/Rem effects, along with cloak and the prawn dump bugs/fairy poss. I have his script he wrote long ago, but I rather not without his permission. Maybe if you can contact him, he may be able to sell it to you, it's organized and works well. On 1/7/2022 at 5:35 AM, V3ct0r said: @dragontechi Try this condition: local body = (death_BODY_ID == 2817 or Fdeath_BODY_ID == 2817) local glove = (death_GLOVE_ID == 2818 or Fdeath_GLOVE_ID == 2818) local shoes = (death_SHOES_ID == 2819 or Fdeath_SHOES_ID == 2819) if ( (body == true) and (glove == true) and (shoes == true) ) then AddState(role, role, State_deathcruss, statelv, statetime) else local state_State_deathcruss = GetChaStateLv(role, State_deathcruss) if ( state_State_deathcruss ~= 0 ) then RemoveState(role, State_deathcruss) end end Thank you very much after being able to make the scrint start correctly Edited January 9, 2022 by dragontechi farta de infomacion Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted January 9, 2022 6 hours ago, dragontechi said: Thank you very much but I prefer to finish the script and share it publicly I am just saying, it will work, but regardless, when you use prawn dump/fairy poss/cloaks etc it will cause a lot of bugs because of cha_timer. 1 Quote Share this post Link to post Share on other sites
dragontechi 68 Report post Posted January 9, 2022 2 hours ago, Dan said: Solo digo que funcionará, pero de todos modos, cuando usas gambas, poses de hadas, capas, etc., causará muchos errores debido a cha_timer. If I already removed that errors I am fine-tuning the script right now Quote Share this post Link to post Share on other sites