Crystals
Member
- Joined
- Sep 28, 2024
- Messages
- 58
- Reaction score
- 10
Hi, I tried to fix the rune but no player can teach it. "You cannot use this object"
wild growth runes.lua:
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_WILDGROWTH)
local time = 40
local function countDown(cid, position, time)
local player = Player(cid)
if not player or time == 0 then
return
end
player:say(time, TALKTYPE_MONSTER_SAY, false, 0, position)
addEvent(countDown, 1000, cid, position, time - 1)
end
function onCastSpell(creature, variant, isHotkey)
countDown(creature.uid, Variant.getPosition(variant), 40)
return combat:execute(creature, variant)
end