So, I want to do this:
You use pick, and a tp creates, but I want it that when the teleport creates, a UniqueID is set to that new tp
If the script it's wrong, please I'd like to fix it too.
I just don't know how to specify that I want THAT tp to get that UID, any help appreciated 
You use pick, and a tp creates, but I want it that when the teleport creates, a UniqueID is set to that new tp
LUA:
local tile = getThingfromPos(tilepos)
local toposition = {x=EDIT, y=EDIT, z=EDIT}
local inposition = {x=EDIT, y=EDIT, z=EDIT}
function onUse(cid, item, fromPosition, ItemEx, toPosition)
doTransformItem(itemEx.uid, 0)
doCreateTeleport(1387, toposition, inposition)
doItemSetAttribute(1387, "uid", 15185)
return true
end
If the script it's wrong, please I'd like to fix it too.
LUA:
doItemSetAtribute(1387, "uid", 15185)