DarkRulez 0 Report post Posted June 8, 2017 like the tittle say i need help with the admiral cloak i cant make it work i have no idea to where add it in functions.lua sorry for my bad english Quote Share this post Link to post Share on other sites
blazi10 37 Report post Posted June 9, 2017 Put it inside cha_timer in functions.lua: Spoiler local cha = TurnToCha ( role ) local cha_type = GetChaTypeID ( cha ) local Cape_bg = GetChaItem ( role , 2 , 4 ) local Cape_id = GetItemID ( Cape_bg ) if Cape_id == 9205 and cha_type == 1 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_CAPE1 , statelv , statetime ) elseif Cape_id == 9205 and cha_type == 2 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_CAPE2 , statelv , statetime ) elseif Cape_id == 9205 and cha_type == 3 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_CAPE3 , statelv , statetime ) elseif Cape_id == 9205 and cha_type == 4 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_CAPE4 , statelv , statetime ) else local statelv_cape1 = GetChaStateLv ( role , STATE_CAPE1 ) if statelv_cape1~=0 then RemoveState ( role , STATE_CAPE1 ) end local statelv_cape2 = GetChaStateLv ( role , STATE_CAPE2 ) if statelv_cape2~=0 then RemoveState ( role , STATE_CAPE2 ) end local statelv_cape3 = GetChaStateLv ( role , STATE_CAPE3 ) if statelv_cape3~=0 then RemoveState ( role , STATE_CAPE3 ) end local statelv_cape4 = GetChaStateLv ( role , STATE_CAPE4 ) if statelv_cape4~=0 then RemoveState ( role , STATE_CAPE4 ) end end Quote Share this post Link to post Share on other sites
DarkRulez 0 Report post Posted June 10, 2017 (edited) @blazi10 im new at this so i have no idea of how must i put it if u can show me how must it look like. It would be very helpful Edited June 10, 2017 by DarkRulez Quote Share this post Link to post Share on other sites
blazi10 37 Report post Posted June 11, 2017 @DarkRulez put cloak funtion under 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 -----Here put cloak function 1 Quote Share this post Link to post Share on other sites