function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 5901 then
if toPosition.x == 65535 then
doCreatureSay(cid, 'Put the wood on the floor first.', TALKTYPE_ORANGE_1, false, cid)
elseif itemEx.type ~= 50 then
doCreatureSay(cid, 'You need to stack 50 pieces of wood.', TALKTYPE_ORANGE_1, false, cid)
else
doTransformItem(itemEx.uid, 5272)
doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
end
return true
end
end