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

2 script request

kilirt

New Member
Joined
May 11, 2009
Messages
223
Reaction score
2
Hello,

I ask here for know if anyone can said me a script for:


- Red message (like talkaction: /bc) when a player get red skull and black skull ( "player" have get the red skull/black skull )

And an other script for:

- When a man kill an other player the player loot a heart ( id: 9543 ) and the description said: this is the heart of "player dead" he/she was killed by "name player pk"



Thank you
 
First:

LUA:
local skulls = {"Red", "Black"}
function onKill(cid, target)
	if(isPlayer(cid) and isPlayer(target)) then
		if(getPlayerFrags(cid) >= getConfigValue('dailyFragsToRedSkull')) then
			if(isInArray({SKULL_RED, SKULL_BLACK}, getCreatureSkullType(cid))) then
				doBroadcastMessage(getCreatureName(cid) .. " has a " .. skulls[getCreatureSkulltype(cid)] .. " skull.", MESSAGE_STATUS_WARNING)
			end
		end
	end
	
	return true
end

Second:

LUA:
local corpse_ids = {
	[0] = 3065,
	[1] = 3058
}

function onDeath(cid, corpse, deathList)
	local v = { killer_name = getCreatureName(deathList[1]), killer_level = getPlayerLevel(deathList[1]), target_name = getCreatureName(cid), target_level = getPlayerLevel(cid) }
	local reward = doAddContainerItem(corpse.uid, 5943, 1)
	if isPlayer(cid) then
		for i = 1, #deathList do
			if(isPlayer(deathList[i])) then
				doItemSetAttribute(reward, "description", "" .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed at level " .. v.target_level .. " by " .. v.killer_name .. " who was level " .. v.killer_level .. " at the time. " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "[Unjustified]" or "[Justified]"))
				local corpse, killers = doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), ""
				for i = 1, math.min(getConfigInfo('deathAssistCount') + 1, #deathList) do
					killers = killers .. (i == 1 and "" or ", ") .. (isMonster(deathList[i]) and "a " or "") .. getCreatureName(deathList[i])
				end
			end
			
			doItemSetAttribute(reward, "name", v.target_name .."'s Heart")
		end
	end
	
	return true
end

The heart will be in the corpse's body.
 
Back
Top