ratonter 3 Report post Posted August 9, 2020 Hello some one can tell me how can i set a function for get the effect kylen while the set stil fussed.. i mean get the effect kylin while the set be fuse with an app Quote Share this post Link to post Share on other sites
Cleo 2 Report post Posted August 31, 2020 Hello, if you still need help DM me in discord Delgad#7390 Quote Share this post Link to post Share on other sites
ratonter 3 Report post Posted August 31, 2020 ill msg u at discord Quote Share this post Link to post Share on other sites
Cleo 2 Report post Posted August 31, 2020 @ratonter hi, i didn't get your message Quote Share this post Link to post Share on other sites
Fisal Moha 21 Report post Posted September 1, 2020 (edited) If you already got function on one with normal set you can use this line to get the actual id of item local checkSlot = GetEquipItemP(role,5)-- here it will check the slot 5 is neck you could find ids in Look.lua which located at script/calculate local ItemID = 0--we set it here always 0 for failure if checkSlot ~= nil then -- check when is empty or null ItemID = GetItemFissionID (checkSlot) -- this here will get the actual ItemID from Fissioned one end hope i helped and try use your head a bit you never learn unless you challenge yourself! good luck buddy. Edited September 1, 2020 by Fisal Moha 1 Quote Share this post Link to post Share on other sites
ratonter 3 Report post Posted September 1, 2020 9 minutes ago, Fisal Moha said: If you already got function on one with normal set you can use this line to get the actual id of item local checkSlot = GetEquipItemP(role,5)-- here it will check the slot 5 is neck you could find ids in Look.lua which located at script/calculate local ItemID = 0--we set it here always 0 for failure if checkSlot ~= nil then -- check when is empty or null ItemID = GetItemFissionID (checkSlot) -- this here will get the actual ItemID from Fissioned one end hope i helped and try use your head a bit you never learn unless you challenge yourself! good luck buddy. thanks man, but i still not understand Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted September 1, 2020 This applies for Kylin and or Black Dragon. In your server files, Resource\script\calculate\functions.lua Find "function CheckItem_Nianshou ( role )" This is what parameters it will check, to see if a player is wearing the ItemID's, if they are, and they also have a certain item in their inventory then they can keep the effect while item is fused. function CheckItem_Nianshou ( role ) local Atk = IsPlayer ( role ) local boat = ChaIsBoat ( role ) if Atk == 0 or boat == 1 then return 0 end local cha = TurnToCha ( role ) local Cha_Num = GetChaTypeID( cha ) local item = CheckBagItem(role,7008) -- Item required to be in your inventory if fused. local head = GetChaItem ( role , 1 , 0 ) -- Checking head item local body = GetChaItem ( role , 1 , 2 ) -- Checking body item local hand = GetChaItem ( role , 1 , 3 ) -- Checking gloves item local foot = GetChaItem ( role , 1 , 4 ) -- Checking boots item local Head_ID = GetItemID ( head ) -- Retrieve the ItemID of head local Body_ID = GetItemID ( body ) -- Retrieve the ItemID of body local Hand_ID = GetItemID ( hand ) -- Retrieve the ItemID of gloves local Foot_ID = GetItemID ( foot ) -- Retrieve the ItemID of boots local FBody_ID = GetItemAttr ( body , ITEMATTR_VAL_FUSIONID ) -- Get the fused ItemID of body local FHand_ID = GetItemAttr ( hand , ITEMATTR_VAL_FUSIONID ) -- Get the fused ItemID of gloves local FFoot_ID = GetItemAttr ( foot , ITEMATTR_VAL_FUSIONID ) -- Get the fused ItemID of boots -- If less than ID 5000 (means its not apparel). if Body_ID<5000 or Hand_ID<5000 or Foot_ID<5000 then if Body_ID ~= 0825 and Body_ID ~= 2549 then --If Armor ID is 825, and or 2549, then it is considered Kylin return 0 end if Hand_ID ~= 0826 and Hand_ID ~= 2550 then --If Gloves ID is 826, and or 2550, then it is considered Kylin return 0 end if Foot_ID ~= 0827 and Foot_ID ~= 2551 then --If Armor ID is 827, and or 2551, then it is considered Kylin return 0 end else --Recall that we created "FBody/FHand/FFoot above, the F in front of the objective stands for "fusion" in this case, just to make it easy to read. -- Checking if player wearing armor if FBody_ID ~= 0825 and FBody_ID ~= 2549 then return 0 end -- Checking if player wearing gloves if FHand_ID ~= 0826 and FHand_ID ~= 2550 then return 0 end -- Checking if player wearing boots if FFoot_ID ~= 0827 and FFoot_ID ~= 2551 then return 0 end -- Checking if player has the item required "The item needed in inventory". if item < 1 then return 0 end -- End checking end -- After checking, apply the effects return 1 -- End of process end Next, we apply this into the attacking parameters. Find "function Skill_Melee_End ( ATKER , DEFER , sklv )" in Resource\script\calculate\skilleffect.lua This one is for "Normal melee's" Non-range. It will check for "Check_Nianshou" which we will call from functions.lua to identify the calling. local Check_Nianshou = CheckItem_Nianshou ( ATKER ) if Check_Nianshou == 1 then local P_R = 0.2 -- 20% chance to obtain kylin effect. local job = GetChaAttr( ATKER , ATTR_JOB ) if job == 5 then P_R = 1 end local Percentage = Percentage_Random ( P_R ) if Percentage == 1 then -- If the chance is obtained, then Add Stun for 1 second, and also a chance to apply heal. AddState ( ATKER , DEFER , STATE_XY , 1 , 1 ) SystemNotice ( ATKER , "<Kylin Set> Target Stunned for 1 Second.") end end Now we go find the "Range" melee, which applies for Sharpshooters, or range classes. "function Skill_Range_End ( ATKER , DEFER , sklv )" Same application here. local Check_Nianshou = CheckItem_Nianshou ( ATKER ) if Check_Nianshou == 1 then local P_R = 0.2 -- 20% chance to obtain kylin effect. local job = GetChaAttr( ATKER , ATTR_JOB ) if job == 5 then P_R = 1 end local Percentage = Percentage_Random ( P_R ) if Percentage == 1 then -- If the chance is obtained, then Add Stun for 1 second, and also a chance to apply heal. AddState ( ATKER , DEFER , STATE_XY , 1 , 1 ) SystemNotice ( ATKER , "<Kylin Set> Target Stunned for 1 Second.") end end 1 Quote Share this post Link to post Share on other sites
Fisal Moha 21 Report post Posted September 1, 2020 3 hours ago, ratonter said: thanks man, but i still not understand I am sorry I forget one thing the function that run to check the itemid of fission id (cough) function GetItemFissionID(Item) local MainID = GetItemID (Item) if MainID > 5000 and MainID ~= 9999 then return GetItemAttr(Item,ITEMATTR_VAL_FUSIONID) else return MainID end end anyway @ᴡʀx explained it well you can check his post carefully and you will surly manage to make it work. good luck 1 Quote Share this post Link to post Share on other sites
Brothers 24 Report post Posted October 24, 2020 Will this work the same with 85 ring effect? When i fuse death armor, will it also keep effect? Quote Share this post Link to post Share on other sites
DangThao 81 Report post Posted October 25, 2020 5 hours ago, Brothers said: Will this work the same with 85 ring effect? When i fuse death armor, will it also keep effect? It should work for any set u want to keep effect. make sure u do it correctly. Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 20, 2021 On 9/1/2020 at 4:15 PM, Fisal Moha said: I am sorry I forget one thing the function that run to check the itemid of fission id (cough) function GetItemFissionID(Item) local MainID = GetItemID (Item) if MainID > 5000 and MainID ~= 9999 then return GetItemAttr(Item,ITEMATTR_VAL_FUSIONID) else return MainID end end anyway @ᴡʀx explained it well you can check his post carefully and you will surly manage to make it work. good luck May I know where you place this script ? I put it inside functions.lua but still its not detecting fused kylin set as kylin and the effect is not working. Can anyone clarify where should i put this script and why its not working for me. I already tested with both kylin set without apparel and the effect working well. So I suspect the only issue is the script for fussion or fission is not working. Quote Share this post Link to post Share on other sites
Brothers 24 Report post Posted October 1, 2022 On 9/1/2020 at 7:15 AM, Dan said: This applies for Kylin and or Black Dragon. In your server files, Resource\script\calculate\functions.lua Find "function CheckItem_Nianshou ( role )" This is what parameters it will check, to see if a player is wearing the ItemID's, if they are, and they also have a certain item in their inventory then they can keep the effect while item is fused. function CheckItem_Nianshou ( role ) local Atk = IsPlayer ( role ) local boat = ChaIsBoat ( role ) if Atk == 0 or boat == 1 then return 0 end local cha = TurnToCha ( role ) local Cha_Num = GetChaTypeID( cha ) local item = CheckBagItem(role,7008) -- Item required to be in your inventory if fused. local head = GetChaItem ( role , 1 , 0 ) -- Checking head item local body = GetChaItem ( role , 1 , 2 ) -- Checking body item local hand = GetChaItem ( role , 1 , 3 ) -- Checking gloves item local foot = GetChaItem ( role , 1 , 4 ) -- Checking boots item local Head_ID = GetItemID ( head ) -- Retrieve the ItemID of head local Body_ID = GetItemID ( body ) -- Retrieve the ItemID of body local Hand_ID = GetItemID ( hand ) -- Retrieve the ItemID of gloves local Foot_ID = GetItemID ( foot ) -- Retrieve the ItemID of boots local FBody_ID = GetItemAttr ( body , ITEMATTR_VAL_FUSIONID ) -- Get the fused ItemID of body local FHand_ID = GetItemAttr ( hand , ITEMATTR_VAL_FUSIONID ) -- Get the fused ItemID of gloves local FFoot_ID = GetItemAttr ( foot , ITEMATTR_VAL_FUSIONID ) -- Get the fused ItemID of boots -- If less than ID 5000 (means its not apparel). if Body_ID<5000 or Hand_ID<5000 or Foot_ID<5000 then if Body_ID ~= 0825 and Body_ID ~= 2549 then --If Armor ID is 825, and or 2549, then it is considered Kylin return 0 end if Hand_ID ~= 0826 and Hand_ID ~= 2550 then --If Gloves ID is 826, and or 2550, then it is considered Kylin return 0 end if Foot_ID ~= 0827 and Foot_ID ~= 2551 then --If Armor ID is 827, and or 2551, then it is considered Kylin return 0 end else --Recall that we created "FBody/FHand/FFoot above, the F in front of the objective stands for "fusion" in this case, just to make it easy to read. -- Checking if player wearing armor if FBody_ID ~= 0825 and FBody_ID ~= 2549 then return 0 end -- Checking if player wearing gloves if FHand_ID ~= 0826 and FHand_ID ~= 2550 then return 0 end -- Checking if player wearing boots if FFoot_ID ~= 0827 and FFoot_ID ~= 2551 then return 0 end -- Checking if player has the item required "The item needed in inventory". if item < 1 then return 0 end -- End checking end -- After checking, apply the effects return 1 -- End of process end Next, we apply this into the attacking parameters. Find "function Skill_Melee_End ( ATKER , DEFER , sklv )" in Resource\script\calculate\skilleffect.lua This one is for "Normal melee's" Non-range. It will check for "Check_Nianshou" which we will call from functions.lua to identify the calling. local Check_Nianshou = CheckItem_Nianshou ( ATKER ) if Check_Nianshou == 1 then local P_R = 0.2 -- 20% chance to obtain kylin effect. local job = GetChaAttr( ATKER , ATTR_JOB ) if job == 5 then P_R = 1 end local Percentage = Percentage_Random ( P_R ) if Percentage == 1 then -- If the chance is obtained, then Add Stun for 1 second, and also a chance to apply heal. AddState ( ATKER , DEFER , STATE_XY , 1 , 1 ) SystemNotice ( ATKER , "<Kylin Set> Target Stunned for 1 Second.") end end Now we go find the "Range" melee, which applies for Sharpshooters, or range classes. "function Skill_Range_End ( ATKER , DEFER , sklv )" Same application here. local Check_Nianshou = CheckItem_Nianshou ( ATKER ) if Check_Nianshou == 1 then local P_R = 0.2 -- 20% chance to obtain kylin effect. local job = GetChaAttr( ATKER , ATTR_JOB ) if job == 5 then P_R = 1 end local Percentage = Percentage_Random ( P_R ) if Percentage == 1 then -- If the chance is obtained, then Add Stun for 1 second, and also a chance to apply heal. AddState ( ATKER , DEFER , STATE_XY , 1 , 1 ) SystemNotice ( ATKER , "<Kylin Set> Target Stunned for 1 Second.") end end I follow all your steps, but after appereal fusion, effect of normal kylin set is still gone. These steps were done by what u said: Find "function CheckItem_Nianshou ( role )" and changed... Next, we apply this into the attacking parameters. Find "function Skill_Melee_End ( ATKER , DEFER , sklv )" in Resource\script\calculate\skilleffect.lua This one is for "Normal melee's" Non-range.It will check for "Check_Nianshou" which we will call from functions.lua to identify the callin Check.. Now we go find the "Range" melee, which applies for Sharpshooters, or range classes. function Skill_Range_End ( ATKER , DEFER , sklv )" Same application here. check check,,, Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted October 2, 2022 @Brothers You need to see if you have the item local item = CheckBagItem(role,7008) -- Item required to be in your inventory if fused. 1 Quote Share this post Link to post Share on other sites
Brothers 24 Report post Posted October 2, 2022 13 hours ago, Dan said: @Brothers You need to see if you have the item local item = CheckBagItem(role,7008) -- Item required to be in your inventory if fused. Thanks for the quick response! I use clean files, so i bet its not there yet. Do i have to create this in function? Quote Share this post Link to post Share on other sites
AlGhoul 66 Report post Posted October 3, 2022 11 hours ago, Brothers said: Thanks for the quick response! I use clean files, so i bet its not there yet. Do i have to create this in function? function IsSkySet( role ) local Atk = IsPlayer ( role ) local boat = ChaIsBoat ( role ) if Atk == 0 or boat == 1 then return 0 end local head = GetChaItem ( role , 1 , 0 ) local body = GetChaItem ( role , 1 , 2 ) local hand = GetChaItem ( role , 1 , 3 ) local foot = GetChaItem ( role , 1 , 4 ) local Head_ID = GetItemID ( head ) local Body_ID = GetItemID ( body ) local Hand_ID = GetItemID ( hand ) local Foot_ID = GetItemID ( foot ) local FusedBody_ID = GetItemAttr ( body , ITEMATTR_VAL_FUSIONID ) local FusedHand_ID = GetItemAttr ( hand , ITEMATTR_VAL_FUSIONID ) local FusedFoot_ID = GetItemAttr ( foot , ITEMATTR_VAL_FUSIONID ) -- local hasSkyStone = CheckBagItem( role, 7529) -- if (Body_ID ~= idToBeChecked or Hand_ID ~= idToBeChecked or Foot_ID ~= idToBeChecked) then return 0 end if (FusedBody_ID ~= 24 or FusedHand_ID ~= 25 or FusedFoot_ID ~= 26) then return 0 end -- if hasSkyStone ~= 1 then -- return 0 -- end return 1 end Here you go, I used this in Avacado Online, the normal (nonfuse) checks are commented but I kept them for convenience plus you can enable the hasSkyStone in-order to check for a fused set + a stone to have stun effect but don't enable it in place, you can add it to the fuse checks as an (or hasSkyStone ~= 1) also if you gonna use this function notice it returns false for mismatches, true otherwise so you have to check for either of the predictable conditions and beware of mismatches in lua, you have to explicitly check for a success local hasSkySet = IsSkySet(Player) if hasSkySet == 1 then -- perform something end because of the following Quote lua considers false and nil as false and anything else as true. Implicit checks like the following example, are error prone and mostly won't work. local hasSkySet = IsSkySet(Player) if hasSkySet then -- perform something end Quote Kind regards, AG. Share this post Link to post Share on other sites
Brothers 24 Report post Posted October 3, 2022 17 hours ago, J0k3r said: function IsSkySet( role ) local Atk = IsPlayer ( role ) local boat = ChaIsBoat ( role ) if Atk == 0 or boat == 1 then return 0 end local head = GetChaItem ( role , 1 , 0 ) local body = GetChaItem ( role , 1 , 2 ) local hand = GetChaItem ( role , 1 , 3 ) local foot = GetChaItem ( role , 1 , 4 ) local Head_ID = GetItemID ( head ) local Body_ID = GetItemID ( body ) local Hand_ID = GetItemID ( hand ) local Foot_ID = GetItemID ( foot ) local FusedBody_ID = GetItemAttr ( body , ITEMATTR_VAL_FUSIONID ) local FusedHand_ID = GetItemAttr ( hand , ITEMATTR_VAL_FUSIONID ) local FusedFoot_ID = GetItemAttr ( foot , ITEMATTR_VAL_FUSIONID ) -- local hasSkyStone = CheckBagItem( role, 7529) -- if (Body_ID ~= idToBeChecked or Hand_ID ~= idToBeChecked or Foot_ID ~= idToBeChecked) then return 0 end if (FusedBody_ID ~= 24 or FusedHand_ID ~= 25 or FusedFoot_ID ~= 26) then return 0 end -- if hasSkyStone ~= 1 then -- return 0 -- end return 1 end Here you go, I used this in Avacado Online, the normal (nonfuse) checks are commented but I kept them for convenience plus you can enable the hasSkyStone in-order to check for a fused set + a stone to have stun effect but don't enable it in place, you can add it to the fuse checks as an (or hasSkyStone ~= 1) also if you gonna use this function notice it returns false for mismatches, true otherwise so you have to check for either of the predictable conditions and beware of mismatches in lua, you have to explicitly check for a success local hasSkySet = IsSkySet(Player) if hasSkySet == 1 then -- perform something end because of the following Implicit checks like the following example, are error prone and mostly won't work. local hasSkySet = IsSkySet(Player) if hasSkySet then -- perform something end But does this helps function CheckItem_Nianshou? I guess i just have to make that work. Im not sure, but i think SkySet is differend function, but same thing? Quote Share this post Link to post Share on other sites
Brothers 24 Report post Posted October 5, 2022 On 10/2/2022 at 2:19 AM, Dan said: @Brothers You need to see if you have the item local item = CheckBagItem(role,7008) -- Item required to be in your inventory if fused. Can you please explain this to me? I didnt find this info above, so i might have to add this somewhere into my files? Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted October 6, 2022 6 hours ago, Brothers said: Can you please explain this to me? I didnt find this info above, so i might have to add this somewhere into my files? It's checking if your character has the itemID 7008 in bag. Quote Share this post Link to post Share on other sites
Brothers 24 Report post Posted October 6, 2022 10 hours ago, Dan said: It's checking if your character has the itemID 7008 in bag. Ah, because it says local item = CheckBagItem(role,7008) -- Item required to be in your inventory if fused. Well, my iteminfo goes to 5999, does it mean i have to make an item to 7008? @Dan Quote Share this post Link to post Share on other sites
AlGhoul 66 Report post Posted October 6, 2022 On 10/3/2022 at 8:23 PM, Brothers said: But does this helps function CheckItem_Nianshou? I guess i just have to make that work. Im not sure, but i think SkySet is differend function, but same thing? This is just a name that you can replace, you should be concerned with the body of the function, you build up on it. Quote Kind regards, AG. Share this post Link to post Share on other sites
Dan 184 Report post Posted October 8, 2022 On 10/6/2022 at 7:11 AM, Brothers said: Ah, because it says local item = CheckBagItem(role,7008) -- Item required to be in your inventory if fused. Well, my iteminfo goes to 5999, does it mean i have to make an item to 7008? @Dan No, you can change the 7008 to an itemID you want. Quote Share this post Link to post Share on other sites
Brothers 24 Report post Posted October 9, 2022 On 10/8/2022 at 5:07 AM, Dan said: No, you can change the 7008 to an itemID you want. Ah oke, thanks! Is it also avaible to delete this line, so you just can fuse kylin to any appereal and keep the kylin effect? Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted October 9, 2022 1 hour ago, Brothers said: Ah oke, thanks! Is it also avaible to delete this line, so you just can fuse kylin to any appereal and keep the kylin effect? Yes but you need to modify the code, and do something else if you are not checking for character to have certain ItemID in inventory. 1 Quote Share this post Link to post Share on other sites
Brothers 24 Report post Posted October 9, 2022 59 minutes ago, Dan said: Yes but you need to modify the code, and do something else if you are not checking for character to have certain ItemID in inventory. Ah oke, thanks for your replys! I changed item to auto rations, guess everyone will have that one in inventory Quote Share this post Link to post Share on other sites