kyleflow 35 Report post Posted March 31, 2022 I edit the existing script for 85 ring glow and adding a new set of accessories to made it use back the 85 glow but with job class prerequisite and new item ID corresponding to the ring and neck location. The glow wont show up. Anyone knows why ? function cha_timer(role, freq, time) local resume_freq = 5 local now_tick = GetChaParam(role, 1) local is_role_living = -1 SetChaParam(role, 1, now_tick + freq * time) --hp回复 if math.mod(now_tick, resume_freq) == 0 and now_tick > 0 then JianYuKa(role ,now_tick) ZhongShenTaoZhuang(role,now_tick) if is_role_living == -1 then is_role_living = IsChaLiving(role) end if is_role_living == 1 then Resume(role) end end ---Glow 85--- local Dina_xl = GetEquipItemP(role,8) local Dina_xl_ID= GetItemID (Dina_xl) local Dina_x2 = GetEquipItemP(role,2) local Dina_x2_ID= GetItemID (Dina_x2) local Dina_x3 = GetEquipItemP(role,5) local Dina_x3_ID = GetItemID(Dina_x3) local job = GetChaAttr(role, ATTR_JOB) if Dina_xl_ID == 2577 and (Dina_x2_ID == 2817 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif Dina_xl_ID==2578 and (Dina_x2_ID==2820 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif Dina_xl_ID==2579 and (Dina_x2_ID==2823 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif Dina_xl_ID==2580 and (Dina_x2_ID==2826 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif Dina_xl_ID==2581 and (Dina_x2_ID==2832 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif Dina_xl_ID==2582 and (Dina_x2_ID==2829 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end if job == 8 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then -- xjd hahahaha local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif job == 9 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif job == 12 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif job == 16 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif job == 14 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif job == 13 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end end end Quote Share this post Link to post Share on other sites
DangThao 81 Report post Posted April 4, 2022 On 3/31/2022 at 11:13 AM, kyleflow said: I edit the existing script for 85 ring glow and adding a new set of accessories to made it use back the 85 glow but with job class prerequisite and new item ID corresponding to the ring and neck location. The glow wont show up. Anyone knows why ? function cha_timer(role, freq, time) local resume_freq = 5 local now_tick = GetChaParam(role, 1) local is_role_living = -1 SetChaParam(role, 1, now_tick + freq * time) --hp回复 if math.mod(now_tick, resume_freq) == 0 and now_tick > 0 then JianYuKa(role ,now_tick) ZhongShenTaoZhuang(role,now_tick) if is_role_living == -1 then is_role_living = IsChaLiving(role) end if is_role_living == 1 then Resume(role) end end ---Glow 85--- local Dina_xl = GetEquipItemP(role,8) local Dina_xl_ID= GetItemID (Dina_xl) local Dina_x2 = GetEquipItemP(role,2) local Dina_x2_ID= GetItemID (Dina_x2) local Dina_x3 = GetEquipItemP(role,5) local Dina_x3_ID = GetItemID(Dina_x3) local job = GetChaAttr(role, ATTR_JOB) if Dina_xl_ID == 2577 and (Dina_x2_ID == 2817 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif Dina_xl_ID==2578 and (Dina_x2_ID==2820 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif Dina_xl_ID==2579 and (Dina_x2_ID==2823 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif Dina_xl_ID==2580 and (Dina_x2_ID==2826 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif Dina_xl_ID==2581 and (Dina_x2_ID==2832 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif Dina_xl_ID==2582 and (Dina_x2_ID==2829 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end if job == 8 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then -- xjd hahahaha local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif job == 9 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif job == 12 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif job == 16 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif job == 14 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif job == 13 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end end end Try this function cha_timer(role, freq, time) local resume_freq = 5 local now_tick = GetChaParam(role, 1) local is_role_living = -1 SetChaParam(role, 1, now_tick + freq * time) --hp回复 if math.mod(now_tick, resume_freq) == 0 and now_tick > 0 then JianYuKa(role ,now_tick) ZhongShenTaoZhuang(role,now_tick) if is_role_living == -1 then is_role_living = IsChaLiving(role) end if is_role_living == 1 then Resume(role) end end ---Glow 85--- local Dina_xl = GetEquipItemP(role,8) local Dina_xl_ID= GetItemID (Dina_xl) local Dina_x2 = GetEquipItemP(role,2) local Dina_x2_ID= GetItemID (Dina_x2) local Dina_x3 = GetEquipItemP(role,5) local Dina_x3_ID = GetItemID(Dina_x3) local job = GetChaAttr(role, ATTR_JOB) if Dina_xl_ID == 2577 and (Dina_x2_ID == 2817 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif Dina_xl_ID==2578 and (Dina_x2_ID==2820 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif Dina_xl_ID==2579 and (Dina_x2_ID==2823 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif Dina_xl_ID==2580 and (Dina_x2_ID==2826 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif Dina_xl_ID==2581 and (Dina_x2_ID==2832 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif Dina_xl_ID==2582 and (Dina_x2_ID==2829 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) --[[ Your Custom ]]-- elseif job == 8 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then -- xjd hahahaha local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif job == 9 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif job == 12 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif job == 16 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif job == 14 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif job == 13 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end end end Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted April 5, 2022 @DangThao not working. But I figured that I able to create new state and everything related to that stats such like skilleff and etc. it worked.. but i need multiple item for it also Quote Share this post Link to post Share on other sites