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

help onDeath change corpse

JorgeXxD

New Member
Joined
Jun 16, 2010
Messages
25
Reaction score
0
Code:
function onDeath(cid, corpse, deathList)
if getPlayerVocation(cid) == 2 then
doTransformItem(corpse.uid, 2826)
end
return TRUE
end

don't send error, but the corpe don't change :S

help?(rep++ of course)
 
I can't remember but have seen same problem few weeks ago, maybe try something like this:
Code:
function onDeath(cid, corpse, deathList)
	local tmpCorpse = getTileItemById(getCreaturePosition(cid), corpse.itemid)
	if(tmpCorpse > 0) then
		doTransformItem(tmpCorpse.uid, 2826)
	end
	return true
end
 
I can't remember but have seen same problem few weeks ago, maybe try something like this:
Code:
function onDeath(cid, corpse, deathList)
	local tmpCorpse = getTileItemById(getCreaturePosition(cid), corpse.itemid)
	if(tmpCorpse > 0) then
		doTransformItem(tmpCorpse.uid, 2826)
	end
	return true
end

don't work send this error:
Code:
[31/08/2010 14:01:47] [Error - CreatureScript Interface] 
[31/08/2010 14:01:47] data/creaturescripts/scripts/playerdeath.lua:onDeath
[31/08/2010 14:01:47] Description: 
[31/08/2010 14:01:47] data/creaturescripts/scripts/playerdeath.lua:3: attempt to compare number with table
[31/08/2010 14:01:47] stack traceback:
[31/08/2010 14:01:47] 	data/creaturescripts/scripts/playerdeath.lua:3: in function <data/creaturescripts/scripts/playerdeath.lua:1>
but thanks for try help xd

For a specific monster or what?
for each vocation, see the script: "getPlayerVocation"
 
??
Lua:
function onDeath(cid, corpse, deathList)
	local tmpCorpse = getTileItemById(getCreaturePosition(cid), corpse.itemid)
	if(tmpCorpse.uid > 0) then
		doTransformItem(tmpCorpse.uid, 2826)
	end
	return true
end
 
Code:
function onDeath(cid, corpse, deathList)
	local tmpCorpse = getTileItemById(getCreaturePosition(cid), corpse.itemid)
	if(tmpCorpse.uid > 0) then
		doTransformItem(tmpCorpse.uid, 2826)
	end
	return true
end
o.o?

I just thought it could be long script and you just pasted that piece into it, but no problems if it is just that kind of script :)
 
Back
Top