Fiz dessa forma e funcionou
local from = {x=1252,y=1007}
local to = {x=1261,y=1013}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local setX = math.random(from.x,to.x)
local setY = math.random(from.y,to.y)
doCreateItem(1746, 1, {x = setX,y = setY,z = 4})
return true
end