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

Player corpses doesnt appear D:

wafuboe

Active Member
Joined
Dec 24, 2010
Messages
884
Solutions
2
Reaction score
26
well i have this problem i think its cause a frag reward script i have

when a player its killed by a monster it doesnt appear a corpse here is something that it will maybe help..

[03/02/2011 23:45:33] [Error - CreatureScript Interface]
[03/02/2011 23:45:33] data/creaturescripts/scripts/reward.lua:onDeath
[03/02/2011 23:45:33] Description:
[03/02/2011 23:45:33] (internalGetPlayerInfo) Player not found when requesting player info #3

[03/02/2011 23:45:33] [Error - CreatureScript Interface]
[03/02/2011 23:45:33] data/creaturescripts/scripts/reward.lua:onDeath
[03/02/2011 23:45:34] Description:
[03/02/2011 23:45:34] data/creaturescripts/scripts/reward.lua:5: attempt to concatenate field 'killer_level' (a boolean value)
[03/02/2011 23:45:34] stack traceback:
[03/02/2011 23:45:34] data/creaturescripts/scripts/reward.lua:5: in function <data/creaturescripts/scripts/reward.lua:1>


heres the script

function onDeath(cid, corpse, deathList)
if isPlayer(cid) then
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)
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

this script would be perfect if someone fix it :D
thanks ^^
 
try this

LUA:
function onDeath(cid, corpse, deathList)
	if isPlayer(cid) and isPlayer(deathList[1]) then
		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)
		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