Bom, eu vi essa script em um forum aki que é o seguinte cria um teleport q leva ao templo se usa tal item entao
eu nao sei como q coloca esse script no meu ot queria q alguem me falsse.
function onUse(cid, item, frompos, item2, topos) local tpId = 1387 local p = getCreaturePosition(cid) local x = { [0] = {x=p.x, y=p.y-1, z=p.z}, [1] = {x=p.x+1, y=p.y, z=p.z}, [2] = {x=p.x, y=p.y+1, z=p.z}, [3] = {x=p.x-1, y=p.y, z=p.z} } local tps = { pos = x[getCreatureLookDirection(cid)], toPos = {x=32360, y=32360, z=7}, time = 15, -- remove teleport exausted = 60, -- in seconds storage1 = 18370, -- dont edit storage2 = 97854 -- dont edit } function removeTp() local t = getTileItemById(tps.pos, tpId) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(tps.pos, CONST_ME_POFF) end end function doTPSecond(cid,delay) local seconds = math.floor((getPlayerStorageValue(cid, tps.storage1) - os.time())) local msg = ''.. (seconds < 0 and 0 or seconds) ..'' doSendAnimatedText(tps.pos, msg, math.random(1,140)) if delay ~= 1 then addEvent(doTPSecond, 1000,cid, delay -1) end end if getCreatureCondition(cid, CONDITION_INFIGHT) then return true,doPlayerSendTextMessage(cid,22,"Sorry,you cannot use this item with battle.") elseif (getPlayerStorageValue(cid, tps.storage2) >= os.time()) then return true,doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, tps.storage2) - os.time() .. " seconds to use this item again.") end doCreateTeleport(tpId, tps.toPos, tps.pos) setPlayerStorageValue(cid, tps.storage1, os.time()+tps.time) doTPSecond(cid, tps.time) addEvent(removeTp, tps.time*1000) setPlayerStorageValue(cid,tps.storage2,os.time()+tps.exausted) return false end