tried:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if comparePos(getCreaturePosition(cid), {33605, 32394, 11}) then
if target.itemid == 22634 then
item:remove(22634)
player:teleportTo(Position(33574, 32414, 12), false)
end
return true
end
but i get distro error...