Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
  • Autor
22 hours ago, MaTTch said:

Em creaturescripts:


function onCombat(cid, target)
	if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then
		return false
	end
	
	return true
end

 

 

O que eu coloco no arquivo creaturescripts.xml?

Eu tentei isso, mas não deu certo:

<event type="combat" name="areaspell" event="script" value="areaspell.lua"/>

 

Edit:

 

Eu consegui implantar esse sistema, mas quando alguém entra em pvp e está com o modo seguro, ele não ataca com magia de área (ele deveria atacar).

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

  • Respostas 13
  • Visualizações 918
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
Spoiler

local c = {
	skulls = {SKULL_NONE, SKULL_GREEN}, -- tipos de skull em que o modo seguro funcionara
	ignorePVPE = true, -- modo seguro funcionara mesmo em PVP-Enforced? (true / false)
	ignoreArena = false -- modo seguro funcionara mesmo em arenas? (true / false)
}

function onCombat(cid, target)
	if(c.ignorePVPE or getWorldType() ~= WORLDTYPE_HARDCORE) then
		if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then
			if(c.ignoreArena or not getTileInfo(getThingPos(target)).hardcore) then
				if(isInArray(getCreatureSkullType(cid), c.skulls)) then
					return false
				end
			end
		end
	end
	
	return true
end

 

 

Postado
  • Autor
4 hours ago, MaTTch said:
  Hide contents


local c = {
	skulls = {SKULL_NONE, SKULL_GREEN}, -- tipos de skull em que o modo seguro funcionara
	ignorePVPE = true, -- modo seguro funcionara mesmo em PVP-Enforced? (true / false)
	ignoreArena = false -- modo seguro funcionara mesmo em arenas? (true / false)
}

function onCombat(cid, target)
	if(c.ignorePVPE or getWorldType() ~= WORLDTYPE_HARDCORE) then
		if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then
			if(c.ignoreArena or not getTileInfo(getThingPos(target)).hardcore) then
				if(isInArray(getCreatureSkullType(cid), c.skulls)) then
					return false
				end
			end
		end
	end
	
	return true
end

 

 

 

Putz, um belíssimo script, mas agora voltou à estaca zero... Os jogadores atacam outros mesmo estando no modo seguro.

Postado
Spoiler

local c = {
	skulls = {SKULL_NONE, SKULL_GREEN}, -- tipos de skull em que o modo seguro funcionara
	ignorePVPE = true, -- modo seguro funcionara mesmo em PVP-Enforced? (true / false)
	ignoreArena = false -- modo seguro funcionara mesmo em arenas? (true / false)
}

function onCombat(cid, target)
	if(c.ignorePVPE or getWorldType() ~= WORLDTYPE_HARDCORE) then
		if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then
			if(c.ignoreArena or not getTileInfo(getThingPos(target)).hardcore) then
				if(isInArray(c.skulls, getCreatureSkullType(cid))) then
					return false
				end
			end
		end
	end
	
	return true
end

 

 

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

Postado
Em 26/08/2016 ás 13:03, MaTTch disse:

Em creaturescripts:


function onCombat(cid, target)
	if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then
		return false
	end
	
	return true
end

 

pode ajudar num script

 

O rei de seu proprio destino é aquele que luta pela gloria do amanhã!
Discord : ZoR#9373


 

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