Ir para conteúdo

[SOLUCIONADO] [COH] TELEPORTE DE GUILD PERDEDORA DO CASTLE PARA TEMPLO.

Featured Replies

Postado
1 hora atrás, luanluciano93 disse:

local function negativa(uid, posicaoAnterior, texto, temple)
	if uid then
		doSendMagicEffect(getThingPos(uid), 2)
		doPlayerSendCancel(uid, texto)
		if temple then
			doTeleportThing(uid, getTownTemplePosition(getPlayerTown(uid)))
		else
			doTeleportThing(uid, posicaoAnterior, false)
		end
	end
end

function onStepIn(cid, item, pos, fromPosition)
	if not isPlayer(cid) then
		return true
	end

	if item.actionid == 16203 then -- TILE PARA PASSAR A GUILD DOMINADORA.
		if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then
			doSendAnimatedText(getThingPos(cid), "CoH", 14)
		else
			negativa(cid, fromPosition, "[CoH] Você não pertence á guild "..getGlobalStorageValue(COH_STATUS)..".", true)
		end
	
	elseif item.actionid == 16202 then -- TILE PARA QUEM TEM GUILD (QUE NÃO É A DOMINADORA) PARA VIRAR DOMINADORA.
		if getPlayerGuildId(cid) > 0 then
			if getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid) then
				doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!")
				setGlobalStorageValue(COH_PREPARE1, -1)
				setGlobalStorageValue(COH_PREPARE2, -1)
				setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid))
				doCastleRemoveEnemies()
				doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão no comando do castelo, vá dominar e impedir isso!")
			end
		else
			negativa(cid, fromPosition, "[CoH] Você não possui uma guild.", false)
		end
	
	elseif item.actionid == 16200 then
		if getPlayerGuildId(cid) > 0 then
			doSendAnimatedText(getThingPos(cid), "CoH",14)
			if getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid) and getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid) then
				setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid))
				doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está tentando dominar o castelo, preparem-se!")
			end
		else
			negativa(cid, fromPosition, "[CoH] Você não possui uma guild.", false)
		end   
	
	elseif item.actionid == 16201 then
		doSendAnimatedText(getThingPos(cid), "CoH", math.random(1, 255))
		if getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid) then
			setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid))
			doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está muito próxima do domínio, ataquem!")
		end
	end
	return true
end

 

 

ta traduzido algumas partes do script, e me diz uma coisa e pra jogar na mesma script do outro, ou criar uma nova?

  • Respostas 17
  • Visualizações 1.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • ERA UM PROBLEMA MUITO SIMPLES, NAO DA PARTE DO SCRIPT SIM DE MINHA PARTE DA IGNORANCIA E IMPACIENCIA , FOI MT SIMPLES AJEITAR A EXPULSÃO DOS PERDEDORES. PARA AQUELES QUE TAMBÉM TEM DIFICULDADE, É SÓ

  • leozincorsair
    leozincorsair

    ta traduzido algumas partes do script, e me diz uma coisa e pra jogar na mesma script do outro, ou criar uma nova?

  • luanluciano93
    luanluciano93

    @leozincorsair substitui pelo outro.

Posted Images

Postado
  • Autor
16 horas atrás, luanluciano93 disse:

local function negativa(uid, posicaoAnterior, texto, temple)
	if uid then
		doSendMagicEffect(getThingPos(uid), 2)
		doPlayerSendCancel(uid, texto)
		if temple then
			doTeleportThing(uid, getTownTemplePosition(getPlayerTown(uid)))
		else
			doTeleportThing(uid, posicaoAnterior, false)
		end
	end
end

function onStepIn(cid, item, pos, fromPosition)
	if not isPlayer(cid) then
		return true
	end

	if item.actionid == 16203 then -- TILE PARA PASSAR A GUILD DOMINADORA.
		if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then
			doSendAnimatedText(getThingPos(cid), "CoH", 14)
		else
			negativa(cid, fromPosition, "[CoH] Você não pertence á guild "..getGlobalStorageValue(COH_STATUS)..".", true)
		end
	
	elseif item.actionid == 16202 then -- TILE PARA QUEM TEM GUILD (QUE NÃO É A DOMINADORA) PARA VIRAR DOMINADORA.
		if getPlayerGuildId(cid) > 0 then
			if getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid) then
				doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!")
				setGlobalStorageValue(COH_PREPARE1, -1)
				setGlobalStorageValue(COH_PREPARE2, -1)
				setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid))
				doCastleRemoveEnemies()
				doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão no comando do castelo, vá dominar e impedir isso!")
			end
		else
			negativa(cid, fromPosition, "[CoH] Você não possui uma guild.", false)
		end
	
	elseif item.actionid == 16200 then
		if getPlayerGuildId(cid) > 0 then
			doSendAnimatedText(getThingPos(cid), "CoH",14)
			if getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid) and getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid) then
				setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid))
				doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está tentando dominar o castelo, preparem-se!")
			end
		else
			negativa(cid, fromPosition, "[CoH] Você não possui uma guild.", false)
		end   
	
	elseif item.actionid == 16201 then
		doSendAnimatedText(getThingPos(cid), "CoH", math.random(1, 255))
		if getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid) then
			setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid))
			doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está muito próxima do domínio, ataquem!")
		end
	end
	return true
end

 

 

 

@luanluciano93 TESTEI , MAIS AINDA NÃO FUNCIONOU ,A GUILD Q PERDEU O CASTELO CONTINUA LA DENTRO 

 

Postado

é quando acaba o castle e a guild que perdeu fique fora?

 

 

 

 

 

                                                                                                                                                     tumblr_nwmv2z4VEM1ujiquxo1_100.gif.2db64bb36f0f565e68ff2a90cb98f439.gif.59f4c4cf234d2f6906621cac0553a862.gif

https://github.com/italoxxx1

 

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo