Jump to content
  • 0
Anny1906

Scripting Reward ao matar players

Question

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

 

 

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×