mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
20 lines
560 B
Lua
20 lines
560 B
Lua
local moveevent = MoveEvent()
|
|
|
|
function moveevent.onAddItem(moveitem, tileitem, position)
|
|
if moveitem:getId() == 7732 then -- seeds
|
|
tileitem:transform(7665) -- flower pot
|
|
tileitem:decay()
|
|
moveitem:remove(1)
|
|
position:sendMagicEffect(CONST_ME_MAGIC_GREEN)
|
|
elseif moveitem:getId() == 15271 then -- ice flower seeds
|
|
tileitem:transform(15442) -- flower pot
|
|
tileitem:decay()
|
|
moveitem:remove(1)
|
|
position:sendMagicEffect(CONST_ME_MAGIC_BLUE)
|
|
end
|
|
return true
|
|
end
|
|
|
|
moveevent:id(7655) -- empty flower pot
|
|
moveevent:tileItem(true)
|
|
moveevent:register()
|