Ximboliex 85 Report post Posted October 24, 2016 (edited) You would need to have the stats on a state, and then add the state when the wings are in slot 1: Add this to variable.lua (or wherever you store your variables to) changing the ID to the wings ID and the State to the state you want to add. You can add more wings, I'm just using 5 for an example. Code: WingID = {} WingID[0] = {ID = 1, State = 1} WingID[1] = {ID = 2, State = 2} WingID[2] = {ID = 3, State = 3} WingID[3] = {ID = 4, State = 4} WingID[4] = {ID = 5, State = 5} WingID[5] = {ID = 6, State = 6} Add this into cha_timer or your cha_timer hook: if Is_NormalMonster ( role ) ~= 1 then local Item_bg = GetChaItem ( role , 2 , 0 ) local ID = GetItemID ( Item_bg ) for i,v in pairs(WingID.ID) do if ID == v then AddState ( role , role , WingID[i].State , 1, 3600 ) else local HASstate = GetChaStateLv ( role , WingID[i].State ) if HASstate ~= 0 then RemoveState ( role , WingID[i].State ) end Put Code in Skilleffec.lua : ---------------------------------------Wing#1------------------------------------------------ function State_Wing1_Add ( role , statelv ) local strsb_dif = 50 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 50 local consb = ConSb( role ) + consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 50 local dexsb = DexSb( role ) + dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 110 local agisb = AgiSb( role ) + agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 110 local stasb = StaSb( role ) + stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) local resistsb_dif = 10 local resistsb = ResistSb( role ) + resistsb_dif SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF ) local mspdsb_dif = 100 local mspdsb = MspdSb( role ) + mspdsb_dif SetCharaAttr( mspdsb , role , ATTR_STATEV_MSPD ) ALLExAttrSet(role) end function State_Wing1_Rem ( role , statelv ) local strsb_dif = 50 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 50 local consb = ConSb( role ) - consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 50 local dexsb = DexSb( role ) - dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 110 local agisb = AgiSb( role ) - agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 110 local stasb = StaSb( role ) - stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) local resistsb_dif = 10 local resistsb = ResistSb( role ) - resistsb_dif SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF ) local mspdsb_dif = 100 local mspdsb = MspdSb( role ) - mspdsb_dif SetCharaAttr( mspdsb , role , ATTR_STATEV_MSPD ) ALLExAttrSet(role) end --------------------------------------------------------------------------------------------------------------- function State_Wing4_Add ( role , statelv ) local strsb_dif = 10 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 10 local consb = ConSb( role ) + consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 10 local dexsb = DexSb( role ) + dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 50 local agisb = AgiSb( role ) + agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 55 local stasb = StaSb( role ) + stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) ALLExAttrSet(role) end function State_Wing4_Rem ( role , statelv ) local strsb_dif = 10 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 10 local consb = ConSb( role ) - consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 10 local dexsb = DexSb( role ) - dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 50 local agisb = AgiSb( role ) - agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 55 local stasb = StaSb( role ) - stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) ALLExAttrSet(role) end -------------------------------------------------------------------------------------------------------------- function State_Wing5_Add ( role , statelv ) local strsb_dif = 15 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 15 local consb = ConSb( role ) + consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 15 local dexsb = DexSb( role ) + dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 55 local agisb = AgiSb( role ) + agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 60 local stasb = StaSb( role ) + stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) ALLExAttrSet(role) end function State_Wing5_Rem ( role , statelv ) local strsb_dif = 15 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 15 local consb = ConSb( role ) - consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 15 local dexsb = DexSb( role ) - dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 55 local agisb = AgiSb( role ) - agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 60 local stasb = StaSb( role ) - stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) ALLExAttrSet(role) end --------------------------------------------------------------------------------------------------------------------------- function State_Wing6_Add ( role , statelv ) local strsb_dif = 25 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 25 local consb = ConSb( role ) + consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 25 local dexsb = DexSb( role ) + dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 60 local agisb = AgiSb( role ) + agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 65 local stasb = StaSb( role ) + stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) local resistsb_dif = 5 local stasb = ResistSb( role ) - resistsb_dif SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF ) ALLExAttrSet(role) end function State_Wing6_Rem ( role , statelv ) local strsb_dif = 25 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 25 local consb = ConSb( role ) - consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 25 local dexsb = DexSb( role ) - dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 60 local agisb = AgiSb( role ) - agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 65 local stasb = StaSb( role ) - stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) local resistsb_dif = 5 local resistsb = ResistSb( role ) - resistsb_dif SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF ) ALLExAttrSet(role) end --------------------And add this in skill effec---------------- 522 Wing1 -1 0 State_Wing1_Add State_Wing1_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxxx -1 -1 0 State_Wing2_Add State_Wing2_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxx -1 -1 0 State_Wing3_Add State_Wing3_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxxx -1 -1 0 State_Wing4_Add State_Wing4_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxxx Wing5 -1 0 State_Wing5_Add State_Wing5_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxx -1 -1 0 State_Wing6_Add State_Wing6_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 By @Billy Edited October 24, 2016 by Ximboliex Quote Share this post Link to post Share on other sites
Eviles 179 Report post Posted October 24, 2016 Same as other topic.. No credits. - 7n6 @Billy 2 Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted October 24, 2016 (edited) 5 minutes ago, Satan said: Same as other topic.. No credits. - 7n6 @Billy Sorry I dont remeber. i edit post Thank's Edited October 24, 2016 by Ximboliex 1 Quote Share this post Link to post Share on other sites
Guest Report post Posted October 24, 2016 You either add credits next time or I'll be asking admins to remove every other topic you post. best regards. Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted October 24, 2016 5 minutes ago, qwerty said: You either add credits next time or I'll be asking admins to remove every other topic you post. best regards. I published it knowing that the creator of scripts would tell me I was his, did not want to steal my credit far were scripts that had kept much of serverdev ago and as the creator did not put his name in the scripts that copy why not remembered I become apologize if I offended someone Quote Share this post Link to post Share on other sites
Totoka 152 Report post Posted October 24, 2016 Even when these scripts are public releases; A good way to do it, could be you to ask the owners before post. If you don't know @who, use an small note on the bottom of your post like: "Credits to the respective owners.", could be nice. At least until you get that name. 2 Quote Discord: andresc Share this post Link to post Share on other sites
johan 2 Report post Posted January 29, 2019 @Ximboliex You could show a clearer example of code. When you say Wings ID do you mean the ID of the wings in the Iteminfo? And when you mean a state, do you mean the Skilleff ID? On the other hand I have some doubt with the code of Cha_timer. I feel that the code is a bit incomplete, and when I try it I do not see changes. Thanks for your help Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted January 30, 2019 8 hours ago, johan said: @Ximboliex You could show a clearer example of code. When you say Wings ID do you mean the ID of the wings in the Iteminfo? And when you mean a state, do you mean the Skilleff ID? On the other hand I have some doubt with the code of Cha_timer. I feel that the code is a bit incomplete, and when I try it I do not see changes. Thanks for your help Wings ID - Correct, iteminfo wing ID State - Yes SkilleffID Cha_timer - Same as cloaks, you are checking if the item is there, if true activate state Example: Check if the item is in 1st slot if Is_NormalMonster ( role ) ~= 1 then local Item_bg = GetChaItem ( role , 2 , 0 ) local ID = GetItemID ( Item_bg ) for i,v in pairs(WingID.ID) do if ID == v then AddState ( role , role , WingID.State , 1, 3600 ) Usually for testing try doing Notice() and see if it spams system. when wing is on/off. 1 Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 18, 2021 cha_timer function when added with the script, i have a lot of error popping up when launching gameserver. is it possible for 2.4 version to use this? and is it cha_timer hook in functions ? Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 23, 2021 still unable to make this work Quote Share this post Link to post Share on other sites
Mesut 28 Report post Posted November 7, 2021 On 9/18/2021 at 10:19 AM, kyleflow said: cha_timer function when added with the script, i have a lot of error popping up when launching gameserver. is it possible for 2.4 version to use this? and is it cha_timer hook in functions ? where did u add it i made one whit txt and add it on extension folder is it right folder? Quote Share this post Link to post Share on other sites
Zackeus 2 Report post Posted March 22, 2022 On 10/24/2016 at 12:23 PM, Ximboliex said: You would need to have the stats on a state, and then add the state when the wings are in slot 1: Add this to variable.lua (or wherever you store your variables to) changing the ID to the wings ID and the State to the state you want to add. You can add more wings, I'm just using 5 for an example. Code: WingID = {} WingID[0] = {ID = 1, State = 1} WingID[1] = {ID = 2, State = 2} WingID[2] = {ID = 3, State = 3} WingID[3] = {ID = 4, State = 4} WingID[4] = {ID = 5, State = 5} WingID[5] = {ID = 6, State = 6} Add this into cha_timer or your cha_timer hook: if Is_NormalMonster ( role ) ~= 1 then local Item_bg = GetChaItem ( role , 2 , 0 ) local ID = GetItemID ( Item_bg ) for i,v in pairs(WingID.ID) do if ID == v then AddState ( role , role , WingID[i].State , 1, 3600 ) else local HASstate = GetChaStateLv ( role , WingID[i].State ) if HASstate ~= 0 then RemoveState ( role , WingID[i].State ) end Put Code in Skilleffec.lua : ---------------------------------------Wing#1------------------------------------------------ function State_Wing1_Add ( role , statelv ) local strsb_dif = 50 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 50 local consb = ConSb( role ) + consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 50 local dexsb = DexSb( role ) + dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 110 local agisb = AgiSb( role ) + agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 110 local stasb = StaSb( role ) + stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) local resistsb_dif = 10 local resistsb = ResistSb( role ) + resistsb_dif SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF ) local mspdsb_dif = 100 local mspdsb = MspdSb( role ) + mspdsb_dif SetCharaAttr( mspdsb , role , ATTR_STATEV_MSPD ) ALLExAttrSet(role) end function State_Wing1_Rem ( role , statelv ) local strsb_dif = 50 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 50 local consb = ConSb( role ) - consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 50 local dexsb = DexSb( role ) - dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 110 local agisb = AgiSb( role ) - agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 110 local stasb = StaSb( role ) - stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) local resistsb_dif = 10 local resistsb = ResistSb( role ) - resistsb_dif SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF ) local mspdsb_dif = 100 local mspdsb = MspdSb( role ) - mspdsb_dif SetCharaAttr( mspdsb , role , ATTR_STATEV_MSPD ) ALLExAttrSet(role) end --------------------------------------------------------------------------------------------------------------- function State_Wing4_Add ( role , statelv ) local strsb_dif = 10 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 10 local consb = ConSb( role ) + consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 10 local dexsb = DexSb( role ) + dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 50 local agisb = AgiSb( role ) + agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 55 local stasb = StaSb( role ) + stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) ALLExAttrSet(role) end function State_Wing4_Rem ( role , statelv ) local strsb_dif = 10 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 10 local consb = ConSb( role ) - consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 10 local dexsb = DexSb( role ) - dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 50 local agisb = AgiSb( role ) - agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 55 local stasb = StaSb( role ) - stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) ALLExAttrSet(role) end -------------------------------------------------------------------------------------------------------------- function State_Wing5_Add ( role , statelv ) local strsb_dif = 15 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 15 local consb = ConSb( role ) + consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 15 local dexsb = DexSb( role ) + dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 55 local agisb = AgiSb( role ) + agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 60 local stasb = StaSb( role ) + stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) ALLExAttrSet(role) end function State_Wing5_Rem ( role , statelv ) local strsb_dif = 15 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 15 local consb = ConSb( role ) - consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 15 local dexsb = DexSb( role ) - dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 55 local agisb = AgiSb( role ) - agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 60 local stasb = StaSb( role ) - stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) ALLExAttrSet(role) end --------------------------------------------------------------------------------------------------------------------------- function State_Wing6_Add ( role , statelv ) local strsb_dif = 25 local strsb = StrSb( role ) + strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 25 local consb = ConSb( role ) + consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 25 local dexsb = DexSb( role ) + dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 60 local agisb = AgiSb( role ) + agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 65 local stasb = StaSb( role ) + stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) local resistsb_dif = 5 local stasb = ResistSb( role ) - resistsb_dif SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF ) ALLExAttrSet(role) end function State_Wing6_Rem ( role , statelv ) local strsb_dif = 25 local strsb = StrSb( role ) - strsb_dif SetCharaAttr( strsb , role , ATTR_STATEV_STR ) local consb_dif = 25 local consb = ConSb( role ) - consb_dif SetCharaAttr( consb , role , ATTR_STATEV_CON ) local dexsb_dif = 25 local dexsb = DexSb( role ) - dexsb_dif SetCharaAttr( dexsb , role , ATTR_STATEV_DEX ) local agisb_dif = 60 local agisb = AgiSb( role ) - agisb_dif SetCharaAttr( agisb , role , ATTR_STATEV_AGI ) local stasb_dif = 65 local stasb = StaSb( role ) - stasb_dif SetCharaAttr( stasb , role , ATTR_STATEV_STA ) local resistsb_dif = 5 local resistsb = ResistSb( role ) - resistsb_dif SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF ) ALLExAttrSet(role) end --------------------And add this in skill effec---------------- 522 Wing1 -1 0 State_Wing1_Add State_Wing1_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxxx -1 -1 0 State_Wing2_Add State_Wing2_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxx -1 -1 0 State_Wing3_Add State_Wing3_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxxx -1 -1 0 State_Wing4_Add State_Wing4_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxxx Wing5 -1 0 State_Wing5_Add State_Wing5_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 Xxx -1 -1 0 State_Wing6_Add State_Wing6_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 0 2 0 0 0 0 0 0 0 By @Billy Is it possible code to work wings/effect on 3rd slot on inventory rather than first slot? Because I want to work Wings/Effect(3rd slot) while Using Swing on 1st slot Quote Share this post Link to post Share on other sites