Postado Setembro 23, 2016 8 anos Autor Solução consegui arrumar o script, obrigado pela sua ajuda tuners, o script ficou assim para quem futuramente tiver interesse. local toPos = {x = 1375, y = 835, z = 7} --pos para onde o player será teleportado local createPos = {x = 1378, y = 837, z = 7} --pos aonde o teleporte será criado local tpID = 1387 --id do tp. local tempo = 30 -- segundos local function removeTP(pos, id, time) if time == 0 then local item = getTileItemById(pos, id).uid if item > 1 then doRemoveItem(item, 1) doSendAnimatedText(pos, "Closed!", 227) end else doSendAnimatedText(pos, time, 192) addEvent(removeTP, 1000, pos, id, time-1) end end function onUse(cid, item, frompos, item2, topos) local item = getTileItemById(createPos, tpID).uid if item > 1 then return doPlayerSendTextMessage(cid, 27, "o Teleporte ja está aberto!") end doCreateTeleport(tpID, toPos, createPos) removeTP(createPos, tpID, tempo) doPlayerSendTextMessage(cid, 27, "O teleporte foi aberto, ele fechará em 30 segundos!") doTransformItem(item2.uid, (item2.itemid == 1945 and 1946 or 1945)) return true end Editado Setembro 24, 2016 8 anos por gabrielbuff consegui arrumar o erro do script (veja o histórico de edições)
Postado Setembro 27, 2016 8 anos Em 23/09/2016 em 23:34, gabrielbuff disse: consegui arrumar o script, obrigado pela sua ajuda tuners, o script ficou assim para quem futuramente tiver interesse. local toPos = {x = 1375, y = 835, z = 7} --pos para onde o player será teleportado local createPos = {x = 1378, y = 837, z = 7} --pos aonde o teleporte será criado local tpID = 1387 --id do tp. local tempo = 30 -- segundos local function removeTP(pos, id, time) if time == 0 then local item = getTileItemById(pos, id).uid if item > 1 then doRemoveItem(item, 1) doSendAnimatedText(pos, "Closed!", 227) end else doSendAnimatedText(pos, time, 192) addEvent(removeTP, 1000, pos, id, time-1) end end function onUse(cid, item, frompos, item2, topos) local item = getTileItemById(createPos, tpID).uid if item > 1 then return doPlayerSendTextMessage(cid, 27, "o Teleporte ja está aberto!") end doCreateTeleport(tpID, toPos, createPos) removeTP(createPos, tpID, tempo) doPlayerSendTextMessage(cid, 27, "O teleporte foi aberto, ele fechará em 30 segundos!") doTransformItem(item2.uid, (item2.itemid == 1945 and 1946 or 1945)) return true end Show de bola!!! xD Está procurando um Global Mid exp para se divertir e dominar? http://www.deluxe-global.com
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.