Ir para conteúdo

Featured Replies

Postado
local config = {
	onlypremium = true, -- se precisa ser premium para não perder nada
	exp = true, -- se ao morrer o jogador irá perder exp
	skills = true, -- se ao morrer vai perder skills
	magic = true, -- se vai perder magic level
	loot = false, -- se ao morrer o jogador irá perder o loot
	level = 700000 -- até que level irá proteger o player
}

function onDeath(cid, corpse, deathList)
	if isPlayer(cid) and getPlayerLevel(cid) <= config.level then
		if config.onlypremium == true and isPremium(cid) then
			if config.loot == false then doCreatureSetDropLoot(cid, false) end
			if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end
			if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end
			if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end
		end
	end
	return true
end

adiciona em creaturescript, e registra em login

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

  • Respostas 11
  • Visualizações 703
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • tem que registrar o evento   registerCreatureEvent(cid, "ProtectLevel") <event type="death" name="ProtectLevel" event="script" value="levelprotection.lua"/>  

Postado
  • Autor
9 minutos atrás, Jobs disse:

local config = {
	onlypremium = true, -- se precisa ser premium para não perder nada
	exp = true, -- se ao morrer o jogador irá perder exp
	skills = true, -- se ao morrer vai perder skills
	magic = true, -- se vai perder magic level
	loot = false, -- se ao morrer o jogador irá perder o loot
	level = 700000 -- até que level irá proteger o player
}

function onDeath(cid, corpse, deathList)
	if isPlayer(cid) and getPlayerLevel(cid) <= config.level then
		if config.onlypremium == true and isPremium(cid) then
			if config.loot == false then doCreatureSetDropLoot(cid, false) end
			if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end
			if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end
			if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end
		end
	end
	return true
end

adiciona em creaturescript, e registra em login

 

em login eu boto oque mano?

38 minutos atrás, Jobs disse:

local config = {
	onlypremium = true, -- se precisa ser premium para não perder nada
	exp = true, -- se ao morrer o jogador irá perder exp
	skills = true, -- se ao morrer vai perder skills
	magic = true, -- se vai perder magic level
	loot = false, -- se ao morrer o jogador irá perder o loot
	level = 700000 -- até que level irá proteger o player
}

function onDeath(cid, corpse, deathList)
	if isPlayer(cid) and getPlayerLevel(cid) <= config.level then
		if config.onlypremium == true and isPremium(cid) then
			if config.loot == false then doCreatureSetDropLoot(cid, false) end
			if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end
			if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end
			if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end
		end
	end
	return true
end

adiciona em creaturescript, e registra em login

 

mano manda ai o codigo q e pra botar no login porfavor , botei 1 mais deu erro.

Postado
  • Autor
1 hora atrás, Jobs disse:

local config = {
	onlypremium = true, -- se precisa ser premium para não perder nada
	exp = true, -- se ao morrer o jogador irá perder exp
	skills = true, -- se ao morrer vai perder skills
	magic = true, -- se vai perder magic level
	loot = false, -- se ao morrer o jogador irá perder o loot
	level = 700000 -- até que level irá proteger o player
}

function onDeath(cid, corpse, deathList)
	if isPlayer(cid) and getPlayerLevel(cid) <= config.level then
		if config.onlypremium == true and isPremium(cid) then
			if config.loot == false then doCreatureSetDropLoot(cid, false) end
			if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end
			if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end
			if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end
		end
	end
	return true
end

adiciona em creaturescript, e registra em login

 

adicionei mais o char continuar perdendo ml é skill

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