Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
  • 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>'

 

  • Respostas 15
  • Visualizações 586
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Cara, agora entendi.   Põe assim:   Edited: kkkkkkkkkkkkkkk, ganhar donate é f**da hahahahah

  • Corrige aí:  

  • 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}

Postado

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

 

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Postado
  • 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 por Axion Nitron
erro de digitaçao (veja o histórico de edições)

Postado
  • 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

 

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Postado
  • 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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo