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

Need FragReward

cesar10

Active Member
Joined
Aug 4, 2009
Messages
428
Reaction score
37
Hello I Was Wondering Any Of You Have FragReward But Old Script Something Like, mmm When You Kill Player Get Trophy [In My Case get Medal Of Honour] That Says Something Like:
This Medal Was Given To [Name] For Killing [Name]
if Someone has or can make plis Post );
 
This is what Fallen released a while back, I'm pretty sure it still works.

Code:
function onDeath(cid, corpse, deathList)
	local corpse_ids = {
		[0] = 3065,
		[1] = 3058
	}
	local v = { killer_name = getCreatureName(deathList[1]), killer_level = getPlayerLevel(deathList[1]), target_name = getCreatureName(cid), target_level = getPlayerLevel(cid) }
	local reward = [COLOR="Red"]doAddContainerItem(corpse.uid, 5943, 1)[/COLOR]
	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
 
fixed version for 0.4:
function onDeath(cid, corpse, deathList)



local reward = doAddContainerItem(corpse.uid, 5943, 1)
if isPlayer(cid) then




if(isPlayer(deathList[1])) then
local v = { killer_name = getCreatureName(deathList[1]), killer_level = getPlayerLevel(deathList[1]), target_name = getCreatureName(cid), target_level = getPlayerLevel(cid) }

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]"))
doItemSetAttribute(reward, "name", v.target_name .."'s Heart")





end
return true
end
 
Back
Top