Try this
function onUse(cid, item, frompos, item2, topos)
tp = {x=1,y=1,z=1}
if getPlayerConditionTicks(cid, 1024) > 0 then
doPlayerSendTextMessage(cid, 24, "You can't use the teleport scroll if you have pz.")
else
doTeleportThing(cid, tp)
doSendMagicEffect(tp, 10)
doPlayerSendTextMessage(cid...