• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Request50%] Reward

pawlacz741

New Member
Joined
Jan 23, 2009
Messages
90
Reaction score
2
Hello i using [8.54-8.57] The Forgotten Server v0.2.7 (Mystic Spirit) and i need to remake my script to this server becouse actualy not working.
LUA:
-- Credits to LeozeraRox
function onDeath(cid, corpse, deathList)
local cidpos = getPlayerPosition(deathList[1])
loot = 2151
loots = 5944
item = doPlayerAddItem(deathList[1],loot,1)
item = doPlayerAddItem(deathList[1],loots,1)
if(isPlayer(deathList[1]) == TRUE) then
hitKillerName = getPlayerName(deathList[1])
doItemSetAttribute(item, "description", "hereputtext")
doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_ORANGE, "You Killed " .. getCreatureName(cid) .. ".")
doSendMagicEffect(cidpos,12)
else
hitKillerName = getCreatureName(deathList[1])
doSetItemSpecialDescription(item,"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by a "..hitKillerName..".")
end
doItemSetAttribute(item, "name", getCreatureName(cid).."'s Heart")
return TRUE
end

Please fast i need it rly...
 
Last edited by a moderator:
An error would help. Btw get TFS 0.3.6 and compile for these versions why you use that crap version?

I also think:
doItemSetAttribute()
doesn't exist.
 
Code:
function onDeath(cid, corpse, killer)
	if isPlayer(killer) == TRUE then
		doPlayerSendTextMessage(killer, MESSAGE_STATUS_CONSOLE_ORANGE, 'You killed ' .. getCreatureName(cid) .. '!')
		doSendMagicEffect(getThingPos(killer), CONST_ME_MAGIC_BLUE)
		doPlayerAddItem(killer, 2151, 1)
		doSetItemSpecialDescription(doPlayerAddItem(killer, 5944, 1), 'This is the heart of ' .. getCreatureName(cid) .. ' killed at level ' .. getPlayerLevel(cid) .. ' by ' .. getCreatureName(killer) .. '.')
	end
	return TRUE
end
 
Back
Top