Heart pillow with special discritpion whos that heart and who was the killer. Please help with this script. I know everything withoud how to additem to corpse. Is good to add this script in playerdeath.lua ?
Where is this killer in the function onDeath?doPlayerAddItem(killer, config.addItem)
There is no Killer.function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
ordoPlayerAddItem(lastHitKiller, config.addItem)
doPlayerAddItem(mostDamageKiller, config.addItem)
function onKill(cid, target)
if(isPlayer(target) == TRUE) and isPlayer(cid) == TRUE then
doSetItemSpecialDescription(doPlayerAddItem(cid,1685,1), "This is the heart of "..getPlayerName(target).." ["..getPlayerLevel(target).."]. who was killed by ".. getPlayerName(cid) .." ["..getPlayerLevel(cid).."].")
end
return TRUE
end
-- script by Azi, fixed by Zonet
local config = {
addItem = 1685, -- heart id
itemDesc = {
"You received this when you killed",
-- Name
"when",
-- Sex
"was level"
-- Level
}
}
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if isPlayer(mostDamageKiller) == TRUE then
if getPlayerSex(cid) == 0 then
"she"
else
"he"
end
doPlayerAddItem(mostDamageKiller, config.addItem)
doSetItemSpecialDescription(1685, config.itemDesc[1].." "..getPlayerName(cid).." "..config.itemDesc[2].." "..sex.." "..config.itemDesc[3].." "..getPlayerLevel(cid)..".")
return TRUE
end
[21/05/2009 19:03:16] Lua Script Error: [CreatureScript Interface]
[21/05/2009 19:03:16] data/creaturescripts/scripts/2.lua:onDeath
[21/05/2009 19:03:16] luaDoSetItemSpecialDescription(). Item not found
-- script by Azi, fixed by Zonet, fixed again by Watkins577
local config = {
addItem = 1685, -- heart id
itemDesc = {
"You received this when you killed",
-- Name
"when",
-- Sex
"was level"
-- Level
}
}
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if isPlayer(mostDamageKiller) == TRUE then
if getPlayerSex(cid) == 0 then
"she"
else
"he"
end
heart = doPlayerAddItem(mostDamageKiller, config.addItem)
doSetItemSpecialDescription(heart, config.itemDesc[1].." "..getPlayerName(cid).." "..config.itemDesc[2].." "..sex.." "..config.itemDesc[3].." "..getPlayerLevel(cid)..".")
return TRUE
end
doSetItemSpecialDescription(heart,
if getPlayerSex(cid) == 0 then
"she"
else
"he" --i did something worng ;)
-- it must be
if getPlayerSex(cid) == 0 then
sex = "she"
else
sex = "he"
end
-- by zonet
local config = {
addItem = 1685,
itemDesc = "You received this when you killed "..getPlayerName(cid).." when "..sex.." was level "..getPlayerLevel(cid).."."
}
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if isPlayer(lastHitKiller) == TRUE then
if getPlayerSex(cid) == 0 then
sex = "she"
else
sex = "he"
end
itemAdd = doPlayerAddItem(lastHitKiller, config.addItem)
doSetItemSpecialDescription(itemAdd, config.itemDesc)
return TRUE
end
doPlayerAddItem(mostDamageKiller, config.addItem)
doSetItemSpecialDescription(config.addItem, config.itemDesc)
heart = doPlayerAddItem(mostDamageKiller, config.addItem)
doSetItemSpecialDescription(heart, config.itemDesc)
-- by zonet
local config = {
addItem = 1685,
itemDesc = "You received this when you killed "..getPlayerName(cid).." when "..sex.." was level "..getPlayerLevel(cid).."."
}
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if isPlayer(lastHitKiller) == TRUE then
if getPlayerSex(cid) == 0 then
sex = "she"
else
sex = "he"
end
itemAdd = doPlayerAddItem(lastHitKiller, config.addItem)
doSetItemSpecialDescription(itemAdd, config.itemDesc)
end
return TRUE
end
-- by zonet
local sex = ""
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if isPlayer(mostDamageKiller) == TRUE then
if getPlayerSex(cid) == 0 then
sex = "she"
else
sex = "he"
end
local config = {
addItem = 1685,
itemDesc = "You received this when you killed "..getPlayerName(cid).." when "..sex.." was level "..getPlayerLevel(cid).."."
}
heart = doPlayerAddItem(mostDamageKiller, config.addItem)
doSetItemSpecialDescription(heart, "configitemDesc")
end
return TRUE
end
@up
Check the last one i posted, works 100%
@up maybe your using the wrong distro? Or maybe your just retarded.
local config = {
addItem = 1685,
itemDesc = "You received this when you killed "..getPlayerName(cid).." when "..sex.." was level "..getPlayerLevel(cid).."." -- cid is nil
}