Brad
Mapper
This is way cooler then some of the other ones ive seen like slightly like this. =D Ima use it!
[25/03/2010 04:18:18] [Error - CreatureScript Interface]
[25/03/2010 04:18:18] data/creaturescripts/scripts/reward.lua:onDeath
[25/03/2010 04:18:18] Description:
[25/03/2010 04:18:18] data/creaturescripts/scripts/reward.lua:5: attempt to concatenate field 'killer_level' (a boolean value)
[25/03/2010 04:18:18] stack traceback:
[25/03/2010 04:18:18] data/creaturescripts/scripts/reward.lua:5: in function <data/creaturescripts/scripts/reward.lua:1>
[25/03/2010 20:12:14] [Error - CreatureScript Interface]
[25/03/2010 20:12:14] data/creaturescripts/scripts/reward.lua:onDeath
[25/03/2010 20:12:14] Description:
[25/03/2010 20:12:14] (internalGetPlayerInfo) Player not found when requesting player info #3
20:12 You see the Morgaroth's heart.
It weighs 35.00 oz.
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]"))
elseif(isMonster(deathList[i])) then
return false
end
doItemSetAttribute(reward, "name", v.target_name .."'s Heart")
end
end
return true
end
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 = 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
21:30 You see the Ishari's Heart.
It weighs 35.00 oz.
He was killed at level 87 by Ichigo who was level 81 at the time. [Unjustified]
21:31 You see the Mistake's Heart.
It weighs 35.00 oz.