Ir para conteúdo

Featured Replies

  • Respostas 20
  • Visualizações 2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
local playerPosition =

{

	{x = 500, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 499, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 498, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 497, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}

}



local newPosition =

{

	{x=500, y=755, z=10},

	{x=499, y=755, z=10},

	{x=498, y=755, z=10},

	{x=497, y=755, z=10}

}



local demonPosition =

{

	{x=498, y=753, z=10},

	{x=500, y=753, z=10},

	{x=499, y=757, z=10},

	{x=497, y=757, z=10},

	{x=502, y=755, z=10},

	{x=501, y=755, z=10}

}



function onUse(cid, item, fromPosition, itemEx, toPosition)

	local player = {0, 0, 0, 0}

	local failed = TRUE

	local count = 0

	item.new = 1946



	if(item.itemid == 1945) then

		if(os.time(t) >= (getGlobalStorageValue(9000) + 3600)) then

			for i = 1, 4 do

				player[i] = getThingfromPos(playerPosition[i])

				if(player[i].itemid > 0) then

					if(isPlayer(player[i].uid) == TRUE) then

						if(getPlayerStorageValue(player[i].uid, 9000) <= 0) then

							if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then

								failed = FALSE

								count = count + 1

							end

						end

					end

				end



				if(failed == TRUE) then

					doTransformItem(item.uid, 1946)

					return TRUE

				end

			end



			if(count == 4) then

				for i = 1, 6 do

					doSummonCreature("Demon", demonPosition[i])

				end



				for i = 1, 4 do

					doSendMagicEffect(playerPosition[i], CONST_ME_POFF)

					doTeleportThing(player[i].uid, newPosition[i], FALSE)

					doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)

					setPlayerStorageValue(player[i].uid, 9000, 1)

				end



				setGlobalStorageValue(9000, os.time(t))

			end

		end

	else

		item.new = 1945

	end



	doTransformItem(item.uid, item.new)

	return TRUE

end

Coloca actionid 9000 na alavanca e configura as posições no script..

                                                                     Ajudei? De nada \o/                                            Att Rusherzin

Postado
  • Autor
local playerPosition =

{

	{x = 500, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 499, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 498, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 497, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}

}



local newPosition =

{

	{x=500, y=755, z=10},

	{x=499, y=755, z=10},

	{x=498, y=755, z=10},

	{x=497, y=755, z=10}

}



local demonPosition =

{

	{x=498, y=753, z=10},

	{x=500, y=753, z=10},

	{x=499, y=757, z=10},

	{x=497, y=757, z=10},

	{x=502, y=755, z=10},

	{x=501, y=755, z=10}

}



function onUse(cid, item, fromPosition, itemEx, toPosition)

	local player = {0, 0, 0, 0}

	local failed = TRUE

	local count = 0

	item.new = 1946



	if(item.itemid == 1945) then

		if(os.time(t) >= (getGlobalStorageValue(9000) + 3600)) then

			for i = 1, 4 do

				player[i] = getThingfromPos(playerPosition[i])

				if(player[i].itemid > 0) then

					if(isPlayer(player[i].uid) == TRUE) then

						if(getPlayerStorageValue(player[i].uid, 9000) <= 0) then

							if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then

								failed = FALSE

								count = count + 1

							end

						end

					end

				end



				if(failed == TRUE) then

					doTransformItem(item.uid, 1946)

					return TRUE

				end

			end



			if(count == 4) then

				for i = 1, 6 do

					doSummonCreature("Demon", demonPosition[i])

				end



				for i = 1, 4 do

					doSendMagicEffect(playerPosition[i], CONST_ME_POFF)

					doTeleportThing(player[i].uid, newPosition[i], FALSE)

					doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)

					setPlayerStorageValue(player[i].uid, 9000, 1)

				end



				setGlobalStorageValue(9000, os.time(t))

			end

		end

	else

		item.new = 1945

	end



	doTransformItem(item.uid, item.new)

	return TRUE

end

Coloca actionid 9000 na alavanca e configura as posições no script..

 

 

Funcionou, porém tentei fazer novamente e não foi... sabe me dizer quais são as restrições e verificações do script?

 

Não tem nenhuma mensagem ou aviso também... haveria possibilidade de adicioná-las?

Editado por ScythePhantom (veja o histórico de edições)

Postado

Ela só pode ser feita uma vez no dia, eu creio.. tenta assim:

local playerPosition =

{

	{x = 500, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 499, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 498, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE},

	{x = 497, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}

}



local newPosition =

{

	{x=500, y=755, z=10},

	{x=499, y=755, z=10},

	{x=498, y=755, z=10},

	{x=497, y=755, z=10}

}



local demonPosition =

{

	{x=498, y=753, z=10},

	{x=500, y=753, z=10},

	{x=499, y=757, z=10},

	{x=497, y=757, z=10},

	{x=502, y=755, z=10},

	{x=501, y=755, z=10}

}



function onUse(cid, item, fromPosition, itemEx, toPosition)

	local player = {0, 0, 0, 0}

	local failed = TRUE

	local count = 0

	item.new = 1946



	if(item.itemid == 1945) then

		if(os.time(t) >= (getGlobalStorageValue(9000) + 3600)) then

			for i = 1, 4 do

				player[i] = getThingfromPos(playerPosition[i])

				if(player[i].itemid > 0) then

					if(isPlayer(player[i].uid) == TRUE) then

						if(getPlayerStorageValue(player[i].uid, 9000) <= 0) then

							if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then

								failed = FALSE

								count = count + 1

							end

						end

					end

				end



				if(failed == TRUE) then

					doTransformItem(item.uid, 1946)

					return TRUE

				end

			end



			if(count == 4) then

				for i = 1, 6 do

					doSummonCreature("Demon", demonPosition[i])

				end



				for i = 1, 4 do

					doSendMagicEffect(playerPosition[i], CONST_ME_POFF)

					doTeleportThing(player[i].uid, newPosition[i], FALSE)

					doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)

					setPlayerStorageValue(player[i].uid, 9000, 1)

				end


			end

		end

	else

		item.new = 1945

	end



	doTransformItem(item.uid, item.new)

	return TRUE

end

Quais mensagens queres adicionar? E em qual situação?

Editado por Rusherzin (veja o histórico de edições)

                                                                     Ajudei? De nada \o/                                            Att Rusherzin

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.7k

Informação Importante

Confirmação de Termo