• 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!

[CreatureEvents][Killing Players] A simple script

Erevius

It Was A Good Day
Joined
Feb 12, 2010
Messages
157
Reaction score
7
Location
Poland/Olsztyn
Hello. I need a simple creatureevent script:
If player with lvl30 and above kills other player with lvl29 or below then he gets a red skull for 14 days.
If player with lvl30 and above, with red skull, kills other player with lvl29 or below then he gets a black skull for 30 days.
If player with lvl30 and above kills other player with red skull or black skull, then he gets no frags...
It seems to be a simple to script, doesn't it? Well, I couldn't make it by myself ;<<<
 
Not sure if these functions exist but they might <_< Untested but opened with no errors.

LUA:
function onKill(cid, target, lastHit)
local _r = 1209600 -- 14 days
local _b = 2592000 -- 30 days

	if(isPlayer(cid) and isPlayer(target)) then
	if getPlayerLevel(cid) >= 30 and getPlayerLevel(target) <= 29 then
	doPlayerSetRedSkullTicks(cid, _r)
	doCreatureSetSkullType(cid, red)
	end
	elseif getPlayerLevel(cid) >= 30 and getCreatureSkullType(cid, red) == true and getPlayerLevel(target) <= 29 then
	doPlayerSetBlackSkullTicks(cid, _b) 
	doCreatureSetSkullType(cid, black)
	end
	return true
	end
 
Back
Top