Ir para conteúdo

Featured Replies

Postado

Olá

alguma alma me ajuda passar esses 2 script para 1.3 8.60

 

function onUse(cid, item, frompos, item2, topos)

if item.itemid == 1945 then

player1pos = {x=1069, y=55, z=15, stackpos=253} -- piso 1 que tem que ter player
player1 = getThingfromPos(player1pos)

player2pos = {x=1068, y=55, z=15, stackpos=253} -- piso 2 que tem que ter player
player2 = getThingfromPos(player2pos)

player3pos = {x=1067, y=55, z=15, stackpos=253} -- piso 2 que tem que ter player
player3 = getThingfromPos(player3pos)


if isPlayer(player1.uid) and isPlayer(player2.uid) and isPlayer(player3.uid) then

nplayer1pos = {x=932, y=186, z=15, stackpos=253} -- piso onde sera levado o player do piso 1
nplayer2pos = {x=943, y=186, z=15, stackpos=253} -- piso onde sera levado o player do piso 2
nplayer3pos = {x=954, y=186, z=15, stackpos=253} -- piso onde sera levado o player do piso 2

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

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

doSendMagicEffect(nplayer1pos,4)
doSendMagicEffect(nplayer2pos,4)
doSendMagicEffect(nplayer3pos,4)

doTransformItem(item.uid,1946)

else
doPlayerSendCancel(cid,"Você Precisa de uma team de 3 players.")
return TRUE
end

elseif item.itemid == 1946 then
doTransformItem(item.uid,1945)
end
return TRUE
end

 

 

-2 script

 

function onUse(cid, item, frompos, item2, topos)
	if item.uid == 60145 then
		if getPlayerStorageValue(cid,60145) == -1 then
			doPlayerSendTextMessage(cid,25,"mensagem!")
			doPlayerAddItem(cid,14332,1)
			setPlayerStorageValue(cid,60145,1)
		else
			doPlayerSendTextMessage(cid,25,"Voce já recebeu seu item.")
		end
		return true
	end
end

 

Resolvido por FlavioHulk

Ir para solução
Postado
  • Solução
local config = {
	playerPositions = {
		Position(1067, 55, 15),
		Position(1068, 55, 15),
		Position(1069, 55, 15)
	},
	newPositions = {
		Position(932, 186, 15),
		Position(943, 186, 15),
		Position(954, 186, 15)
	},
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
	if item.itemid == 1945 then
		local storePlayers, playerTile = {}

		for i = 1, #config.playerPositions do
			playerTile = Tile(config.playerPositions[i]):getTopCreature()
			if not playerTile or not playerTile:isPlayer() then
				player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need 4 players.")
				return true
			end

			storePlayers[#storePlayers + 1] = playerTile
		end

		local players
		for i = 1, #storePlayers do
			players = storePlayers[i]
			players:teleportTo(config.newPositions[i])
			config.newPositions[i]:sendMagicEffect(CONST_ME_BLOCKHIT)
		end
	end

	item:transform(item.itemid == 1946 and 1945 or 1946)
	return true
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
	if item.uid ~= 60145 then
		return false
	end

	if player:getStorageValue(60145) > 0 then
		player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Voce já recebeu seu item.')
		return true
	end

	player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'mensagem!')
	player:addItem(14332, 1)
	player:setStorageValue(60145, 1)
	return true
end

 

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