• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[LUA?] PvP Script

Breakdown

Be good, or be good at it
Joined
Feb 5, 2009
Messages
334
Reaction score
9
Hey everyone,

Requesting a script :

A - Killer
B - Person who died...


When a player A - Killer kills player B, and if player B is only 3 levels higher or lower than him he gains one single 2157.

But, if player B is 10 levels below him, he gains nothing. But if player B is 10 levels above him, he gains 2157 (three of them).


Please be descriptive in where to add the code, and i really hope it can be done.

//thanks.
 
Code:
function onKill(cid, target)
	local diferencia = (getPlayerLevel(cid) - getPlayerLevel(target))
	local diferencia2 = (getPlayerLevel(target) - getPlayerLevel(cid))
	local item = 2157
	if(diferencia or diferencia2) == 3 then
		doPlayerAddItem(target, item, 1)
	elseif(diferencia or diferencia2) == 10
		doPlayerAddItem(target, item, 3)
	end
	return TRUE
end
test
 
Back
Top