Postado Janeiro 16, 2016 9 anos Autor Em 16/01/2016 em 20:57, Xagah disse: AeaueiHaui aGORA VAI! HAHAH function onUse(cid, item, frompos, item2, topos) local wall1 = {x=88, y=188, z=7, stackpos=1} local wall2 = {x=88, y=189, z=7, stackpos=1} local getwall1 = getThingfromPos(wall1) local getwall2 = getThingfromPos(wall2) local tempo = 2 -- temop em minutos aqui function remove() local itemA = getThingFromPos(wall1) local itemB = getThingFromPos(wall2) doRemoveItem(itemA.uid, 1) doRemoveItem(itemB.uid, 1) return true end if item.uid == 60010 and (item.itemid == 9825 or item.itemid == 9826) then doCreateItem(13017,1,wall1) doCreateItem(13017,1,wall2) doPlayerSendTextMessage(cid,22,"Uma nova passagem foi aberta!") addEvent(remove,tempo*60*1000) if (item.itemid == 9825) then doTransformItem(item.uid,item.itemid+1) else doTransformItem(item.uid,item.itemid-1) end else doPlayerSendTextMessage(cid,22,"Não é possivel realizar esta ação.") end Erro dnv kkkkkkkk olha aii: 'end' expected (to close 'function' at line 1) near '<eof>'
Postado Janeiro 16, 2016 9 anos Oxe, eu copiei errado kkkkkkkkkkk faltou um end function onUse(cid, item, frompos, item2, topos) local wall1 = {x=88, y=188, z=7, stackpos=1} local wall2 = {x=88, y=189, z=7, stackpos=1} local getwall1 = getThingfromPos(wall1) local getwall2 = getThingfromPos(wall2) local tempo = 2 -- temop em minutos aqui function remove() local itemA = getThingFromPos(wall1) local itemB = getThingFromPos(wall2) doRemoveItem(itemA.uid, 1) doRemoveItem(itemB.uid, 1) return true end if item.uid == 60010 and (item.itemid == 9825 or item.itemid == 9826) then doCreateItem(13017,1,wall1) doCreateItem(13017,1,wall2) doPlayerSendTextMessage(cid,22,"Uma nova passagem foi aberta!") addEvent(remove,tempo*60*1000) if (item.itemid == 9825) then doTransformItem(item.uid,item.itemid+1) else doTransformItem(item.uid,item.itemid-1) end else doPlayerSendTextMessage(cid,22,"Não é possivel realizar esta ação.") end end The Last Man Standing - 100% funcional
Postado Janeiro 17, 2016 9 anos Autor Em 16/01/2016 em 21:03, Xagah disse: Oxe, eu copiei errado kkkkkkkkkkk faltou um end function onUse(cid, item, frompos, item2, topos) local wall1 = {x=88, y=188, z=7, stackpos=1} local wall2 = {x=88, y=189, z=7, stackpos=1} local getwall1 = getThingfromPos(wall1) local getwall2 = getThingfromPos(wall2) local tempo = 2 -- temop em minutos aqui function remove() local itemA = getThingFromPos(wall1) local itemB = getThingFromPos(wall2) doRemoveItem(itemA.uid, 1) doRemoveItem(itemB.uid, 1) return true end if item.uid == 60010 and (item.itemid == 9825 or item.itemid == 9826) then doCreateItem(13017,1,wall1) doCreateItem(13017,1,wall2) doPlayerSendTextMessage(cid,22,"Uma nova passagem foi aberta!") addEvent(remove,tempo*60*1000) if (item.itemid == 9825) then doTransformItem(item.uid,item.itemid+1) else doTransformItem(item.uid,item.itemid-1) end else doPlayerSendTextMessage(cid,22,"Não é possivel realizar esta ação.") end end @Xagah desculpe a demora de responder tiver que sair aconteceu algo urgente. Eu testeii man mais aconteceu que eu clikei mais de uma vez a alavanca e nao tinha um exausted. Eu queria que podesse puxar a alavanca novamente só depois de 2 ou 5 minutos. O resto tudo funcionou perfeitamente. Tem como adicionar esse exausted para eu da seus 5 reps logo ? Editado Janeiro 17, 2016 9 anos por Axion Nitron erro de digitaçao (veja o histórico de edições)
Postado Janeiro 17, 2016 9 anos Solução Tenta lá: function onUse(cid, item, frompos, item2, topos) local wall1 = {x=88, y=188, z=7, stackpos=1} local wall2 = {x=88, y=189, z=7, stackpos=1} local getwall1 = getThingfromPos(wall1) local getwall2 = getThingfromPos(wall2) local tempo = 2 -- temop em minutos aqui para as magic walls voltarem local storage = 45001 -- Escolha um GlobalStorage para armazenas o momento. Um número menor que 65000 local minutos = 2 -- Quantidade de minutos que a alavanca ficará indisponível time = os.time() function remove() local itemA = getThingFromPos(wall1) local itemB = getThingFromPos(wall2) doRemoveItem(itemA.uid, 1) doRemoveItem(itemB.uid, 1) return true end if item.uid == 60010 and (item.itemid == 9825 or item.itemid == 9826) then if (getGlobalStorageValue(storage)+(minutos*60) < time) then setGlobalStorageValue(storage, os.time()) doCreateItem(13017,1,wall1) doCreateItem(13017,1,wall2) doPlayerSendTextMessage(cid,22,"Uma nova passagem foi aberta!") addEvent(remove,tempo*60*1000) if (item.itemid == 9825) then doTransformItem(item.uid,item.itemid+1) else doTransformItem(item.uid,item.itemid-1) end else addEvent(doSendMagicEffect, 550, getPlayerPosition(cid), CONST_ME_POFF) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Esta alavanca poderá voltar a ser utilizada em "..getGlobalStorageValue(storage)+(minutos*60)..".") return false end doPlayerSendTextMessage(cid,22,"Não é possivel realizar esta ação.") end end The Last Man Standing - 100% funcional
Postado Janeiro 18, 2016 9 anos Autor Em 17/01/2016 em 11:20, Xagah disse: Tenta lá: function onUse(cid, item, frompos, item2, topos) local wall1 = {x=88, y=188, z=7, stackpos=1} local wall2 = {x=88, y=189, z=7, stackpos=1} local getwall1 = getThingfromPos(wall1) local getwall2 = getThingfromPos(wall2) local tempo = 2 -- temop em minutos aqui para as magic walls voltarem local storage = 45001 -- Escolha um GlobalStorage para armazenas o momento. Um número menor que 65000 local minutos = 2 -- Quantidade de minutos que a alavanca ficará indisponível time = os.time() function remove() local itemA = getThingFromPos(wall1) local itemB = getThingFromPos(wall2) doRemoveItem(itemA.uid, 1) doRemoveItem(itemB.uid, 1) return true end if item.uid == 60010 and (item.itemid == 9825 or item.itemid == 9826) then if (getGlobalStorageValue(storage)+(minutos*60) < time) then setGlobalStorageValue(storage, os.time()) doCreateItem(13017,1,wall1) doCreateItem(13017,1,wall2) doPlayerSendTextMessage(cid,22,"Uma nova passagem foi aberta!") addEvent(remove,tempo*60*1000) if (item.itemid == 9825) then doTransformItem(item.uid,item.itemid+1) else doTransformItem(item.uid,item.itemid-1) end else addEvent(doSendMagicEffect, 550, getPlayerPosition(cid), CONST_ME_POFF) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Esta alavanca poderá voltar a ser utilizada em "..getGlobalStorageValue(storage)+(minutos*60)..".") return false end doPlayerSendTextMessage(cid,22,"Não é possivel realizar esta ação.") end end Otiimooo man incrível parabéns. Só teve um problema em relação ao tempo kkk: Esta alavanca poderá voltar a ser utilizada em 1453117997. Mais fora isso tudo perfeito. Obrg. Reputado 5 REPS :D E Too seguindo para reputações futuras.
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.