Ir para conteúdo

Featured Replies

Postado

Olá, eu estou tendo problema com um script que ao usar a alavanca da debug em geral que ta na tela da alavanca.

 

uso tfs 1.x

servidor do malucooo

 

o script é esse (script do xWhiteWolf)

 

Spoiler

local positions = {
	[1] = {pos = {x = 32944, y = 30807, z = 7}, id = 1721},
	[2] = {pos = {x = 32944, y = 30808, z = 7}, id = 1722},
	[3] = {pos = {x = 32943, y = 30807, z = 7}, id = 1116, toid = 1122},
	[4] = {pos = {x = 32943, y = 30808, z = 7}, id = 1116, toid = 1123},
}

local createpos = {
	[1] = {pos = {x = 32944, y = 30806, z = 7}, id = 1721},
	[2] = {pos = {x = 32944, y = 30809, z = 7}, id = 1722}
}

local tempo = 60

function onUse(cid, item, frompos, item2, topos)
	if getTileItemById(positions[1].pos, positions[1].id).uid < 100 then
		doPlayerSendCancel(cid, "Is already open.")
	return true
	end

	doCreatureSay(cid, "You have ".. tempo .." seconds.", 19)
	function criar_paredes()
		for i = 1, #positions do
			if i <= (#positions/2) then
				doCreateItem(positions[i].id, 1, positions[i].pos)
				local obst = getTileItemById(createpos[i].pos, createpos[i].id).uid
				doSendMagicEffect(createpos[i].pos, 2)
				doRemoveItem(obst, 1)			
			elseif i > (#positions/2) then
				local obst = getTileItemById(positions[i].pos, positions[i].toid).uid
				doTransformItem(obst, positions[i].id)
			end
		end
		return true
	end

	for i = 1, #positions do
		local obst = getTileItemById(positions[i].pos, positions[i].id).uid
		if i <= (#positions/2) and obst ~= 0 then
			doRemoveItem(obst, 1)
			doSendMagicEffect(positions[i].pos, 2)
			doCreateItem(createpos[i].id, 1, createpos[i].pos)
		elseif i > (#positions/2) and obst ~=0 then
			doTransformItem(obst, positions[i].toid)
		end
	end
	addEvent(criar_paredes, tempo*1000)
	return true
end

 

 

Alguém pode me ajuda com isso ?

  • Respostas 9
  • Visualizações 688
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @Koring4 doCreatureSay(cid, "You have ".. tempo .." seconds.", 19) Para doCreatureSay(cid, "You have ".. tempo .." seconds.", TALKTYPE_ORANGE_1)  

  • Ahhh, percebi agora que o seu era tfs 1.x, eu testei no tfs 0.4. Erro meu, desculpe aí! Já que funcionou assim, tá tranquilo, mas segue o código para tfs 1.x:    

Postado

Tira a função de dentro.

Spoiler

function onUse(cid, item, frompos, item2, topos)
	if getTileItemById(positions[1].pos, positions[1].id).uid < 100 then
		doPlayerSendCancel(cid, "Is already open.")
	return true
	end

	doCreatureSay(cid, "You have ".. tempo .." seconds.", 19)

	for i = 1, #positions do
		local obst = getTileItemById(positions[i].pos, positions[i].id).uid
		if i <= (#positions/2) and obst ~= 0 then
			doRemoveItem(obst, 1)
			doSendMagicEffect(positions[i].pos, 2)
			doCreateItem(createpos[i].id, 1, createpos[i].pos)
		elseif i > (#positions/2) and obst ~=0 then
			doTransformItem(obst, positions[i].toid)
		end
	end
	addEvent(criar_paredes, tempo*1000)
	return true
end

	function criar_paredes()
		for i = 1, #positions do
			if i <= (#positions/2) then
				doCreateItem(positions[i].id, 1, positions[i].pos)
				local obst = getTileItemById(createpos[i].pos, createpos[i].id).uid
				doSendMagicEffect(createpos[i].pos, 2)
				doRemoveItem(obst, 1)			
			elseif i > (#positions/2) then
				local obst = getTileItemById(positions[i].pos, positions[i].toid).uid
				doTransformItem(obst, positions[i].id)
			end
		end
		return true
	end

 

 

Contato:

 

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