Ir para conteúdo
  • 0

Tulio271

Pergunta

Olá XTibianos cara to cm esse escript de teleportes que vai estar abaixo aqui:

function onUse(cid, item, frompos, item2, topos)
	if item.uid == 7001 then
		if item.itemid == 1946 then

		player1pos = {x = 1187, y = 1173, z = 6, stackpos=253}
		player1 = getThingfromPos(player1pos)

		player2pos = {x = 1186, y = 1173, z = 6, stackpos=253}
		player2 = getThingfromPos(player2pos)

		player3pos = {x = 1185, y = 1173, z = 6, stackpos=253}
		player3 = getThingfromPos(player3pos)

		player4pos = {x = 1184, y = 1173, z = 6, stackpos=253}
		player4 = getThingfromPos(player4pos)

		player5pos = {x = 1183, y = 1173, z = 6, stackpos=253}
		player5 = getThingfromPos(player5pos)


			if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 and player5.itemid > 0 then

				player1level = getPlayerLevel(player1.uid)
				player2level = getPlayerLevel(player2.uid)
				player3level = getPlayerLevel(player3.uid)
				player4level = getPlayerLevel(player4.uid)
				player5level = getPlayerLevel(player5.uid)

				questlevel = 150

					if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then

						nplayer1pos = {x=1184, y=1157, z=7}
						nplayer2pos = {x=1183, y=1157, z=7}
						nplayer3pos = {x=1182, y=1157, z=7}
						nplayer4pos = {x=1181, y=1157, z=7}
						nplayer5pos = {x=1180, y=1157, z=7}

						doSendMagicEffect(player1pos,2)
						doSendMagicEffect(player2pos,2)
						doSendMagicEffect(player3pos,2)
						doSendMagicEffect(player4pos,2)
						doSendMagicEffect(player5pos,2)

						doTeleportThing(player1.uid,nplayer1pos)
						doTeleportThing(player2.uid,nplayer2pos)
						doTeleportThing(player3.uid,nplayer3pos)
						doTeleportThing(player4.uid,nplayer4pos)
						doTeleportThing(player5.uid,nplayer4pos)

						doSendMagicEffect(nplayer1pos,10)
						doSendMagicEffect(nplayer2pos,10)
						doSendMagicEffect(nplayer3pos,10)
						doSendMagicEffect(nplayer4pos,10)
						doSendMagicEffect(nplayer5pos,10)

						doTransformItem(item.uid,1945)

					else

						doPlayerSendCancel(cid,"todos precisao estar level 150+.")
					end

				else

					doPlayerSendCancel(cid,"voce precisa de mais players para entrar.")
			end
	elseif item.itemid == 1945 then
	doTransformItem(item.uid,1946)
	end
end
return 1
end 


oque ele faz? bom pega 5 players de level 150+ e leva pra o locar da queste.

 

oque eu quero que faça? que ele pegue 5 palyer e leva pra mesma queste so que no codigo acima so entra se tiver 5 player e eu quero que possa entrar com 5 cm 4 3 2 ou ate mesmo sozinho.

des de já agadeço vlw quem puder me ajudar nessa ae


galera podia bem ajudar viu

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Aqui está:

local pos = {
	[1] = {playerpos = {x = 1187, y = 1173, z = 6, stackpos=253}, nplayerpos = {x=1184, y=1157, z=7}},
	[2] = {playerpos = {x = 1186, y = 1173, z = 6, stackpos=253}, nplayerpos = {x=1183, y=1157, z=7}},
	[3] = {playerpos = {x = 1185, y = 1173, z = 6, stackpos=253}, nplayerpos = {x=1182, y=1157, z=7}},
	[4] = {playerpos = {x = 1184, y = 1173, z = 6, stackpos=253}, nplayerpos = {x=1181, y=1157, z=7}},
	[5] = {playerpos = {x = 1183, y = 1173, z = 6, stackpos=253}, nplayerpos = {x=1180, y=1157, z=7}}
}
local questLevel = 150
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 7001 then
		if item.itemid == 1946 then
			for _, pid in pairs(pos) do
				local player = getThingfromPos(pid.playerpos)
				if player.itemid > 0 then
					local level = getPlayerLevel(player.uid)
					if level >= questLevel then
						doSendMagicEffect(pid.playerpos,2)
						doTeleportThing(player.uid,pid.nplayerpos)
						doSendMagicEffect(pid.nplayerpos,10)
					else
						doPlayerSendCancel(player.uid,"Você precisa estar no level ".. questLevel .."+.")
					end
					doTransformItem(item.uid,1945)
				end
			end
		elseif item.itemid == 1945 then
			doTransformItem(item.uid,1946)
		end
	end
        return true
end
Editado por Lucas CP
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...