Ir para conteúdo
  • 0
Anny1906

Scripting Reward ao matar players

Pergunta

Anny1906    0
Anny1906

Base: Otserv-Br

 

Qual é a sua pergunta?

alguém poderia me ajudar com um Revscriptsys, onde se ganha recompensa ao matar players? OBS: Revscriptsys

 

Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:

Spoiler

local config = {
--{exp, item, quantidade}
	{40000, 2152, 5}, -- menor
	{90000, 2152, 6}, -- mesmo
	{110000, 2152, 7}, -- maior
}

function onKill(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerLevel(target) < getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[1][2], config[1][3])
			doPlayerAddExp(cid, config[1][1])
			
		elseif getPlayerLevel(target) == getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[2][2], config[2][3])
			doPlayerAddExp(cid, config[2][1])
			
		elseif getPlayerLevel(target) > getPlayerLevel(cid) then
			doPlayerAddItem(cid, config[3][2], config[3][3])
			doPlayerAddExp(cid, config[3][1])
		end
	end
	return true
end

 

 

Compartilhar este post


Link para o post

0 respostass a esta questão

Recommended Posts

Até agora não há respostas para essa pergunta

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×