Go-piratia Posted November 4, 2023 Share Posted November 4, 2023 Скрипт устанавливает кулдаун на использование предмета. Добавляем в ItemEffect.lua Gyosa = {} function ItemUse_SSSJ ( role , Item ) local name = GetChaDefaultName(role) if Gyosa[name] == nil then Gyosa[name] = { UsedTime = os.time() } end local cooldown = Gyosa[name].UsedTime - os.time() if cooldown > 0 then SystemNotice(role,"Gyoza cooldown on effect wait "..cooldown.." second(s) to use again!") UseItemFailed(role) return end mxhp = GetChaAttr(role,ATTR_MXHP) hp_resume = mxhp * 0.3 hp = hp + hp_resume if hp > mxhp then hp = mxhp end SetCharaAttr(hp, role, ATTR_HP) Gyosa[name].UsedTime = os.time()+10 end Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.